Skeleton Scenario Code

More
19 years 7 months ago #12612 by Qlippoth
Replied by Qlippoth on topic Skeleton Scenario Code
Awesome, I look forward to the Dragonlance projects!

Back on topic: Wonder what we could do with scenarios? Training scenario for Epic? Combat training scenarios?

Any way we can safe progress in a scenario? Write to an INI file? Just brainstorming.



- Qlippoth

<div align="left"> </div id="left">

Please Log in or Create an account to join the conversation.

More
19 years 7 months ago #12620 by GrandpaTrout
Replied by GrandpaTrout on topic Skeleton Scenario Code
EricMan did a nice job using a scenario for the entry into his whole mod. And he does have save games.

Please Log in or Create an account to join the conversation.

More
19 years 7 months ago #12621 by Joco
Replied by Joco on topic Skeleton Scenario Code
The next thing I plan to tinker about with is to get my head around the save game system and how that all works. Again the end result will be to add sample code to the skeleton for future reference.

Please Log in or Create an account to join the conversation.

More
19 years 7 months ago #12638 by GrandpaTrout
Replied by GrandpaTrout on topic Skeleton Scenario Code
Check out Eric Man's Gold rush. It has a bunch of very useful ideas, including save games and a custom written ship loadout package. Those are the two items you really need to get rid of Lucretia's Base forever.

Saving is really just a single function pog call. When the save game happens, Flux writes all the global variables to the save file. The real trick is getting all your save game data into globals before the save function is called.

My recommendation is to add a new event to multimod. A save_game event. This allows multimod to call all installed mods and tell them to write any data they need saved to globals. After all mods have been called, you can then call the save game function. This technique allows any mod to hook into your save game code. And it means that you can save in multiple ways, such as when entering a base, or at special mission waypoints, or save anywhere.

Please Log in or Create an account to join the conversation.

More
19 years 7 months ago #12640 by Joco
Replied by Joco on topic Skeleton Scenario Code
The added hook into MultiMod is a good idea. Is someone maintaining this mod or shall I just go ahead and repost the results?

I realise the save game function is all about globals I just wanted to investigate the area further. Just incase something clever occured to me. :)

-- edit --
Looks like Gold Rush has some nice generic looking save/load functions that I will look at more closely. Might be a case of using them or a version close to them and providing appropriate credit.

Please Log in or Create an account to join the conversation.

More
19 years 7 months ago #12657 by EricMan64
Replied by EricMan64 on topic Skeleton Scenario Code
I tried to make those save/load functions as generic as possible because I realized they would be of use to other modders. It shouldn't be too difficult to adapt them to the needs of your project. Let me know if you have any questions.

Please Log in or Create an account to join the conversation.