Help Editing the events.txt

ahenobarb

Warlord
Joined
Mar 8, 2001
Messages
118
I am having trouble editing the events.txt file. I am interested in integrating a feature from the "4 seas" scenario with the "Decline and Rise of Empire" scenario. In 4 seas, there is a bounty paid for the destruction of "Caravels", which makes it appealing and profitable to construct ships. However, when I copy the relevant portion of the "4 seas" events.txt and paste it into the "DAROE" events.txt. I get an error message that says soemthing to the effect "error in module.db" The section I am pasting into the events.txt is the following (I modified the civ names to correspond to the new scenario as well as changing "Caravel" to "Round Ship"). Can someone familiar with the scenarios give me a hint as to what is going wrong?

@IF
UNITKILLED
unit=Round Ship
attacker=Byzantines
defender=Latins
@THEN
TEXT
"One eagle will fly no more". Latin ship sacked for 200 gold.
ENDTEXT
CHANGEMONEY
receiver=Byzantines
amount=200
@ENDIF

@IF
UNITKILLED
unit=Round Ship
attacker=Latins
defender=Byzantines
@THEN
TEXT
"One eagle will fly no more". Byzatnine ship sacked for 250 gold.
ENDTEXT
CHANGEMONEY
receiver=latins
amount=250
@ENDIF
 
i haven't played either, but you might want to check if both scenarios are from the same version of civ2. the problem might be wether one scenario is FW and the or CiC or some other similar problem.
 
I don't think it is a problem with versions since events.txt is a text file, it shouldn't matter what program is utilizing it. I simplified my addition to be:


@IF
UNITKILLED
unit=Round Ship
attacker=Latins
defender=Byzantines
@THEN
TEXT
One eagle will fly no more. Ship sacked for 250 gold.
ENDTEXT
CHANGEMONEY
receiver=Latins
amount=250
@ENDIF


But when I try to boot the scenario, I get:

Error "-3" in module "12" data: 24 21

File open failed: modules.db
Most recent DOS error: 2



Any thoughts? Anybody else run across something similar when working on a senario?
 
Two sugestions:
1. I've had similar things happen to me when I stuff up the rules.txt - I sugest that you check that (problems with the tech tree are common)

2. If it is a problem with the events, then add the line @DEBUG to the events.txt file after @BEGINEVENTS When you load the scenario, this will run through the events and tell you where things go wrong.

Hope that helps :)
 
some versions support more/ different events than others, so it could be the version, or another possibility is that the events file is too big. see some one of nemo's scenarios on how to handle that.
 
Hey! I got it to work! Thanks Case for the tip on the DEBUG command. That's very useful to know. The problem turns out to be that the events/txt file was too long - - Thanks for the tip H Tower. I just cut one section, which was redundant, and added the section I wanted.

Now, does anybody know what the file size limit is for an events.txt file? Is it different for each scenario? And if so, how do you change it?

Thanks again
 
Officially, the seize limit for FW events file is 32kb. However, in reality most of the events files have only ca. 15 - 20 kb, this has to do with the internal structure of these files (e.g. what events are used, what commands, etc, etc). Unfortunately you cannot change the limit. Some scn makers use multiple events files for one scn to get around the limit...;)
 
Back
Top Bottom