just found these tricks while i was working on my custom cba map. since the project is stopped since some months ago, i decided to share them
1. (only works with the 'Send chat' effect).
instead of '
@#2(Text here)
or
@$2(Text here)
2. bleeding effect (the opposite to the regenerate hp trick)
Loop trigger:
Damage object: 0-((16777216*X)-Y)
Damage object: (16777217*X)-Y
X = the amount of hp taken when bleeding
Y = the amount of hp at which the object will start bleeding
there is a little issue with this trick, some units get slightly damaged a bit (only once) when using it
3. set object current hp (also works on 0 hp units)
Kill object
Damage object: 0-x
x = the hp you want to set on the object
4.1. disable next age button from town center (can be re-enabled later [only once], but players wont require any buildings from the current age to advance to the next age after re-enabling it)
use aokts to disable the following techs:
- for feudal age
108 - Dock built
110 - Mill built
122 - Barracks built
258 - Lumber Camp built
282 - Mining Camp built
- for castle age
106 - Blacksmith built
128 - Market Built
130 - Stable built
132 - Archery Range built
- for imperial age
107 - Monastery built
138 - Siege Workshop built
146 - University built
266 - Castle built
and manually research any of the following techs to re-enable it:
- for feudal age
120 - Shadow Node for Age Two
- for castle age
135 - Shadow Node for Age Three
- for imperial age
142 - Shadow Node for Age Four
4.2 disable next age button permanently from town center (cant be re-enabled later, but requires less techs to disable)
disable any of the following techs:
- for feudal age
120 - Shadow Node for Age Two
- for castle age
135 - Shadow Node for Age Three
- for imperial age
142 - Shadow Node for Age Four
5. bugfix for the bonus attack/hp received from spawn-blocking. if you have the typical trigger spawning an unit every X seconds, changing his hp/ap and tasking it to a location, you might know its possible to block the spawn with one of those units and that unit will get the bonus hp/ap instead of another unit being created.
add the bonus hp/ap effects before 'Create object' effect, example:
Change object attack: -10
Change object HP: -100
Create object
Change object attack: 10
Change object HP: 100
if an unit is blocking the spawn, it will get the effect in negative and then in positive (meaning it will remain with the same stats).
6.1. decrease object hp by -4 until a specific amount of hp. a great trick that i found; used it to decrease paladins/rams hp in my cba map. can be used to decrease Y amount of hp every X seconds or instantly decrease it to a specific amount (will be applied with a delay of 1 second or less)
Loop trigger:
Timer: X
Damage object: 4
Damage object: 0-(16777217-Y)
Damage object: 16777216-Y
Damage object: 0-(16777217-Y)
Damage object: 16777216-Y
Damage object: 0-(16777217-Y)
Damage object: 16777216-Y
Damage object: 0-(16777217-Y)
Damage object: 16777216-Y
X = the delay in seconds between every -4 hp effect
Y = the amount of hp at which the object will start to gain -4 hp per X time
note: its only possible to increase it by +4 or multipliers. to increase it a multiplier of 4, simply duplicate all effects in the same trigger as many times as the multiplier you want. its also possible to use a multiplier of the magic number 16777116, but the object will instantly recover hp to the multiplier you used if his hp is under that multiplier (hard to explain)
6.2. increase object hp by +4 at a specific amount of hp
Loop trigger:
Timer: X
Damage object: -4
Damage object: 0-(16777216-Y)
Damage object: 16777217-Y
Damage object: 0-(16777216-Y)
Damage object: 16777217-Y
Damage object: 0-(16777216-Y)
Damage object: 16777217-Y
Damage object: 0-(16777216-Y)
Damage object: 16777217-Y
X = the delay in seconds between every +4 hp effect
Y = the amount of hp at which the object will start to gain +4 hp per X time
note: its only possible to reduce it by -4 or multipliers. to reduce it a multiplier of -4, simply duplicate all effects in the same trigger as many times as the multiplier you want. its also possible to use a multiplier of the magic number 16777116, but the object will instantly recover hp to the multiplier you used if his hp is under that multiplier (hard to explain)
7.1. increase object hp & max hp and kill it when reaches certain amount
Loop trigger:
Change object hp: (16777217*X)-Y
Change object hp: 0-((16777216*X)-Y)
X = amount of HP increased each time (must be 1 or multiplier of 2)
Y = HP at which the object will die
7.2. decrease object hp & max hp and kill it when reaches certain amount
Loop trigger:
Change object hp: (16777216*X)-Y
Change object hp: 0-((16777217*X)-Y)
X = amount of HP decreased each time (must be 1 or multiplier of 2)
Y = HP at which the object will die
8. read/write values from game memory
http://aok.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=4,41898,0,30
9. play sounds from any folder
http://aok.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=4,41910,0,30
10. invert trigger conditions there are various ways, but this is one of the correct ones. if you want the trigger to Start On, apply it only to T1, rest must be always Off
T1(Looping On) - E: Activate Trigger: 2, E: Activate Trigger: 3
T2(Starts Off;Looping Off) - C:[Conditions], E: Deactivate Trigger: 3
T3(Starts Off;Looping Off) - E:[Effects], E: Deactivate Trigger: 2 *E: Deactivate Trigger: 1
*E: Deactivate Trigger: 1 <- remove this if you want the conditions to be looped
download example
11. make all techs free this will make all techs cost 0 of any resource
Send Tribute (pX to gaia): Researches' Cost Multipler: 2147483647
Send Tribute (pX to gaia): Researches' Cost Multipler: -2147483647
12. starting view fix sometimes the starting view doesnt work in some scenario, here is a workaround:
set players starting view to '-1.0' and spawn an invisible unit (garrison inside itself) for each player with the lowest possible id (0) (you can remove the units with triggers at start)
the players starting view will now always be where you have spawned that unit
13. remove all trigger names
here
14. list triggers by its internal order
here
<RED>
text bugfixinstead of '
<RED>
', use:@#2(Text here)
or
@$2(Text here)
Loop trigger:
Damage object: 0-((16777216*X)-Y)
Damage object: (16777217*X)-Y
X = the amount of hp taken when bleeding
Y = the amount of hp at which the object will start bleeding
there is a little issue with this trick, some units get slightly damaged a bit (only once) when using it
Kill object
Damage object: 0-x
x = the hp you want to set on the object
use aokts to disable the following techs:
- for feudal age
108 - Dock built
110 - Mill built
122 - Barracks built
258 - Lumber Camp built
282 - Mining Camp built
- for castle age
106 - Blacksmith built
128 - Market Built
130 - Stable built
132 - Archery Range built
- for imperial age
107 - Monastery built
138 - Siege Workshop built
146 - University built
266 - Castle built
and manually research any of the following techs to re-enable it:
- for feudal age
120 - Shadow Node for Age Two
- for castle age
135 - Shadow Node for Age Three
- for imperial age
142 - Shadow Node for Age Four
disable any of the following techs:
- for feudal age
120 - Shadow Node for Age Two
- for castle age
135 - Shadow Node for Age Three
- for imperial age
142 - Shadow Node for Age Four
add the bonus hp/ap effects before 'Create object' effect, example:
Change object attack: -10
Change object HP: -100
Create object
Change object attack: 10
Change object HP: 100
if an unit is blocking the spawn, it will get the effect in negative and then in positive (meaning it will remain with the same stats).
Loop trigger:
Timer: X
Damage object: 4
Damage object: 0-(16777217-Y)
Damage object: 16777216-Y
Damage object: 0-(16777217-Y)
Damage object: 16777216-Y
Damage object: 0-(16777217-Y)
Damage object: 16777216-Y
Damage object: 0-(16777217-Y)
Damage object: 16777216-Y
X = the delay in seconds between every -4 hp effect
Y = the amount of hp at which the object will start to gain -4 hp per X time
note: its only possible to increase it by +4 or multipliers. to increase it a multiplier of 4, simply duplicate all effects in the same trigger as many times as the multiplier you want. its also possible to use a multiplier of the magic number 16777116, but the object will instantly recover hp to the multiplier you used if his hp is under that multiplier (hard to explain)
Loop trigger:
Timer: X
Damage object: -4
Damage object: 0-(16777216-Y)
Damage object: 16777217-Y
Damage object: 0-(16777216-Y)
Damage object: 16777217-Y
Damage object: 0-(16777216-Y)
Damage object: 16777217-Y
Damage object: 0-(16777216-Y)
Damage object: 16777217-Y
X = the delay in seconds between every +4 hp effect
Y = the amount of hp at which the object will start to gain +4 hp per X time
note: its only possible to reduce it by -4 or multipliers. to reduce it a multiplier of -4, simply duplicate all effects in the same trigger as many times as the multiplier you want. its also possible to use a multiplier of the magic number 16777116, but the object will instantly recover hp to the multiplier you used if his hp is under that multiplier (hard to explain)
Loop trigger:
Change object hp: (16777217*X)-Y
Change object hp: 0-((16777216*X)-Y)
X = amount of HP increased each time (must be 1 or multiplier of 2)
Y = HP at which the object will die
Loop trigger:
Change object hp: (16777216*X)-Y
Change object hp: 0-((16777217*X)-Y)
X = amount of HP decreased each time (must be 1 or multiplier of 2)
Y = HP at which the object will die
T1(Looping On) - E: Activate Trigger: 2, E: Activate Trigger: 3
T2(Starts Off;Looping Off) - C:
T3(Starts Off;Looping Off) - E:
*E: Deactivate Trigger: 1 <
Send Tribute (pX to gaia): Researches' Cost Multipler: 2147483647
Send Tribute (pX to gaia): Researches' Cost Multipler: -2147483647
set players starting view to '-1.0' and spawn an invisible unit (garrison inside itself) for each player with the lowest possible id (0) (you can remove the units with triggers at start)
the players starting view will now always be where you have spawned that unit
[This message has been edited by JustTesting1234 (edited 05-27-2014 @ 06:21 AM).]