(A major use for the trick is to make donkey caravns carry stupid amount of gold and then transforming it to a gold mine so it has unlimited gold! Make sure you modify the gold mine and donkey caravan carry capacity first)
I found these two commands in the memory dump file I created a while ago.
kbSetPlayerHandicap( int playerID, float handicap )
kbGetPlayerHandicap( int playerID )
So now I can set handicaps - something which I have never been able to do.
You can even give people negative handicaps and when they build buildings they destroy them and if you chop wood you lose it!
You also get cool things happening like tons of extra gold from gold mines so you can get infinite gold from a 6000 gold old mine!
Note - not everything is affected by it like caravan training speed and villager training speed. However some funny things are like the gold example above!
Here is the trigger:
<Effect name="Player Set/Modify handicap player range">
<Param name="p1" dispName="lowest player" varType="player">1</Param>
<Param name="p2" dispName="highest player" varType="player">4</Param>
<Param name="Rate" dispName="$$22507$$Rate" varType="float">1.0</Param>
<Param name="Relative" dispName="Relative" varType="bool">false</Param>
<Command>trQuestVarSet("PlayerID", %p1%);</Command>
<Command>while(%p2%>=trQuestVarGet("PlayerID")) {</Command>
<Command>if(%Relative% != true)kbSetPlayerHandicap(trQuestVarGet("PlayerID"), %Rate%);</Command>
<Command>if(%Relative% != false)kbSetPlayerHandicap(trQuestVarGet("PlayerID"), kbGetPlayerHandicap(trQuestVarGet("PlayerID")) + %Rate%);</Command>
<Command>trQuestVarSet("PlayerID", trQuestVarGet("PlayerID")+1);}</Command>
</Effect>
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.
[This message has been edited by nottud (edited 02-04-2009 @ 01:09 PM).]