Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Black Wolf on August 02, 2009, 05:44:45 am

Title: Bug Report - I know it should be on Mantis...
Post by: Black Wolf on August 02, 2009, 05:44:45 am
But I can't find my login and it doesn't seem to want to send me a new one. I think this is the second time I've lost it too, embarassingly enough... :nervous:

Anyway, the set-afterburner/shield/weapon-energy sexps don't seem to be compatible with conditionals like any-of. They work fine for just one ship though. I spoke to Kara about this via PM a few days back, but hadn't fully tested the bug, so I'm just "officially" reporting it now. I can provide a mission demonstrating this to anyone who plans to fix it, but it's a half finished TI mission, so I'd rather not just post it up generally.

Anyway, sorry that this isn't in Mantis, I signed up for a new login, so if that ever turns up I'll be able to go back to Mantis again.
Title: Re: Bug Report - I know it should be on Mantis...
Post by: FUBAR-BDHR on August 02, 2009, 01:22:31 pm
Does it happen with 3.6.11?  Can you post an example of the event?  You might want to give the new do-for-every-valid-argument (or whatever Kara named it) a try. 
Title: Re: Bug Report - I know it should be on Mantis...
Post by: karajorma on August 02, 2009, 01:53:31 pm
It shouldn't need that SEXP to work though.

I'll take a look into this one tonight.
Title: Re: Bug Report - I know it should be on Mantis...
Post by: FUBAR-BDHR on August 02, 2009, 01:56:21 pm
No it shouldn't that's why I asked to see an example of the event.  Could be something crazy like I would try messing it up. 
Title: Re: Bug Report - I know it should be on Mantis...
Post by: karajorma on August 03, 2009, 04:46:11 pm
Tested. Works perfectly well for me (at least the shield one does).
Title: Re: Bug Report - I know it should be on Mantis...
Post by: Black Wolf on August 05, 2009, 03:37:46 am
OK, I'm in a bit of a rush right now, but I will PM you the mission I'm using probably tonight. Hopefully will give you an idea what's up.
Title: Re: Bug Report - I know it should be on Mantis...
Post by: Black Wolf on October 03, 2009, 10:23:41 pm
Bumping this, still no working mantis.

It seems that it might not be the conditionals after all. I originally arrived at the assumption that it was the conditionals because when I removed the conditionals and changed my sexps to only firing for one ship, they worked. I also individually tested each of the sexps I was using to see if it was specifically, for example, the set-afterburner or set-shield sexp that was giving me grief. It wasn't, so I made what I thought was a logical assumption that the conditionals were at fault. Maybe not so.

This time I went through and made individual sexps for each ship with lots of variables to tell it when to fire. After a lot of laborious sexping to comp[letely eliminate the conditionals I went back and tested only to find the same god damned bug. (You can't read it, but I smashed every single one of those last keystrokes. I am really frustrated about the whole thing). So I'm left with the possibility of either the every-time sexp not playing nice or the game not liking firing multiple instances of the same sexp for different ships. Or something else weird that I've not even thought of.

I'll experiment with it a little and post the results.
Title: Re: Bug Report - I know it should be on Mantis...
Post by: Black Wolf on October 06, 2009, 04:21:56 am
I think I've isolated the issue (again). It works fine firing for multiple fighters, but breaks down if you have it trying to check for fighters that haven't arrived yet, rather than ignoring them and moving on - I suspect this might be related to distance triggers, but I'm not certain, and I think I can make the mission work anyhow.

So yeah, for future reference, always make sexps reliant on the relevant ships having arrived. It's cumbersome, but seems to prevent crashes. Perhaps this thread should have been in the FREDding forum, all things considered.

[EDIT]Argh. It also seems to dislike it when the ships involved are killed. This is very frustrating.
[EDIT2]Fixed by specifically telling each sexp to first check that a ship has arrived, then every-time check to ensure it's not been killed. Joyful. I'll also need to do this for every other fighter I put in the mission. But it works! No more freezing :D
Title: Re: Bug Report - I know it should be on Mantis...
Post by: karajorma on October 06, 2009, 06:28:31 am
Hmmmm. If those are crashing for ships that haven't arrived yet I'll look into and fix that pretty quickly.

EDIT: I'm sorry but I simply can't reproduce this crash using my own missions and the one you've given me it too long for a good test mission. Can you reproduce this error in a mission using only FS2 data?

Cause I've looked at the code and it definitely does check if the ship is present before doing anything.
Title: Re: Bug Report - I know it should be on Mantis...
Post by: Black Wolf on October 07, 2009, 01:19:04 pm
Yep, it looks like if it can't find a ship it's looking for for a distance trigger - say if you want something to trigger when there's less than 1000m between Alpha 1 and an enemy fighter - it defaults to true when that fighter isn't in mission, whether that's because it's not arrived yet or it's been destroyed.

The really annoying thing is that I think that I can fix this - but it's going to involve flipping every single variable check triggered by distance, so that my events fire when things are false, and the default value of true causes the opposite behaviour to what I have now. Good to know for the future, annoying now.
Title: Re: Bug Report - I know it should be on Mantis...
Post by: Black Wolf on October 07, 2009, 11:34:51 pm
/me has successfully brute forced FRED into doing what he wants.

I think.

Kara - All you ought to have to do to replicate it in the variant of the mission I sent you is press 1 as soon as the mission starts. Or do you mean too long as in too many sexps?
Title: Re: Bug Report - I know it should be on Mantis...
Post by: karajorma on October 08, 2009, 10:16:41 am
Ah, Okay, I'll give that a try tomorrow then.
Title: Re: Bug Report - I know it should be on Mantis...
Post by: FUBAR-BDHR on October 10, 2009, 05:53:18 pm
Think I just hit the multiplayer equivalent of this.  Mission checked for distance of ships from a station in a dogfight.  Crashed every time since the game self destructs the ships at mission start.
Title: Re: Bug Report - I know it should be on Mantis...
Post by: karajorma on October 10, 2009, 09:05:03 pm
Ah so it's the distance SEXPs at fault and not the set-afterburner/shield/weapon-energy sexps. That makes more sense. I'll look into that today after the meeting.