Want to design a scenario, I have questions.

:( This events file drives me crazy.
I have three spawner cities/units and when one is killed the events take place as they should, but the other two disappear without any trace, too, even though they are spread all across the map and haven't got anything in common in the events file.The actions work for each event properly but affects the other spawner units as well.
:mad:

@IF
UNITKILLED
unit=City of the Dead
attacker=ANYBODY
defender=ANYBODY
@THEN
CHANGETERRAIN
terraintype=0
maprect
8,42,8,42,8,42,8,42
TEXT
The City of the Dead has crumbled to ashes! The victorious hero tames a Bone Dragon and plunders its lair.
ENDTEXT
CREATEUNIT
unit=Bone Dragon
owner=TRIGGERATTACKER
veteran=no
homecity=no
locations
9,41
endlocations
CHANGEMONEY
receiver=TRIGGERATTACKER
amount=250
@ENDIF

@IF
UNITKILLED
unit=Dragon City
attacker=ANYBODY
defender=ANYBODY
@THEN
CHANGETERRAIN
terraintype=2
maprect
81,49,81,49,81,49,81,49
TEXT
Dragon City lies in ruins! The victorious hero tames a Black Dragon and plunders its lair.
ENDTEXT
CREATEUNIT
unit=Black Dragon
owner=TRIGGERATTACKER
veteran=no
homecity=no
locations
80,48
endlocations
CHANGEMONEY
receiver=TRIGGERATTACKER
amount=250
@ENDIF

@IF
UNITKILLED
unit=Xanadu
attacker=ANYBODY
defender=ANYBODY
@THEN
CHANGETERRAIN
terraintype=2
maprect
48,22,48,22,48,22,48,22
TEXT
A hero was chosen worthy enough to enter Xanadu and takes the Ultimate Book of Knowledge home to unleash its magic.
ENDTEXT
GIVETECHNOLOGY
technology=60
receiver=TRIGGERATTACKER
@ENDIF
 
Last edited:
Hi Metro Polis,

I looked at your events in a little bit more detail but couldn't discern any particular error in them, though I might recommend to place the changeterrain code after the TEXT or CREATEUNIT code. I can't say I've ever worked with the TRIGGERATTACKER wildcard so I cannot, myself, attest to it's reliability.

You weren't very specific about which of the 3 events worked but one technique I've used repeatedly in the past, when confronting a particularly troublesome event is to create a separate small event file. I then placed exclusively the macro code for the events I was trying to fix to try and debug them.

In your case, I've attached a small macro file with your 3 events. As such, you can start by testing each event individually by commenting out the other two (you do so by placing a ";" in front of each line of the other events). If they all work, then you can try combinations of two. If that works, then uncomment all three. If that works then it could be another event in your file that is causing an issue.

Finally, I may be mistaken, but it seems like your events are the kind you may only want to occur once? You may want to try adding the JUSTONCE parameter to each one to see if that makes a difference.

I hope this helps.
 

Attachments

Well, each of three events worked neatly when triggered in-game, but caused the other two spawner units to vanish. It isn't important which one is triggered, the other two always disappear, too. And it's true, I wanted to use the JUSTONCE parameter, but because of the flaws described, I omit it while testing, because it had no effect and I wanted to keep the code as simple as possible.

I'll have a try with the method you described in the evening and will report what's going on. At least I think I won't need the CHANGETERRAIN parameter after all, because I forgot that the whole stack gets killed. And changing the terrain does exactly the same. I hope a more simple code will work better than this one.
 
Last edited:
A possible workaround is to split the CHANGETERRAINs into separate events (using the same trigger). I know from my own experience the events macro is finicky in weird ways that MicroProse never documented, and I've had instances where certain effects wouldn't work when invoked in the same block.
 
We're working on the rulers' portraits and something strange happens to the heralds' text boxes. Each civ's one has got a weird colour, some of which are really hard to read, even harder then the second one in this picture. I don't know why this happens as all other text boxes aren't affected. Does anybody have a clue where these colours derive from?
untitled.PNG
 
Sorted that out too: I just found a video editor from the millenium turn which uses the right Intel Indeo Video 4.5 codec (it's almost the last in line in the project options) here
https://archive.org/details/UleadVideoStudio3.0SE

But it won't work with WIN10, I had to reactivate my old XP laptop.
 
Ah, not really, the sound makes some trouble. It needs to be 22050 kHz and this program converts the video correctly and great, but the sounds are useless as they are 44100 kHz. So, what sort of editor or converter does a Civ2 veteran use? This is what it has to be:
upload_2019-8-11_18-51-36.png
 
Last edited:
Somehow the civs in my scenario don't want to stick to the city names given to them in the city.txt file! :mad: They switch to the @Extra cities' names. For each civ. So 7 times Naples and 7 times Cunaxa and so on. I checked the names and their owners several times, the problem still occurs. They have the right capital, then I save it as a scenario and s**t happens. Does anyone have a hint or clue?

There are only 7 civs, always revolving, meaning if a civ gets killed at the beginning of the game, a civ with the same name jumps in.
 
The names of civilizations must exactly match each other in the files CITIES.txt and RULES.txt
 

Attachments

  • 1.jpg
    1.jpg
    196.3 KB · Views: 194
  • 2.jpg
    2.jpg
    71.8 KB · Views: 123
Last edited:
Somehow the civs in my scenario don't want to stick to the city names given to them in the city.txt file! :mad: They switch to the @Extra cities' names. For each civ. So 7 times Naples and 7 times Cunaxa and so on. I checked the names and their owners several times, the problem still occurs. They have the right capital, then I save it as a scenario and s**t happens. Does anyone have a hint or clue?
If you go to Edit King in the Cheat menu, there's an option to Edit Name. I'm pretty sure that will change a tribe's name in your scenario but will not update/overwrite any part of rules.txt. That seems like a really bad idea to me (having them inconsistent), but if something like that has ever happened in your project, I'm not sure what city.txt would expect. My first guess would be that it would look for a heading matching the tribe's name in the scenario... so that might be a corner case where this:
The names of civilizations must exactly match each other in the files CITIES.txt and RULES.txt
actually wouldn't apply. I haven't tested this, though.

There are only 7 civs, always revolving, meaning if a civ gets killed at the beginning of the game, a civ with the same name jumps in.
So in the @ LEADERS of rules.txt, the first 7 lines define your unique civs, and then these lines are simply copied verbatim for "sets" 2 and 3?
So in city.txt, do you have city lists for 7 civs, or for 21 civs (where the entire set of 7 city lists is repeated 3 times)?

I can imagine that the game's programmers expected to be able to find a unique 1-to-1 match between all 21 civs and all 21 city lists, so if that's not possible, you might have an issue. If it was me, I'd start with testing unique names like "Romans1", "Romans2", "Romans3" in both .txt files, just to confirm that this gets things back on track again. From there you might have to do some experimenting...

It certainly does seem strange if the capital city name is assigned correctly for each civ, but all cities after that are incorrect. Not sure why a problem linking tribes to lists wouldn't begin immediately with the first city.
 
**** still happens. Even though I replaced all the civs' names in all the txt files in the main folder in a Civ2-copy of the game itself.

Funny thing is: if I start a regular game, the game picks the cities' names in the right order. As soon as I save it as a scenario, it doesn't do that any more, but switches to the extra city names.

I have no clue why, can't remember this has ever happened before. The events.txt works fine and uses the same civs' names to distibute the custom techs.

This is quite frustrating for it is the final part before ending and publishing this project.
 
Last edited:
Maybe, but only MAYBE I sorted out the city name problem. If you take a look at city.txt and just move forwards and backwards by pushing the arrow keys, a slight problem occurs at the end of some names (and all capitals' names). If you push fowards and backwards there, the cursor won't move, only if you push the key again. Maybe something odd happened during copying the names into that file and that's why the game switches to the extra names list after the capital was built. However, you can't see that flaw by just looking at the text itself and that drove me crazy. You get aware of it it only by moving the cursor along.

Well, I just erazed the capitals' names and simply wrote them anew. And that seems to work, the next city uses the next name from the custom list.

It seems there are other cities, too, that have that kind of flaw which interrupts the civs' city names list. I don't know owhy and how this could happen, need to check the names anew.
 
I have already wondered why changes in the WIN10 text editor didn't work and caused the game to crash! I had to write everything an my old XP laptop. And I guess I haven't done that with the city file! F**k! Notepad shows there were lots of extra gap lines between the cities' names.
 
Last edited:
Back
Top Bottom