Events.txt refuses to enable map transport

PlutonianEmpire

King of the Plutonian Empire
Joined
Mar 11, 2004
Messages
4,802
Location
MinneSNOWta
Okay, for my mod of the Original game, I previously had the acquisition of a tech advance as the sole prerequisite event that gives engineers the ability to build map transport sites. However, I wanted to add an additional requirement, so I changed events.txt so that not only is FTL Technology (id=90) a requirement to obtain, but the Apollo Program (id=65) must have been built as well. Here's the problem. It's not working. At all. Events.txt will load without error, and DebugView doesn't show any errors either. Yet for some reason, Tech 90 has been discovered and Improvement 65 has been built, but engineers still have not been given transport build ability. I'm at an absolute loss.
 

Attachments

  • Game.zip
    168.7 KB · Views: 85
Add "Continuous" to the CityProduction trigger. Macro.txt explains why:
When a trigger is activated, it remains that way only until the current game turn ends. If you need a trigger to remain "true" for the rest of the game (to satisfy one half of an @AND modified trigger, for example, when the other half will be satisfied later), you must include the Continuous modifier in the definition of that trigger.

Then follows a list of applicable triggers, but it seems they forgot to mention CityProduction.

Also, for ReceivedTechnology adding continuous is not necessary, since it'll fire every turn.
 
Hmm, I added the continuous modifier to the cityproduction trigger, but when reloading the .sav after using delevent, and as well as starting an entirely new game, Events.txt loaded fine, but it never found any form of "continuous" for city production, even though it said it was looking for it. Example:

Code:
@IF
RECEIVEDTECHNOLOGY
technology=90
receiver=Plutonian Empire
@AND
CityProduction
builder=Anybody
improvement=65
[continuous]
@THEN
Transport
Unit=Nuclear Ice Bomb
State=On
Mode=Native
Type=9
@ENDIF

Code:
@IF found - creating new event structure
New event structure created

@IF RECEIVEDTECHNOLOGY found
looking for technology=,whom=
found technology=90 (technology id=90)
found receiver=Plutonian Empire (king id=4)

@AND found - creating new event structure
New event structure created

@IF CITYPRODUCTION found
looking for builder=,unit=,improvement=,[continuous]
found builder=Anybody (king id=-3)
found city production improvement=65 (improvement id=-65)
@THEN found

@THEN TRANSPORT found
looking for unit=,state=,mode=,type=
found unit=Nuclear Ice Bomb (id=76)
found state=On
found mode=Native
found type=9 (bit=512)
@ENDIF found

The same result occurred even without the [] brackets around Continuous.
 
Apparently, "Continuous" needs to be the first parameter (or not the last or something). This will work:
Code:
CityProduction
continuous
builder=Anybody
improvement=65
 
Aha, oh wow. Playing an entirely new game, I just noticed that, if the tech is discovered first, when a city begins building the improvement, the game doesn't wait until said improvement has actually finished, it just goes ahead and triggers the @THEN statements. Is this an issue with the game, or, aside from a turn delay, can this be handled with additional fancy footwork in events.txt? :)
 
As far as I know, CityProduction will only fire upon completion of the improvement. What are the exact conditions? Or feel free to post the saved game, so I can have a look.
 
I think I already overwrote the .sav file, but if memory serves, an AI civ began production on it first, then I did a turn or two later, thus triggering it the next turn. Unfortunately, it seems to be a bit of a crapshoot, so there seems to be a bit of randomness involved.
 
Top Bottom