You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, TAG

Hop to:    
Welcome! You are not logged in. Please Login or Register.712 replies, Sticky
Age of Mythology Heaven » Forums » Scenario Design » Have a Question? Post it here!
Topic Subject:Have a Question? Post it here!
« Previous Page  1 ··· 10 ··· 20 ··· 27 28 29  Next Page »
Out Reach
(id: newreach268)
posted 28 September 2015 03:38 PM EDT (US)         

Got a question? Need an answer?
Here is a list of common questions concerning AoM.


Upon playtesting a scenario in the editor, I lose within the first five seconds!
Easy to fix. Simply click on the "Scenario" tab in the editor, click on "Scenario Data" and uncheck the check box next to "Use victory conditions". Alternatively, you can place a unit of yours somewhere on the map, then place an enemy unit somewhere else on the map as well.

How come it seems like some units are missing in the list of protounits on a trigger?
To find out the proto name of a unit, have it selected in the editor and click on the "Cinematics" tab, then click "View animations." For a shortcut, just select the unit and press Alt+A.

How do I make units larger or smaller?
This is for The Titans users only. To enlarge a unit, select it and hold "K" on your keyboard. To make the unit smaller, hold "Shift + K".

How can I change the stats (attack/health/etc.) for a unit?
Easy. If you're a Titans user you can find the two triggers called "Modify Protounit" and "Set Tech Status". If you're running regular AoM, you will only have "Set Tech Status" available. You can set unit attributes with both these triggers.

How can I make units regenerate health?
First create a new trigger. Check the Active and Loop boxes. Pull the Priority cursor all the way to the right. Create a new condition Is Alive, select and set your desired unit. Add a condition Timer with a value of 1. Finally, add a Damage Unit effect, select your desired unit again and set the value to -1.

How can I have over 300 population?
Use the Modify Protounit effect to make a protounit have a population cost of a very extremely high number, like 999999999.0 . Make sure that it is a protounit that you can't normally get in-game by yourself. Then just place two of them somewhere on the map, and they will make the population for that player go to a negative number, and be infinite.

My triggers have stopped working!
Using Run immediately, quotations in chats, linking camera tracks, sound timers and decimals in conditions like timer and distance to unit affect this. If you are unsure about what the source is, outline what you did, and we can help.

The computer players aren't acting like computer players should!
You need to set AI for them. In the editor, click the "Scenario" tab, then "Player Data". There will be a button all the way to the right of the player slot to set the AI. It is reccomended you choose one of the "default" ais such as aomdefaultai.xs for AoM Vanilla, or aomxdefaultai.xs for The Titans.

I've seen people do these crazy camera angles that I can't seem to figure out how to do! Help!
A common question. Your camera must be unlocked and working first. It should be already by default. If it's not, press "Shift + Alt + C" to unlock it. To change the pitch of the camera, press "A" and "Z" or "Ctrl + Up Arrow" and "Ctrl + Down Arrow" on your keyboard to go up and down.

How do I add sound and dialogs in a scenario?
Like the dialogs in the campaigns, you can use the trigger effect "Play Dialog" to display text while on Cinematic Mode. You can type a text, include a sound, and a small image (portrait) "Sound filename" is a similar trigger effect, but not the main one used.

How can I give units animations like they do in the campaigns?
Select the unit in the editor, click on the "Cinematics" tab, then click "View animations." In the "Type" tab, find and click "Cinematic". In the "Anim Path:" tab is a list of animations that you can view for sampling. When you find the one you want, you can use its name with the "Set animation" trigger effect and be able to use it in-game.

Practical Guides
Scenario Design Library Articles
Scenario Design Dictionary
Shuch_ya_mouf's Ultimate Trigger Guide
Paperfriend's List of Guides
Making Quality Scenarios: Triggers
Making Quality Scenarios: Eyecandy
Nottud's Guide to the transform trigger
Campaign Dialogue List

