Log in

View Full Version : [TEC] Automatic campaign generation & conversion - has this been attempted by anyone?


GlobalExplorer
11-01-11, 11:38 AM
During the discussion in the 'stability mod thread' I had some ideas about automated processes and I will try to outline them here more precisely.

What I'm thinking of is an application to automatically generate campaign data and I would like to know if someone has attempted something like this or had similar ideas.

pseudocode

:read in campaign data
data could be in SH5 / SH4 / SH3 format
theoretically even other formats (ideal would be a meta format which contains meta data like descriptive texts and other information that could be used for generation of specific dynamic missions)
:analyzing target installation
analyze available roster of ship types, ports, and other things
:re merging data according to target installation
this means ship types / classes are re-assigned according to the available setup
the logic is defined by the programmer
:writing campaign data to target format
self explaining
this step produces clean output files in the target format
other stuff like radio messages could be generated on the fly
Besides the general fact that it could save a lot of time for the campaign designers, such a tool has several uses, which are:

1. cleanup of existing campaign. I think an automated process will turn out much more consistent data than a manual process. If it is programmed well it should be free of inconsistencies in the data and result in less CTDs and quirks.

2. it can be used to reassign campaigns to make use of the target rosters, i.e. if additional units that have been added to the roster they will also be used by the new campaign

3. it can be used to merge campaigns from different sources.

4. it can be used to convert campaigns automatically from older versions (Silent Hunter 3 etc)

5. theoretically, one could even generate campaign data dynamically, providing the application can handle meta data, analyze geometric data, coast lines etc, and run them through a GIS like library or topology suite.

So far I was only thinking about a tool can be used by programmers, but a next step could be the creation of a new mission editor, that integrates all these functions with a user interface.

Adriatico
11-01-11, 05:45 PM
Hmmm.... quite interesting :hmmm:
Anybody ?

TheDarkWraith
11-01-11, 05:47 PM
I see one big show stopper in your thinking: game saves (campaign saves). There is a multitude of campaign data written into save games (it's evident from CTDs that happen when user tries to load old save game on new campaign data - aka OHII). If you look at the save games in a hex editor the data is not easily discernable. You would first have to decode the save game files to learn what they contain then you would know what you are up against :yep:
As far as the campaign files being able to 'read' meta data, good luck. I haven't seen anything in the SH5.exe or any of the ACT files that looks anything like it's trying to read meta data. It's pretty evident from viewing them in disassemblers that they have a strict pattern of data format that they look for. This is also readily apparent when one tries to manually edit a .mis file and makes a typo or something and the game CTDs.