• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Experience System

Status
Not open for further replies.
Level 12
Joined
Apr 27, 2008
Messages
1,228
Lets just say that the system has Issues.
So many ifs... ifs that are unnecessary:
If unit is hero
bla
Else
If unit is not hero
bla
You have to put some conditions in checking what the level of the dying unit and the level of the unit receiving experience is OR the level of the killing unit.
But that depends on a lot of stuff.
Do you want it to be possible that a high level hero kills a unit, he gets no experience but a low level hero gets xp.
The system is rather simple. Try figuring it out. Just ignore the actions about the floating texts.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
If the killing unit is a hero and is level (level of killed unit + 10) then gain negative expoerience. :eek:
So actually you gain not any experience.

This is quite irrelevant...
I advise you to see the RPG system he has downloaded.
It is not about the killing unit getting xp, it is about all allied heroes of the killed unit and if it is a hero the killing unit too, getting xp and displaying that.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
The system he is already working with works - it does what it is meant to do.
He does not need a new system - ha wants that one modified.
A lot of people can modify it, but none of them read human minds(well, from a distance).
So until he says how he wants:
"Do you want it to be possible that a high level hero kills a unit, he gets no experience but a low level hero gets xp?" ...
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
The system he is already working with works - it does what it is meant to do.
He does not need a new system - ha wants that one modified.
A lot of people can modify it, but none of them read human minds(well, from a distance).
So until he says how he wants:
"Do you want it to be possible that a high level hero kills a unit, he gets no experience but a low level hero gets xp?" ...

That's my boy ! Follow my teachings and prosper ! :p

And I didn't look at whatever you are using, but just add a condition that the killer is below level 10 ?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
yes i would. If a high level kills the unit (say 10 levels higher) he gets no experience.

Ok. We got one piece of the puzzle.
Now, seeing that you do not get what I am asking(I want to know the details about the limitations).
Imagine this situation.
2 heroes, allied. One level 40 and one level 10.
Now when the level 40 kills a unit 5 he will not get xp.
But does the level 10 get xp?
Now when the level 40 kills a unit 15 he will not get xp.
But does the level 10 get xp?
Now when the level 40 kills a unit 25 he will not get xp.
But does the level 10 get xp?
Now when the level 40 kills a unit 35 does he get xp?
But does the level 10 get xp?
Now when the level 40 kills a unit 45 does he get xp?
But does the level 10 get xp?
Now when the level 40 kills a unit 55 does he get xp?
But does the level 10 get xp?
And when the level 10 kill a unit level 5 does he get xp(the other hero is next to him)?
Does the level 40 get xp?
And when the level 10 kill a unit level 15 does he get xp(the other hero is next to him)?
Does the level 40 get xp?
And when the level 10 kill a unit level 25 does he get xp(the other hero is next to him)?
Does the level 40 get xp?
And what about being alone.
And how is xp split - does it depend on level of each gaining hero or on the count nearby allied of heroes? Is it constant depending what was killed?
P.s. A system should cover every possible situation and with a level boundary there a lot of situations.
 
Level 9
Joined
May 5, 2007
Messages
253
ok this is what im asking for a hero kills a unit the hero is 10 levels above it but he is with a guy that is 5 levels above it he still gets half of the experience can anyone help me?

