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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Guide: The Ultimate EXP System
posted 24 November 2007 06:02 PM EDT (US)   
Introduction
A realistic infinate leveling system that can be reflected in resources! perfect for that RPG you're working on!

Thanks to:
BlueScreenODeath for his Adding REAL EXP to RPGs Guide, which this system is based on.
invent00r, for quickly making me a QV Grant Resources trigger.

Guide time!

Infinite Leveling with Units Killed Cost Reflected in Resources

A guide on how to make an infinite leveling system using units killed cost, and how to show a player’s level and EXP in chats as well as reflecting them in a player’s resource count.

Requirements:
•AoM: TT
•Oddy’s QV Triggers. You can download them in reyk’s SomeNewXTriggers3.
•Mune84's Age of Mythology Unit Stats v2.0.

PART 1: Creating the EXP and Infinite Leveling

Trigger_1:
Active
Conditions:
Always

For this part, you have to know what the enemies in your scenario are, as well as their cost. This should be easy with Age of Mythology Unit Statistics v2.0.
Now, let’s say that the enemies in your scenario only have centaurs. Centaurs cost 12 favor and 200 wood. At this point, you should pick a resource, any resource. It has no effect on the player’s resource cost or anything like that. I’m picking gold for mine.
Effects:
Modify Protounit
Protounit: Centaur
Player: (the enemy)
Field: Cost Wood
Delta: -200


At this point, you want your unit to cost nothing at all. Because I know that a centaur cost 12 favor and 200 wood, I’m using this effect to make the enemy’s centaurs cost 0 wood. You can change the centaur to whatever unit the enemy in your scenario has, but be sure to change the resources and the delta depending on the cost of the units. My next effect (still in the first trigger) would be

Modify Protounit
Protounit: Centaur
Player: (the enemy)
Field: Cost Favor
Delta: -12


Now, I chose gold as my resource, so I’m going to give the centaur an EXP value. If you want a centaur to be worth 10 EXP, then you would make an effect with the following:

Modify Protounit
Protounit: Centaur
Player: (the enemy)
Field: Cost Gold
Delta: 10


So now my enemy centaur costs 10 gold. End of Trigger #1. Now,

Trigger_2:
Active
Conditions:
Always
Effects:
Quest Var Set
Var Name: Subtract
Value: 100 (The number of EXP points the player needs to reach Level 1.)

Trigger_3:
Active, Loop
Conditions:
QV Stat Value
Fake Player: (Player that’s leveling up)
Stat Type: Units Killed Cost
Operator: >=
QV Point Zero: Subtract
Value: 100 (The number of EXP points the player needs to reach Level 1.)

Effects:
(Whatever you want to happen when the player levels up)
Quest Var Modify
Var Name: Level
Operator: +
Amount: 1 (This effect will be important in part two)
Quest Var Modify
Var Name: Subtract
Operator: +
Amount: 100
Quest Var Modify
Var Name: Subtract2
Operator: +
Amount: 10 (You can customize this {see below})
Quest Var Modify 2
Var Name: Subtract
Operator: +
Var Name: Subtract2
Grant Resources:
Player: (the player that’s leveling)
Amount: 1
Resource: Favor (this is the resource you want to be equal to the player’s level. Make sure it is a resource the player can’t collect! If you don’t want to do this, then skip it.)


The amount of “Subtract2” is very important. In the trigger above, I said the player needed 100 EXP to level up. Now the player has 100, and I don’t want him to keep leveling over and over again. So, I made Subtract increased by Subtract2 every time the player levels up, and made Subtract2 increase by 10 ever time the player levels up. This means that the player needs 100 EXP more than 100+10 to level up. Notice that I set it as 110 instead of 100. Now my player needs 110 EXP for a level up, making it harder for him to get a level up each time he levels up.

And there’s your basic infinite leveling system! In only 2 triggers!

PART 2: Creating chats to show the amount of EXP a player has and their level.

Trigger_3:
Active, Loop
Conditions:
Always
Effects:
QV Set Stat Value
Var Name: EXP
Fake Player: (Same player as all those other times)
Stat Name: Units Killed Cost


This effect makes the Quest Var “EXP” equal to the player’s EXP. However, if the player leveled up, it would say the total amount of EXP, not his current amount. So, we have our next effect:

Quest Var Modify 2:
Var Name: EXP
Operator: -
Var Name 2: Subtract (Remember this QV from part one? It’s back! This will subtract all the EXP from the previous levels.)


Now, we have the player’s EXP in a Quest Var. And the good part is, thanks to the looping, it will keep updating itself throughout the entire game.

Trigger_4 (This will be the message telling the player how much EXP he/she has)
Active, Loop
Conditions:


Let’s say that we want the message to show whenever the player kills a unit. You would do this:

QV Stat Value:
Stat Type: Enemy Units Killed
Operator: >=
QV Point Zero: Killed
Value: 1
Effects:
Quest Var Modify:
Var Name: Killed (Depending on the name you put in the conditions)
Operator: +
Amount: 1
QV Send Chat
Message before: (Something like) You have
Var Name: EXP
Message after: EXP.


