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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Regenerating units
posted 01 July 2009 09:37 PM EDT (US)   
Hello. In my country we don't speak English -so any mistake that may confuse you all, please let me know.
Open AOM Editor and create a trigger (For this example I used the hero Achilles. Before selecting the unit to regenerate, make sure it hasn't got that ability ingame)
-----------------------------------------------------------
TRIGGER (NAME): check Active box, check Loop box, uncheck Run Inmediately box (I guess it's 'run', unfortunately I haven't got the English version. Anyway, you can understand it's the box below the other two options and has to be unchecked)
CONDITIONS: Is Alive (Select Achilles)
EFFECTS: Damage Unit (select Achilles again and set a value of -0.05 for a nice healing speed)
-----------------------------------------------------------
You can test diferent values 'till you get the one you prefer. Just remember that they always have to be negative, otherwise your unit will suffer positive damage (actual damage) and slowly die with no seeming reason. It's not very good to check the 'Run Inmediately' box because if you do it, the healing rate will increase a lot. Check this box only if you want indestructible units.
I recommend you to use this together with the Modify Protounit effect to make some really cool changes in regular soldiers (I also set Achilles health bar to 450 hitpoints and added him 3 points of Hand Attack Hack).
That's it. Good luck with this trick.
PS: Sorry if I missed the section of the forum

[This message has been edited by freak1995 (edited 07-01-2009 @ 09:43 PM).]

Replies:
posted 01 July 2009 09:52 PM EDT (US)     1 / 23  
Nice guide!

But this should really be posted in the "scenario" board, I suggest future guides go there.
posted 01 July 2009 09:55 PM EDT (US)     2 / 23  
ok, thanx. I'll correct the error with the sections in next topics
posted 02 July 2009 01:33 AM EDT (US)     3 / 23  
Don't worry, DQ will move it











Thank God.
posted 04 July 2009 03:33 AM EDT (US)     4 / 23  
A trick I use commonly yet don't see it used nearly enough

____________
+|||SwordOfValor|||+
A Proud Member Of
0==[==========>
ValorStudios
<==========]==0
posted 04 July 2009 02:15 PM EDT (US)     5 / 23  
posted 04 July 2009 07:28 PM EDT (US)     6 / 23  
I spent a goodly time tryin got figure out how fast the campaign heroes healed, and ended up going with 0.9 hitpoints every second. Sadly that makes him immune to arrows.
posted 04 July 2009 08:57 PM EDT (US)     7 / 23  
@ hammerhands.

try to find a value where an arrow attack will cause more damage per second than the regeneration rate will.
posted 05 July 2009 12:12 PM EDT (US)     8 / 23  
I'm just gonna have to try this idea out...
Maybe it'll work better. It's a bit distressing seeing my guys immune to arrows. Won't get good reviews that way, will I?

I had a hoplite attacking masses of Manticores, about a dozen of them. And with that healing rate, he never died...
But I'd given him enough hit points that it would take a few minutes for him to heal. Which was not desirable.
And I didn't want him to heal two or three hitpoints at a time. I'd rather have the rate smooth. But that brought up the aforementioned problem.
posted 05 July 2009 01:41 PM EDT (US)     9 / 23  
<Condition name="Unit Action">  
<Param name="PlayerID" dispName="$$22301$$Player" varType="string">0</Param>
<Param name="SrcObject" dispName="Unit" VarType="unit">default</Param>
<Param name="ActionID" dispName="Action ID" VarType="long">9</Param>
<Command>trUnitSelectClear();</Command>
<Command>for(id=0;>1){} id = kbGetBlockID("%SrcObject%"); </Command>
<Command>xsSetContextPlayer(%PlayerID%);</Command>
<Expression>kbUnitGetActionType(id) == ¬tionID%</Expression>
</Condition>
Have two regeneration triggers, one of them using that condition, and set the action ID to 9 (idle).

That way you can have two separate regeneration rates, one for standing still, and one for moving/fighting.
posted 05 July 2009 01:45 PM EDT (US)     10 / 23  
Genius, Oboe

That condition just keeps getting more useful.

☭ Long live the Turk ☭
"Xzy is the worst parts of kman and legion combined, only with proper spelling so you know he's smart enough to act otherwise if he wasn't such an idiot." - theferret
"Xzy is like all of the terrible Guardian contributors rolled into one person. Proof that you can genetically engineer a humanoid abomination." - Fiindil
posted 05 July 2009 03:38 PM EDT (US)     11 / 23  
ARGH I HATE THIS THE FORUM MAKES ME ANGRY WITH ITS STOOPID ¬'s

Here is the code again, and this time it should work.
<Condition name="Unit Action">  
<Param name="PlayerID" dispName="$$22301$$Player" varType="string">0</Param>
<Param name="SrcObject" dispName="Unit" VarType="unit">default</Param>
<Param name="zActionID" dispName="Action ID" VarType="long">9</Param>
<Command>trUnitSelectClear();</Command>
<Command>for(id=0;>1){} id = kbGetBlockID("%SrcObject%"); </Command>
<Command>xsSetContextPlayer(%PlayerID%);</Command>
<Expression>kbUnitGetActionType(id) == %zActionID%</Expression>
</Condition>
I feel like I've posted this condition in a hundred different threads... do you think I should just put it in the download section?
posted 05 July 2009 03:49 PM EDT (US)     12 / 23  
Throwing it in a pastebin and linking it in your signature would work too :P

☭ Long live the Turk ☭
"Xzy is the worst parts of kman and legion combined, only with proper spelling so you know he's smart enough to act otherwise if he wasn't such an idiot." - theferret
"Xzy is like all of the terrible Guardian contributors rolled into one person. Proof that you can genetically engineer a humanoid abomination." - Fiindil
posted 05 July 2009 04:12 PM EDT (US)     13 / 23  
<Condition name="Unit Action">  
<Param name="PlayerID" dispName="$$22301$$Player" varType="string">0</Param>
<Param name="SrcObject" dispName="Unit" VarType="unit">default</Param>
<Param name="zActionID" dispName="Action ID" VarType="long">9</Param>
<Command>xsSetContextPlayer(%PlayerID%);</Command>
<Expression>kbUnitGetActionType(kbGetBlockID("%SrcObject%")) == %zActionID%</Expression>
</Condition>
If you want it better.
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 05 July 2009 04:14 PM EDT (US)     14 / 23  
That is better.

Do you know if there is a way to make an "action ID" parameter list, similar to protounits, so you can choose Fighting, Idle, Bored, etc from a dropdown instead of putting in a number or typing the name of a constant that holds the value?
posted 05 July 2009 10:47 PM EDT (US)     15 / 23  
Okay, okay...I know that's a trigger, Invent00r but how do I put it in?

And how do I use it?
posted 05 July 2009 11:20 PM EDT (US)     16 / 23  
  • Hammer, you open your Age of mythology Directory(C:\Program Files\Microsoft Games\Age of Mythology\)
  • Then open the Triggers Folder(Triggers2 for Titans).
  • In there you should see an XML called "Typetest.xml" open it and scroll down to the Area where all the other conditions are
  • just Copy and paste the trigger in.
  • Save the file
  • open Age of Mythology. The trigger/condition should be available.

    The lord of all living beings, holder of the Ilúvatar
    ~My Heavens~
    AoMH
    SpH
    DoFH
    Also, I am here.

    [This message has been edited by JDmino (edited 07-05-2009 @ 11:22 PM).]

  • posted 05 July 2009 11:53 PM EDT (US)     17 / 23  
    posted 06 July 2009 08:55 PM EDT (US)     18 / 23  
    OK.. many people obviously has more useful ideas.. the only thing I can be proud of at this time is being the thread creator
    Anyway, if someone still likes my way, I may suggest a healing rate of -0.4. It's not very different to the one I originally said, but you will see a better result with a few archers (MORE THAN ONE, or else it's impossible to kill ANY regenerative unit, from the original Arkantos to the modified Achilles).

    [This message has been edited by freak1995 (edited 07-06-2009 @ 09:01 PM).]

    posted 07 July 2009 05:08 PM EDT (US)     19 / 23  
    What are all the actions? I found idle, attack, and move. Aren't there others?
    posted 07 July 2009 05:27 PM EDT (US)     20 / 23  
    Look through the trigger request sticky for the full list.

    ☭ Long live the Turk ☭
    "Xzy is the worst parts of kman and legion combined, only with proper spelling so you know he's smart enough to act otherwise if he wasn't such an idiot." - theferret
    "Xzy is like all of the terrible Guardian contributors rolled into one person. Proof that you can genetically engineer a humanoid abomination." - Fiindil
    posted 07 July 2009 07:08 PM EDT (US)     21 / 23  
    From the trigger loader:
    const int cActionBored=0;
    const int cActionBuild=1;
    const int cActionConvert=2;
    const int cActionDeath=3;
    const int cActionDecay=4;
    const int cActionGather=5;
    const int cActionHandAttack=6;
    const int cActionHeal=7;
    const int cActionHunting=8;
    const int cActionIdle=9;
    const int cActionMove=10;
    const int cActionMoveByGroup=11;
    const int cActionRangedAttack=12;
    const int cActionRepair=13;
    const int cActionResearch=14;
    const int cActionTrain=15;
    const int cActionOverrideAnimation=16;
    const int cActionWork=17;
    const int cActionAttack=18;
    const int cActionUnused0=19;
    const int cActionWander=20;
    const int cActionEnter=21;
    const int cActionAutoConvert=22;
    const int cActionBirth=23;
    const int cActionAreaAttack=24;
    const int cActionFreeze=25;
    const int cActionDormant=26;
    const int cActionGatherPoint=27;
    const int cActionMoveAttack=28;
    const int cActionThrown=29;
    const int cActionLightning=30;
    const int cActionLight=31;
    const int cActionJumpAttack=32;
    const int cActionUnused1=33;
    const int cActionMeteor=34;
    const int cActionAttach=35;
    const int cActionGuide=36;
    const int cActionJumpMove=37;
    const int cActionPickup=38;
    const int cActionDiveBomb=39;
    const int cActionUnused2=40;
    const int cActionRegenerate=41;
    const int cActionUse=42;
    const int cActionEmpower=43;
    const int cActionAutoGather=44;
    const int cActionThrow=45;
    const int cActionGore=46;
    const int cActionDropoff=47;
    const int cActionWhirlwindAttack=48;
    const int cActionChargedRangedAttack=49;
    const int cActionEject=50;
    const int cActionFreezeAttack=51;
    const int cActionConvertAttack=52;
    const int cActionTrade=53;
    const int cActionGuard=54;
    const int cActionAutoMover=55;
    const int cActionGetOnMover=56;
    const int cActionSwallow=57;
    const int cActionGate=58;
    const int cActionLightningAttack=59;
    const int cActionExplore=60;
    const int cActionEat=61;
    const int cActionBoost=62;
    const int cActionCorpseDecay=63;
    const int cActionTeleport=64;
    const int cActionBuckAttack=65;
    const int cActionTownBell=66;
    const int cActionHeroDeath=67;
    const int cActionUnbuild=68;
    const int cActionAutoLOS=69;
    posted 07 July 2009 10:33 PM EDT (US)     22 / 23  
    posted 07 July 2009 11:36 PM EDT (US)     23 / 23  
    GAWD thats a long jumble of letters. id have no idea how to read that man! but i guess some people have the gift. I make my scenarios without quest vars. i cant grasp the idea for some reason.
    Age of Mythology Heaven » Forums » Scenario Design » Regenerating units
    Top
    You must be logged in to post messages.
    Please login or register
    Hop to:    
    Age of Mythology Heaven | HeavenGames