Thread credits: Paperfriend + Yeebaago0on (FAQ), Eurotool (design), CeaseDaFire (maintenance), Reach (OP) 

Out Reach
The guy who writes the erotic fan fiction in Yeebaagoon's signature

[This message has been edited by Out Reach (edited 01-22-2019 @ 10:12 AM).]

posted 10 August 2019 08:16 AM EDT (US)     701 / 712       
There may be two main issues with your trigger.

The first one lies with the way your conditions are set up. In AoM, the conditions are checked individually, from top to bottom. So right now, the conditions will be met if the guarding army was alive before the 300s interval triggered, and if the guarding army then was killed during the 300s interval it would not matter because the army alive check has already been done (and thus all the conditions will be met).

And a possible second issue is related to the timer condition. A looped trigger with a timer condition might not behave like you think it should. The timer condition checks if at least 300s have expired from the moment the trigger activated. If the Army is Dead condition is not met after those 300s, the trigger will be refired because it's looped and all the conditions are checked again. But because a timer condition is present, the previous trigger activation remains active until the next trigger activation has done a full cycle of all the conditions.

So basically what this means is that the following thing could happen:

  1. The trigger gets activated. Let's call this activation trigger_instance1.

  2. When 300s have expired and the army is dead condition is not met, another instance of the trigger will be created that is refired because the trigger is looped. Let's call this trigger_instance2.

  3. Now whenever the army that is standing by the player's settlement is killed within the next 300s, then the conditions for trigger_instance1 will be met and the effects for that trigger instance will be activated. Let's say this happens after 200s. The anubites and spearmen will be deployed by trigger_instance1, and they will deploy again after 100s by trigger_instance2 if the Army is Dead condition will be met again.

I don't know how exactly you want your trigger to function. Do you want to check if the guarding army is alive and standing army is defeated every 300s, and then only spawn the anubite/spearmen army if both those conditions are met? Or do you want to check if the standing army is defeated, and then wait 300s to deploy the anubite/spearmen army if guarding army is still alive?

What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey.
Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers.
Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]

[This message has been edited by Lewonas (edited 08-10-2019 @ 08:24 AM).]

posted 15 August 2019 12:19 PM EDT (US)     702 / 712       
That is the exact function I'm looking for, both one army (Guarding army) alive, and the other (standing army) dead. If both of those conditions are met I want it to spawn the attack every 300 seconds. but I also want it to stop if the guarding army ends up dying.
posted 16 August 2019 09:40 AM EDT (US)     703 / 712       
Is there a way to edit godpowers? For example:

Damage of Lightnings, Meteors etc,
Number of Snakes and Minions,
Freezing time of the Frost,
posted 17 August 2019 07:00 AM EDT (US)     704 / 712       
@Niley: You can edit them to an extend.

  • For the Lightning Storm god power, you can modify the Lightning Strike protounit attack values which is the unit that inflicts the damage (hand attack crush = 150, hand attack pierce = 200).

  • The same goes for the Bolt god power; you can modify the Bolt Strike protounit (hand attack hack & pierce & crush are all set at 10000).

  • Meteor god power; modify the Meteor protounit (hand attack crush = 900, hand attack hack = 100)

  • SPC Meteor god power; modify the SPCMeteor protounit (hand attack hack & pierce & crush = 1000000)

You can find these values in the proto*.xml files inside your AoM/data folder.

As for the Snakes / Minions god powers, you can use the vtriggers or ytriggers to detect those units and kill some of them if you want the god power to deploy less units, or deploy extra units near them if you want the god power to deploy more.

The Freeze god power would be tricky to modify. There is no actual way to prolong the freeze effect, but you could shorten it. You would have to use the God Power active condition to detect the god power usage, and then use vtriggers to do a map-wide search for units that are frozen by checking the units' states. Then save the unit IDs of those units somewhere, start a timer for how long you want those units to keep frozen, and then use the change unit type effect to change the units to the same unit to cancel out the freeze effect. That's a pretty hefty trigger to make. I would try to find another way that doesn't involve using the frost god power because it's too much of a hassle to make it work.

