1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Want to design a scenario, I have questions.

Discussion in 'Civ2 - Scenario Creation' started by Konig15, Jul 31, 2016.

  1. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    Oh, haha, thanks.
     
  2. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    :( 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: Aug 4, 2019
  3. tootall_2012

    tootall_2012 Chieftain

    Joined:
    Feb 11, 2012
    Messages:
    504
    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.
     

    Attached Files:

  4. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    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: Aug 5, 2019
  5. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    Funny thing is, it really seems to be connected to that changeterrain event. Once I deleted it in each of the three events everything worked fine. That's odd, they weren't linked to each other!
     
    Last edited: Aug 6, 2019
  6. Thorvald of Lym

    Thorvald of Lym A Little Sketchy

    Joined:
    Nov 21, 2005
    Messages:
    8,089
    Location:
    A Palace north of Oslo
    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.
     
  7. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    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
     
  8. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    Sorted out the glitch.

    Another one concerning wonder videos:
    Civ2 videos won't play on Windows 7 or 10 machines without Indeo 4 codec install (v5 fot TOT). How do you achieve something like this? Is there any obsolete program someone uses for this kind of modification?
     
  9. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    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.
     
  10. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    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: Aug 11, 2019
  11. Thorvald of Lym

    Thorvald of Lym A Little Sketchy

    Joined:
    Nov 21, 2005
    Messages:
    8,089
    Location:
    A Palace north of Oslo
  12. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    That doesn't seem to work. I've got a program (Ulead Visual Studio 3) that can handle the video and one (RAD) that can handle the sound. But none can do both at once.
     
  13. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    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.
     
  14. Buck2005

    Buck2005 Chieftain

    Joined:
    Feb 27, 2009
    Messages:
    327
    The names of civilizations must exactly match each other in the files CITIES.txt and RULES.txt Here and here:


    1.jpg 2.jpg
     
  15. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    199
    Location:
    Southern Hell
    They do, they do. That's what's weird about it. The capital cities get the right name for each civ, and the second city name is chosen from the extra list.
    If you don't have the civs' names right in the txt file your cities wouldn't get any names at all.
     

Share This Page