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 Warlord

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

    Metro Polis Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    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 Prince

    Joined:
    Feb 11, 2012
    Messages:
    515
    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 Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    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 Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    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,113
    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 Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    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 Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    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 Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    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 Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    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,113
    Location:
    A Palace north of Oslo
  12. Metro Polis

    Metro Polis Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    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 Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    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 Prince

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

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      196.3 KB
      Views:
      48
    • 2.jpg
      2.jpg
      File size:
      71.8 KB
      Views:
      41
    Last edited: Oct 18, 2019
  15. Metro Polis

    Metro Polis Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    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.
     
  16. Knighttime

    Knighttime Warlord

    Joined:
    Sep 20, 2002
    Messages:
    107
    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:
    actually wouldn't apply. I haven't tested this, though.

    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.
     
  17. Metro Polis

    Metro Polis Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    Location:
    Southern Hell
    **** 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: Oct 20, 2019
  18. Metro Polis

    Metro Polis Warlord

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

    Metro Polis Warlord

    Joined:
    May 5, 2012
    Messages:
    203
    Location:
    Southern Hell
    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: Oct 20, 2019
    Thorvald of Lym likes this.
  20. Catfish

    Catfish Emperor

    Joined:
    Nov 2, 2003
    Messages:
    1,395
    Location:
    Wollongong, Australia
    See this post. Note the second paragraph. Does it apply to you?
     

Share This Page