Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: EdrickV on May 13, 2002, 02:13:19 pm
-
With the source code available I did something I've always wanted to do: Find out exactly what Special-Check does and what all it's "magic numbers" are. Here's what I found out.
Special check magic numbers:
0 True if "Freighter 1" is aspect locked
1 True if "Interceptor#weak" missiles are fired at "Freighter 1"
2 True if the "Weapons" subsystem of "Freighter 1" is aspect locked
3 Damages the front shields of the player's ship
4 Really damages the front shields of the player's ship
5 Repairs the player ship's front shields
6 Reduces 3 shield quadrants to 0
7 True if front shields are maxed/near max
8 True if rear shields are maxed/near max
9 Sets right and left shields to 0
10 True if player is under 8 total secondary weapons
11 True if player has more then 8 total secondary weapons
12 True if player is under 4 total secondary weapons
13 Sets front shields to 0
14-99 unused
100 True if player's out of countermeasures
2000 Player fired on the instructor's ship, end the mission now!
-
and all this time we had hoped that special check did all kinds of really useful things :)
-
hhhhmmmmmm :sigh:
Good job though. :yes:
-
Can someone remind me what that is.........:doh:
-
We could add features to special-check (there are unused numbers) but remember it's used as the true/false condition for a when statement so using it to do an action can be a little weird. :)
Addendum: Only two missions in the FS2 campaign even use the special-check SEXP.
-
Originally posted by EdrickV
With the source code available I did something I've always wanted to do: Find out exactly what Special-Check does and what all it's "magic numbers" are.
Ahem...
To: [email protected]
Subject: FDL: Re: special-check
From: Mike Kulas
Date: Mon, 19 Oct 1998 21:51:34 -0500
Reply-To: [email protected]
Sender: [email protected]
Someone asked for what the various "special-check" values mean. Here they
are. I doubt they're too useful outside of training mission #4. The ugliest hack I coded for FreeSpace, outside of an AI hack in the last mission.
case 0: // Ship "Freighter 1" is aspect locked by player.
case 1: // Fired Interceptors
case 2: // Ship "Freighter 1", subsystem "Weapons" aspect locked by player
case 3: // Player ship suffering shield damage on front.
case 4: // Player ship suffering much damage.
case 5: // Player's shield is quick repaired
case 6: // 3 of player's shield quadrants are reduced to 0.
case 7: // Make sure front quadrant has been maximized, or close to it.
case 8: // Make sure rear quadrant has been maximized, or close to it.
case 9: // Zero left and right quadrants before maximizing rear quadrant.
case 10: // Return true if player is low on Interceptors.
case 11: // Return true if player has plenty of Interceptors.
case 12: // Return true if player is low on Interceptors.
case 100: // Return true if player is out of countermeasures.
-
That list is missing one. And back in 98 I'd never even heard of FDL. :) Only found out about FDL this month and have not looked through their archives, and don't really intend to look through several years worth of messages. Probably would have taken longer to find that post then it did to find the entries in the source code. I had looked through the VBB a long long time ago and looked through HLP more recently.
-
But the point is that the special-check operators have been known for over three years now. Just asking would have gotten you them. ;)
-
I think I asked a long long time ago on VBB and never got a response. But even if I'd gotten a link to that list I'd have double checked it anyways to see if there were any that weren't mentioned or forgotten. (Like magic number 2000 which wasn't on the above list, probably because it's evaluated seperately.) The main reason I was looking through that code anyways was to try and figure out how 2000 automatically warps the player out so I could try to fix end-mission. (Which I'd read it did in a post somewhere.) Think I'll have to dig up the regular warpout code and try and use that though. And in any event, special-check is now fully documented here.
Edit: And, incidently, my post explains some of the numbers functions a bit better. For instance the one about "low on interceptors" doesn't check specifically for interceptors. Those are just the comments which were targeted specifically for the mission and didn't always describe exactly what the code looked for/did.