In Everything is Regicide with UserPatch 1.5 I described how to turn any random map script into a custom regicide map, with the help of UserPatch 1.5 and the guard_state
command.
However, regicide is only half the fun without the Treason1 technology. For the mere cost of 400 gold, it briefly reveals the positions of all enemy kings. Treason can also be researched repeatedly, making it easier for you to hunt those kings down and eventually kill them, defeating the player instantly.
Treason is only available in regicide games, where it replaces the Spies technology2. Treason could hence not be used on the custom regicide maps above. The latest update of UserPatch 1.5 however allows us to manually enable the technology in our random map script, without the use of any mod!
Adding Treason to Custom Regicide Maps
First we need to define three constants at the top of the script (if they are not defined already):
#const GAIA_SET_PLAYER_DATA -10 #const DATA_MODE_FLAGS 1 #const ATTR_SET 0
Now we can mess with the availability of Treason and Spies in the <PLAYER_SETUP>
section by adding an effect_amount
command:
<PLAYER_SETUP> […] effect_amount GAIA_SET_PLAYER_DATA DATA_MODE_FLAGS ATTR_SET 1
The value 1
at the end enables the Treason technology, the value 2
disables the Spies technology, and the value 3
does both (so Treason is available while Spies is not).
I have of course updated all the custom King of the Hill Regicide maps over at Github to include both Treason and Spies: click me
Have fun!
Does it have to be a king?
The guard_state
option not only works with kings, but with arbitrary units.
Supposedly, Treason also works with other units that a guard_state
is set for. If there is a king, it is revealed, else one guard_state
unit is revealed. This behaviour is not necessarily ideal, but without doubt better than before.