• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Leftover Game Cache?

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
Here is my trigger for restoring game cache and units so far:

  • Init Cache
    • Events
    • Conditions
    • Actions
      • Game Cache - Create a game cache from bof2.w3v
      • Set bof2 = (Last created game cache)
      • Game Cache - Restore 1 of party from bof2 for Player 1 (Red) at (Center of Village 1 Church Ryu Start <gen>) facing 0.00
      • Set Party_Order[1] = (Last restored unit)
      • Game Cache - Restore 2 of party from bof2 for Player 9 (Gray) at (Center of Village 1 Church Ryu Start <gen>) facing 0.00
      • Set Party_Order[2] = (Last restored unit)
      • Game Cache - Restore 3 of party from bof2 for Player 9 (Gray) at (Center of Village 1 Church Ryu Start <gen>) facing 0.00
      • Set Party_Order[3] = (Last restored unit)
      • Game Cache - Restore 4 of party from bof2 for Player 9 (Gray) at (Center of Village 1 Church Ryu Start <gen>) facing 0.00
      • Set Party_Order[4] = (Last restored unit)
      • Set Cache_Gold = (Load gold of resources from bof2)
      • Player - Set Player 1 (Red) Current gold to Cache_Gold
      • If (Party_Order[1] Not equal to No unit) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Create 1 Ryu (Child) for Player 9 (Gray) at (Center of Village 1 Church Ryu Start <gen>) facing Default building facing degrees
      • Set Party_Order[1] = (Last created unit)
      • Unit Group - Add Party_Order[1] to Party_Group
It seems that the Party_Order[1] unit is being restored upon starting the campaign. I'm trying to test my campaign from the start but the Party_Order[1] unit keeps being restored. Is this because the game cache isn't deleted upon exiting the campaign from the last time I tested? And so next time I open it, the units and gold are still saved and restored?

If that is the case, theoretically a player could never use the "save game" option in the menu and save the cache instead? That could work, but what if the player ever wanted to start a new campaign? The old cache would somehow need to be removed? Would saving the game through the options menu save the game cache as well if the player ever decided get back his old characters, progress, gold, etc.

New to campaigns, if someone could explain whats going on and perhaps an idea on how to resolve the problem that would be awesome thanks. How do you guys prefer to save your campaign progress?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
I believe the pre-made campaigns of WC3 uses separate game caches for each mission. This meant you could replay them with the correct progress and carry that progress down if you wanted, 1 mission at a time.

An obvious alternative is to simply give them unique identifiers in a single game cache that are separate for each mission. Again it will allow you to carry them down appropriately.

For campaigns like the orc expansion (the Rexar RPG) you simply have an initialization map which resets it all. Hitting ESC in that cinematic can skip to the actual map. Or something like that (not sure exactly how they do it).
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
My campaign is similar to the rexxar campaign. There is a world map that the player keeps coming back to, so to speak, after leaving dungeons, etc.

I'll do what the rexxar campaign did then. Upon starting a campaign you watch a cinematic which clears cache and initializes a new one. If players want to resume their old games, they simply load their save file. I will test this out when I get home from work. Thanks..
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
You could also provide them with a dialog when loading the main map.

"Would you like to continue?"
[Yes, load my progress.]
[No, start from the beginning.]

WC3 saves are imperfect and fail to retain some state information such as periodic timers and array index 8191.
 
Status
Not open for further replies.
Top