I would also recommend reading Yeebaagooon's guide to creating / modifying god powers with triggers.

@Macseafood: In that case I would create the triggers like so:

Trigger name = deploy_standing_army_check
Active [X] Loop [ ] Run Immediately [ ]

Condition: Army is Alive
Army: The guarding army

Effect: Fire Event
Trigger: deploy_standing_army

Trigger name = deploy_standing_army
Active [ ] Loop [ ] Run Immediately [ ]

Condition: Timer
Time: 300

Effect: Conditional Army is Alive
Army: The guarding army

Effect: Conditional Army is Dead
Army: The standing army

Effect: Army Deploy
Army: The standing army
Unit: Anubites
Clear: TRUE (erases all the previous units that belonged to the army)

Effect: Army Deploy
Army: The standing army
Unit: Spearman
Clear: FALSE (!!) (if you don't set this to FALSE, then the Anubites you just deployed would be removed from the army)

Effect: Conditional zEND

Effect: Conditional zEND

Effect: Fire Event
Trigger: deploy_standing_army_check


You can download the Conditional effects from here.

What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey.
Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers.
Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]

[This message has been edited by Lewonas (edited 08-17-2019 @ 07:31 AM).]

posted 17 August 2019 12:04 PM EDT (US)     705 / 712       
@Lewonas Thanks, that helps a lot! For the frost it was actually depending on how easy it's gonna be so in this case I will just not use it :P
Can I change how fast and how much Restoration heals and the range of Bronze?

[This message has been edited by Niley (edited 08-17-2019 @ 03:40 PM).]

Irrational Fear
posted 17 August 2019 12:50 PM EDT (US)     706 / 712       
You can't edit the number of things being spawned but you can edit the damage dealt by the god powers using the Modify Protounit trigger.

For example, if you modify the Bolt Strike unit's Hand Attack Hack value, you can change the amount of hack damage that bolt will deal.

I suggest you look inside the proto2.5.xml file located in C:/Program Files(x86)/Steam/steamapps/common/Age of Mythology/data. That is where all the unit stats are stored.

[This message has been edited by Zenophobia (edited 02-29-2094 @ 10:60 AM).]
(id: Lilitu)
posted 01 September 2019 01:16 PM EDT (US)     707 / 712       

I got a question on scenario scripting. We know that triggercode gets translated into the trigtemp.xs on scenario start, which is the code being executed for all of the triggers.

But there are people who do not script Trigger Conditions and Effects in xml, but just write the code in an XS which they turn into like 1 trigger. So the whole map runs on one effect.

Is there a tutorial on how to work like that?

Azarath Metrion Zinthos

Steam: Order of Azarath
Discord: Azarath @
Heretic of December
posted 02 September 2019 09:50 AM EDT (US)     708 / 712       
I know this tool could do it for titans scenarios. Iím not sure if it works for EE. I donít think there would be any harm in trying that.
(id: Lilitu)
posted 03 September 2019 12:47 PM EDT (US)     709 / 712       
Ah I prefer TT anyways, quicker restart. X,x

But this tool looks like it's the other way around?
By buttons this tool can:
- Export to XML, so if there are custom triggers which you don'T have, you can get them.
- Triggers to one, wich makes one out of all

But I was looking to write in XS and convert it into one XML effect or so which will be run once and sort of does everything. I don't want to use triggers, conditions and effects and then fuse them into one. I want to write an XS script and make the scenario run on that.

Azarath Metrion Zinthos

Steam: Order of Azarath
Discord: Azarath @
Heavy Hoplite 15
posted 17 September 2019 07:35 AM EDT (US)     710 / 712       
is there a way to make custom campaign backgrounds? I am trying to make a Vikings campaign but England is too far left.
posted 18 September 2019 10:27 AM EDT (US)     711 / 712       
@Izalith: You could always just write the XS code and then wrap every line in <Command></Command> tags with a simple script. Triggers are essentially just a bunch of XML command tags.

