• 🏆 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] Use Upkeep Tab as an Additional (4th) Resource Tab

Status
Not open for further replies.
Level 14
Joined
Jul 27, 2007
Messages
793
Help Needed: Use Upkeep Tab as an Additional (4th) Resource Tab

Is there a way to use the upkeep tab as a additional, 4th resource tab?

In my campaign, I'll be having three main resources:

:fp: Food: Produced in farms. It differentiates from housing, as it's an accumulative resource (like in Age of Empires, or like wood in WC3). Used for unit production.

:fp: Wood: Gathered from trees. Accumulative resource. Pretty much unchanged. Used for building construction.

:fp: Gold: Control-point housing resource. Gained through controlling Gold Mines. Used both for units and buildings (think of it as the housing limit being "income", and the food cost being "expenditures").

Now, that leaves me in a rather strange position, as items cannot cost neither of these (wood and food are illogical, and gold would be too troublesome and complex to use in gameplay). That's why I came up with a fourth resource:

:fp: Mana Crystals/Honor Points: Accumulative resource. Gained through creep killing. Used for items. Has a set limit of 30/35/40/something under 50.

Is there a way to implement this without scoreboards? I've been thinking of using the Upkeep tab for it, but I don't know if I'm able to change the text in it through JASS. Also, is it possible to add an icon to the upkeep tab?

Any help would be appreciated (but please refrain from answering with a simple "no, it's not possible" - if it isn't, and you're sure about it, give us the reasons why it isn't. Maybe we'll find a way to work around those limitations.)

Other ideas how to implement such a feature would be appreciated as well.
 
Last edited:
Level 14
Joined
Jul 27, 2007
Messages
793
Well, I've just thought of something.

Apparently, there MAY be a way to solve this thing by messing with the FDF files and making a custom mod altogether, but that solution seems to be too clumsy to me (and there's no guarantee that it'll work).

I've checked the UI textures and it seems that the black background of the resources tab is part of the texture. One can simply alpha it out.

Which makes me think about a possible solution:

1. The black background of the upkeep text is alphaed out.
2. The upkeep text is removed through the Gameplay Interface menu.
[3]3.[/b] The text is triggered at the position, like many RPG UIs do.

Would it be possible?
 
Level 29
Joined
Mar 9, 2012
Messages
1,557
Youd lack the component to detect and display the number of your custom resource even if you did that. It would remain a static text without setting up a multiboard anyways.
Theoretically, one could clone any of the other 3 to display over there with a custom icon, probably would have to clone food resource since you want it to be a resource with an upper limit, and then you will have problems with its gathering since can only be 'generated' by building.
The gathering, storage, display and usage of this custom resource would need to be handled over a complex system all set-up with triggers.
Im pretty sure that ive seen maps with multiple additional resources like iron,stone,uran. but absolutely none of them had managed to replace the upkeep tab.
 
Level 14
Joined
Jul 27, 2007
Messages
793
Youd lack the component to detect and display the number of your custom resource even if you did that. It would remain a static text without setting up a multiboard anyways.

Not true. Given that this solution is possible, it will be easy to refresh the floating text, and it actually will be required. The hardest part would be to actually PUT it there (especially since the camera isn't locked). One would have to find a way to find the coordinates of the terrain that is directly under the upkeep tab every several seconds (given that you can't set floating text's position relative to GUI elements).

Theoretically, one could clone any of the other 3 to display over there with a custom icon,

Please do tell more about this. Do you mean clone as in copy or as in move?

probably would have to clone food resource since you want it to be a resource with an upper limit, and then you will have problems with its gathering since can only be 'generated' by building.
The gathering, storage, display and usage of this custom resource would need to be handled over a complex system all set-up with triggers.

Ay, there would be quite a lot of effort involved.

Still, gold or wood would be more suitable. The set limit will be 50 (for example), and the resource gathering and spending system is quite easy - gathered by creep drops or items sold, spend through buying items.

Im pretty sure that ive seen maps with multiple additional resources like iron,stone,uran. but absolutely none of them had managed to replace the upkeep tab.

I'm pretty sure none of them even gave it an effort, and just a few of them though of trying.

The resource could be stored in a variable.
And if he is able to change the upkeep text via triggers it should be "easy" to create.

True, but I think that even with JASS there's no way to change the upkeep text or level (without changing the food supply) ingame. Please, somebody, prove me wrong. :(

Also, this makes me think if I can put a variable INSIDE "Gameplay Interface". Clarification:

Is it possible to create a variable, and put it in "Gameplay Interface" tab? Would it show the variable value ingame, would it crash, or would it just show a strange string of symbols?
 
Status
Not open for further replies.
Top