Hard Light Productions Forums

Hosted Projects - Standalone => The Babylon Project => Public Development => Topic started by: Hades on July 09, 2009, 04:30:28 pm

Title: Multiplayer White Star beam bug
Post by: Hades on July 09, 2009, 04:30:28 pm
Today, I have found the fix (sort of) to the White Star's beam bug. What happens is, the normal version is used instead of the #player version of the weapon, and this causes the game to crash in Multiplayer. The normal version of the beam is used as default, which had to be changed to the "#player" to fix this. But there's a catch: The beam doesn't register any kills when used to kill a craft, though, this is to be expected from a beam weapon.

Link provided by The_E (who implemented the fix into the ship.tbl since I don't have access to the TBP tbl files) : Here (http://www.mediafire.com/download.php?4umtydm2tdy)
Title: Re: Multiplayer White Star beam bug
Post by: FUBAR-BDHR on July 09, 2009, 04:47:28 pm
What do you know I never realized there was a player version.  Haven't looked at his changes yet but this presents a problem.  The only real way to fix it is to take the player allowed flag off the standard one but then that would break any single player mission where it may have been set up that way and actually works.  The only other possibility I see is to leave it up to the FREDder to pick the right one.  I'll check his solution out later and see if there is something I didn't think of in there.
Title: Re: Multiplayer White Star beam bug
Post by: karajorma on July 11, 2009, 02:23:03 pm
Bear in mind that there is an ai_profile flag that fixes the lack of scoring issue.
Title: Re: Multiplayer White Star beam bug
Post by: FUBAR-BDHR on July 11, 2009, 02:32:53 pm
Yes and I added a second ai_profile with that enabled.  So if you want beam damage to count you just need to change the ai_profile for the mission to the new one or wait for 3.6.11. 
Title: Re: Multiplayer White Star beam bug
Post by: FUBAR-BDHR on July 11, 2009, 05:04:45 pm
Just looking at the changes.  Pretty much what I feared.  If you make that change to the WhiteStar in ships.tbl then every mission ever made with a WhiteStar will default to the player beam.  

I think what we need to look at is the WhiteStar as a player ship overall.  Right now I'm thinking it might be worth sacrificing a ship slot for a WhiteStar#Fighter set as a fighter class instead of gunship and removing the player flag from the regular one.  If we go that far then we might as well fix the three primary bank problem as well (at least until that can be fixed in the code).  The question is how to do that.  

Only other solution I can think of is double checking every mission for player flyable WhiteStars and making sure none have the standard beam.  If there aren't any then just remove the player allowed flag from the standard beam so it will force the #player version in the loadout.  Now this has drawbacks as well since I think there is a bug in the loadout code that will leave the primary bank blank if the default primary isn't available making you pick it.

E do you have a summary of the changes you made to the weapons and ships tables?  Was it just the WhiteStar and its' beam that were changed?  FYI any other changes like this would be a lot easier to figure out using a .tbm and the +nocreate option and could be directly integrated into the existing Zathras-wep.tbm.  
Title: Re: Multiplayer White Star beam bug
Post by: Trivial Psychic on July 14, 2009, 08:53:39 am
If you're referring to the #player version of the Whitestar beam, I made it some time back because I didn't want the player to be limited by the default fire time for the main gun.  Using a standard beam means that when you click that trigger, the beam will fire for its listed duration regardless of whether it only takes a fraction of a second to take out the target.  I wanted the player to have the option of firing in only short bursts, or in sustained beam.  I did that by virtually eliminating warmup and warmdown times, and giving the beam a very short duration.  I'm not sure if I quite got the energy consumption balanced between the two versions though.  I retained a standard beam for the AI, because I wasn't sure if the AI would handle the rapid-fire version well at that time.
Title: Re: Multiplayer White Star beam bug
Post by: Vidmaster on July 14, 2009, 11:34:05 am
which actually sounds very smart to me Trivial  :yes:
Title: Re: Multiplayer White Star beam bug
Post by: FUBAR-BDHR on July 14, 2009, 12:32:08 pm
So if we don't break any existing mission we can just remove the "player allowed" flag from the standard version of the beam since it seems like that was the way it was supposed to be. 
Title: Re: Multiplayer White Star beam bug
Post by: Vidmaster on July 14, 2009, 03:04:58 pm
is there definitly no Whitestar anywhere? What's with B5's StarFury missions?
And what happens if you pick one during RaiderWars bonus play?
Title: Re: Multiplayer White Star beam bug
Post by: FUBAR-BDHR on July 14, 2009, 06:40:37 pm
Vid I think your misinterpreting the solution.   

Whitestar will remain player allowed and flyable.  Right now both the WS beam and the WS beam$player version are player allowed.  The standard version should not be player allowed so just removing that flag should go a long way to resolving the issue.  The only thing it would break is any mission where the WhiteStar is the player ship and wasn't given the #player version of the beam.  That we will have to check for. 
Title: Re: Multiplayer White Star beam bug
Post by: Trivial Psychic on July 14, 2009, 08:26:46 pm
Unfortunately, that may mean that you won't be able to equip the non-player beam to any wingmen.

I was originally hoping that the Source Code team would allow a -1 option for beam duration, which would enable a variable duration beam.  That way we could retain the warmup and cooldown time and sounds, and avoid the somewhat off-sound for the multi-shot beam.  Beam fire would continue for as long as either the player has the fire button depressed, or until the weapon energy runs out.  Speaking of weapon energy, there would need to be a change in weapon energy usage for such a weapon so instead of a per-shot basis, it would be on a per-second basis or something.
Title: Re: Multiplayer White Star beam bug
Post by: FUBAR-BDHR on July 14, 2009, 11:02:10 pm
Never thought of that one.  I don't think there is any way to specify player ships to be allowed one weapon and player AI to get a different one link you could in single. 

The best overall solution would be to come up with a beam that works for both and change both to the same setting.  This may require a code change so it won't be in 3.6.10.   Still no matter what the beam it shouldn't crash the game so that is the first thing that needs tackled by the coders. 
Title: Re: Multiplayer White Star beam bug
Post by: Vidmaster on July 15, 2009, 04:18:30 am
The only thing it would break is any mission where the WhiteStar is the player ship and wasn't given the #player version of the beam.  That we will have to check for. 

No, it's pretty clear actually. And I checked Raider Wars, it seems that campaign just allows for any weapon of your choice, so it should work.
Title: Re: Multiplayer White Star beam bug
Post by: FUBAR-BDHR on July 17, 2009, 11:46:05 pm
OK for now I just went with the removing the standard one from Ultimate Gauntlet.  An actual fix will probably need to wait for the next version.  Just don't have the time right now to do the proper testing.   
Title: Re: Multiplayer White Star beam bug
Post by: CaptJosh on July 18, 2009, 11:28:28 pm
Um, minor detail. I remember the White Star beams already being pretty rapid cycle. Only time I can recall seeing them fire for longer than about a second was a scene with four of them pounding a shadow ship. But anything like that could be done with a beam fire sexp, and the player wouldn't be in on it, I would think.
Title: Re: Multiplayer White Star beam bug
Post by: Trivial Psychic on July 20, 2009, 12:35:57 am
Um, minor detail. I remember the White Star beams already being pretty rapid cycle. Only time I can recall seeing them fire for longer than about a second was a scene with four of them pounding a shadow ship. But anything like that could be done with a beam fire sexp, and the player wouldn't be in on it, I would think.
I don't think that fire-beam can be used for a non-turret-mounted weapon.  It's a shame that we didn't retain a turret subsystem on ships like the Whitestar and Drakh Raider, as it would allow not only fire-beam, but to fire from a non-straight-ahead vector.  We would have had to make the turret submodel non-targettable and unarmed by default, only activating it as needed by sexps.
Title: Re: Multiplayer White Star beam bug
Post by: CaptJosh on July 20, 2009, 01:54:13 am
Obviously I don't know enough about sexps. Could someone who knows about them comment more? Also, might it be possible to turn the forward beam cannon into a turret that has a field of view directly in front? Then again, I don't know that a turret can be fired by a player. Is there any code for that?
Title: Re: Multiplayer White Star beam bug
Post by: FUBAR-BDHR on July 20, 2009, 01:09:05 pm
Um, minor detail. I remember the White Star beams already being pretty rapid cycle. Only time I can recall seeing them fire for longer than about a second was a scene with four of them pounding a shadow ship. But anything like that could be done with a beam fire sexp, and the player wouldn't be in on it, I would think.
I don't think that fire-beam can be used for a non-turret-mounted weapon.  It's a shame that we didn't retain a turret subsystem on ships like the Whitestar and Drakh Raider, as it would allow not only fire-beam, but to fire from a non-straight-ahead vector.  We would have had to make the turret submodel non-targettable and unarmed by default, only activating it as needed by sexps.

Zathras contains a Raider with a turret.  It's set to <none> by default for backward compatibility.  The model still contained it and it caused errors since it was a subsystem without a table entry so I needed to fix it somehow.  I don't see a reason the WhiteStar couldn't have something similar.  Have to look into it down the road.