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. Thorvald of Lym

    Thorvald of Lym A Little Sketchy

    Joined:
    Nov 21, 2005
    Messages:
    8,052
    Location:
    A Palace north of Oslo
    And just as I think I figured out what the problem was. :p

    I noticed digging through the rules that you gave every faction its own settler unit and made the default Settler and Engineer (Wizard and Necromant) civ-specific. I loaded up test.sav from this post, removed the 'Not _x' from all civs' tech, and lo and behold the suicide stopped. My guess is blocking access to the default settler units confused the AI; I don't think I've ever seen a scenario block them outright without pre-placed cities.

    You're not using a rich text editor, are you? I've written events out by hand in Notepad and as long as it's all proper format and syntax it works fine.
     
  2. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    192
    Location:
    Southern Hell
    Thanks for the replies and hints, guys.

    @Buck: Ah, forget my harsh words against Civ2, I simply felt devasteted. This flaw cost me about one week of my lifetime. And yes, the guys transfering Heroes to Civ2 - well, I'm one of them, haha. This actually really is the scenario that gave me those headaches. And yeah, I know Heroes is/was perfect the way it is, but I'm in simply because of the fun element of designing (which wasn't that much fun lately by the way! :mad:), I don't really expect anyone will play it. I'm only assisting Blake who really seems fond of pressing classical games into the Civ2, haha. He's got the passion and I've got the knowledge how it works (at least I thought I had it until a week ago). And I simply feel an urge to finish a Heroes mod because I started it five years ago - but already back then nobody was interested in that one, so I skipped it. And it was funny to read Blake's call here,re-posting one of my five-year-old screenshots and trying to find me. Ah, I guess that's fate, that's why I can't stand aside.
    But up to now I haven't touched Civ2 for about four or five years and TOTPP seemed to be a never ending story back then. I don't know if The Nameless One has ever finished it, therefore I didn't want to use it unless there was a final version.

    @Thorvald: Yep,that makes sense, now that you mentioned it I can't remember a scenario starting without cities but with custom units either. And I'm not using wordpad for editing the events, I do it with the most primitive txt editor there is. Funny thing is, I can alter the events file manually on my XP laptop manually or by editor and transfer it on my WIN10 laptop and it works. But if I edit it on the WIN10 laptop itself, it doesn't work. I don't have a clue on that either. But I'm happy it works at least on the XP notebook.

    By the way, I've got a few questions on MGE and TOT and would appreciate some answer here:
    1. Only the original engineer's slot seems to be able to terraform hills and mountains. Is that hardcoded just like the spy's slot (who can plant a nuke and poison water supplies for example, but the diplomat can't)?
    2. And do I have to keep the missile and the nuke in their slots, too, or are these both free to be placed wherever you want them to be in the units.gif file? That's simply because they split my custom creatures in two parts and that looks a little bit odd, it would look better if they were in a row.
     
  3. Buck2005

    Buck2005 Chieftain

    Joined:
    Feb 27, 2009
    Messages:
    319

    1. It seems so. Only an engineer can terraform a landscape. The role of "settle" allows you to create only additional setters in new slots.

    2. A nuclear bomb and a rocket can be made from any unit. For a nuclear bomb, all you need is to set the attack value to 99.
     
  4. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    192
    Location:
    Southern Hell
    Okay, thanks. That's a pity with the engineers, but having the rockets not split the rest of the army in two halfs has to be well enough then.
     
  5. Buck2005

    Buck2005 Chieftain

    Joined:
    Feb 27, 2009
    Messages:
    319
    However, also do not forget about the option "self-destruction after the attack," for conventional missiles. For a nuclear bomb, it certainly is not needed, since the bomb will die anyway. In addition, if you plan to allow barbarians in a game, be careful when placing new missiles and bombs on "barbarian slots". Otherwise, in the game you may have a paradoxical situation, when suddenly there will be "barbaric nuclear bombs".

    As for the engineer, I’m not 100% sure, but it looks like it’s the only unit to whom terraforming is available. In any case, I was not able to create one more "engineer". Although someone on this forum told me that in TOTPP it is supposedly possible to create a units with separate functions of a “worker” and a “setler”, like civ3 or freeciv. Maybe I just did not understand this person correctly. If this separation is really possible on the civ2 platform, I would also be interested to know how to do this.
     
  6. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    192
    Location:
    Southern Hell
    Yeah, I won't forget about the missile self-destruction. And the barbarians are linked to techs, there's a good description in the Barbarian Papers: http://sleague.civfanatics.com/COC/guides/barbtechs.shtml

    And I also had another unfriendly encounter. Naming a civ Barbarians crashes the events file, had to rename that civ into Savages. I don't know if it works the other way round, renaming the Civ2-barbarians into savages and that specific civ into barbarians. I'll check that later, depending on how much work this turns out to be.
     
  7. Thorvald of Lym

    Thorvald of Lym A Little Sketchy

    Joined:
    Nov 21, 2005
    Messages:
    8,052
    Location:
    A Palace north of Oslo
    It's funny because I always felt the MoM Jr. scenario was undercooked; when I found out you were porting HoMM I got stupid excited. :p

    I don't know if there will ever be a final version per se, but most of the features are stable and the SLeague gang now considers it a staple in all future modding. TNO's last update was April 2018; there are a few lingering bugs but they shouldn't be prominent enough to break most games.

    I noticed in the test build the barbarian faction hadn't been renamed, so the event would try to process two civs at once. As long as the barb civ doesn't share a name with a player civ, it should work.
     
  8. Prof. Garfield

    Prof. Garfield Chieftain Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,124
    Location:
    Ontario
    I don't remember anyone talking about it in the forums, but some very brief tests I did suggest it is possible (at least for the human player). You achieve it by doing a key press event. Specify a "worker" unit type that is non-settler (i.e. roll not 5), and write an event such that when key 'i' is pressed, if the active unit is a worker, change the unit's order to irrigating. After a few turns, irrigation will be produced (though I think the unit won't get rid of its order, so you'd need another event). Unfortunately, you will still get popup messages explaining how only settlers can do that action.

    If a settler does a "worker" action, you would have to clear the settler's order (maybe you must use civ.sleep to wait a moment so the unit is actually given the order), and maybe replace the settler unit so it doesn't accumulate work.

    Alternatively, use the non-settler unit for city building, using civ.createCity, and delete any city produced by a settler (there is some code for the latter part in Over the Reich).
     
  9. Buck2005

    Buck2005 Chieftain

    Joined:
    Feb 27, 2009
    Messages:
    319
    I see, thanks for the comment. It’s a pity, of course, that this separation is only available using the "events" file. I try to avoid using "events" in civ2 as much as possible. However, I am sure that this information will be useful to other users of the game who use them.

    By the way, thank you for the idea, and the implementation of the Library of events. Ready-made blocks of events, such as "ammunition" (I must admit that this is one of the valuable achievements of TOTPP, which really improves the gameplay) greatly simplify their incorporation into the game.
     
  10. Prof. Garfield

    Prof. Garfield Chieftain Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,124
    Location:
    Ontario
    I think engineers are the only ones who can get x2 work effort as well. In Test of Time, it appears you can give engineer qualities to any unit

    ; Advanced unit fields

    ; A) 'tribe may build' mask: 0 - can't; 1 - can
    ; B) 'not allowed on map' mask: 1 - not allowed on map
    ; C) minimum bribe amount: n - minimum bribe; 0 - don't care; -1 - can't bribe
    ; D) 'build transport site' mask: 1: can; 0: can't for each site type
    ; E) 'use transport site' mask: 1: can; 0: can't for each site type
    ; F) native transport ability: 1: can; 0: can't for each map relationship type
    ; G) General flags
    ; 00000001 invisible until attack: 1 - invisible
    ; 00000010 non-disbandable (human players only): 1 - cannot disband
    ; 00000100 0-range-air-unit damage override: 1 - override damage
    ; 00001000 barbarian units can't be bought off: 1 - can't buy off
    ; 00010000 impassable terrain override: 1 - override impassable terrain
    ; 00100000 unit acquires engineering abilities 1 - engineer
    ; 01000000 barbarian unit will not expire: 1 - no expire
    ; 10000000 override .SPR file for this unit: 1 - don't use .SPR


    I think the nuke slot is hard coded to change diplomacy, however. I seem to remember a Colonies scenario where the Spanish Treasure fleet was put in the nuke spot, so that gave different messages in diplomacy than others.
     
  11. Buck2005

    Buck2005 Chieftain

    Joined:
    Feb 27, 2009
    Messages:
    319

    Yes, now I managed to make engineers from other units, it works. Thanks for these settings!



    Honestly, I have never been interested in civ2 diplomacy, since I only use this game strictly for multiplayer (where, in fact, it is not needed). However, you are right, for the single player mode, it will probably be important to keep track of such details affecting diplomacy.
     
  12. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    192
    Location:
    Southern Hell
    Now it's the events file:
    I want to include a spawner unit in every MGE scenario you save on a random map. It clearly appears always at the same coordinates. That's why I first need to change the terrain on that spot (I don't like the spawner to end up in the ocean) and those around it. Alas, I can't find a system behind that eight coordinates: 0,0,0,0,0,0,0,0 (x,y,x,y,x,y,x,y) which should form a grid. The effect isn't identical with the coordinates in the map. The heading says they are for a 'Map Rectangle', but it turns out to be weird. Can someone give me some lead-in on how this works?
     
    Last edited: Jul 28, 2019
  13. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    192
    Location:
    Southern Hell
    Aargh! Are the techs somehow hardcoded on how much science points you need to make advances? Because the tech tree is set and some of the techs take hundreds of turns and the next one you research only like 15. I changed their epoch, but that seems to have only graphical effects in the icons.gif
     
  14. Prof. Garfield

    Prof. Garfield Chieftain Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,124
    Location:
    Ontario
    This is probably a "key civ" issue. Change power, and move from a key civ with few (or no, if that player is missing) technologies to one with many.

     
  15. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    192
    Location:
    Southern Hell
    Okay, thanks.

    And hopefully the last few things I need to know:

    - Giving someone Philosophy by event doesn't trigger any free advance as intended?
    - After destroying certain units you don't get your free creature as written down in the events file. :( The text appears and the money is changed, but the free creature that should replace the destroyed unit refuses to appear.

    EDIT: Obviously you can't create a new creature to replace the destroyed one on the same tile. It only works if it gets placed only on a tile next to it. Okay, I can live with that.
    But the Philosophy thing is annoying.
     
    Last edited: Jul 28, 2019
  16. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    192
    Location:
    Southern Hell
    I still don't have a clue how that terrain change event action works. Let's say I want to change the terrain at 8,42 and the eight tiles around it to get a nice 3x3 pattern of similar terrain (I really don't need that specific coordinates, any hint on a 3x3 pattern will do, because the spawner unit will appear right in the middle of that pattern one turn later). Which coordinates do I have to enter in the event file to achieve that?
     
  17. Knighttime

    Knighttime Chieftain

    Joined:
    Sep 20, 2002
    Messages:
    99
    I'm not an expert in the macro language, but I think the tile coordinates for a map rectangle have to be entered in this order:
    1 2
    4 3

    However, a tile and the 8 tiles surrounding it form a diamond, not a rectangle. So I'm not sure if that's supported (at least with a single command). You could try this:
    8,40,10,42,8,44,6,42

    If that doesn't work, well, you should be able to change a single tile by giving its coordinates four times:
    8,42,8,42,8,42,8,42
    You could change each tile individually that way, if you defined multiple events.

    Or, this ought to give a little larger area:
    6,40,10,40,10,44,6,44

    Hope this helps. I know there are some other people on this forum who have used macro language much more extensively, so someone please correct me if I'm mistaken.
     
  18. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    192
    Location:
    Southern Hell
    Thanks, and oh... wow. Changing the terrain by events kills every unit standing on those tiles and even disrupts existing cities! I had a try and my starting settler randomly appeared on one of the affected tiles and I simply built my city there, without even taking care of the coordinates (I just wanted to check on the changed pattern) and suddenly my whole civ perished. I tested it several times and it really works that way.
     
  19. Metro Polis

    Metro Polis Chieftain

    Joined:
    May 5, 2012
    Messages:
    192
    Location:
    Southern Hell
    I'm on the finishing line with the MGE version and have a short question on events I hope someone is willing to answer.

    There is a stack of spawner units (Dragon City), a stack of two, so they can't be bribed in MGE. If anyone destroys such a unit (and therefore the both units in the stack), the action is triggered twice, which shouldn't happen (double bonus unit, double text,...) - so everything happens twice. That's not that bad, just the text appearing twice annoys me. There is a command line called "Just once", but that doesn't seem to work properly mybe because the stack is killed simultaneously?

    I had all the actions (change terrain, text, create unit, change money) in one big action order and it didn't work. Then I split it and had the text in a single if-order of it's own (see below), but still everything happens twice.

    @IF
    UNITKILLED
    unit=Drageon City
    attacker=ANYBODY
    defender=ANYBODY
    @THEN
    JUST ONCE
    TEXT
    Dragon City lies in ruins! The hero tames some Black Dragons and plunders their lair.
    ENDTEXT
    @ENDIF

    Has anybody got an idea on how to prevent the text (and maybe the other actions, too) from appearing twice in a row? Maybe I don't apply the Just once command properly.
     
  20. tootall_2012

    tootall_2012 Chieftain

    Joined:
    Feb 11, 2012
    Messages:
    503
    Hi Metro Polis,

    The just once parameter needs to be in one word, JUSTONCE.
     

Share This Page