Test of Time scenario creation problem

PlutonianEmpire

King of the Plutonian Empire
Joined
Mar 11, 2004
Messages
4,815
Location
MinneSNOWta
I've had ToT on my computer for a few days, and i'm already having problems

1. I have absolutely no idea how to create a map on ToT

2. Much less create a scenario (i'm almost uber on MGE, though... :mischief: )

3. I copied the saved "tutorial.sav" game over to the PlutoEmp ( :D ) scenario folder, and when i tried to load it, the game suddenly shut off, and i got an error message.

4. if you wish, feel free to see for yourself: http://www.civfanatics.net/uploads9/PlutoEmp.zip (i accidentally uploaded it twice :eek: :o )
 
Did you really find it necessary to carry on like a pork chop in the forum simply because you hadn't done your research?
PlutonianEmpire said:
1. I have absolutely no idea how to create a map on ToT
There is no map editor for ToT. It states this in the game's readme file. However, Mercator, being the kindly dude that he is, created one. You can download it from his site. I've also written a FAQ for ToT in case you have any other, um, frequently asked questions.
PlutonianEmpire said:
2. Much less create a scenario
  1. Create a folder for your scenario in your Test of Time directory.
  2. Before starting a new game, you may wish to temporarily replace the official rules.txt file in the Original folder with one modified for your scenario. There are some settings in rules.txt, such as the number of maps, @LEADERS2, fertility and map transport relationships which are written to memory when you begin a new game. These are permanently stored in the .sav file when you first save it, so you'll want correct settings from the outset. You can change these things at a later date, but it's much more work.
  3. Start a new Original game.
  4. Save the game to your new scenario folder.
  5. Add other modified files (eg, rules.txt, units.bmp, events.txt, etc) to that folder.
  6. Restore the Original game's rules.txt file (if required).
  7. Quit to the game's main menu.
  8. Reload the saved game.
  9. Cheat menu -> Toggle Cheat Mode
  10. Edit the thing. BTW, there is no scenario editor for ToT, so you'll need a text editor, such as notepad, to edit the game's .txt files.
  11. When you're ready to save it as a scenario: Cheat menu -> Save As Scenario
PlutonianEmpire said:
3. I copied the saved "tutorial.sav" game over to the PlutoEmp ( :D ) scenario folder, and when i tried to load it, the game suddenly shut off (...)
Using the info in the error message it took me about 1 minute to find the source of the error. You have 3 typos in the @IMPROVE list (rules.txt): your prerequisites for the spaceship components are in lower case – it's case sensitive. The same typo would also crash MGE.
 
1. Sorry, I need to pay more attention to my short temper. :o

2. Thanks for the editor :)

3. Typo? thank you for pointing that out :)

Your help is much apprecieated. :)
 
Now i've got yet another problem. somehow, techs that are SUPPOSED to be civ specific are being researched by other civs, even though i've done everything right to prevent it. here's the rules.txt. maybe i missed something?
 

Attachments

I notice the ranting and raving in the first post has been toned down somewhat. ;)
PlutonianEmpire said:
...even though i've done everything right to prevent it.
Well, that's the problem. You haven't. The fact that the Plutonian Empire occupies civ slot 4 and you've assigned values of 4 to the PE-specific techs under @CIVILIZE2 suggests to me that you misunderstand how the table works. The @CIVILIZE2 table refers to the column numbers in the @LEADERS2 table – which you haven't touched. What guide/s are you following?

The Scenario League has two on this subject:

Civilize2 and Leaders2 in ToT
Getting @Civilize2 and @Leader2 to work for you

Unfortunately I can't link to either of them because Apolyton's hosted sites are out of action for some reason. I'll edit this post when (if) they get their act together (Edit: done). With no disrespect to the author, I'd recommend that you ignore the second article as it contains numerous factual errors. I've also written a guide:

Restricting Technologies - A Guide to Using @CIVILIZE2, @LEADERS2 and EnableTechnology

I should've updated it a while back after confirming a bug relating to rule 2 technologies. I'm sure it's going to piss some people off, because it certainly pissed me off.

In your example, you should've had something like this for the 2 tables:

