• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] Custom Ressources System working for Reforged ?

Level 7
Joined
Jan 12, 2014
Messages
67
Hi, i'm trying to use the Warcraft Editor to prototype a dream of mine, but i need multiples ressources and objects in which you harvest them.
I'm too bad to create one myself, i tryed, but argh, what a task !
I found 2 topics : Custom ressources and Ressource System but they don't seem to work (or i didn't manage to make it work, the editor tells me there are errors everywhere)

Is there anyone who manage to make it work or know another system?

Thanks
 
Those systems should work fine assuming that you don't see any reviewers/reviews saying otherwise. Check out the most recent posts to get a better understanding. Also, there's a "State" icon/label that shows what the official Hive reviewers say about the system. Note that systems in Warcraft rarely become obsolete due to an update, since they generally don't remove functionality.

Anyway, are you sure you've enabled JassHelper? It's disabled by default and will throw errors when you import anything that uses Jass.
 
Last edited:
Those systems should work fine assuming that you don't see any reviewers/reviews saying otherwise. Check out the most recent posts to get a better understanding. Also, there's a "State" icon/label that shows what the official Hive reviewers say about the system. Note that systems in Warcraft rarely become obsolete due to an update, since they generally don't remove functionality.

Anyway, are you sure you've enabled JassHelper? It's disabled by default and will throw errors when you import anything that uses Jass.

OMG i worked on another project with JassHelper enabled for so long that i forgot him , thanks Uncle, always here to help <3
However, now that i made it work, i have issues. Resource System has issues (idle workers even when working) so i used Custom Resources. I manages to edit the multiboards to make something more pleasing to the eye. BUT, evering seems to work only for 1 player. The board and ressources seem shared :/ i know i need to use arrays, but not HOW to use it.

What version of the game are you using? Additionally, have you considered using Tasyen's MyResourceField instead? It's a lot more optimal.
It seems to "only" make boards (very pretty) on the screen. I wanted resources, like adding to gold and wood. MyResourceField doesn't seem to do that or i missunderstood.
I don't try to be pretty for now (maybe never, i do that for fun)
 
OMG i worked on another project with JassHelper enabled for so long that i forgot him , thanks Uncle, always here to help <3
However, now that i made it work, i have issues. Resource System has issues (idle workers even when working) so i used Custom Resources. I manages to edit the multiboards to make something more pleasing to the eye. BUT, evering seems to work only for 1 player. The board and ressources seem shared :/ i know i need to use arrays, but not HOW to use it.


It seems to "only" make boards (very pretty) on the screen. I wanted resources, like adding to gold and wood. MyResourceField doesn't seem to do that or i missunderstood.
I don't try to be pretty for now (maybe never, i do that for fun)
Unfortunately I don't have the time to learn how either system works, but I imagine the demo map/thread/comments have an explanation or examples.
 
Unfortunately I don't have the time to learn how either system works, but I imagine the demo map/thread/comments have an explanation or examples.
I think i understand some of it, but not everything. But making it work for different players will be hard haha
For now i struggle with Multiboard Display
I hate GUI so much ahah, you can't Show a multiboard to only 1 player with it. And the "call MultiboardDisplay(blablabla, true)" doesn't work if you hide with "Hide all Multiboards", it only works with "Hide Last created"
 
You could provide the system code to ChatGPT and ask it to modify the system to use the "new" UI frames instead of a multiboard.
Some key notes you could use in your explanation:

1. I'm using vJass on the latest patch of Warcraft 3.
2. Use framehandles instead of a Multiboard.
3. No custom .toc or .fdf files should be required.
4. To avoid desyncs, each Player needs their own set of frames. To hide other Player's frames you can use BlzFrameSetVisibility in a GetLocalPlayer() block.
5. GetLocalPlayer() should ONLY be used to toggle visibility, nothing else is safe.
6. Frames should NOT be creating during Map Initialization. Create them using an elapsed time event shortly after the game starts. Or provide a public function for manually initializing the creation myself.
 
You could provide the system code to ChatGPT and ask it to modify the system to use the "new" UI frames instead of a multiboard.
Some key notes you could use in your explanation:

1. I'm using vJass on the latest patch of Warcraft 3.
2. Use framehandles instead of a Multiboard.
3. No custom .toc or .fdf files should be required.
4. To avoid desyncs, each Player needs their own set of frames. To hide other Player's frames you can use BlzFrameSetVisibility in a GetLocalPlayer() block.
5. GetLocalPlayer() should ONLY be used to toggle visibility, nothing else is safe.
6. Frames should NOT be creating during Map Initialization. Create them using an elapsed time event shortly after the game starts. Or provide a public function for manually initializing the creation myself.
I have no idea how to do that because the system has many triggers everywhere and a lot of variables.
I can use Multiboards, it's not a big deal but maybe i'll try to import Tasyen's MyResourceField to try.
However for now, i have issues with Custom Scripts, my GetLocalPlayer doesn't work !
p = player variable
i = integer
1. I loop 1 to 12 to make multiboards
2. I check LocalPlayer number and display corresponding Multiboard.
3. Nothing because it doesnt work

(i looked around and mainly found : This and This

(BTW how do you embed GUI or JASS in posts ? I don't find a tutorial)

image.png
 
I managed to make it work !
If anyone stumble upon this thread, here how i did it (because i hate to find a thread without the answer haha):
I used Custom Resources from ZiBitheWand3r3r
I edited two triggers :
  • DemoLeaderboard
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 0 to 24, do (Actions)
        • Loop - Actions
          • Player - Set (Player((Integer A))).Current gold to 10000
          • Player - Set (Player((Integer A))).Current lumber to 10000
      • -------- ---------------- --------
      • For each (Integer B) from 0 to 23, do (Actions)
        • Loop - Actions
          • Multiboard - Create a multiboard with 3 columns and 2 rows, titled Resources.
          • For each (Integer A) from 1 to 2, do (Actions)
            • Loop - Actions
              • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 3.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 5.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 10.00% of the total screen width
              • Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Show text and Hide icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Show text and Hide icons
          • -------- Food Row --------
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNMonsterLure.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Food
          • Multiboard - Set the color for (Last created multiboard) item in column 2, row 1 to (100.00%, 0.00%, 0.00%) with 0.00% transparency
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to 0
          • Multiboard - Set the color for (Last created multiboard) item in column 3, row 1 to (100.00%, 0.00%, 0.00%) with 0.00% transparency
          • -------- Light Row --------
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 2 to ReplaceableTextures\CommandButtons\BTNHolyBolt.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to Light
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to 0
          • -------- ---------------- --------
          • Set VariableSet Resource_Multiboard[(Integer B)] = (Last created multiboard)
          • Multiboard - Maximize (Last created multiboard)
      • Custom script: set udg_i=0
      • Custom script: loop
      • Custom script: exitwhen udg_i>23
      • Custom script: set udg_p = Player(udg_i)
      • Custom script: if udg_p == GetLocalPlayer() then
      • Custom script: call MultiboardDisplay(udg_Resource_Multiboard[udg_i], true)
      • Custom script: endif
      • Custom script: set udg_i=udg_i+1
      • Custom script: endloop
and
  • UpdateLeaderboard
    • Events
      • Game - Resource_Event becomes Equal to 2.00
      • Game - Resource_Event becomes Equal to 3.00
      • Game - Resource_Event becomes Equal to 4.00
      • Game - Resource_Event becomes Equal to 5.00
    • Conditions
    • Actions
      • -------- there are 3 variables available to read --------
      • -------- "Resource_Player" - owner who recieved custom resource --------
      • -------- "Resource_Value" - how many resources have been delivered --------
      • -------- "Resource_Number" - delivered resource's number (defined in triggers "ResourceNAME"). It is usefull if you're using multiple events - like in this example. --------
      • -------- --- --------
      • Set VariableSet i = (Player number of Resource_Player)
      • Set VariableSet i = (i - 1)
      • -------- FOOD --------
      • Custom script: set udg_tempInt[2] = GetPlayerCustomResource(Player(udg_i), 2)
      • Multiboard - Set the text for Resource_Multiboard[i] item in column 3, row 1 to (String(tempInt[2]))
      • -------- LIGHT --------
      • Custom script: set udg_tempInt[3] = GetPlayerCustomResource(Player(udg_i), 3)
      • Multiboard - Set the text for Resource_Multiboard[i] item in column 3, row 2 to (String(tempInt[3]))
      • -------- copy paste and add 1 to the row and index for other resources --------
      • -------- --- --------
      • Game - Display to (All players) the text: ((DemoTrigger) Player + ((Name of Resource_Player) + ( gets + ((String(Resource_Value)) + ( + (Resource_Name[Resource_Number] + <Empty String>))))))
His display was kinda meh and not usable in multiplayer, but here is it.

image.png
 
Back
Top