I made this awhile back, decided to share it here. This is a mod + scenario that demonstrates one way to give a RPG hero type unit buttons when selected, which can be programed to do different effects. This system utilizes AOK Trigger-Studio, Userpatch 1.5, Double negative Id trick, Zeus-Mod, Spell button guide, and the Up-effect guide
Voobly Linkhttps://www.voobly.com/gamemods/mod/974/Abilities
Blacksmith link - to be updated when approved.
The scenario attached shows two abilities.
1)The ability to switch between bow and sword mode.
This uses up-effect to upgrade the unit from longbow, to samurai, and back. Before you can cycle back to Robin from Samurai you must upgrade to a third unit momentarily or the unit will not upgrade/change correctly.
up-effect 1,3,200,291,0,1 (change Robin to Samurai)
up-effect 1,3,291,24,0,1 (change Samurai to Crossbow)
up-effect 1,3,24,200,0,1 (change Crossbow to Robin)
(24 Crossbowman) (200 Robin) (291 Samurai)
2)Spell - Fire lightning-bolt
This uses up-effect to change the dead unit id of the flare to a saboteur. After you click the ability button in the unit, the spell is primed. Next you click flare (ALT-F) to target the spell. The graphic for the flare is changed to a lightning bolt and after it instantly decays a saboteur is created and killed instantly to deal damage where you selected.
up-effect 1,0,274,57,706,1
(This changed the dead unit id (57) of the flare (274)
to a saboteur (706).)
These are just two examples, but the effects you can achieve are endless. For example instead of upgrading a Robin to Samurai, you can upgrade the unit to have more armor, attack, health, range, attack speed, or move speed for a short duration before switching back to normal.
Instead of creating a saboteur with the flare, you could create a monk with increased healing rate to quickly heal friendly units nearby to where you targeted the flare. The Graphic of the monk can be removed or changed to a healing special effect/graphic.
You would need to add/edit some new button IDs and change the description to make the spells noob friendly, but you can achieve a lot of effects with this system.
-Credits-
Resources:
AOKTS by DiGiT, LOD_mantis, JustTesting1234
https://www.voobly.com/forum/thread/204073
Userpatch 1.5 by Scripter64
http://userpatch.aiscripters.net/guide.html
Double neg. Id by Nixck
http://aok.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=26,40,120,all
Zeus-Mod by Gallas
https://www.voobly.com/gamemods/mod/503/Zeus-mod
Spell button guide by Aoe2 Edhun
http://aok.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=4,44462,60,all
Up-effect guide by BF_Tanks
http://aok.heavengames.com/cgi-bin/aokcgi/display.cgi?action=ct&f=4,44466,,30
"i keep my female villagers either garrisoned in the town center or pickin' berries where they belong"
Voobly Link
Blacksmith link - to be updated when approved.
The scenario attached shows two abilities.
1)
This uses up-effect to upgrade the unit from longbow, to samurai, and back. Before you can cycle back to Robin from Samurai you must upgrade to a third unit momentarily or the unit will not upgrade/change correctly.
up-effect 1,3,200,291,0,1 (change Robin to Samurai)
up-effect 1,3,291,24,0,1 (change Samurai to Crossbow)
up-effect 1,3,24,200,0,1 (change Crossbow to Robin)
(24 Crossbowman) (200 Robin) (291 Samurai)
2)
This uses up-effect to change the dead unit id of the flare to a saboteur. After you click the ability button in the unit, the spell is primed. Next you click flare (ALT-F) to target the spell. The graphic for the flare is changed to a lightning bolt and after it instantly decays a saboteur is created and killed instantly to deal damage where you selected.
up-effect 1,0,274,57,706,1
(This changed the dead unit id (57) of the flare (274)
to a saboteur (706).)
These are just two examples, but the effects you can achieve are endless. For example instead of upgrading a Robin to Samurai, you can upgrade the unit to have more armor, attack, health, range, attack speed, or move speed for a short duration before switching back to normal.
Instead of creating a saboteur with the flare, you could create a monk with increased healing rate to quickly heal friendly units nearby to where you targeted the flare. The Graphic of the monk can be removed or changed to a healing special effect/graphic.
You would need to add/edit some new button IDs and change the description to make the spells noob friendly, but you can achieve a lot of effects with this system.
"i keep my female villagers either garrisoned in the town center or pickin' berries where they belong"