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

Hero Skill Points Beyond Number 'Needed' Can't be Granted

Status
Not open for further replies.
Level 8
Joined
Jul 8, 2013
Messages
249
Short version: Warcraft 3 will not allow me to give heroes more ability points than could be spent maxing the level of all their hero abilities even with the basic hero point trigger. Does anyone know a way to override that limit and trigger heroes getting hero points even when they have no more abilities to spend them on?

Long version:
So heroes in my game range from level 1 to 10 as normal, but they start with 2 hero points and gain 2 every level (I triggered a bonus one per level). Thus in theory they can gain 20 points in total.

However, every hero in my game has 5 hero abilities 3 of which can be raised to level 3 and 2 of which can be raised to level 2. Thus, only 13 levels of hero abilities.

Additionally, heroes can buy stat boosts with their hero points through a spellbooked set of 'extra' hero abilities. This was my way around the normal 5 hero ability cap. Every hero can buy 7 stat boosts in total (what the boosts are varies hero by hero). I triggered purchasing these stat boosts to require a hero point.

The goal is basically that every hero sort of has 8 hero abilities they can level up: 5 normal hero abilities in the normal hero ability menu and 3 passive stat boost hero abilities accessed from a spellbook. In total, they can spend 20 hero points as they level from 1 to 10 to maximize every stat boost and every spell.

If the hero spends their first hero points on stat bonuses, then all DOES work as intended. The hero points to buy the stat bonuses are removed by trigger as intended and the hero continues to gain 2 hero points per level as intended.

However, if the hero spends their early hero points buying spells then they stop gaining hero points once they have enough to max level every spell. Even if I trigger setting the hero's hero points to a higher value, the hero doesn't gain any more points.
The upshot is that a player could screw themselves out of ever being able to boost their stats if they buy hero spells early on.
 
Level 8
Joined
Jul 8, 2013
Messages
249
You'd need to put some kinda placeholder ability that he cannot really level (via requirements maybe) that has lots of levels so that he can gain the needed points

I thought about this, but the trouble is that I already have 5 hero abilities so I can't add another. I could transfer one of the current hero abilities over to the attribute bonus spellbook, but doing so would be kind of... ugly and odd.

My fallback solution, similar to what you suggested with food, would probably be to use lumber or gold as pseudo-hero points. If there IS a way to make normal hero points work by forcibly adding them with triggers or something though then I'd greatly prefer that option.
 
Level 11
Joined
Nov 15, 2007
Messages
781
You could do the "buy abilities" method and still use skillpoints; replace all hero abilities with two placeholders - "Abilities" and "Attribute Bonuses" - that have as many levels as necessary (13 for hero abilities, 7 for stat boosts, for example). When a unit "learns" one of these placeholders, detect the order ID and change the player's selection to a dummy unit with more placeholder abilities that level up your hero's real abilities and subtract a skillpoint when cast. You can use tech tree requirements to simulate hero level/level skip requirements.
 
Level 8
Joined
Jul 8, 2013
Messages
249
Thank you, everyone, I've been trying out these ideas and trying to come up with others. I now have some interface questions relating to heroes and hero points:

1) Hero icons get a shimmering glow around them when they have unspent hero points and the number of unspent points appears in their bottom right corner. Is there a way to create this shimmer and number effect if the hero doesn't have any points?

2) Can the Hero Abilities menu icon be hidden?

3) The Hero Abilities menu icon gets a number in the bottom right corner showing the number of hero points left to spend; can I put a similar looking number on different icons somehow?
 
Level 8
Joined
Jul 8, 2013
Messages
249
Hm. One last idea.

If I could give one of the abilities with 3 levels 7 more levels that didn't actually do anything, then the hero could be granted enough points to spend on the attribute bonuses elsewhere- if the player could be prevented from wasting points on the levels that don't do anything. Is there a way to hide an icon in the level up screen but NOT in the main one? If that icon could be suppressed then presumably I could continue handing points to the hero by the normal mechanisms while ensuring they are only spent on real abilities and bonuses.
 
Level 8
Joined
Jul 8, 2013
Messages
249
Ah. Well I'll think about custom integers (resources and the like are out because I might need some people to have multiple heroes sometimes and I might want to use resources for other things), but at the moment I think I'm leaning toward Meticulous's method. That will allow me to preserve things like the hero icon shimmer.

Thank you both though, your input was quite helpful.
 
Level 8
Joined
Jul 8, 2013
Messages
249
What order string would I need to detect to notice when a unit is opening up the hero abilities menu?

And what order do I give to tell a unit to open that menu? I've been looking through the no target orders and I found one 'Level up' that sounded promising but didn't actually do anything I noticed.

Newb question: I think those will be my last two questions on this matter since I think I've got my revised hero interface in mind now. How can I mark a thread as solved?
 
Level 8
Joined
Jul 8, 2013
Messages
249
Yeah, I know but I wanted to do something slightly different from his method. If I could detect the opening of the hero abilities menu and then cause the selection of some different unit with the 5 ability dummies and the 3 attribute dummies, then I could make it look more like the original hero actually has 8 hero abilities in a normal hero abilities increase menu. I guess stylistically I'm trying to make my interface look similar to the original one, you know?
 
Level 8
Joined
Jul 8, 2013
Messages
249
Tried that already actually (at least I tried it the way I could think of).

  • Order Finder
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Issued order)))
Works fine for stop, hold position, targetless spells, etc. But there is no response for opening a spellbook or opening the hero abilities menu.
 
Level 8
Joined
Jul 8, 2013
Messages
249
Looked around elsewhere and found confirmation that spellbook opening has no order id. I can't find any mention of the hero abilities menu, but at this point I'm betting it's the same. Come to think of it, the hero abilities menu is actually a lot like a spellbook in a number of respects.

In any case, thanks for the help.
 
Level 8
Joined
Jul 8, 2013
Messages
249
Ah ha! Just discovered something potentially interesting after I thought back to WC3's campaign and how on cave levels some spells were disabled but you could still level up normally. If you disable all of a hero's abilities then the hero ability increase icon is removed from his command box but he can continue to acquire hero points as normal!

If you disable only some of his abilities then he can level up all the other ones normally of course, but he can still rack up additional hero points for the disabled ability.

This means that if I give one of my heroes' abilities 7 more levels than it's supposed to have and make the hero spell version of that ability essentially a dummy which causes you to be given the real unit version, I can get my interface to work exactly the way I want. Once the hero learns the last real level of the ability, the spell can be disabled. It will disappear from the abilities menu exactly as it should but secretly still exists, allowing more points to be awarded!

Besides possibly helping me with my problems, I imagine this could help other people too since it gives you a way to make a hero icon shimmer and have a number on it. That could be useful for all sorts of non-hero point things.
 
Status
Not open for further replies.
Top