Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: IPAndrews on February 10, 2006, 03:22:01 am

Title: >100 variables
Post by: IPAndrews on February 10, 2006, 03:22:01 am
Hi,

What bad things... if any... are likely to happen if I try to use >100 variables? Does anyone actually know from experience? Any SCP coder views on this?

Regards,
Ian
Title: Re: >100 variables
Post by: karajorma on February 10, 2006, 04:54:50 am
After looking at the code for BHX I knew it was only a matter of time till you asked this one :p

To be honest I think you're probably the first to ever need that many. I do know that PVs are limited to 100 but I don't know if that is for both kinds or 100 of each.
Title: Re: >100 variables
Post by: IPAndrews on February 10, 2006, 07:03:24 am
PVs? Actually I don't really need >100 variables for BHX. It would just make it easier to do certain things. Correct sun -> planet alignment with random backgrounds being one of them.
Title: Re: >100 variables
Post by: karajorma on February 10, 2006, 07:48:10 am
Persistent variables. I remember the old wiki mentioning something about the campaign file only taking 100.

This may be a completely seperate number from the number of other variables you are allowed.
Title: Re: >100 variables
Post by: CP5670 on February 10, 2006, 10:00:23 am
I am pretty sure the variable limit for missions is also 100. If you use the special hitpoints feature, it stores the values as variables starting from 99 and going down. This was probably done to avoid conflicts with the normal variables, so it would naturally start and the highest possible value.

I don't think I have ever used more than one or two mission variables at a time, but you can quickly get close to the campaign's 100 limit if you need ships' status to carry over without using adjacent red alert missions.
Title: Re: >100 variables
Post by: IPAndrews on February 15, 2006, 06:49:08 am
If anyone is interested, it won't let you add past 100 variables. It accepts the new variable but it doesn't actually appear.
Title: Re: >100 variables
Post by: WMCoolmon on February 15, 2006, 09:11:05 pm
Why are special hitpoints/explosions stored as SEXP variables?
Title: Re: >100 variables
Post by: CP5670 on February 15, 2006, 10:36:10 pm
No idea, ask Goober.
Title: Re: >100 variables
Post by: Goober5000 on February 15, 2006, 11:24:39 pm
No idea, ask :v:.
Title: Re: >100 variables
Post by: CP5670 on February 15, 2006, 11:29:11 pm
I thought you coded in that feature? :p (which by the way is extremely handy; I use it all the time)
Title: Re: >100 variables
Post by: Goober5000 on February 15, 2006, 11:34:38 pm
Ya, but I based it on the special explosion feature which was done by :v:. ;)
Title: Re: >100 variables
Post by: IPAndrews on February 16, 2006, 03:55:40 am
Why are special hitpoints/explosions stored as SEXP variables?

Hacky code?