Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Spoon on February 04, 2011, 07:11:00 pm

Title: $Substitute, $Thruster Glow not showing
Post by: Spoon on February 04, 2011, 07:11:00 pm
Busy testing all the possibilities of $Substitute
Came across one minor visual effect issue when using substitute on a secondary with an other secondary. Namely that the $Thruster Glow of the second weapon does not show up (pspew and the likes does)
(http://img69.imageshack.us/img69/8827/evidencet.png)
Title: Re: $Substitute, $Thruster Glow not showing
Post by: Iss Mneur on February 04, 2011, 11:10:51 pm
That is strange.  As far as the engine is concerned the substituted weapon is no different than the weapon that caused the substitution and as far as I can tell it goes through the same creation process as the native weapon.

So I guess the first question is, does the weapon that is being substituted have a working $Thruster Glow Effect: when it is not being used as a normal weapon?  What happens when you swap the weapons?
Title: Re: $Substitute, $Thruster Glow not showing
Post by: Spoon on February 05, 2011, 08:03:51 am
After doing some more testing, I've confirmed where the problem is
The weapon needs to be allowed in the team loadout in fred. If its not, the thrusters just won't show up.

This is not really ideal, since in general you'd don't want the subtituted weapon to be visible to the player in weapon loadout menu
Title: Re: $Substitute, $Thruster Glow not showing
Post by: Iss Mneur on February 05, 2011, 12:35:53 pm
After doing some more testing, I've confirmed where the problem is
The weapon needs to be allowed in the team loadout in fred. If its not, the thrusters just won't show up.

This is not really ideal, since in general you'd don't want the subtituted weapon to be visible to the player in weapon loadout menu

Hmm, well that makes sense, the engine is not loading something that "can't be used".  It would probably also work if you equip the substituted weapon to an AI ship that is not involved in the fight at all.

However, I will take a look because this feature should just work and not require any weird work arounds.

EDIT: I may have found the issue. Please try the following build.  If the problem remains, please run the build with the attached debug_filter.cfg.txt (save it as debug_filter.cfg into your root data folder (same place you find the log)) and post the resulting log after you run a mission with where the problem appears.

[attachment deleted by ninja]
Title: Re: $Substitute, $Thruster Glow not showing
Post by: Spoon on February 05, 2011, 04:15:00 pm
I can't play the mission with this build, it just flat out returns to desktop after loading is done, no error given.
http://pastebin.com/zVFfruqr don't think the log will tell much here
Title: Re: $Substitute, $Thruster Glow not showing
Post by: Iss Mneur on February 05, 2011, 05:05:07 pm
I can't play the mission with this build, it just flat out returns to desktop after loading is done, no error given.
Do trunk nightly debug builds run it?  Because the change I made shouldn't be able to cause a crash.

http://pastebin.com/zVFfruqr don't think the log will tell much here
It tells a lot.  It says that it was loading a ship called 'Seraphim 2' just before it died.  So check it and make sure that there is nothing funky in its declaration and try removing it to see what happens.
Title: Re: $Substitute, $Thruster Glow not showing
Post by: Spoon on February 05, 2011, 05:08:29 pm
6995 debug runs just fine
Title: Re: $Substitute, $Thruster Glow not showing
Post by: Iss Mneur on February 06, 2011, 04:04:03 pm
Hmm, it seems I goofed.  I had another patch applied when I built the previous build... Apparently it is not ready for trunk :D.

I have attached a new build that just has the fixed code.  This is based on 7004.

[attachment deleted by ninja]
Title: Re: $Substitute, $Thruster Glow not showing
Post by: Spoon on February 06, 2011, 08:10:12 pm
Same deal with this build, instant return to desktop half way done loading, no error given.
Title: Re: $Substitute, $Thruster Glow not showing
Post by: Iss Mneur on February 06, 2011, 10:21:17 pm
Same deal with this build, instant return to desktop half way done loading, no error given.
And removing the ship that is crashes on?
Title: Re: $Substitute, $Thruster Glow not showing
Post by: Spoon on February 07, 2011, 06:33:30 am
works on a completely empty mission, and the thrusters seem to be working a-okay with this build  :nod: