Author Topic: Too many variables in the campaign...  (Read 2448 times)

0 Members and 1 Guest are viewing this topic.

Too many variables in the campaign...
Hello. I've got a problem with variables in my campaign. In one mission a message appeared that I have too many player-persistent variables (can't be more than 100). But I must have more than 100 because I have 40 missions, most of which use checkpoint system and store data of ships that appear in multiple missions, so variables are essential. How can I remove variables from previous missions after I use them or, alternatively, how can I have more than 100 variables in the campaign?

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Too many variables in the campaign...
Good gravy.. what kind of data are you saving for each checkpoint?
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Too many variables in the campaign...
Can someone give this guy a variable whore badge or something?

Is it possible for you to reuse variables for example when a ship is destroyed or no longer going to reoccur in the campaign?  I presume you are saving subsystem status and stuff like that, if that is the case I understand from a post karajorma made a while back that in some situations it is possible to use prime number equations to store multiple data points so might be worth looking into.
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 
Re: Too many variables in the campaign...
Quote
Good gravy.. what kind of data are you saving for each checkpoint?
In most missions - percentage values of ship hulls. In a few missions also ships' main beams. And of course some 0-1 variables (0 - checkpoint not reached, 1 - checkpoint reached; 0 - goal failed, 1 - goal completed, etc.).

Quote
Can someone give this guy a variable whore badge or something?

Is it possible for you to reuse variables for example when a ship is destroyed or no longer going to reoccur in the campaign?  I presume you are saving subsystem status and stuff like that, if that is the case I understand from a post karajorma made a while back that in some situations it is possible to use prime number equations to store multiple data points so might be worth looking into.
Well, I can use one variable for different ships in different missions and if there is no other choice, I'll do so. But I'd like to avoid it because all variables are named after ship names and renaming them would take a lot of time and work (there are about 180 variables in total).

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Too many variables in the campaign...
Well, you should only need 1 variable for checkpoint reached per mission.

0 = no checkpoint
1 = first checkpoint
2 = second checkpoint
3 = third checkpoint
etc.

You should also consider things like this for goals.

(for 3 goals)
111 = all three goals incomplete
121 = second goal complete, first and third incomplete
123 = first goal incomplete, second complete, third failed

or something like that...
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Too many variables in the campaign...
Bear in mind that you can probably use previous-event/goal-true for quite a few of those goal things too.

The prime number thing that headdie refers to might be overkill for this situation. But if you need it, it is explained here.

http://www.hard-light.net/forums/index.php?topic=49360.msg1001415#msg1001415
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
Re: Too many variables in the campaign...
Good advice above, but also:

If you are making a campaign of that size and plan to release it... please PLEASE play through the whole thing in debug mode and fix the warnings!

I mean, it might be overwhelming to do, but at least be aware of the bugs so that a player can play through your campaign without crashing himself/herself.

Also check fred logic to make sure every mission is beatable, and accounts for everything the player can do.

Sorry for the derail, but these issues appear frequently when people appear out of the blue with big campaigns. Make sure everything runs smooth.
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: Too many variables in the campaign...
Bitwise variables might be useful here too, although they are touchy at the best of times.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Too many variables in the campaign...
Also note that nightly builds have 250 variable slots available.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 
Re: Too many variables in the campaign...
Thanks for your advices. Of course I can make one 0-1-2 variable for 2 goals instead of two 0-1 variables, but I'm afraid it won't be enough, because that would give max. 20 variables less, and I'll still have about 160 variables. Many variables are used for storing hull percentage of fighters and I don't want to remove this system. I think I must use a nightly build for my campaign. Thank you anyway.

Quote
If you are making a campaign of that size and plan to release it... please PLEASE play through the whole thing in debug mode and fix the warnings!

I mean, it might be overwhelming to do, but at least be aware of the bugs so that a player can play through your campaign without crashing himself/herself.

Also check fred logic to make sure every mission is beatable, and accounts for everything the player can do.

Sorry for the derail, but these issues appear frequently when people appear out of the blue with big campaigns. Make sure everything runs smooth.
Don't worry. I played through each mission of Shadow Genesis at least 8-10 times so far, the first missions about 20 times, my brother and co-leader of the project as well and what's more, we have a few testers that will get entire campaign to play as soon as work is finished. So you'll get a product elaborated :).
« Last Edit: September 10, 2011, 03:43:49 am by Macielos »

  
Re: Too many variables in the campaign...
If you really need to get that much ship-data saved between the missions, the script i made might be useful for you: http://www.hard-light.net/forums/index.php?topic=74716.0
It saves ship-data into a file and can load it into the game again without using variables and you only need to use Fred sexps to control it. If you are interested i can make a simpler version of the script without stuff you don't need and try to fix it if there are any problems.
Here goes scripting and copy paste coding
Freespace RTS Mod
Checkpoint/Shipsaveload script