Help With Creating An EXP System [Formula Inside]

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Okay so an EXP system came into my head. Though it takes a lot of indexing and my coding powers are not sufficient to make it. It goes like this.

XP Gained = (Total Damage Done By Player / Spawn Total Damage Received) x Spawn Default XP Given

Wherein:

XP Gained - The XP gained by the heroes when the spawn dies.

Total Damage Done By Player - The total damage done by a player to the spawn.

Spawn Total Damage Received - The total damaged received by the spawn.

Spawn Default XP Given - A default integer for total XP given by a unit-type.

Also I want a condition wherein the hero must be in 1500 range within the spawn or the Hero wont receive any XP (Hero still acquires XP even when dead)

_______________________________________

As far as I can tell maybe it would work like

1. The spawn has an index when it enters the map.

2. When the spawn is damaged, the damage is then stored to an index for the owner of the damaging unit which is linked to the index of the spawn.

3. When the spawn dies a trigger checks for the heroes present within 1500 range and distributes the XP according to the formula above.

I wanted to try using arrays but I don't think the cap 8000 would be big enough since I won't be able to figure out recycling the arrays which are already empty.
 

Laiev

Hey Listen!!
Reaction score
188
you mean the natural regeneration of every unit?

it should (at least explain in the introducer)
 

vonDarkmoor

New Member
Reaction score
9
How is dmg done by player different from dmg received by spawn?

:edit: nm, i didnt consider more than one player.
 

luorax

Invasion in Duskwood
Reaction score
67
How is dmg done by player different from dmg received by spawn?

Damage done by player means the total damage dealt by the player, who'll give the EXP. Example:

P1 and P2 kills a mob. The mob had 600 hp, P1 dealt 450 p2 150 damage. Then P1 will get 450/600+*basic* XP and p2'll get 150/600+*basic* XP
 

Ashlebede

New Member
Reaction score
43
But wouldn't that mean everyone would pick high-damage classes since they'd level faster? >>D:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top