One great benefit of coding in XS is that you can define helpful functions which you can use in your rules (triggers). Here's an example of some XS code I used in a Risk map that I have worked on:
<Effect name="RISK - ACTIVATE LOADER">

<!-- ======== -->
<!-- RISK -->
<!-- ======== -->

<Command>const int TERRITORIES_COUNT = 42;</Command>
<Command>const int CONTINENTS_COUNT = 6;</Command>

<Command>const int TERRITORY_HIBERNIA = 1;</Command> // GERMANIA
<Command>const int TERRITORY_CALEDONIA = 2;</Command> // GERMANIA
<Command>const int TERRITORY_ANGLIA = 3;</Command> // GERMANIA
<Command>const int TERRITORY_THULE = 4;</Command> // GERMANIA
<Command>const int TERRITORY_VARANGIA = 5;</Command> // GERMANIA
<Command>const int TERRITORY_GALICIA = 6;</Command> // GERMANIA
<Command>const int TERRITORY_ALEMANNIA = 7;</Command> // GERMANIA
<Command>const int TERRITORY_GAUL = 8;</Command> // GERMANIA
<Command>const int TERRITORY_IBERIA = 9;</Command> // GERMANIA
<Command>const int TERRITORY_RUS = 10;</Command> // HYRKANIA
<Command>const int TERRITORY_SCYTHIA = 11;</Command> // HYRKANIA
<Command>const int TERRITORY_CIMMERIA = 12;</Command> // HYRKANIA
<Command>const int TERRITORY_SARMATIA = 13;</Command> // HYRKANIA
<Command>const int TERRITORY_LIGURIA = 14;</Command> // EUROPA
<Command>const int TERRITORY_DALMATIA = 15;</Command> // EUROPA
<Command>const int TERRITORY_DACIA = 16;</Command> // EUROPA
<Command>const int TERRITORY_THRACIA = 17;</Command> // EUROPA
<Command>const int TERRITORY_ROMA = 18;</Command> // EUROPA
<Command>const int TERRITORY_APULIA = 19;</Command> // EUROPA
<Command>const int TERRITORY_CORSICA = 20;</Command> // EUROPA
<Command>const int TERRITORY_SICILIA = 21;</Command> // EUROPA
<Command>const int TERRITORY_GRAECIA = 22;</Command> // EUROPA
<Command>const int TERRITORY_MINOA = 23;</Command> // EUROPA
<Command>const int TERRITORY_IONIA = 24;</Command> // EUROPA
<Command>const int TERRITORY_ANATOLIA = 25;</Command> // EUROPA
<Command>const int TERRITORY_PHOENICIA = 26;</Command> // ASIA MINOR
<Command>const int TERRITORY_ASSYRIA = 27;</Command> // ASIA MINOR
<Command>const int TERRITORY_PARTHIA = 28;</Command> // ASIA MINOR
<Command>const int TERRITORY_SUMER = 29;</Command> // ASIA MINOR
<Command>const int TERRITORY_BABYLON = 30;</Command> // ASIA MINOR
<Command>const int TERRITORY_SHEBA = 31;</Command> // ASIA MINOR
<Command>const int TERRITORY_ATLAS = 32;</Command> // AFRICA
<Command>const int TERRITORY_CARTHAGE = 33;</Command> // AFRICA
<Command>const int TERRITORY_GAITULIA = 34;</Command> // AFRICA
<Command>const int TERRITORY_CYRENAICA = 35;</Command> // AFRICA
<Command>const int TERRITORY_NUBIA = 36;</Command> // AFRICA
<Command>const int TERRITORY_EGYPT = 37;</Command> // AFRICA
<Command>const int TERRITORY_KUSH = 38;</Command> // AFRICA
<Command>const int TERRITORY_HESPERIDE = 39;</Command> // ATLANTIS
<Command>const int TERRITORY_POSEIDONIS = 40;</Command> // ATLANTIS
<Command>const int TERRITORY_TRITONIS = 41;</Command> // ATLANTIS
<Command>const int TERRITORY_ORICALCOS = 42;</Command> // ATLANTIS