+ if u are 40 and kill a 35 its ok your only 5 levels higher
like if a 10 kills a level 1 he gets no experience
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
I asked a lot of questions, you answered only 2.5.
I will post a trigger in a few, but note that after that you will say: "but I do not want this" or "I wanted it that way".
To prevent this I asked simple questions (all of them are quite simple).
Here it is:
  • ExpSystem20
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to (==) True
    • Actions
      • Set zz_HeroKillerLoc = (Position of (Killing unit))
      • Set zz_HeroAllies = (Units within zz_MaxRangeOfExp of zz_HeroKillerLoc matching (((((Matching unit) is A Hero) Equal to (==) True) and ((Hero level of (Matching unit)) Greater than (>) ((Level of (Triggering unit)) - 10))) and ((((Matching unit) is alive) Equal to (==) True) and
      • Unit Group - Pick every unit in zz_HeroAllies and do (Actions)
        • Loop - Actions
          • Set zz_Experience = ((zz_ExperiencePerLevel x (10.00 - ((Real((Hero level of (Picked unit)))) + (Real((Level of (Triggering unit))))))) / 10.00)
          • Floating Text - Create floating text that reads ((+ + (String((Integer(zz_Experience))))) + zzStr_ExperienceTag) above (Picked unit) with Z offset 0.00, using font size 10.00, color (50.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Hide (Last created floating text) for (All players)
          • Floating Text - Set the velocity of (Last created floating text) to 90.00 towards 90.00 degrees
          • Floating Text - Show (Last created floating text) for (Player group((Owner of (Picked unit))))
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to zz_ExperienceFloatingTextTime seconds
          • Hero - Add (Integer(zz_Experience)) experience to (Picked unit), Show level-up graphics
      • Custom script: call DestroyGroup(udg_zz_HeroAllies)
      • Custom script: call RemoveLocation(udg_zz_HeroKillerLoc)
You gave scarce information about this, I had to guess or rather go with the easiest way. So now it does absolutely everything you wanted it to do.
I cannot customize it further without you telling me what you want.
This goes with the trigger InitializeExpSystem.
EDIT: You posted, I will proceed than :)
 
Last edited:
Level 9
Joined
May 5, 2007
Messages
253
Now when the level 40 kills a unit 5 he will not get xp. doesnt get exp
But does the level 10 get xp? yes
Now when the level 40 kills a unit 15 he will not get xp. doesnt get exp
But does the level 10 get xp? yes
Now when the level 40 kills a unit 25 he will not get xp. doesnt get exp
But does the level 10 get xp? yes
Now when the level 40 kills a unit 35 does he get xp? yes
But does the level 10 get xp? yes
Now when the level 40 kills a unit 45 does he get xp? yes
But does the level 10 get xp? yes
Now when the level 40 kills a unit 55 does he get xp? yes
But does the level 10 get xp? yes
And when the level 10 kill a unit level 5 does he get xp(the other hero is next to him)? yes
Does the level 40 get xp? no
And when the level 10 kill a unit level 15 does he get xp(the other hero is next to him)? yes
Does the level 40 get xp? no
And when the level 10 kill a unit level 25 does he get xp(the other hero is next to him)? yes
Does the level 40 get xp? noAnd what about being alone. same thing for all people alone or with a group
And how is xp split - does it depend on level of each gaining hero or on the count nearby allied of heroes? Is it constant depending what was killed? if with group it is split equally in any way

hope this answered questions?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
More question.
By split you mean that if a unit yields 100 xp and there 3 heroes each gets 33 or 100?
Do you want the killing hero to get xp bonus(like in the original system)?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Lets make a quick revision.
A unit is killed.
Yielded xp is than split into the number of allied(allied to the killing unit) heroes who are at most 10 levels above the level of the killed unit.
Each hero gets xp equal to that amount multiplied by a modifier depending on the heroes level.
ok this is what im asking for a hero kills a unit the hero is 10 levels above it but he is with a guy that is 5 levels above it he still gets half of the experience can anyone help me?
So if hero is supposed to get xp from a unit that is lower level than him he gets reduced xp. Is a hero supposed to get increased xp from units that are higher level than him?
 
Level 9
Joined
May 5, 2007
Messages
253
A unit is killed.
Yielded xp is than split into the number of allied(allied to the killing unit) heroes who are at most 10 levels above the level of the killed unit.
Each hero gets xp equal to that amount multiplied by a modifier depending on the heroes level. - the hero who is 10 levels above the killed unit doesnt get exp even in a group.

So if hero is supposed to get xp from a unit that is lower level than him he gets reduced xp. Is a hero supposed to get increased xp from units that are higher level than him? - yes
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Ah, ok.
But this is different from what you said here
Well, the trigger does almost what you want, but since the condition line is too big and cannot be copied as text, I will post a map.
 
Level 9
Joined
May 5, 2007
Messages
253
the additions i want are if you are 10 levels higher you get no exp but if you have people near you they get exp unless if they are 10 levels higher than the dying unit but if they are 9- they get split exp and if there are say 3 level 10s and 1 level 1 the level 1 gets 1/4 the exp do you get it?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
You lost me with the last one.
Try explaining the last bit(if there are say 3 level 10s and 1 level 1 the level 1 gets 1/4).
Also:
How exactly is xp split.
At first, not depending on hero levels, the xp that a unit yields is split.
Than individually it is calculated?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
like if there are 4 people around a unit they all get 25% of the experience
My question was, if those 4 people are higher levels than the killed unit.
Each gets xp = (25% of ( xp unit yields)) * (some formula based on unit level and hero level)
So it is first split like 100/4=25 than for each of the heroes it is calculated individually like 25*(some formula with levels).
And what should the xp bonus/reduction be.
You have a hero level 20 You kill a unit level #
11
12
13
14
15
16
17
18
19
21
22
23
24
25
26
27
28
29
What is the modifier(x) - (( xp from unit)/(heroes count)) *x) in each case.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
I am sorry but you are contradicting youurself:
So if hero is supposed to get xp from a unit that is lower level than him he gets reduced xp. Is a hero supposed to get increased xp from units that are higher level than him? - yes
You said yes:
When a hero is supposed to get xp from a unit which is 1 to 9 levels lower than him that xp is reduced, right?
When a hero is supposed to get xp from a unit which is 1 to 9 levels higher than him that xp is increased, right?
If so, please fill in that "table" from above.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Simply remove the game constants of exp getting, then when a unit dies, you pick all the heroes in the range you want and put your conditions.

That part is simple and is already done.
But the how xp is split and how level of hero and dieing unit affects final xp is still a mystery.
:D
 
Level 9
Joined
May 5, 2007
Messages
253
I am sorry but you are contradicting youurself:
So if hero is supposed to get xp from a unit that is lower level than him he gets reduced xp. Is a hero supposed to get increased xp from units that are higher level than him? - yes
You said yes:
When a hero is supposed to get xp from a unit which is 1 to 9 levels lower than him that xp is reduced, right?
When a hero is supposed to get xp from a unit which is 1 to 9 levels higher than him that xp is increased, right?
If so, please fill in that "table" from above.

oh sorry i confused myself..
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
I think you are a couple of posts behind.
He said he wanted xp from unit lower level than the heroes reduced.
Than he said he wanted xp from higher level increased.
Now I am waiting for a increase/decrease table.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Bla bla bla
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Triggering unit)) is an enemy of (Owner of (Killing unit))) Equal to True
    • Actions
      • -------- --- --------
      • -------- Put here something to determine the exp gained from the dying unit --------
      • Set ExpGained = 0
      • -------- --- --------
      • Set LocationVar = (Position of (Triggering unit))
      • Set GroupVar = (Units within 512.00 of LocationVar matching ((((Matching unit) is A Hero) Equal to True) and ((Hero level of (Matching unit)) Less than ((Level of (Triggering unit)) + 10))))
      • Custom script: call RemoveLocation(udg_LocationVar)
      • Set UnitsNum = (Number of units in GroupVar)
      • Unit Group - Pick every unit in GroupVar and do (Actions)
        • Loop - Actions
          • Hero - Add (ExpGained / UnitsNum) experience to (Picked unit), Hide level-up graphics
      • Custom script: call DestroyGroup(udg_GroupVar)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Ah, good to point out.
