Internal scenarios?

Lutefisk Mafia

Inscrutable Enforcer
Joined
Jun 15, 2007
Messages
544
Location
Minnesota
Okay - here is a question for all of you coding experts:

Would it be possible to script an event in FfH2 that would flesh out the "hero quest" event even more?

I was thinking that if you chose to go into the dungeon, the following would happen:

1. Your hero gets his information written to a cache file.
2. The hero is "deleted from the game."
3. The game is saved.
4. Civ loads a scenario, reading the hero information from the cache file and inserts the hero at the start position.
5. You play the scenario until you get to an ending of some sort.
6. The scenario writes the new updated information to the cache file.
7. Civ exits the scenario and reloads the original savegame
8. On load, the hero information is read from the cache and the hero is recreated in the original game to match.

Is this technically feasible? Does the SDK allow for something like this? If so, this would open up a HUGE new realm of creativity for the modding community.

So - to those of you who are wise in the ways of Python and XML - what do you think?
 
That would be so awesome if someone figured out how to do it. Especially since the same code would possibly be able to be utilized to move ALL of the game onto a new map for things like AC = 100 for a certain number of turns causing the world to actually move into Hell :)
 
@xienwolf: I hadn't even thought of the "moving into Hell" idea. That would be awesome.

If an "industry standard" could be devloped for the right tags, scripts, and cache mechanisms, the possibilities are endless. It really would open up a whole new area of content.

Personally, I was thinking that people could make little dungeon maps for random insertion into regular play. I have tried to make a few full fledged scenarios for FfH2, but they are lot of work. But I am betting that most people could bang out a 32x32 dungeon map without much trouble and have fun doing it, too.

Come to think of it, this mechanism could open up a whole different style of FfH2 games in which you start an original scenario that is a "home village" map with a hero unit -- and then go on a series of adventures to different dungeon or area maps.

Well, that settles it. If any experienced hands want to take a crack at this I am willing to help. I don't know much code (but can learn) and am a crappy artist, but have experience playtesting and bugtesting CRPGs. I also have decades of RPG experience and love designing maps.

Any takers for the FfH2 "Adventure Module" team?
 
I'd be happy to write adventure modules and create scenarios from them. My programming experience is limited to XML so I wouldn't be much help making the system work. Once it is working, I could generate some scenarios though.
 
Just off the top of my head, I'm think that the easiest way to accomplish this would be to create a custom "baseline" scenario for FfH2 that automatically looks to a cache file every time it is loaded, even if (well... especially if) loading from a saved game instead of creating a new game.

The internal Python /SDK mod would tell instances of that mod to associate each savegame file with a cache file using a common naming convention for consistancy. For example, a savegame called "Tessa" would be associated with a cache file called "Tessa_cache" or something like that.

We would also need some way for the mod to automatically generate the cache files as needed for each savegame.

Then, we would need a way to pass information to the modular adventure file telling it which cache file to access to populate its starting state. Something in the nature of a command line option maybe? The last time I did any serious programming was back in the days of PC-DOS and MS Basic.

So here is a summary of technical requirements:

1. A way to have a scenario automatically access a cache file to get additional information each time it is started.
2. A way to tell the Civ program to create a cache file associated to a certain savegame using a common naming convention.
3. A way to pass the needed information to the cache file.
4. A common format for the information contained in the cache file.
5. A way to get a scenario to close down after writing to the cache, and starting up a different scenario.
6. A way to pass a commnad or information from the "closed down" scenario to the newly started one telling it which cache file to access on load.

As I think of it more, #s 1. and 6. are pretty much the same thing. Once these are in place, we could pop in and out of scearios at will, but provide for some continuity of information.

The cache information might even be able to be a part of the savegame files themselves, so long as there is a way to update that part of the savegame file by passing information from scenario to scenario.

Any thoughts?
 
Back
Top Bottom