Code:
@CIVILIZE2
0		; AFl
0		; Alp
0		; Amp
0		; Ast
0		; Ato
0		; Aut
0		; Ban
0		; Bri
0		; Bro
0		; Cer
0		; Che
0		; Chi
0		; CoL
0		; CA
0		; Cmb
0		; Cmn
0		; Cmp
0		; Csc
0		; Cst
0		; Cor
0		; Cur
0		; Dem
0		; Eco
0		; E1
0		; E2
0		; Eng
0		; Env
0		; Esp
0		; Exp
0		; Feu
0		; Fli
1		; Fun
0		; FP
0		; Gen
0		; Gue
0		; Gun
0		; Hor
0		; Ind
0		; Inv
0		; Iro
0		; Lab
0		; Las
0		; Ldr
0		; Lit
0		; Too
0		; Mag
0		; Map
0		; Mas
0		; MP
0		; Mat
0		; Med
0		; Met
0		; Min
0		; Mob
0		; Mon
0		; MT
0		; Mys
0		; Nav
0		; NF
0		; NP
0		; Phi
0		; Phy
0		; Pla
1		; Plu  (Cst & Pot)
0		; PT
0		; Pot
0		; Rad
0		; RR
0		; Rec
0		; Ref
0		; Rfg
0		; Rep
0		; Rob
0		; Roc
0		; San
0		; Sea
0		; SFl
0		; Sth
0		; SE
0		; Stl
0		; Sup
0		; Tac
0		; The
0		; ToG
0		; Tra
0		; Uni
0		; War
0		; Whe
0		; Wri
0		; ...
1		; U1
1		; U2
1		; U3
1		; X1
1		; X2
1		; X3
1		; X4
1		; X5
1		; X6
1		; X7

@LEADERS2
02000000
02000000
02000000
02000000
02000000
02000000
02000000
02000000
02000000
02000000
00000000
02000000
02000000
02000000
02000000
02000000
02000000
02000000
02000000
02000000
02000000
The @LEADERS2 table is written to the .sav file when you create it. Therefore, further edits to @LEADERS2 in rules.txt will not be implemented in the game. You've got 3 options available to you to fix it:

  1. Recreate the scenario save from scratch, using the corrected rules.txt,
  2. Hex edit the @LEADERS2 table in the .sav file, or
  3. Use EnableTechnology events, together with the ScenarioLoaded trigger, in a temporary events.txt file. Run delevent.exe on the .sav file to clear any existing events. Reload your saved game and save it. The new events will rewrite the @LEADERS2 table in your .sav file. Run delevent.exe on your .sav file again to clear the temporary events.
Whichever option you choose, you will need to correct the @CIVILIZE2 table in rules.txt. It is important that you do this first if you decide on option 3.

Again, in your example the temporary events would look like this:

Code:
@IF
ScenarioLoaded
@THEN
EnableTechnology
whom=Everybody
technology=99
value=2
@ENDIF

@IF
ScenarioLoaded
@THEN
EnableTechnology
whom=Plutonian Empire
technology=99
value=0
@ENDIF
 
1. lol. thanks ;)

2. Guides? what guides? ;) :D Really, i've been doing things by trial and error, using TP's rules.txt file in the Post Wars mod as a reference.

EDIT: alrighty. i made the changes in the rules.txt file and copied it over to the "Original" folder in ToT, so i can start games with it (which was my original intent in the first place :mischief: :D ) . . . . .

IT WORKS!!! AAAHHH HAHAHAHAHAHAA!!!! :crazyeye: :D

thanks much! :goodjob: :thanx:
 
Right, the Scenario League is back up, so I've fixed the links to the 2 articles in my last post. The Cradle of Civilization, which I believe hosts them as well, is still down though. :confused:
PlutonianEmpire said:
Guides? what guides? ;) :D Really, i've been doing things by trial and error, using TP's rules.txt file in the Post Wars mod as a reference.
With a comment like: "I've done everything right to prevent it", I assumed you were following a set of instructions. If trial and error was your method, why then were you so confident that you'd done everything correctly when it didn't work, huh? That ain't logical. :p
PlutonianEmpire said:
IT WORKS!!! AAAHHH HAHAHAHAHAHAA!!!! :crazyeye: :D
Great :goodjob:
 
Are there any utilities that can convert MGE save and scenario files to ToT format? If so, where can I find them?
 
I found it, but just reading the readme makes it sound so complicated....

(honestly, i was expecting a GUI interface to come up once i double-clicked the civconverter.exe file...)
 
PlutonianEmpire said:
I found it, but just reading the readme makes it sound so complicated....

(honestly, i was expecting a GUI interface to come up once i double-clicked the civconverter.exe file...)
Jeez, it's not that bad. Having said that, you're not the only one around who's had trouble following CivConverter's instructions. If it's any help, I've written a guide on this as well. It can be found here.
 
thanks, i'll look at it later though, my computer's gonna be reformatted soon.

Also, that "no cd" patch for MGE that allows you to start it up w/o needing the cd? does it also work for ToT or is there something that does the same for ToT? I ask cuz the only ToT cd in my home belongs to my sister.

BTW, I wonder how much ToT costs anyway if I ever go and buy a cd for myself... ;)
 
PlutonianEmpire said:
Also, that "no cd" patch for MGE that allows you to start it up w/o needing the cd? does it also work for ToT...
No, it doesn't.
PlutonianEmpire said:
...or is there something that does the same for ToT?
Did you read this?
Wobbegong said:
I've also written a FAQ for ToT in case you have any other, um, frequently asked questions.
 
Oh. My bad. Thanks. :)
Wobbegong said:
The @LEADERS2 table is written to the .sav file when you create it. Therefore, further edits to @LEADERS2 in rules.txt will not be implemented in the game. You've got 3 options available to you to fix it:

  1. Recreate the scenario save from scratch, using the corrected rules.txt,
  2. Hex edit the @LEADERS2 table in the .sav file, or
  3. Use EnableTechnology events, together with the ScenarioLoaded trigger, in a temporary events.txt file. Run delevent.exe on the .sav file to clear any existing events. Reload your saved game and save it. The new events will rewrite the @LEADERS2 table in your .sav file. Run delevent.exe on your .sav file again to clear the temporary events.
Whichever option you choose, you will need to correct the @CIVILIZE2 table in rules.txt. It is important that you do this first if you decide on option 3.

Again, in your example the temporary events would look like this:

Code:
@IF
ScenarioLoaded
@THEN
EnableTechnology
whom=Everybody
technology=99
value=2
@ENDIF

@IF
ScenarioLoaded
@THEN
EnableTechnology
whom=Plutonian Empire
technology=99
value=0
@ENDIF
1. Can a .scn file be hex edited the same way?
2. How do I learn hex editing?
3. where can i download delevent.exe?
 
PlutonianEmpire said:
1. Can a .scn file be hex edited the same way?
Yes, both file formats are virtually the same. In fact you can change a .scn extension to .sav and load the file as a saved game and vice versa.
PlutonianEmpire said:
2. How do I learn hex editing?
:hmm: Where do I start? How's your knowledge of bits, bytes, binary (base 2) and hexadecimal (base 16) numbers? Bear in mind that you really only require a basic understanding of these concepts to hex edit a file. Most of the difficult work, ie, identifying the internal file structures, has been done by others.

Hex editing the Leaders2 table in the .sav/.scn file is a straightforward exercise because the values shown in the rules.txt table represent individual bytes. I suppose I could run you through that, but first you'd better answer the above questions.

Anyway, before you can edit anything, I guess you'll need to get yourself a hex editor. I use AXE (shareware) and frhed (freeware). You can find other free ones on Tucows.
PlutonianEmpire said:
3. where can i download delevent.exe?
I've attached a copy. It ships with various versions of Civ2. I forget which ones.
 

Attachments

Wobbegong said:
:hmm: Where do I start? How's your knowledge of bits, bytes, binary (base 2) and hexadecimal (base 16) numbers? Bear in mind that you really only require a basic understanding of these concepts to hex edit a file. Most of the difficult work, ie, identifying the internal file structures, has been done by others.
How's my knowledge? All i know about it is that eight bits make up a byte or something like that. Sorry.

Also, when i converted just the .scn file to ToT, i had this problem where the entire ToT program crashed whenever the PE's turn came up when loading the scenario (the game starts with the barbarians' turn. it is a modern-day-earth scenario). I started out as the russians, and the game started fine. but when i switched human players to USA, i did see the PE beat up USA for a while, but once the PE'ian turn ended, the game crashed, and had to be shut down and restarted. :hmm:
 
PlutonianEmpire said:
How's my knowledge? All i know about it is that eight bits make up a byte or something like that. Sorry.
OK, this webpage should help you familiarise yourself with those terms and concepts. After scanning that tutorial you should be able to recognise that a byte has the following range of values:

Binary (base 2): 00000000 – 11111111
Decimal (base 10): 0 – 255
Hexadecimal (base 16): 0 – FF

Below is a screenshot of AXE showing the beginning of a Civ2 .sav file. In the Bytes column, raw bytes are displayed as 2-digit hexadecimal numbers (00 – FF). Bytes are identified by their offsets (the position number in the file). The offset for the first byte in each row is displayed in the Offset column, the first byte in the file being zero. By default these are also displayed in hexadecimal. Clicking the column heading changes them to decimal. In this example the number of bytes per row has been set at 15 (it's adjustable) to keep the screenshot down to an acceptable size. Notice that the current selection is indicated in the status bar; in this case byte 10. The ANSI Text column can be useful for editing strings, eg, "CIVILIZE".

HexEdit01.png


So how do I know which bytes to edit? The complete structure of the .sav/.scn file is not known, but a good proportion of it has been documented. For information on the Civ2 .sav file format, read Allard Höfelt's hex-editing article (the Scenario League's Hints, Tips and Guides threads are down, so I'll attach it here). It covers vanilla Civ2, FW and MGE. It doesn't include ToT, but the basic format is very similar. I began to compile a file format document for ToT (in HTML) at the beginning of the year, but guess what? I'm a lazy bugger and didn't finish. :p

Once you have the byte offsets, you're set to go. In the case of the Leaders2 table, I've already supplied that information (in the Restricting Technologies article). Anyway, before you start editing anything, make sure you backup the original file first, especially if you're unsure as to what you're doing.

Hex editing the Leaders2 table is a good place to start because it's very easy. This is because each digit in the @LEADERS2 table from rules.txt represents a single byte with a value ranging from 0 to 2. Open your .sav/.scn file in your hex editor. The first byte in the Leaders2 table is located at offset 29728. This value is a constant for all ToT scenarios. In AXE, click the Goto button (or Ctrl+G), check the Decimal Offset option and type in 29728. Other hex-editors should have a similar 'Go to' function.

HexEdit02.png


This will present you with the Leaders2 table in the game file, an 8 x 21 byte matrix. After resizing the Bytes column to 8 bytes per row, it compares very easily to the @LEADERS2 table in rules.txt. This is the Leaders2 table for a Fantasy game:

HexEdit03.png


Here's the same table in rules.txt:
Code:
@LEADERS2
02012220 
02212220 
02012202 
02212022 
02210220 
02212220 
02212220 
02012220 
02212220 
02012202 
02212022 
02210220 
02212220 
02212220 
02012220 
02212220 
02012202 
02212022 
02210220 
02212220 
02212220
Making changes to this table in the .sav/.scn file should be a piece of cake. No further explanation is really required. Change the byte values to reflect your new technology settings and then save. It's much simpler than using EnableTechnology events.

PlutonianEmpire said:
Also, when i converted just the .scn file to ToT, i had this problem where the entire ToT program crashed whenever the PE's turn came up when loading the scenario (the game starts with the barbarians' turn. it is a modern-day-earth scenario). I started out as the russians, and the game started fine. but when i switched human players to USA, i did see the PE beat up USA for a while, but once the PE'ian turn ended, the game crashed, and had to be shut down and restarted. :hmm:
The problem can't be identified from that information. Often labels.txt will cause crashes, but that normally occurs as soon as the scenario is loaded, so that's not likely. For some scenarios CivConverter produces errors in the .scn file which cause it to crash. Fortunately these scenarios are few and far between. If you're unlucky, yours maybe one of them. There's no known fix. Then again it's possible that the problem is completely unrelated to CivConverter – there could be an error in the original scenario for instance.
 

Attachments

Alrighty. I finally got a new ToT game (the other one was my sister's that I was using), so I can continue to learn how ToT works. :)

My first new question: How does one disable the animated terrain sprites, like we disable the animated unit sprites?

Secondly, I noticed a difference between MGE terrain rules and ToT terrain rules? What is it?
 
Back
Top Bottom