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

Scenario Design
Moderated by Yeebaagooon, TAG

Hop to:    
Welcome! You are not logged in. Please Login or Register.14 replies
Age of Mythology Heaven » Forums » Scenario Design » Effect Name = Grant (Min to Max) Resource Per Unit Type Kill
Bottom
Topic Subject:Effect Name = Grant (Min to Max) Resource Per Unit Type Kill
damaskditager
Mortal
posted 09 October 2018 02:09 PM EDT (US)         
Can anyone make trigger like this for me?

Effect Name= "Grant (Min to Max) Resource Per Unit Type Kill"

I need it for my RPG adventure scenario :P

I Have Revive and Patrol effects.
Like in Lineage 2, Unit moves itself randomly and when you kill it, it gives gold and respawns
AuthorReplies:
Izalith
Mortal
(id: Lilitu)
posted 09 October 2018 03:08 PM EDT (US)     1 / 14       
Afaik the two kill requests u can make are "buildings killed" and "units killed". I don't think the game cares about or saves what kind of unit types you killed.

Azarath Metrion Zinthos

Steam: Order of Azarath
Twitch: twitch.tv/orderofazarath
Discord: Azarath @ https://discord.gg/3ENKJeb
TAG
That AoM Guy
(id: aom expert)
posted 09 October 2018 03:54 PM EDT (US)     2 / 14       
you can use quest vars or use the trigger I used in tiny temple blood (download on this site) which for the life of me I cant remember. with the one I used it doesnt matter what unit gets killed, a kill is a kill. but with QV's you may be able to be specific.

Check out my YouTube
For live help with me, enter this chatroom. If I'm not on you can leave a message.

[This message has been edited by TAG (edited 10-09-2018 @ 03:55 PM).]

damaskditager
Mortal
posted 09 October 2018 04:33 PM EDT (US)     3 / 14       
I can make:

(Active + Loop)

Condition: Unit is dead

Effect: Grant Resourse
Effect: Wait (1minute)
Effect: Revive
Effect: Teleport Near Spawn Point

But it's very booring to add "Grant Resource" on every monster

Sorry for my bad English

"Aom Expert" I can't open "tiny temple blood.scx", I only have aom tt

[This message has been edited by damaskditager (edited 10-09-2018 @ 04:35 PM).]

scragins
Heretic of December
posted 09 October 2018 06:38 PM EDT (US)     4 / 14       
If you are making an rpg where the enemy does not train units normally then you can use the stat that has a name like “killed cost” or “units killed cost”, I forget the exact name. You can then change the cost of the unit.
damaskditager
Mortal
posted 10 October 2018 00:03 AM EDT (US)     5 / 14       
I want every unit to have it's own Gold and Exp drop, that's why needed to add "Grant Resource" on each unit. Harder to kill unit, it will have more Gold and Exp
Izalith
Mortal
(id: Lilitu)
posted 10 October 2018 06:32 AM EDT (US)     6 / 14       
Oh yeah, I'm doing something similar with Unit Cost Kill. You can easily modify enemy unit types to cost 5 or 10 or what you need. So Ulfsarks cost 10 gold, cyclops 25 favor or however you want to balance it (and whatever resource, they will be treated the same).

And then instead of the Unit Kill Stat you use the "Units killed Cost" stat & compare it to your players QVar. Sth like this:

IF: Units Killed P1 > QVar(P1KilledRes)
Increase P1KilledRes & Give P1 the difference as resource.

Azarath Metrion Zinthos

Steam: Order of Azarath
Twitch: twitch.tv/orderofazarath
Discord: Azarath @ https://discord.gg/3ENKJeb
damaskditager
Mortal
posted 10 October 2018 09:03 AM EDT (US)     7 / 14       
Izalith can you please make a little scenario guide for it, for version: aom; tt; or ee? I can give you mine
Izalith
Mortal
(id: Lilitu)
posted 11 October 2018 05:45 AM EDT (US)     8 / 14       
Here the correct Triggers. C is Condition, E is Effect:

The QV for P1 is "GrantedP1":
Another QV is "temp" to temporary save a value.
Both can start at 0 so u don't have to initialize them.

Grant_Res_Per_Kill_P1 [High Priority]
C: QV Stat Value | P1 | Unit Killed Cost | > | GrantedP1 | 0
E: QV Set Stat Value | temp | P1 | Unit Killed Cost
E: Quest Var Modify 2 | temp | - | GrantedP1
E: QV Grant Resources | P1 | Gold | temp
E: Quest Var Copy | GrantedP1 | temp
E: Fire Event | Grant_Refire

Grant_Refire [High Priority] [Active]
C: Timer ms | 1
E: Fire Event | Grant_Res_Per_Kill_P1


After every kill P1 gets the amount of gold the enemy was worth in resources. If u kill an Ulfsark (50f, 30g) you get 80 gold for it. You can modify protounit the unit cost to make the reward more fitting. No need to run immediately (at game start) or loop (bad performance) here. o.ó .. at least that's my understanding of triggering atm.

Azarath Metrion Zinthos

Steam: Order of Azarath
Twitch: twitch.tv/orderofazarath
Discord: Azarath @ https://discord.gg/3ENKJeb

[This message has been edited by Izalith (edited 10-11-2018 @ 05:47 AM).]

damaskditager
Mortal
posted 11 October 2018 05:55 AM EDT (US)     9 / 14       
Really nice guide, but I want to receive randomized resources

Can you add me to Skype (nika_xaraza) or Facebook (https://www.facebook.com/profile.php?id=100008032484933)?
I can give you my triggers and show you how I do it.

This trigger worked

< Effect name="Grant Random Res + Echo" >
< Param name="ResName" dispName="Reward Resource" varType="resource">gold< /Param >
< Param name="MinVal" dispName="Min Reward" VarType="float">0< /Param >
< Param name="MaxVal" dispName="Max Reward" VarType="float">100< /Param >
< Param name="Sound" dispName="Sound" varType="sound">gotresource.wav< /Param >
< Command>trSoundPlayFN("%Sound%");< /Command >
< Command>trQuestVarSetFromRand("RandomRewardQV", %MinVal%, %MaxVal%, true);< /Command >
< Command> if (trQuestVarGet("RandomRewardQV") > 0) {< /Command >
< Command>trPlayerGrantResources(trCurrentPlayer(), "%ResName%", trQuestVarGet("RandomRewardQV"));< /Command >
< Command>trChatSend(0, "%ResName%: "+ 1*trQuestVarGet("RandomRewardQV") +" "+ "");< /Command >
< Command>}< /Command >
< /Effect >

[This message has been edited by damaskditager (edited 10-11-2018 @ 06:02 AM).]

Izalith
Mortal
(id: Lilitu)
posted 11 October 2018 06:51 AM EDT (US)     10 / 14       
easy:

Instead of QV Copy you add +1 to GrantedP1 with QV Modify,
Instead of QV Grant Res u make the grant random res thing..

Azarath Metrion Zinthos

Steam: Order of Azarath
Twitch: twitch.tv/orderofazarath
Discord: Azarath @ https://discord.gg/3ENKJeb
damaskditager
Mortal
posted 11 October 2018 08:32 AM EDT (US)     11 / 14       
I did everything as you said, but when I kill one unit, the reward loops

Ok no problem, I will add reward in each unit, it won't take a lot of time
Izalith
Mortal
(id: Lilitu)
posted 11 October 2018 11:23 AM EDT (US)     12 / 14       
Oh my fault! When u kill an Ulfsark it loops 80 times since that's the Unit Cost Killed the player got from it :/ ...

Sry, Should've read the starting post better. The solution I gave you (before the buggy fix) solves giving different unit kills different rewards, but not the min/max. :/


The fix is easy nonetheless. From the first presentation:


Grant_Res_Per_Kill_P1 [High Priority]
C: QV Stat Value | P1 | Unit Killed Cost | > | GrantedP1 | 0
E: QV Set Stat Value | temp | P1 | Unit Killed Cost
E: Quest Var Modify 2 | temp | - | GrantedP1
E: QV Grant Resources | P1 | Gold | temp
E: Quest Var Copy | GrantedP1 | temp
>>> Add 3 more lines here as explained later <<<
E: Fire Event | Grant_Refire

Grant_Refire [High Priority] [Active]
C: Timer ms | 1
E: Fire Event | Grant_Res_Per_Kill_P1



Temp stores the unit kill cost, so for the Ulfsark it would be 80. Let's say u want +- 10 on that 80, so u need to make a Random QVar 0 to 20, add that to temp and give that amount as reward to the player.

Like:
QV Random 0 to 20
QV modify temp + RandomQVar
QV Grant Res temp

But do the Copy Line before you change "temp".

Azarath Metrion Zinthos

Steam: Order of Azarath
Twitch: twitch.tv/orderofazarath
Discord: Azarath @ https://discord.gg/3ENKJeb

[This message has been edited by Izalith (edited 10-11-2018 @ 11:23 AM).]

scragins
Heretic of December
posted 11 October 2018 08:02 PM EDT (US)     13 / 14       
Maybe -10 to +10 if you want 80 +/- 10 instead of 0 to 20.
damaskditager
Mortal
posted 12 October 2018 02:22 AM EDT (US)     14 / 14       
Thanks, but I'm really bad at "QV Effects".
I'll upload a tutorial how I do this, this day.
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Mythology Heaven | HeavenGames