Want to design a scenario, I have questions.

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.

If I write events manually into the events.txt file, they don't work. They work only if I design them with the events editor in MGE, then copy them into TOT.
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.
 
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.
 
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.


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.
 
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.
 
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.
 
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.
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

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.
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.

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.
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.
 
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.

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).
 
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.
 
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)?

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.

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


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.

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.

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.
 
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


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


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.


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.
 
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:
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
 
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.

9. TECH "COSTS"

Each time you get a tech, the cost (in "beakers") to research the next one will increase (subject to the "KeyCiv" rule explained next). The first research is usually 10 beakers; the second can be between 18 and 24; the third between 28 and 36; and so on. The variation is usually due to the size of the map, with larger maps requiring more beakers. A good rule of thumb is that the next research "cost" will be:

-First 10 techs: (Number of Techs You Have) times (10 to 12)
-Next 9 techs: (Number of Techs You Have) times (14 to 16)
-20th and following: (Number or Techs You Have) times (MapSizeFactor)
Standard Map Sizes: Small=20; Medium=23; Large=30

Note that there can be a LARGE jump in cost between tech number 19 and 20!

10. "KEY" CIV

There is a mechanism in the game called the KeyCiv that tries to adjust a player's beaker costs as the gap in techs between players grows larger. A brilliant player called Samson discovered that your KeyCiv is based on cross-referencing your PowerRating with the colors of the Player List.

Here are the two lists:
#1/White=Pathetic
#2/Green=Weak
#3/Blue(dark)=Inadequate
#4/Yellow=Moderate
#5/Cyan(light blue)=Strong
#6/Orange=Mighty
#7/Purple=Supreme

So if your PowerRating is Mighty (see top line of F3), your KeyCiv is whatever player is Orange. If that is not you, your beaker "cost" for the current research will be adjusted by a factor based on the difference in number of techs each of you has acquired since the beginning (starting techs don't count). If you have less than your KeyCiv your beaker cost will be lowered somewhat. If you have more, it will increase. Each "jump" in cost happens for every three techs difference, so you don't have to worry every time you get a tech, just every three.

11. ABUSING THE KEY CIV

Of course, what is a discovery without a way to abuse it! This trick is called "Tech Bombing", and requires a willingness to part with techs in order to (A) lower your own research costs, or (B) increase another player's research costs. The basic idea is that you "gift" a bunch of techs to another player. To achieve (A), gift your KeyCiv every tech you have. If absolutely necessary you can withhold 1 tech (NucFission is my favorite, followed by FusionPower!). Hopefully the KeyCiv has one or two techs that you do not (and are not interested in, otherwise do an exchange rather than a gift), and maybe one or two less starting techs than you. This has two benefits: your beaker cost for the current and future techs will be reduced, and your KeyCiv will start worshipping the ground you walk on (a good time to swap maps or ask for a gift, if you are so inclined)! To achieve (B), gift a player whose research you want to slow down (like if they are researching Communism and you have Marco Polo and want to keep it going a while longer, or they are researching NucFission...) as much tech as you can. Every three techs you give them will shift them another notch in the tech cost equation relative to whomever is their KeyCiv. Note that this does not work if you also gift THEIR KeyCiv!
 
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:
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?
 
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.
 
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.
 
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.
 
Back
Top Bottom