If the player has 80 EXP, it will show up as “You have 80 EXP”. If you are making a multiplayer scenario, you may wish to use “{playername(1)}has”
as the message before. You will have to change the 1 to whatever player the message is for.

Next, to make a message showing the level (much easier!)

Trigger_5:
Active
Conditions:
(Whatever you want)
Effects:
QV Send Chat
Message before: You are level
Var Name: Level (I told you it would be important later on!)
Message after: . Congratulations!


Refer to the trigger above. SAVE YOUR SCENARIO!

PART 3: Making EXP reflected in a player’s resource count.

Choose a resource, but make sure it is a resource the player can’t collect in the scenario! If you don’t want to do this, or if your player can collect every resource, skip this part.

Yeebaagooon's Method:
Trigger_6:
Active
Conditions
QV Stat Value
Stat Type: Enemy Units Killed Cost
Operator: >=
QV Point Zero: EXP2
Value: 1
Effects
Grant Resources:
Player: (the player that’s leveling)
Amount: 1
Resource: Food
Quest Var Modify
Var Name: EXP2
Operator: +
Amount: 1

Complicated Method:

Close Age of Mythology.

Find your way to your AoM installation folder, and open the trigger folder. With Notepad, open a file called typetest.xml. Copy the trigger below and past it there. If you requested a condition, then place it under or under effects if it was an effect you requested.
<Effect name="QV Grant Resources">
<Param name="PlayerID" dispName="$$22301$$Player" varType="player">1</Param>
<Param name="ResName" dispName="$$22455$$Resource" varType="resource">food</Param>
<Param name="QVName" dispName="$$32954$$Var Name" VarType="string">QV1</Param>
<Command>trPlayerGrantResources(%PlayerID%, "%ResName%", trQuestVarGet("%QVName%");</Command>
</Effect>
Close it, and run Age of Mythology again.

Trigger_6:
Active
Conditions:
Always
Effects:
QV Set Stat Value
Var Name: EXP2
Fake Player: (Same player as all those other times)
Stat Name: Units Killed Cost


So now this new QV is the same as the total amount of EXP our player has amassed. Time to change that to current EXP.

QV Modify 2:
Var Name: EXP2
Operator: -
Var Name 2: Subtract (This QV really comes in handy, doesn’t it?)


Now we have the current EXP. But there is one more effect that will be important later on.

QV Modify 2:
Var Name: EXP2
Operator: -
Var Name 2: Previous


Now, to fire the next trigger (IMPORTANT! You must use fire event, NOT Loop!)

Fire Event: Trigger_7

Trigger_7:
Active
Conditions:
Always
Effects:
QV Grant Resources (It should appear under effects. If not, you did something wrong with the new trigger).
Player: (the player that’s leveling)
Resource: Food (This is what I put, you should do whatever you chose at the beginning of this part.)
Var Name: EXP2
QV Set as Player Resource Count
Player: (the player that’s leveling)
Resource: Food (whatever you put in the previous effect)
Var Name: Previous
Fire Event: Trigger_6


So, now we granted the player food equal to the amount of EXP2, which is equal to EXP. Or is it? As you can see, “Previous” is set to the previous amount of EXP2. In the trigger above, Previous is subtracted from EXP2, so if these two triggers occur in a period of time when the player didn’t get any EXP, they wouldn’t get any food. Because of the Fire Events, these triggers will keep firing each other forever.

THE END

[This message has been edited by TartarianCerberus (edited 11-27-2007 @ 07:15 PM).]

Replies:
posted 24 November 2007 06:03 PM EDT (US)     1 / 11  
Good guide, but there is a MUCH shorter way of doing it that I will post tomorrow.

Run immeditaly is aslo not needed.

______________________________________ Yeebaagooon ______________________________________
____________________ AoMH Seraph ____________________
"You can't trust yeebaagooon to lead a rebelion, He would send everyone to steal mirrors so he could bask in his own brilliance." - Out Reach
"Yeebaagooon had never seen a more handsome man in all his life. He couldn't control himself, He needed to act. Gripping the mirror in his strong arms he kissed the figure before him..." - Out Reach
AoMH: Unfinished Scenarios|Singleplayer: Codename Ripto|Multiplayer: Minigames Z|CSC 7
Ex Seraphs Dictator, Spore Heaven Seraph
posted 24 November 2007 06:04 PM EDT (US)     2 / 11  
EDIT: Run Immediately removed from Trigger_1.

Cerberus- The three headed guard dog who guards the entrance to Hades; son of Typhon.

[This message has been edited by TartarianCerberus (edited 11-25-2007 @ 08:41 AM).]

posted 24 November 2007 06:20 PM EDT (US)     3 / 11  
A very fine guide, although I think you should have put the description of what to add in the effects/conditions in italics.

Still, good job.



Sweet baby maizes!
posted 25 November 2007 01:59 AM EDT (US)     4 / 11  
Back .

I had something like this in The Badland Chronicles, where you get food for every enemy you kill depending on how powerful it is.

I just used the following trigger:

Conditions
  • QV Stat Value,
    P1 EXP is more than the stat Player 1 enemy unit killed cost.

    Effects
  • Grant resources
    Player 1 gets 1 food

  • Quest Var Modify
    P1 EXP + 1

    Then I have my infinite level trigger seperately using that kind of layout (let me know if you want me to post it).

    So, there you have the easy way of this guide .


    And, NEVER do modify unit cost twice. Just do it in one trigger. Say if a Phoenix costs 30 favor and 300 gold, and I want it to cost 250 exp, take 80 from the cost. It does not matter what resource because you can get negatives.

    ______________________________________ Yeebaagooon ______________________________________
    ____________________ AoMH Seraph ____________________
    "You can't trust yeebaagooon to lead a rebelion, He would send everyone to steal mirrors so he could bask in his own brilliance." - Out Reach
    "Yeebaagooon had never seen a more handsome man in all his life. He couldn't control himself, He needed to act. Gripping the mirror in his strong arms he kissed the figure before him..." - Out Reach
    AoMH: Unfinished Scenarios|Singleplayer: Codename Ripto|Multiplayer: Minigames Z|CSC 7
    Ex Seraphs Dictator, Spore Heaven Seraph

    [This message has been edited by Yeebaagooon (edited 03-24-2008 @ 05:59 AM).]

  • posted 25 November 2007 04:15 AM EDT (US)     5 / 11  
    We use that all the time That reminds me, should we use it in codename kill the sheep?

    MEPH
    [Insert amazingly witty signature here.]

    Me and Yeebaagooon's scenarios | Download The Corruptor
    posted 25 November 2007 08:40 AM EDT (US)     6 / 11  
    The cost of all resources it costs combined is what matters, so you have to subtract its costs in multiple resources, which would have to be done in more than one effect. For instance, in your Phoenix example, you would have to add another modify protounit subtracting the 30 favor.

    Your way is the much easier way, but this system creates more realism because it allows one unit to be worth 10 EXP, a harder unit worth 30 EXP, another worth 50 EXP, and a boss might be 100 EXP. The way you posted makes all units worth the same amount of EXP.

    Cerberus- The three headed guard dog who guards the entrance to Hades; son of Typhon.
    posted 25 November 2007 11:06 AM EDT (US)     7 / 11  
    No, just modify the cost of say gold, even if it goes into negatives it works.

    ______________________________________ Yeebaagooon ______________________________________
    ____________________ AoMH Seraph ____________________
    "You can't trust yeebaagooon to lead a rebelion, He would send everyone to steal mirrors so he could bask in his own brilliance." - Out Reach
    "Yeebaagooon had never seen a more handsome man in all his life. He couldn't control himself, He needed to act. Gripping the mirror in his strong arms he kissed the figure before him..." - Out Reach
    AoMH: Unfinished Scenarios|Singleplayer: Codename Ripto|Multiplayer: Minigames Z|CSC 7
    Ex Seraphs Dictator, Spore Heaven Seraph
    posted 27 November 2007 07:07 PM EDT (US)     8 / 11  
    P1 EXP is less than the stat Player 1 enemy unit killed cose.
    Oh! Sorry, didn't see "cose"! Good idea! So, that would replace part three of the guide...I'll add it as an alternate, easier method.

    Cerberus- The three headed guard dog who guards the entrance to Hades; son of Typhon.
    posted 28 November 2007 03:58 PM EDT (US)     9 / 11  
    Great, great guide, very usefull too.
    Just what I needed for my uber rpg. Thank you.


    [Note: I will add you to the credits of my game ]
    Greetings,
    Twinrova
    posted 28 November 2007 07:58 PM EDT (US)     10 / 11  
    Lol I already knew that and am using it(Different xp thing), and I did it with 2 triggers per player only .

    And resource reflected isn't needed, just make a counter which etlls you your xp, way easier.

    The Gods have left us, therefore making the old world crumble and turn into ashes...

    But as the gods return, from the ashes of the old world, shall rise a more beautiful and powerful new world, and life will begin once more, if they hadn't closed...dang you ES.
    posted 30 November 2007 06:23 PM EDT (US)     11 / 11  
    Or a send spoofed chat to player that tells you how much you have and how much you need - that's just what I've done. Great job though, I remember trying to figure this stuff out - it sucked, but once you know it, you don't forget it ~ Khan

    <||=================================||>
    Proud Member of Forgotten Empires
    96Reviews KaS Dota2 Halo 5 Reach
    { "Work until your idols become your rivals" }
    ༼ つ ◕_◕ ༽つ trGetUnitScenarioName(); ༼ つ ◕_◕ ༽つ
    Age of Mythology Heaven » Forums » Scenario Design » Guide: The Ultimate EXP System
    Top
    You must be logged in to post messages.
    Please login or register
    Hop to:    
    Age of Mythology Heaven | HeavenGames