Editing text files and creating mods in GoT/Spartan
Posted: Fri Sep 21, 2007 8:36 pm
It's not so bad once you get used to it. I've done quite a bit of making my own scenarios for GoT/Spartan, and it's a bit tricky at first, but you learn.
N.B. This post partially duplicates the information inthe "Mod Kit" thread.
Part One
First, let's just talk about making your own scenarios, without modifying the game engine at all.
You cannot create new maps. You must use the existing ones. Adding or deleting cities causes problems.
However, you can do a great deal by just editing text files, and the text files are sort of self-explanatory.
Nota Bene: The sample directory structure below is for the Matrix version of the game. Your directory structure may be different, but only the part to the left of "Gates of Troy". Everything to the right of that is the same, regardless of version.
The important part is to create a \mod directory, mine is at -
C:\Matrix Games\Gates Of Troy\MOD
Then under the mod directory, you create a directory named whatever you want your mod's name to be. For example -
C:\Matrix Games\Gates Of Troy\MOD\Rhodes
I now have a mod named "Rhodes". Then under that, you need to mirror the stock directory structure. This sounds far more complex than it is. Since my "Rhodes" scenario is played on the "Grand Campaign 1500BC" map, I wind up with -
C:\Matrix Games\Gates Of Troy\MOD\Rhodes\data\maps\GCBasic
Then you just need to copy stuff from the stock version at -
C:\Matrix Games\Gates Of Troy\data\maps\GCBasic
into my new directory at -
C:\Matrix Games\Gates Of Troy\MOD\Rhodes\data\maps\GCBasic
Now, all you really need to copy is the *.txt files and events.bat
Slitherine did a very good job of writing this part of the engine, and any files needed for this GCBASIC scenario which are not found in the modded GCBASIC directory, it will get from the stock GCBASIC directory. Therefore, your modded GCBASIC directory only really needs to contain the files you are planning to change.
The one exception is the "events" files. If you are going to change any of them, you need to copy all of them and events.bat
This part is a wee bit tricky. You never edit events.txt directly. You edit the individual event*.txt files, like EventHistoric.txt, EventRandom.txt
Then you run events.bat to compile (concatenate?) a new events.txt file, which is what the game engine actually reads.
I have more to share, but I'll start a new post.
N.B. This post partially duplicates the information inthe "Mod Kit" thread.
Part One
First, let's just talk about making your own scenarios, without modifying the game engine at all.
You cannot create new maps. You must use the existing ones. Adding or deleting cities causes problems.
However, you can do a great deal by just editing text files, and the text files are sort of self-explanatory.
Nota Bene: The sample directory structure below is for the Matrix version of the game. Your directory structure may be different, but only the part to the left of "Gates of Troy". Everything to the right of that is the same, regardless of version.
The important part is to create a \mod directory, mine is at -
C:\Matrix Games\Gates Of Troy\MOD
Then under the mod directory, you create a directory named whatever you want your mod's name to be. For example -
C:\Matrix Games\Gates Of Troy\MOD\Rhodes
I now have a mod named "Rhodes". Then under that, you need to mirror the stock directory structure. This sounds far more complex than it is. Since my "Rhodes" scenario is played on the "Grand Campaign 1500BC" map, I wind up with -
C:\Matrix Games\Gates Of Troy\MOD\Rhodes\data\maps\GCBasic
Then you just need to copy stuff from the stock version at -
C:\Matrix Games\Gates Of Troy\data\maps\GCBasic
into my new directory at -
C:\Matrix Games\Gates Of Troy\MOD\Rhodes\data\maps\GCBasic
Now, all you really need to copy is the *.txt files and events.bat
Slitherine did a very good job of writing this part of the engine, and any files needed for this GCBASIC scenario which are not found in the modded GCBASIC directory, it will get from the stock GCBASIC directory. Therefore, your modded GCBASIC directory only really needs to contain the files you are planning to change.
The one exception is the "events" files. If you are going to change any of them, you need to copy all of them and events.bat
This part is a wee bit tricky. You never edit events.txt directly. You edit the individual event*.txt files, like EventHistoric.txt, EventRandom.txt
Then you run events.bat to compile (concatenate?) a new events.txt file, which is what the game engine actually reads.
I have more to share, but I'll start a new post.
