Author Topic: #Weak weapon variants and the "player allowed" flag  (Read 1808 times)

0 Members and 1 Guest are viewing this topic.

Offline Yarn

  • 210
#Weak weapon variants and the "player allowed" flag
I noticed that if a #Weak variant of a weapon does not have the "player allowed" flag, FSO automatically adds the flag to that weapon if the non-weak variant has that flag. Is this behavior correct? This doesn't happen in retail FS2, and I'm almost certain that it was introduced in revision 7345.

This bug/feature (whatever it is) causes Hornet#Weak#Shivan and Harpoon#Weak#Shivan to appear in the Team Loadout Editor in FRED as available player weapons, and they're selected by default. Those weapons are obviously not supposed to be player weapons (except in mods that configure them as such).
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline Echelon9

  • 210
Re: #Weak weapon variants and the "player allowed" flag
We noticed something similar during Diaspora development, with a patch floating around to amend (I think it is in trunk now).

Karajorma or Ace might be able to shed more light.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: #Weak weapon variants and the "player allowed" flag
r9229 & r9218 in trunk?

Quote
Author:    Goober5000
Date:    Fri Sep 28 06:26:14 2012 UTC (5 days, 20 hours ago)
Log Message:    

fix the techroom bug where #weak weapons appear because they were assigned the player-allowed flag during parsing

Quote
Author:    karajorma
Date:    Sun Sep 23 08:33:32 2012 UTC (10 days, 18 hours ago)
Log Message:    

Stop #weak weapons appearing in the tech room in multiplayer missions.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: #Weak weapon variants and the "player allowed" flag
Yeah, I'd been under the assumption that this was a retail bug so I fixed it then got told it wasn't which basically meant reverting my fix and letting Goober fix it the way it should have been fixed all along.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Yarn

  • 210
Re: #Weak weapon variants and the "player allowed" flag
OK then. Does this also prevent the #Weak#Shivan weapons from appearing in the Team Loadout Editor? (Just to be clear, I'm talking about the dialog box in FRED that allows the FREDder to select which ships and weapons are available to the player in that mission.)
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: #Weak weapon variants and the "player allowed" flag
It appears not. I'll leave this one to Goober for the moment.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: #Weak weapon variants and the "player allowed" flag
This fixes a problem with retail, seen most prominently in FSPort, where the game will complain if the player is assigned a #weak weapon that isn't player allowed.  Retail FS1 had the player-allowed flag on the Interceptor but not on the Interceptor#Weak.

Right now, the code just checks for the five characters #-w-e-a-k but doesn't check any characters after that.  The solution would be to check that the string ends after #weak.

On the other hand, the latest version of FSPort assigns player-allowed to Interceptor#weak, so maybe we should just remove the fix entirely.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: #Weak weapon variants and the "player allowed" flag
I think you should just do that. This seems to be a data error with non-retail data only. So it shouldn't be fixed in code.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]