<Command>const int CONTINENT_GERMANIA = 1;</Command>
<Command>const int CONTINENT_HYRKANIA = 2;</Command>
<Command>const int CONTINENT_EUROPA = 3;</Command>
<Command>const int CONTINENT_ASIAMINOR = 4;</Command>
<Command>const int CONTINENT_AFRICA = 5;</Command>
<Command>const int CONTINENT_ATLANTIS = 6;</Command>

<Command>const int CONTINENT_GERMANIA_MIN = 1;</Command>
<Command>const int CONTINENT_HYRKANIA_MIN = 10;</Command>
<Command>const int CONTINENT_EUROPA_MIN = 14;</Command>
<Command>const int CONTINENT_ASIAMINOR_MIN = 26;</Command>
<Command>const int CONTINENT_AFRICA_MIN = 32;</Command>
<Command>const int CONTINENT_ATLANTIS_MIN = 39;</Command>
<Command>const int CONTINENT_GERMANIA_MAX = 9;</Command>
<Command>const int CONTINENT_HYRKANIA_MAX = 13;</Command>
<Command>const int CONTINENT_EUROPA_MAX = 25;</Command>
<Command>const int CONTINENT_ASIAMINOR_MAX = 31;</Command>
<Command>const int CONTINENT_AFRICA_MAX = 38;</Command>
<Command>const int CONTINENT_ATLANTIS_MAX = 42;</Command>

<Command>const int TERRITORY_GOLD = 10;</Command>

<Command>const int TERRITORY_MIN_TROOPS = 1;</Command>

<Command>const int REINFORCE_MIN_TROOPS = 3;</Command>
<Command>const int REINFORCE_TERRITORIES = 3;</Command>

<!-- TURN STATES -->
<Command>const int TURN_START = 1;</Command> // a new turn has started
<Command>const int TURN_REINFORCE = 2;</Command> // the player can reinforce his troops
<Command>const int TURN_TARGET = 3;</Command> // the player can target territories to attack
<Command>const int TURN_PREPARE = 4;</Command> // the attacking player can set up his army to attack with as well as the defending player
<Command>const int TURN_BATTLE = 5;</Command> // the battle phase
<Command>const int TURN_BATTLERESULT = 6;</Command> // the battle result, modify troops and convert territory if the attacker won (automatically goes back to the TURN_TARGET state)
<Command>const int TURN_MOVE = 7;</Command> // the player can move his troops from one territory to an adjacent territory
<Command>const int TURN_END = 8;</Command> // end the turn, check if the player gains any extras (risk cards?)