Ghostwolf, you are couple of conditions short.
Matching unit needs to be aliied of the killing unit.
Level of matching unit needs to be greater than level of triggering unit - 10
Also mathichng unit should be alive.
 
Level 9
Joined
May 5, 2007
Messages
253
  • Bla bla bla
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Triggering unit)) is an enemy of (Owner of (Killing unit))) Equal to True
    • Actions
      • -------- --- --------
      • -------- Put here something to determine the exp gained from the dying unit --------
      • Set ExpGained = 0
      • -------- --- --------
      • Set LocationVar = (Position of (Triggering unit))
      • Set GroupVar = (Units within 512.00 of LocationVar matching ((((Matching unit) is A Hero) Equal to True) and ((Hero level of (Matching unit)) Less than ((Level of (Triggering unit)) + 10))))
      • Custom script: call RemoveLocation(udg_LocationVar)
      • Set UnitsNum = (Number of units in GroupVar)
      • Unit Group - Pick every unit in GroupVar and do (Actions)
        • Loop - Actions
          • Hero - Add (ExpGained / UnitsNum) experience to (Picked unit), Hide level-up graphics
      • Custom script: call DestroyGroup(udg_GroupVar)

does this work with the system im using? maybe spiwn can edit it?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Here is the example map.
Trigger line too long to post.
I will not comment the conversation we did.
Edit: Ok I will comment :p
Saying what you want would really be helpful. And you did contradict yourself a number of times.
 

Attachments

  • xp system.w3x
    14.9 KB · Views: 42
Last edited:
Status
Not open for further replies.
Top