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

[General] Abilities ignore multiple Techtree - Requirements

Status
Not open for further replies.
Level 19
Joined
Aug 16, 2007
Messages
881
I'm not sure if this has always been the case, or just a bug with the recent patch.

If you set multiple Techtree - Requirements for an ability, the ability ignores all requirements, except the first requirement in the list.

Check dependencies is set to true.

See attached map below for example.

Holy Light: Requires 1 tech (has "Tech Upgrade 1" first in the list).
Divine Shield: Requires 2 techs (has "Tech Upgrade 1" first in the list).
Devotion Aura: Requires 3 techs (has "Tech Upgrade 1" first in the list).
Resurrection: Requires 4 techs (has "Tech Upgrade 4" first in the list).

If you research Tech Upgrade 1 and no other, Holy Light, Divine Shield and Devotion Aura will be unlocked. Divine Shield and Devotion Aura completely ignores the requirement of Tech Upgrade 2 and Tech Upgrade 3.

If you research "Tech Upgrade 4" and no other, Resurrection will be unlocked immediately as Tech Upgrade 4 is first in the techtree requirement list of that ability.

Is there a fix or maybe I've set up the requirements incorrectly?
 

Attachments

  • AbilityTechRequirement.w3m
    16.9 KB · Views: 26
Level 12
Joined
Feb 5, 2018
Messages
521
Here I fixed it for you. For whatever reason the techs needed to be in a reverse order.
I also removed the integers representing 1, because they are not required for upgrades that only have one level.

Instead of having tech 1 - 2 - 3 - 4
I changed the order to tech 4 - 3 - 2 - 1

If you get annoyed by the wrong order in the text tool tip. Just change the name of tech 4 to tech 1, and so on :)

EDIT: I missed the second part of your post completely. I'll take another look at it.

So what I did in addition to the first change, is that I made:
Tech upgrade 2 - requires tech upgrade 1
Tech upgrade 3 - requires tech upgrade 2
Tech upgrade 4 - requires tech upgrade 3

You could also simply put 4 levels on your upgrade and call it tech upgrade.
And set the requirements to:
Ability Q - Tech upgrade - level 1
Ability W - Tech upgrade level 2
Ability E - Tech upgrade level 3
Ability R - Tech upgrade level 4
 

Attachments

  • AbilityTechRequirementFixed2.w3m
    16.9 KB · Views: 30
Last edited:
Level 19
Joined
Aug 16, 2007
Messages
881
Here I fixed it for you. For whatever reason the techs needed to be in a reverse order.
I also removed the integers representing 1, because they are not required for upgrades that only have one level.

Instead of having tech 1 - 2 - 3 - 4
I changed the order to tech 4 - 3 - 2 - 1

If you get annoyed by the wrong order in the text tool tip. Just change the name of tech 4 to tech 1, and so on :)

EDIT: I missed the second part of your post completely. I'll take another look at it.

So what I did in addition to the first change, is that I made:
Tech upgrade 2 - requires tech upgrade 1
Tech upgrade 3 - requires tech upgrade 2
Tech upgrade 4 - requires tech upgrade 3

You could also simply put 4 levels on your upgrade and call it tech upgrade.
And set the requirements to:
Ability Q - Tech upgrade - level 1
Ability W - Tech upgrade level 2
Ability E - Tech upgrade level 3
Ability R - Tech upgrade level 4
Thanks, great fix and it works without problems in your test map. In my map however, it still doesn't work.

I wonder if it has to do with me unlocking the tech upgrades via script.

I have two requirements for each ability and I check if the player has access to each tech separately. If the player has access to one, I research it via call SetPlayerTechResearched, then I check the other tech.

Whenever I set the requirements as you did for the techs, it did not make a difference. I guess I'll just use one tech upgrade for both requirements.
 
Level 12
Joined
Feb 5, 2018
Messages
521
That's pretty weird, i'm gonna mess around with it a bit more. I'm getting interested :D

EDIT: Yea if you set the Tech upgrade 4 to level 1 with triggers before you have the other techs, it instantly unlocks the resurrection.

I also tried to make the techtree requirements with buildings and the results were exactly same, unfortunately.

Sorry I couldn't provide anymore help. It's probably broken in the code to add multiple techtrees for abilities. I looked trough some data in the object editor and none of the abilities, that I checked have multiple techtrees.
 
Last edited:
Level 19
Joined
Aug 16, 2007
Messages
881
That's pretty weird, i'm gonna mess around with it a bit more. I'm getting interested :D

EDIT: Yea if you set the Tech upgrade 4 to level 1 with triggers before you have the other techs, it instantly unlocks the resurrection.

I also tried to make the techtree requirements with buildings and the results were exactly same, unfortunately.

Sorry I couldn't provide anymore help. It's probably broken in the code to add multiple techtrees for abilities. I looked trough some data in the object editor and none of the abilities, that I checked have multiple techtrees.
No worries, thanks anyway! Glad we came to the same conclusion. I removed the requirement of two tech upgrades and baked both into 1 instead. :)
 
Status
Not open for further replies.
Top