Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Tobberoth on March 19, 2007, 08:28:08 am

Title: FSport advanced training problem
Post by: Tobberoth on March 19, 2007, 08:28:08 am
I just got to the Advanced training where you learn how to use shields and a new heat seeker. The problem is, when the mission starts, the trainer tells me my ship is fitted with the new missiles. It isn't. All I have is two normal lasers. Therefor, the mission is impossible to complete. (I could of course skip it, but since I stink at this game, it would be a shame to miss training.) Is this a known error or am I experiencing a bug?

(I would of course change the loadout myself if it weren't a training mission.)
Title: Re: FSport advanced training problem
Post by: Goober5000 on March 19, 2007, 08:37:53 am
It's a known SCP bug.  Just skip the training mission for now.
Title: Re: FSport advanced training problem
Post by: Tobberoth on March 19, 2007, 08:54:58 am
Thanks! (Where can i read about the known bugs? I didn't find information about this one anywhere...)
Title: Re: FSport advanced training problem
Post by: karajorma on March 19, 2007, 11:14:52 am
Skip the training. Load the next one, quit and go to the techroom the training mission will now be available to play (without showing you the other mission names if you used the cheat code to display all missions).
Title: Re: FSport advanced training problem
Post by: jr2 on March 19, 2007, 10:04:31 pm
Thanks! (Where can i read about the known bugs? I didn't find information about this one anywhere...)
Use the Mantis link in Gooby's sig.
Title: Re: FSport advanced training problem
Post by: ARSPR on March 20, 2007, 01:42:33 pm
Could any one explain what this bug makes, please? (Or if it is mantised, its error number)

I mean, with the little info of this thread it sounds pretty important, and I would like to know how and where it can appear.

Thanks.
Title: Re: FSport advanced training problem
Post by: taylor on March 20, 2007, 02:07:17 pm
It happens when you include a weapon in the weaponselect pool that isn't flagged "player allowed".  Technically you can't and shouldn't do that, and the code was fixed to prevent it (FRED doesn't allow you to do it, and won't show you when you have such weapons in the pool either).  The problem is that too many people make use of the bug, so the fix had/has to be reverted in order to continue letting those missions work.

The bug fix that caused this issue doesn't mess anything up if you actually have your tbls setup properly though, it's only for people who shortcut and don't do things properly.  Unfortunately we have to cater to those people, and allow this horrible :v: bug to remain, so as not to break missions.
Title: Re: FSport advanced training problem
Post by: ARSPR on March 20, 2007, 02:39:24 pm
It happens when you include a weapon in the weaponselect pool that isn't flagged "player allowed".  Technically you can't and shouldn't do that, and the code was fixed to prevent it (FRED doesn't allow you to do it, and won't show you when you have such weapons in the pool either).  The problem is that too many people make use of the bug, so the fix had/has to be reverted in order to continue letting those missions work.

The bug fix that caused this issue doesn't mess anything up if you actually have your tbls setup properly though, it's only for people who shortcut and don't do things properly.  Unfortunately we have to cater to those people, and allow this horrible :v: bug to remain, so as not to break missions.

Well, IMO, it seems that it shouldn't be re-enabled. I mean, if you are providing fixed FS1 and FS2 campaigns, (if needed), that's all you MUST do. Trash is trash in any way you look at it, if you cover it, it will continue smelling ...  ;)

Just keep it in mind, open and resolve a 'false' mantis bug explaining the issue and its 'symptoms', and when people make MODs in a wrong way and claim about them not working, point them to it. (I could update Wiki too if you decide to do this).

Or if you really want to keep backwards compatibility with this kind of retail bugs, (I don't know if there are more), I would enable a launcher flag with a name like -AllowCriticalRetailBugsBecauseTheModIsRubbish in "Troubleshoot" section. (Although maintaining such kind of flag and related code can be a PITA).

Edit -----
Funny  :lol:  :lol:. Because of good manners policy, the common word for excrement (it begins with s, it has 4 letters and ends in t) is changed to ****. I've changed it to trash. No offence meant in any way.  :yes:
Title: Re: FSport advanced training problem
Post by: taylor on March 20, 2007, 04:26:34 pm
My first reaction when being notified of the bug from the fix is to just change the code to allow #weak weapons to not be culled out by the fix and that prevents issues with both the retail FS1 and FS2 missions.  But as Goober pointed out, when he and I were talking about how to address this, some people are making use of Shivan weapons which also aren't "player allowed".  I hate having it broken like it has always been, but this is the type of thing that I quickly bow to from people who no more about how this stuff is actually used by mod/mission makers.

But, if you or anyone else wants to voice your opinion on it then go right ahead, Goober may agree to just go with the #weak route to fix the FS1 and FS2 missions, and then everyone else will just have to fix their tbls/missions if they have other such instances of doing-the-wrong-thing.  My opinion should be obivous (as evident by the code comment for removed fix "disable this bug fix for now, too many idiots taking advantage of it"), but I'm going to go with whatever Goober wants to do here.


There isn't a Mantis bug on this exact issue, just the one that ended up causing (you responded to that bug btw, #1196).  That bug was about a weapon that, when you clicked on it in the weapon loadout screen, would crash.  The problem was that the weapon wasn't "player allowed" and didn't have all of the required tbl information to work in the loadout interface.  But, since FRED doesn't show such weapons, it wasn't obvious what the problem was since you couldn't do anything about it.  Only after noticing what the weapon actually was and figuring out that FRED wasn't showing everything in the weapon pool, did I realize what the problem was.  Hence the fix that was made, to force everything in the "$Weaponry Pool:" list to actually require the "player allowed" flag.  FRED was also changed to detect this problem, notify you of it, and then automatically fix it so that when the mission was re-saved the problem weapons were removed from the pool.  Currently, the only thing that actually cares about "player allowed" is FRED itself, then normal game doesn't really care about it.
Title: Re: FSport advanced training problem
Post by: taylor on March 20, 2007, 04:54:51 pm
Ok, after an e-mail from Goober, we might be leaving the original fix in and just going with the #weak hack to fix the problem FSPort and FS2 missions.  Everyone else that happens to take advantage of this bug will just have to fix their data. :)
Title: Re: FSport advanced training problem
Post by: ARSPR on March 20, 2007, 05:03:59 pm
Ok, I've updated wiki, adding a big warning in the player allowed flag. As always, please check it (http://www.hard-light.net/wiki/index.php/Weapons.tbl#.22Player_allowed.22), (English quality and concepts quality too  ;) )
Title: Re: FSport advanced training problem
Post by: jr2 on March 21, 2007, 02:55:03 am
Isn't there a way to release a script to modify missions, to the effect that they correctly implement player allowed weapons?  Or something... duct tape is only good for so long.  :D
Title: Re: FSport advanced training problem
Post by: WMCoolmon on March 22, 2007, 03:13:36 am
It happens when you include a weapon in the weaponselect pool that isn't flagged "player allowed".  Technically you can't and shouldn't do that...

I don't see why not. I believe the weapons selection screen should show text, instead, if no image is defined for the loadout, and I think that most of the rest of the stuff is the same for player-usable and enemy-usable weapons.

Are there some other effects to the "player allowed" flag that necessitate it being excluded from the loadout? It seems like it would be a much better solution to allow it than to, say, force people to make table changes which would break multiplayer validation, even if they wanted to let the player use a weapon that was already in the table. (Since they would be designing the mission anyway, it's not like there's anything to stop them from completely unbalancing it as they please.)
Title: Re: FSport advanced training problem
Post by: taylor on March 22, 2007, 09:45:15 am
Are there some other effects to the "player allowed" flag that necessitate it being excluded from the loadout?
Because FRED excludes them.  There is no reason for the normal game to not honor that as well.  Having the flag is just a basic indication that the weapon in question is setup properly for use on the interface, so really the modders need to simply get it right in the first place.  We either have the use the flag like it's supposed to be used, or just remove it totally, because it serves no other purpose than to say what is available on the interface.