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

Custom UI Setup Questions?

Status
Not open for further replies.
Level 2
Joined
Nov 26, 2021
Messages
11
Made a UI not Finished 100% but still, i know how to set up some things, but it others i dont know how, so wondering how, once i figure it out, i be able to do without questions if i wanna make more in future.

1. How do i set up Resources to show? i have the UI but dunno how to move and show the gold, lumber and Food
2. How to setup portrait of current Selected Unit?
3. How to set up the HP and Mana of currently selected unit?
4. How to set up currently selected units stats, like hero stats.
5. How to show the Research/Upgrades % bar and cancel when u click on the current queue upgrade?
6. I set up inventory but it doesnt show

And Lastly, if i want it to show player stats per player, do i have to set up a UI per player?

Yes i realized in a game with many units, and u attacking, u dont have them selected so the right side of UI is pointless, i will change that when i figure out how to set up things, maybe put the hero stats there.
 

Attachments

  • 123.png
    123.png
    645.4 KB · Views: 38
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
If you want to switch to Lua you need to disable all of your Jass systems and find any Custom script and change it's syntax to follow Lua's syntax rules.

For example, you need to remove the words "call" and "set" from your Custom script.

This:
  • Custom script: call RemoveLocation(udg_TempPoint)
Becomes this.
  • Custom script: RemoveLocation(udg_TempPoint)

Once the map is Jass free the option to change to Lua will become available. Note that the Jass systems must remain disabled, so if you were using them then you'll need to find a Lua replacement. If you post which Jass systems you were using I can probably help you find Lua equivalents for them. Also, if the system/code is simple enough then I can probably recreate it for you in Lua.
 
Last edited:
Level 2
Joined
Nov 26, 2021
Messages
11
If you want to switch to Lua you need to disable all of your Jass systems and find any Custom script and change it's syntax to follow Lua's syntax rules.

For example, you need to remove the words "call" and "set" from your Custom script.

This:
  • Custom script: call RemoveLocation(udg_TempPoint)
Becomes this.
  • Custom script: RemoveLocation(udg_TempPoint)

Once the map is Jass free the option to change to Lua will become available. Note that the Jass systems must remain disabled, so if you were using them then you'll need to find a Lua replacement. If you post which Jass systems you were using I can probably help you find Lua equivalents for them. Also, if the system/code is simple enough then I can probably recreate it for you in Lua.
In my main map it has thousands of lines of jass code, so that aint happening anytime soon, so is it possible to achieve the same Result in jass for that map?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
As far as I know it's impossible to have Jass/Lua code running in the same map.

But you can create custom UI in Jass so it's not like you're completely out of luck. It's just that a lot of UI systems don't have a Jass version since it's become rather obsolete since the introduction of Lua.

That being said, maybe this will work. I remember it not working for me:
 
Last edited:
Level 2
Joined
Nov 26, 2021
Messages
11
As far as I know it's impossible to have Jass/Lua code running in the same map.

But you can create custom UI in Jass so it's not like you're completely out of luck. It's just that a lot of UI systems don't have a Jass version since it's become rather obsolete since the introduction of Lua.

That being said, maybe this will work. I remember it not working for me:

I know they can't be Lua and Jass in same map, and as my map has 17000 likes of jass i can not swap to lua, and yes i know theres limit in jass for UI, but is a ui like this still possible in Jass.

i assume it isnt but work a check
 

Attachments

  • 234234.png
    234234.png
    546.3 KB · Views: 43

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
Jass is not missing out on any UI functions that Lua has, it's the same exact API. So the cool UI you see made in Lua can be made in Jass as well.

All I was saying is that most UI systems are made in Lua because it's easier/better in many ways.

If you look into Tasyen's posts you can learn a lot about custom UI, he has a ton of tutorials/systems that can help you achieve the attached picture.
 
Last edited:
hey to achieve the same results as in my contest map there's not that much required tbh. I'm on holiday atm but basically you just have to read Tasyen's tutorials on moving command buttons. Use RUID for coordinates and then move the command buttons accordingly. If you're well versed in JASS it should pose no problem for you. You just gotta change the stuff in my map to use call functions I guess.
 
Level 2
Joined
Nov 26, 2021
Messages
11
Keep searching on Hive and looking at Tasyen's tutorials. Tasyen explains just about everything.
I been searching, there is no info on how to set up the things i am trying to do, now i figured out how to set up resource, and health.

but requires a ui per player, the origin button frame does nothing, nor does invbutton, it also doesnt say the frame or id for research, and hero stats, but i assume hero stats set up same as resource.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
It can be a painful process as you can see from that thread. I've avoided modifying the standard UI because of these issues.

I personally like to hide all of the standard wc3 UI and just make my own, that way I'm in full control of everything.
 
Level 2
Joined
Nov 26, 2021
Messages
11
It can be a painful process as you can see from that thread. I've avoided modifying the standard UI because of these issues.

I personally like to hide all of the standard wc3 UI and just make my own, that way I'm in full control of everything.

am trying to make my own UI, but dont it require frames to set up a CustomUI, like skill frames, inv frames so on.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
From what I can gather you want to do a little of both. Create your own UI, hide some of the wc3 UI, but also keep (and move) the hp/mana text, resource text, ability buttons/icons/tooltips, etc.

I'm talking about ditching basically every piece of original UI, creating and triggering an entire ability/item system around it, etc. It's no easy task and I don't recommend it.
 
Status
Not open for further replies.
Top