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

Supply Upgrade

Status
Not open for further replies.
Level 3
Joined
Apr 7, 2012
Messages
25
So, I was wondering if I could have a Supply upgrade instead of building structures, I just have to upgrade it from an ability to increase supply by +2 per upgrade.

I had look under effects I believe it was and did Mod player property but it seems that was for only minerals etc.

If there is no Data editor approach to this, could you be so kind to show me an example how to make it triggerd. Thanks a bunch!
 
Level 5
Joined
Dec 13, 2008
Messages
141
Here is how I did mine via triggers:
  • General - If (Conditions) then do (Actions) else do (Actions)
    • If
      • And
        • Conditions
          • (Player (Triggering player) Supplies Limit) < 400
          • (Player (Triggering player) Minerals) >= 3000
          • (Used dialog item) == IncreaseSupplyLimit
    • Then
      • Player - Modify player (Triggering player) Supplies Limit: Add 25
      • Player - Modify player (Triggering player) Minerals: Subtract 3000
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Player (Triggering player) Supplies Limit) == 400
        • Then
          • Dialog - Set IncreaseSupplyLimit text to "Increase Supply Limit" for (Player group((Triggering player)))
        • Else
      • Dialog - Hide ResearchMenu for (Player group((Triggering player)))
      • Dialog - Show TheMainMenu for (Player group((Triggering player)))
    • Else
      • Dialog - Hide ResearchMenu for (Player group((Triggering player)))
      • Dialog - Show TheMainMenu for (Player group((Triggering player)))
That is, through a dialog menu. I don't know if there is a way through the Data editor.
 
If you want to do it via unit you have 2 options:

1. The supplies made is controled via behavior. However this is only tied to the unit and is lost when the unit dies.

2. You can use a ability/trigger hybrid.

Here is some example code:

  • Untitled Trigger 001
    • Events
      • Unit - Any Unit uses Increase Funding at Generic6 - Complete stage (Ignore shared abilities)
    • Local Variables
    • Conditions
    • Actions
      • Player - Modify player (Owner of (Triggering unit)) Supplies Made: Add 2
 
Level 5
Joined
Dec 13, 2008
Messages
141
Oh, heres the other way you may be looking for via Trigger Editor.

  • Events
    • Unit - Any Unit research progress is Completed
  • Local Variables
  • Conditions
    • (Triggering progress upgrade) == IncreaseSupplyLimit
  • Actions
    • Player - Modify player (Owner of (Triggering unit)) Supplies Limit: Add 2
It fires when the research/upgrade is completed.
 
Level 3
Joined
Apr 7, 2012
Messages
25
supply.jpg


This is what I had made and btw I will look in to the research progress is complete one, that is part of what I want and I also do want player group so it applies for triggering player just not any unit unless any unit just means any unit that has the "ability that presses it then forgive me as I don't know enough about the editor yet lol

Hopfully this picture gives an example what I am looking for though and hope to see a better version from you guys.

So, better idea what I need to happen is,

"Player homeworld/unit has this ability to up supply limit so they may build more colony ships, when the upgrade pressed, it will up the limit by +2 and the ability will have a cooldown of say 25seconds before used again.

Each time ability is used, it will be costing 25minerals.

Oh, heres the other way you may be looking for via Trigger Editor.

  • Events
    • Unit - Any Unit research progress is Completed
  • Local Variables
  • Conditions
    • (Triggering progress upgrade) == IncreaseSupplyLimit
  • Actions
    • Player - Modify player (Owner of (Triggering unit)) Supplies Limit: Add 2
It fires when the research/upgrade is completed.

maybe this works for you but it clearly didn't work for me lol

I guessing where it said "IncreaseSupplyLimit" this is a "Upgrade" and if so what do I need to change in data editor under upgrades for that abilily if anything. If nothing, just create it and name it then the trigger didn't work.

Research
Events
Unit - Any Unit research progress is Completed
Local Variables
Conditions
(Triggering progress upgrade) == Planet Supplie
Actions
Player - Modify player (Triggering player) Supplies Limit: Add 2

This is what I had created and did nothing.

Quick up, it seems I didn't do owenr of ... I'll try that..............

Nope still don't work.

supply.jpg


What am I doing wrong here because the trigger seems to work fine up until changing supply made limit +2.

It just wont change it ! lol

BTW I had tried "Any Unit" still nothing

I DONT KNOW WHY

But, this works and I had tried it BEFORE and didn't work.

supply.jpg


I have another trigger 'Exactly' same as this one above it and some reason it don't work but this one did. WTF?! LOL

Anyways, thanks for the help +rep for both of you =)
 
Last edited by a moderator:
Level 5
Joined
Dec 13, 2008
Messages
141
I've tested it in a quick map and it works.

Just exactly as your last one:
  • Events
    • Unit - Any Unit research progress is Completed
  • Local Variables
  • Conditions
    • (Triggering progress upgrade) == Supply Increase
  • Actions
    • Player - Modify player (Owner of (Triggering unit)) Supplies Made: Add 2
The reason that first trigger you have didn't work is because you put Triggering Progress unit. It can't get the owner of the unit if you put that in. You're also using Player Group - Pick Every Player in Player Group and do Actions. You want it to work for the player who just researched that upgrade, so get rid of that. Unless it is for a team of players, then you need to make a Player Group variable and set that for the Player Group, and change the Player in Player - Modify Property to (Picked Player)
 
Status
Not open for further replies.
Top