Commander Gizzmoe's program seems to be an excessively complicated solution to a problem which could be made simple. It is *not* necessary for the programmer to have any information about the mod, although it is essential that the modder has the correct knowledge. But if the modder does not already have the knowledge, he could not make the mod anyway!
SH3 and SH4 (and, doubtless, most or all other games) have a fixed set of files necessary to run the game. Some are text files, such as the many .cfg files, some are data files, such as the many .dat, and .sim files.
All that the modder really needs to do is to write a simple script, which states:
a) which files need to be altered.
b) which parameters need to be located, and changed to what values.
Such a script could easily replace the common system we have now, where a modder hands out a bunch of modified files which may or may not be compatible with other files created by modders.
Let us take a concrete example. Let us pretend I have created an imaginary submarine simulation, 'SilentHunterStiebler', which requires only ten text files to run: text1.cfg, text2.cfg, ... text10.cfg, and also just ten data files to run: data1.dat, dat2.dat, ... data5.dat plus data1.sim, data2.sim, ... data5.sim.
The modder writes a simple script as follows:
COMMENT: text files first
FILE: data\cfg\text1.cfg
COMMENT: only one occurrence of submarine depth
CHANGE: submarinedepth=
TO: submarinedepth=20
CHANGE: crashdepth=
TO: crashdepth=150
FILE: data\cfg\text2.cfg
CHANGE: maxdestroyerspeed=
TO: maxdestroyerspeed=25
COMMENT: change 3rd occurrence of 'No_of_torpedoes'
CHANGE: No_of_torpedoes[3]=
TO: No_of_torpedoes=5
COMMENT: (and so on for all text files, ignoring any which do not need to be altered)
COMMENT: now the data files
FILE: data\library\data1.dat
COMMENT: change 1st occurrence of maxrange (4-byte floating variable)
CHANGE: FLOAT: maxrange
TO: FLOAT: maxrange=2000
COMMENT: change 7th occurrence of 'ArmorLevel' (4-byte integer)
CHANGE: INT: ArmorLevel[7]
TO: INT: ArmorLevel=200
FILE: data\submarine\data3.sim
COMMENT: change 3rd occurrence of 'TorpedoDoorOpen' (BYTE, probably true or false, but 16 alternatives)
CHANGE: BYTE: TorpedoDoorOpen[3]
TO: BYTE: TorpedoDoorOpen=1
This is all fairly simple, is it not? The comments are optional.
A program to implement this kind of script would have just a few requirements:
1. The user must be able to set the path to the root folder, called 'data' in this example.
2. The program must then check that the requested files are found at their expected paths - if not a warning must be given.
3. The program must then make the requested changes, and report any failures (for example, if the 3rd occurrence of 'TorpedoDoorOpen' does not exist, it must generate an error report.)
4. [The only truly difficult part.] The program must make a record of the changes, for the purpose of restoring the original values on request. (Rather like JScones' JSGME, but that program remembers files altered, we need to remember files and new values altered.) One solution would be for the program to make a copy of the original script, writing in the original values it found. For example: CHANGE: BYTE: TorpedoDoorOpen[3] could be written back to a copy of the script as CHANGE: BYTE: TorpedoDoorOpen[3]=0.
To write a program that would execute scripts like the example I have shown would be really rather trivial - the only part in which I lack personal experience is the restoring of values, so I'm not clear about the best way of remembering values put in by several scripts.
But let me emphasise again: the program writer needs NO knowledge of the files that are being written to, only the modder needs it.
Having said all that, there is little chance that anyone will adopt this simple modding system. Because:
1. For reasons that elude me, there are a lot of modders out there who like to grab all the low-lying fruit of a brand-new mod (eg SH5) before anyone else does. They will release mods of altered game files as soon as they can - and then move on to the next newly released game.
2. Some modders like to keep secret what they have done. Think GWX, for example. So they won't be releasing script files.
3. There are also a lot of modders who seem to lack interest in testing their own work before they release it as a 'beta'. Creating scripts would force them to test their own work, and then they would have to waste their own time, and not someone else's, on making the fixes.
Stiebler.
|