• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

[JASS] How to extract unit and item type stock values?

Status
Not open for further replies.
Level 26
Joined
Feb 2, 2006
Messages
1,695
I am writing a paged stock system where you can change the current page of a stock to see more different unit and item types in one single shop.
For this system I need to track and update the stock numbers per type to prevent unlimited numbers of units and items to be purchased.
I can do this with a timer but I need to know what the intervals and maximum values etc. are if I want to reproduce the exact timings from Warcraft.
Basically, I need these fields from the World Editor per unit and item type: usit, usma, usrg, usst, isit, isto, istr and isst.
I cannot find them in common.j and from previous experience with the field ista, I guess I cannot simply add them to common.j and extract them.

Is the only way to manually provide them in JASS?

I have started using a user-defined library where the user can define all values manually:
JASS:
library PagedButtonsSystemConfig

public function GetTypeStartStock takes integer id returns integer
    return 1
endfunction

public function GetTypeMaxStock takes integer id returns integer
    return 1
endfunction

public function GetTypeStartDelay takes integer id returns integer
    return 0
endfunction

public function GetTypeReplenishInterval takes integer id returns integer
    return 30
endfunction

endlibrary

If this is the only way (thx Blizzard), is there a good tool to extract these values for all standard unit and item types and provide them in a table which I could use to generate some JASS code?
It would be a lot of work to manually write them down. I know they are probably in some SLK files, so if there is no standard tool, I will need to get these files.
Do these values ever change like from balance patches?
I know there can be different Game datasets which I can specify per map, so do I need different sets of files then?
 
Status
Not open for further replies.
Top