As many people who use the Data editor know, the Requirements system is usually quite unwieldy, and is clunky at best. So I just wanted to make a quick topic discussing one particular helpful comparison value: Peak.
I spent awhile searching for any information on this and came up with a couple people saying they had no idea what it does: but it sounded like something helpful for what I was trying to accomplish and in the end it was indeed exactly what I needed. So really this post is just for any future searchers that are trying to find out what the peak requirements value actually does.
On to the explanation: This value keeps track of the maximum number of a given unit/upgrade/behavior that you have ever had at one time.
So, for example:
A Terran builds 3 marines. Two of them die. He rebuilds 3 more and winds up with 5. All 5 of those die. The peak value will give '5' as it's value for the Peak count of Marine. At face value this might not seem very useful- but in some situations it can save a LOT of time. For example, if you were trying to create a hero system in which you can only have 1 hero for each upgrade tier- you can use this to easily count the maximum number of heroes that have ever existed- dead or alive - and adjust accordingly. Combined with a mothership-like system that limits the number of concurrent heroes to 1, this is a very powerful value.
@Zetal: Go Very interesting, thank you for sharing this information. I can already think of a few interesting ways to use it.
But in your last example, wouldn't the peak node return always 1 after the first mothership is created?
Exactly! If you were to use Total or Queued or Better as a means of checking this value, it would return an integer for however many times you have EVER created a Mothership. By using Peak, you can tell whether someone has ever bought a Mothership at all. It's not helpful for just a single check- but let's say you had 3 Mothership-like units that shared the property of the player only being allowed to choose one- this value would allow for a if(UnitCountPeak1 + UnitCountPeak2 + UnitCountPeak3 < 1) == true; allow purchase; types of arguments.
@Zetal: Go Well in that case an Equal to or Greater Than would work too, but anyway, I think it is more useful i other situations, like a critical number of units unlocking extra things.
I'll give it some tests later, it may help me with a few things I was planning to do by triggers.
Is it sad that I didn't know sc2mapster had a Wiki? Probably.. Is there any reason why the wiki doesn't appear in Google searches, or searches of the site? Would have saved a lot of people a lot of time. :P
It is mentioned in the first post of the top sticky thread of the wiki forum...
Also the old wiki still has at least some info (wiki button at top of page). Still need to transfer a lot across and recent patches have added a lot of fields that need adding.
As many people who use the Data editor know, the Requirements system is usually quite unwieldy, and is clunky at best. So I just wanted to make a quick topic discussing one particular helpful comparison value: Peak. I spent awhile searching for any information on this and came up with a couple people saying they had no idea what it does: but it sounded like something helpful for what I was trying to accomplish and in the end it was indeed exactly what I needed. So really this post is just for any future searchers that are trying to find out what the peak requirements value actually does.
On to the explanation: This value keeps track of the maximum number of a given unit/upgrade/behavior that you have ever had at one time. So, for example: A Terran builds 3 marines. Two of them die. He rebuilds 3 more and winds up with 5. All 5 of those die. The peak value will give '5' as it's value for the Peak count of Marine. At face value this might not seem very useful- but in some situations it can save a LOT of time. For example, if you were trying to create a hero system in which you can only have 1 hero for each upgrade tier- you can use this to easily count the maximum number of heroes that have ever existed- dead or alive - and adjust accordingly. Combined with a mothership-like system that limits the number of concurrent heroes to 1, this is a very powerful value.
Hope that helps someone! Good luck mapping! Zetal
@Zetal: Go Very interesting, thank you for sharing this information. I can already think of a few interesting ways to use it.
But in your last example, wouldn't the peak node return always 1 after the first mothership is created?
Exactly! If you were to use Total or Queued or Better as a means of checking this value, it would return an integer for however many times you have EVER created a Mothership. By using Peak, you can tell whether someone has ever bought a Mothership at all. It's not helpful for just a single check- but let's say you had 3 Mothership-like units that shared the property of the player only being allowed to choose one- this value would allow for a if(UnitCountPeak1 + UnitCountPeak2 + UnitCountPeak3 < 1) == true; allow purchase; types of arguments.
@Zetal: Go Well in that case an Equal to or Greater Than would work too, but anyway, I think it is more useful i other situations, like a critical number of units unlocking extra things.
I'll give it some tests later, it may help me with a few things I was planning to do by triggers.
Sigh. No one ever reads the wiki... Answer has been there since March.
http://wiki.sc2mapster.com/Data/Requirements
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
Is it sad that I didn't know sc2mapster had a Wiki? Probably.. Is there any reason why the wiki doesn't appear in Google searches, or searches of the site? Would have saved a lot of people a lot of time. :P
It is mentioned in the first post of the top sticky thread of the wiki forum...
Also the old wiki still has at least some info (wiki button at top of page). Still need to transfer a lot across and recent patches have added a lot of fields that need adding.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg