| Design Tips Index Scenario League Apolyton Civ2

Getting @Civilize2 and @Leader2 to work for you by Darth Veda | (August 2000)

An extension of the analysis on the @Civilize2 and @Leaders2 sections of Test of Time's Rules.txt file.

Introduction

While authoring my latest scenario, Kyokujitsu, I’ve run into some interesting bugs involving @CIVILIZE2 and @LEADERS2 in the Rules.txt file for Test of Time. Forutnately, there are some work-arounds that will work for you. For these work-arounds, you will need Delevent.exe, which is available with Fantastic Worlds.

On to the Goodies...

Let’s take a look at the two villains, @Civilize2 and @Leaders2. Not only are they complex to work with, the strategy guide completely wrong about them, AND in binary, but once they’re written to .sav or .scn format, the Rules.txt file cannot change their settings at all!

There’s an interesting tip written about these two sections on how to restrict technologies, and that’s where you’ll want to look to set up your tech tree. If that’s what you’re looking for then go to that article. When you’re finished setting it up, come back here and let me show you how to make it work.

Go on, I’m not looking....

.... Ok, now that you’re back (or you never left and I just made a jerk of myself..., I’ll show you how Civilization II: Test of Time treats this section of Rules.txt.

From the Hip

When Test of Time (ToT from here on in) loads your scenario/regular game for the first time off the rules.txt, it permanently writes to the sector of the save game allocated for the bits (0’s, 1’s, and 2’s) off which the technology allowments queue. The importance of this is that you must have your Rules.txt technology allowments (@Leaders2 and @Civilize2) set up from the start or you will have a lot of work to do during construction.

Say for example, you want to stop the Babylonians from researching Pyramids but want to allow them to research the Ziggurat. You would set up your Rules.txt file so that the Pyramids were restricted but the Ziggurat was not. When you finish your Rules.txt, place it in the Fantasy or Original directory (yes, it does make a difference, especially with what some of the technologies do as an extra effect... there’s a tip for that too though). Remember to back up your original Rules.txt file, you’ll want it for later.

Start up an Original game on the map (or maps) you’ll be using. Save the file to your scenario directory (if you’re using one). At this point, ToT permanently writes the bits for the technology to your savegame or scenario. If you haven’t messed up any, your scenario’s tech tree should work now, not allowing any civs to have technologies they shouldn’t have. You can proceed normally with construction now.

I screwed up!

Yes, we all screw up every now and then. It’s a little bit harder to fix your mistakes than simply changing the Rules.txt file’s @Civilize2 and @Leaders2. You’ll need to enlist the help of a text editor, Delevents.txt, and the game itself to correct them.

Here’s the example:

In Kyokujitsu, I wanted to allow only the Japanese Navy to research ships for construction, but I accidentally allowed the army to Research them as well. I knew I simply couldn’t alter the Rules.txt file to attain the desired changes to fix the problem. I had to do the following steps:

1. Clear the savegame of events (by running Delevents.exe on it). You can run delevents.exe on your savegame by drag-dropping or by using the command line (ie delevents yoursavegame.sav). Events aren’t written to scenario (.scn) files, so there’s no need to do that in this case.
2. Write a special events.txt that uses the following structure for the event that restricts technology:

3. Load the savegame or scenario with the special Events.txt in the same directory as the .scn or .sav file.
4. Check that the problem is fixed (that is, go to edit king, change research goal, and verify that the technology cannot be researched or can be researched, depending on what you wanted).
5. Save the file.
6. If you saved your file as a .sav, you'll need to run the delevent.exe once again on it to clear the events.

And that's a Rap!

With the previous steps you will be able to correct any problems that crop up with your @Civilize2 and @Leaders2. You may need to repeat this process many times, but it will work each time. As a reminder, any other changes you make to your rules.txt file will be recorded by Civ2 (flags, unit changes, tech renames, anything outside @Civilize2 and @Leaders2).

Enjoy!

Have a Civ2 scenario development tip you want to submit? E-mail us!

Return to the Scenario League's main page.

Go to the Apolyton's Civilization II main page.