• 🏆 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!

HeroMaxLevel v1.0

This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
HeroMaxLevel
IMPORT GUIDE :
1. Enable "Tick the Automatically create unknown variables ..." located at File>Preference>General
2. Copy the HeroMaxLevel Folder in the Trigger Editor
3. Configure the HeroMaxLevelInit trigger according to the comments provided
4. Refer to "How to Use" for more details
SYSTEM INFORMATION :
A simple system meant to port the necessary script from Jass to something that GUI user can easily use. The map provides a variable named "HeroLevel_MAPLEVEL" that can be used to find the maximum level of heroes in the map. In addition, due to Blizzard's weird behavior with SetUnitLevel, I have ported Nestharus' SetUnitLevelX into a more GUI-Friendly format.
MEDIA SHOWCASE :
CHANGELOG :
Version 1.0: Released
KNOWN ISSUES:
- When going over the magic number, sometimes SetUnitLevel - UnitStripHeroLevel combination bugs out and return to level 1, I have tried to troubleshoot all edge cases for this but I am sure I might miss some of them


CREDIT :
- Nestharus for SetHeroLevelX and GetMapMaxHeroLevel
Contents

HeroMaxLevel (Map)

Reviews
Wrda
Seems like leveling from level 1 to any number works just fine. If hero level is like 2 or 3, and target level is greater and is greater or equal to 1638 and less than 6553, then it results into target level - 1. If, again, hero level is like 2 or 3...

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,892
Seems like leveling from level 1 to any number works just fine.
If hero level is like 2 or 3, and target level is greater and is greater or equal to 1638 and less than 6553, then it results into target level - 1. If, again, hero level is like 2 or 3, and target level is greater or equal to 6553 results into setting hero to level 1.

A little bit janky at the moment.
At least now I finally know how broken the original function is in the first place, lol.
 
Seems like leveling from level 1 to any number works just fine.
If hero level is like 2 or 3, and target level is greater and is greater or equal to 1638 and less than 6553, then it results into target level - 1. If, again, hero level is like 2 or 3, and target level is greater or equal to 6553 results into setting hero to level 1.

A little bit janky at the moment.
At least now I finally know how broken the original function is in the first place, lol.
That 1683 is a new constant I have zero idea of it existing in the first place. Thanks for the amazing discovery!

I think the core flaw lies within the fact that the level system in itself is not meant to handle large numbers. It is also possible for overflow since the accumulated experience is more than likely to pass key numbers.

And don't get started with custom XP value composition 😅 even the default one gives a lot of headache.

In a way, this is also an attempt to validate Nestharus' snippet.
 
Top