Events Thread

Attached 'Macro.txt' files to first post.
 
yoshi said:
Isn't the 'Kobayashi maru' the unwinnable battle simulation that Capt. Kirk cheated on, as indicated to Tuvok (Christie Ally) in 'Star Trek II: The Wrath of Khan'--Ricardo Montalban rules...in Star Trek...and Fantasy Island...(cough)...it's sad being a Mexican in Hollywood. :D

It is used repeatedly in the movies and in TNG. For example McCoy used the term to describe their incarceration in Rura Penthe in ST VI. Too bad it turns out my scenarios are actually more winnable than the average garden variety and not of the 'no-win' type like Red Front.

Maybe I should change my login to Kobayashi Maru :smug: to avoid confusion?
 
UNIT REDIRECTION USING MOVEUNIT


This is a little experiment in giving a unit new orders via the MoveUnit action before the AI gives it orders following a previous MoveUnit order:

Unit A = Any mobile land unit (haven't tested this with other domains).
Unit B = Immobile Barbarian or 'Neutral' (i.e. allied; no negotiation) unit.

- Spawn Unit A to go to Unit B's coordinates.

- Unit A's orders are cleared when in square adjacent to Unit B.

- Determine how many turns it takes Unit A to arrive at Unit B's adjacent square.

- Time ChangeTerrain event to delete (all four coordinates are Unit B's coordinates--the same coordinate four time over so that no other squares are affected) Unit B when Unit A arrives at adjacent square.

- In the same event, set all units in belonging to Unit A's owner within the area (i.e. the four coordinates beneath the 'maprect' line in the Events.txt file) around Unit B's coordinates to go to whatever coordinates you please.

- Since it isn't Unit A's turn to move yet, the unit will not have been given new orders by the AI yet, thus the MoveUnit command (identifiable as code '7' in a unit's shield when entire map is revealed via cheat menu--shortcut key: 'y') will take effect and the unit will move to the coordinates you specified under the 'moveto' line.


[EDIT: I was too lazy to create, and indeed saw little point in creating, a 'script' (combination of events) that would have UnitA 'bouncing' off four different UnitBs in an infinite cycle, but it should technically work. It would basically be the same thing only the unit would be 'redirected' (my term) to the next UnitB and you would get a repetition of the same action using the TurnInterval trigger.]
 

Attachments

  • Redirection.GIF
    Redirection.GIF
    2.4 KB · Views: 156
AI ASSAULT TEST 1.0 (FW/MGE)

CITY-BASED UNITS

I was also experimenting with different ways of getting the AI to be effective on the assault:

- Spawn AI unit and set it to go to rival's city (using MoveUnit) but set the value for the 'homecity=' parameter to an inaccessible city (not for play) with single shield.
- Repeat this event (simpler if you use TurnInterval).
- Each time a new AI unit is created, the previously-created one will disband (note that in Civ2, the units that have most recetnly made x city their homecity are disbanded last when city production drops).

The result will be that the AI unit will spawn, go to the rival city and attack it. The idea is that if the unit's orders are cleared (by a rival unit in an adjacent square along the AI unit's route), the AI unit will not wander--as the bloody AI just loves to do--for long before being disbanded.

Note that this implies the AI will not have any free units, so if you have the AI using autocratic governments (other than Despotism) you should set the free unit count (line under @COSMIC PRINCIPLES found in Rules.txt) to zero.

SEA DOMAIN CITY-BASED UNITS

I'm presently working on a WW2 scen where AI Landing-Craft (LC) units (the only units that can attack land--not designed for carrying units) are spawned, go to to key coastal cities and attack them. A new LC unit is timed to spawn just after the previous one should have arrived at it's target city, thus the previous LC disbands--assuming it hasn't been destroyed already--whether it has attacked the city or not.

If the AI captures the city, you then prevent more LC units from spawning by blocking the spawn square with an immobile Neutral unit. If the AI loses the city, you delete the blocking unit (using ChangeTerrain action) and LC units start appearing again.


BTW, I really do encourage people to post their ideas here; if anything, at least let me know if you find this thread helpful or not.
 
This thread is a major reason that I return to this forum. It's a dimension of design that is overlooked elsewhere. Keep it up!

I'm out of ideas myself at the moment. :(
 
NP if you have no ideas Boco, your comments are much appreciated. Thanks, this gives me a reason to keep this thread going.
 
Added two links relating to multiple events files (see post #1).
 
Thanks, I'll try to keep adding stuff whenever I can. I will also endevour to clean it up and make it more presentable when I get a large chunck of time to go over it.
 
Cleveland said:
Actually.. I think that's quite useful. But you can't use it if you have scenario where everything in map is visible...right?
Hah! I was just skimming over the thread and just realised what you were talking about! You'll have to forgive me: I am really bloody slow-witted.

Although it's unlikely you'll see this response, I'll post it anyway:

The 'extra' units in the that first example I gave in the second post are invisible (no image, hidden health bar), have no sound effect associated with them (empty Custom slot sound file) and only have single HPs and high FPs (short, single round of combat), so all you see is some momentary combat explosions in that corner of the map. Shouldn't ruin your game experience though--may tip you off that something is going to happen though (you won't know what unless you checked the scenario's Events.txt file--I certainly wouldn't tip players off by mentioning it in the Readme ;) ).

In Civ2:ToT, you can put the 'trigger units' in a seperate map that you have no access to, so then you, the player, will be completely unaware of these 'trigger unit' activities.

As for the rest of you reading this: let's keep my retardation from becoming a public joke, shall we? :shakehead
 
(Please ignore this post--it's just so I remember this stuff.)

- Re-test each posted script
- Go over reference links
- Add 'yoshi's Macro' file (w/tutorial?)
- New example format: description/script/sample file (MGE/ToT) or pic
- New 'Bugs' Section (add to 1st post?)
- Post examples from other scens
- Add tutorial for using batch files (incl. CivSwap tutorial?--check w/M)
- Add advanced Tutorial (tricks, etc.)

- Add everything into single file?
 
OK, I've got a question. Does anyone have any experience using ToT's ModifyReputation action? If so, what experience have you had with the AI? Note that the reputation value modified by this event is not the same as the number of betrayals (the reputation in the Foreign Minister screen) or a tribe's attitude (to other tribes).

Here's what Mick Uhl, one of ToT's designers had to say back in 1999. Unless modified by an event, I've so far found (using a hex editor) that reputation values remain zero (saintly) throughout an entire game.
 
No this is virgin territory from my perspective. Do you have a particular circumstance to which you want to apply it?

Since we're on ToT action questions, has anyone noticed BestowImprovment or even Cheat! building makes two space ship improvements per invoking?
 
I'm inferring that ModifyReputation changes different parameters than does the Eiffel Tower. Sound right? So in theory, then, couple the two, ModRep and BestowImprovement, to a CityTaken trigger, and you get as powerful a shift toward a peaceful AI as you could hope for in Civ2. Wishful thinking, or has anyone found this?
 
Boco said:
No this is virgin territory from my perspective. Do you have a particular circumstance to which you want to apply it?
It's for WotR – naturally. ;) Well, originally I thought that the 'modifier' parameter in the ModifyReputation event adjusted a tribe's attitude (0-100) to another tribe (same as the poster in the link). I was hoping to repeatedly apply a negative modifier (which I found to be illegal anyway) to adjust this value downwards so that I could maintain alliances and at the same time allow negotiations. Because of the aggressive diplomacy model introduced in MGE, it's virtually impossible to maintain alliances if negotiations are permitted. Since even positive modifiers had no effect on attitude, I dismissed this as yet another bug.

I've since found that attitude (0-100) and reputation (0-100) are two different things. Also reputation (0-100) is not to be confused with the reputation from the Foreign Minister screen and Cheat menu (0-8), ie, the number of betrayals. The 'modifier' parameter in ModifyReputation affects the former and the 'betray' parameter affects the latter. The event correctly adjusts the reputation (0-100) value upwards, but how this value actually manifests itself in the game is currently unknown to me.

Just to clarify things, these are the offsets for the variables I've mentioned:
Code:
  Offset       Type Values      Description
  2982 + 3348N Byte 0x00 - 0x08 Reputation (number of betrayals)
  3016 + 3348N Byte 0x64        Attitude to tribe 0 (barbarians) 
  3017 + 3348N Byte 0x00 - 0x64 Attitude to tribe 1 
  3018 + 3348N Byte 0x00 - 0x64 Attitude to tribe 2 
  3019 + 3348N Byte 0x00 - 0x64 Attitude to tribe 3 
  3020 + 3348N Byte 0x00 - 0x64 Attitude to tribe 4 
  3021 + 3348N Byte 0x00 - 0x64 Attitude to tribe 5 
  3022 + 3348N Byte 0x00 - 0x64 Attitude to tribe 6 
  3023 + 3348N Byte 0x00 - 0x64 Attitude to tribe 7 
  3024 + 3348N Byte 0x00 - 0x64 Reputation with tribe 0 (barbarians) 
  3025 + 3348N Byte 0x00 - 0x64 Reputation with tribe 1 
  3026 + 3348N Byte 0x00 - 0x64 Reputation with tribe 2 
  3027 + 3348N Byte 0x00 - 0x64 Reputation with tribe 3 
  3028 + 3348N Byte 0x00 - 0x64 Reputation with tribe 4 
  3029 + 3348N Byte 0x00 - 0x64 Reputation with tribe 5 
  3030 + 3348N Byte 0x00 - 0x64 Reputation with tribe 6 
  3031 + 3348N Byte 0x00 - 0x64 Reputation with tribe 7
N is the tribe number (0-7, starting with Barbarians).

As to the specifics of my example... well, I don't want to give too much away, but in WotR negotiations are allowed with just one other tribe. The behaviour of this tribe can be quite erratic (which I like), but there's one point in the game where I want peace to become an impossibility, even for only part of a turn. MakeAggression isn't good enough as a cease fire can be arranged (and renewed) at the beginning of each player turn.

I don't really think the ModifyReputation event is going to be of much use here – although I'm still curious as to what effect reputation (0-100) has on the game. The solution I'm working on involves increasing the other tribe's bargaining power. The more powerful a tribe, the more arrogant it becomes, to the point where it will only accept war as an option. As an experiment, I gave the tribe some extra inaccessible cities on my starting save. This worked. The trick is to create a balance so it works at the appropriate phase of the game. I wish I knew what factors affected this power algorithm, eg, total population, number of cities, units, technologies, etc.

BTW, since MoveUnit gets a mention in this thread, I'll add that I've solved the worst of the AI's wandering habits in WotR. Conditions are tough for the AI on this map because of its large size, low city density and high number of impassable terrain barriers. You'd often find the AI wandering all over the place: in the far corners of Harad and in the northern wastelands. With judicious use of MoveUnit events and landmass numbering (the map is effectively divided into a number of theatres of war) it's no longer a major issue; you'll get the occasional miscreant, but they're usually brought back into line. There'll always be some arseclown trapped behind a terrain barrier, but that's nowhere near as bad as it was, either; they generally extricate themselves - eventually.
Boco said:
Since we're on ToT action questions, has anyone noticed BestowImprovment or even Cheat! building makes two space ship improvements per invoking?
I've never used BestowImprovement to create space ship parts, but yes, I've seen it using Cheat. Don't know why.
Boco said:
I'm inferring that ModifyReputation changes different parameters than does the Eiffel Tower. Sound right?
Yep.
Boco said:
So in theory, then, couple the two, ModRep and BestowImprovement, to a CityTaken trigger, and you get as powerful a shift toward a peaceful AI as you could hope for in Civ2. Wishful thinking, or has anyone found this?
Yes, it's wishful thinking. Despite what it says in macro.txt, you can't use negative modifiers. Apart from that, I've got no idea how reputation (0-100) affects the game. That's what I'm hoping to find out.
 
Wobbegong said:
It's for WotR – naturally. ;)
Which is closer: this scenario is (A) hours :woohoo:or (B) years :cry: away from general beta testing or release?

Wobbegong said:
I wish I knew what factors affected this power algorithm, eg, total population, number of cities, units, technologies, etc.
I take it your term, power algorithm, is not the same as anything mentioned in the Great Library Info: Statistic

For some reason (obviously not related to the action's full name :blush: ), I thought that ModifyReputation set an absolute value, not modify the existing value.

As for MoveUnit (MU): in your experience, does the AI ignore MU's directed against enemy-held cities unless its strength exceeds some threshold?
 
Boco said:
Which is closer: this scenario is (A) hours :woohoo:or (B) years :cry: away from general beta testing or release?
Put it this way: because I tend to work in short bursts, it could be hours away from completion but years away from release. :p Don't worry, I can always send a beta your way. ;)
Boco said:
I take it your term, power algorithm, is not the same as anything mentioned in the Great Library Info: Statistic
Yeah, I've seen Andu Indorin's PowerGraph analysis before. I figure it's something similar, if not the same. Thanks for the link.
Boco said:
For some reason (obviously not related to the action's full name :blush: ), I thought that ModifyReputation set an absolute value, not modify the existing value.
:D Also consider that so far I've never seen values other than zero in a .sav file, except when modified by an event – and you can't improve on that.
Boco said:
As for MoveUnit (MU): in your experience, does the AI ignore MU's directed against enemy-held cities unless its strength exceeds some threshold?
What do you mean by strength? Total civ power, as mentioned above? If so, I haven't seen any evidence - but that's only because everybody seems to be behaving themselves (WRT MU) in my scenario.
 
Back
Top Bottom