<!-- rpCheckIfPlayerHoldsContinent() -->
<Command>bool rpCheckIfPlayerHoldsContinent(int playerId = 0, int territoryMin = 0, int territoryMax = 0, int continentId = 0) {</Command>
<Command>bool playerHoldsContinent = true;</Command>

<Command><![CDATA[for(i = territoryMin; <= territoryMax) {]]></Command> // check if player holds continent
<Command>if(trQuestVarGet("TERRITORY"+i+"owner") != playerId) {</Command>
<Command>playerHoldsContinent = false;</Command>

<Command>if(playerHoldsContinent == true) {</Command>
<Command>trQuestVarSet("CONTINENT"+continentId+"owner", playerId);</Command>
<Command>trChatSendSpoofed(0, trStringQuestVarGet("p"+playerId+"name")+" owns "+trStringQuestVarGet("CONTINENT"+continentId+"name"));</Command>

<!-- rpCheckIfPlayerHoldsContinents() -->
<Command>void rpCheckIfPlayerHoldsContinents(int playerId = 1) {</Command>
<Command>bool c1 = rpCheckIfPlayerHoldsContinent(playerId, CONTINENT_GERMANIA_MIN, CONTINENT_GERMANIA_MAX, CONTINENT_GERMANIA);</Command>
<Command>bool c2 = rpCheckIfPlayerHoldsContinent(playerId, CONTINENT_HYRKANIA_MIN, CONTINENT_HYRKANIA_MAX, CONTINENT_HYRKANIA);</Command>
<Command>bool c3 = rpCheckIfPlayerHoldsContinent(playerId, CONTINENT_EUROPA_MIN, CONTINENT_EUROPA_MAX, CONTINENT_EUROPA);</Command>
<Command>bool c4 = rpCheckIfPlayerHoldsContinent(playerId, CONTINENT_ASIAMINOR_MIN, CONTINENT_ASIAMINOR_MAX, CONTINENT_ASIAMINOR);</Command>
<Command>bool c5 = rpCheckIfPlayerHoldsContinent(playerId, CONTINENT_AFRICA_MIN, CONTINENT_AFRICA_MAX, CONTINENT_AFRICA);</Command>
<Command>bool c6 = rpCheckIfPlayerHoldsContinent(playerId, CONTINENT_ATLANTIS_MIN, CONTINENT_ATLANTIS_MAX, CONTINENT_ATLANTIS);</Command>
<Command><![CDATA[if(c1 == false && c2 == false && c3 == false && c4 == false && c5 == false && c6 == false){]]></Command>
<Command>trChatSendSpoofed(0, trStringQuestVarGet("p"+playerId+"name")+" owns no continents");</Command>

<!-- rpSetCurrentPlayers() -->
<Command>void rpSetCurrentPlayers() {</Command>
<Command>for(i = 12; > 0) {</Command>
<Command>if(kbIsPlayerHuman(i) == true) {</Command>
<Command>trQuestVarSet("numberOfPlayers", trQuestVarGet("numberOfPlayers") + 1);</Command>
<Command><![CDATA[trStringQuestVarSet("p"+i+"color", "<color={playercolor("+i+")}>");]]></Command>
<Command><![CDATA[trStringQuestVarSet("p"+i+"name", "<color={playercolor("+i+")}>{playername("+i+")}");]]></Command>
<Command>trChatSend(0, trStringQuestVarGet("p"+i+"name") + " is a human player.");</Command>

<Command>rule RiskLoader</Command>
<Command> inactive</Command>
<Command> highFrequency</Command>
<Command> if(true) {</Command>
<Command> xsDisableSelf();</Command>

If we simplify everything, the only effect you will need looks like this:
<Effect name="Custom XS Script">

YOUR XS CODE GOES HERE, WRAPPED IN <Command></Command> tags

<Command>rule XSScript</Command>
<Command> inactive</Command>
<Command> highFrequency</Command>
<Command> if(true) {</Command>
<Command> xsDisableSelf();</Command>

The commands in this effect make it so that you get out of the current rule scope and into the global XS scope where you can define extra rules, functions, variables, etc. In my experiece, this is a much faster and efficient way to create complex trigger mechanics.

What are the key ingredients to make a popular RPG? To find out, read the results of the RPG survey.
Want to create an advanced patrol/pathfinding system? Have a look at the powerful Pathfinding triggers.
Games I'm playing: The Witness [80%] Chivalry: Medieval Warfare [20%]
That AoM Guy
(id: aom expert)
posted 18 September 2019 03:39 PM EDT (US)     712 / 712       
Has anyone actually found a way to modify osiris/son of osiris/circe attack values?

Check out my YouTube
For live help with me, enter this chatroom. If I'm not on you can leave a message.
« Previous Page  1 ··· 10 ··· 20 ··· 27 28 29  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Mythology Heaven | HeavenGames