Modding explorations |
The first few replies to this thread reference an earlier and incorrect post, so they wont make much sense. Suffice it to say that:
Even though MainStrings.txt contains the information the fileparser uses to interpret the data files, you can't (AFAIK) profitably change MS.txt, because the game falls back on safety code (at least in the case of SystemTypes.txt).
What I tried, and didnt manage to make work, was to redefine the structure called "Chance Type". I did so in the sense that the parser didn't barf when the game generated, but the game ignored the tokens I added. Most probably this is due to hardcoding in the executable, but some remote chance exists that I just didn't find the correct places to change MS.txt, so you may have different results. I don't recommend bothering. A bug which led me to believe I had succeeded is that you can add entries to MS.txt's Datafile_CreationTypesSystem list, and this will allow you to add stuff to the data structure in SystemTypes.txt, but the game will only use your new type if you screw up the cut'n'paste and use "Any" instead of "OnlyHuge" as follows:
if you add
Datafile_CreationTypesSystem 63 := Chance Type [%ChanceNum%] Number of OnlyHuge Planet Sizes
Datafile_CreationTypesSystem 64 := [%OnlyHugeNum%]
Datafile_CreationTypesSystem 65 := Chance Type [%ChanceNum%] OnlyHuge Size [%OnlyHugeNum%] Type
Datafile_CreationTypesSystem 66 := Chance Type [%ChanceNum%] OnlyHuge Size [%OnlyHugeNum%] Chance
mimicing:
Datafile_CreationTypesSystem 6 := Chance Type [%ChanceNum%] Number of Any Planet Sizes
Datafile_CreationTypesSystem 7 := [%SizeNum%]
Datafile_CreationTypesSystem 8 := Chance Type [%ChanceNum%] Any Size [%SizeNum%] Type
Datafile_CreationTypesSystem 9 := Chance Type [%ChanceNum%] Any Size [%SizeNum%] Chance
The game will ignore your new token OnlyHuge entirely (but not complain when you stick it into the size types in ST.txt--it will just use "Any" instead)
..but if you pull a clever booboo like I did, and use
Datafile_CreationTypesSystem 63 := Chance Type [%ChanceNum%] Number of OnlyHuge Planet Sizes
Datafile_CreationTypesSystem 64 := [%OnlyHugeNum%]
Datafile_CreationTypesSystem 65 := Chance Type [%ChanceNum%] Any Size [%OnlyHugeNum%] Type
Datafile_CreationTypesSystem 66 := Chance Type [%ChanceNum%] Any Size [%OnlyHugeNum%] Chance
Now OnlyHuge will work, but it just replaces "Any", meaning you can't have OnlyHuge and OnlyTiny, for example.. the last one in your list overwrites all the previous ones. In this case that means any variable size/atmosphere/type probability fan can only be defined once. Too bad.
=====/=====
However, I also discovered you can just flat out delete any item you want from stellarobjecttypes.txt and the game will probably still be okay, if for example you want all tiny worlds to have no atmosphere (since gravity makes atmospheres possible, and tiny planets don't have much, durr).. you can.
It could be the game generator is more fault tolerant (ie you can delete things it needs and it kludges along) as a way of reducing bugs. Too bad, if it was explicit I could do some real neat things with it.
I also confirmed you may not use IIF in the chance entries, which sucks. Anything but a number in those entries and the game goes back to hardcoded pure random selection, which keeps you from switching atmosphere probabilities based on planet size, distance from the sun, etcetc. Tooo baad.

SEIV style moons?
Any idea if SEIV style moons can be re-introduced yet?
______________________________________________________
I think I just had an evilgasm.....
The (now official?) Space Empires 4 Mod Launcher V2.26
SEIV style moons
To get SEIV moons, open SystemTypes.txt and replace any ocurrence of "Offset # Ring 2" with "Offset # Ring 1".
It's also possible to create red giants, protostars, and probably all the rest of the SEIV systems.

Any defined in Systemtypes.txt
Any is defined at the beginning of the systemtypes.txt file in a section that choose various percentages to be used for "any".
Mainstrings.txt is just a collection of all strings used in the game such as those for abilities etc. in order to make localized versions (ie different languages) - so I'm not sure what you doing there...?
-----

Look at first entry block in Systemtypes.txt
The first entry block contains the "Number of Any Chance Types" entries. These are percentages that the game will use to generate the "any" entries in the systemtypes.txt.
It would appear you can create addition any chance types for SystemTypes.txt to have different combos (say if wanted only to randomize between rock & ice, etc) but there's no way to
The "Any" is likely interpreted in the game engine as a call for random function to pick from a set of potential values. It's also used in the default files for neutral AIs to pick gov't types etc.
Mainstrings.txt doesn't affect the game engine with the exception of what characters might be recognized for a certain function etc. For example, the value for Script Parse 18 will always be used for addition regardless of what it is. Or if you edited Script Parse 17 to , it would be interpreted as a decimal indicator in formulas and so on.
-----




Cool, so my standard one can
Cool, so my standard one can now have no tiny planets, and others be totally different chance percentages. among other things for other files also
. Nice find, copy.. paste... I'll have to make my systems types totally radical now
. I had created a system type that had a sun in center (for sphere worlds etc) and no planets within six hexes so I would feel bad about making one, now I can just alter it to have medium max or small max and not feel as bad but also not lose much when losing those planets...