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

Change Tooltip of Item/Unit/Upgrade ingame.

Status
Not open for further replies.
Level 7
Joined
Nov 6, 2019
Messages
186
so been messing with random stuff, and to complete it, i need to be able to edit tooltip ingame not in editor, in game via GUI/Jass

is anything like this possible.

Basically Like
  • Set Claws Extended Tooltip = Claws Extended Tooltip + Text
Like this but for items if possible

  • Ability - Set Extended Tooltip of Avatar to ((Extended Tooltip of Avatar for level 0) + [4]) for level 0
I know it possible and how if the items on the map already, however in this specific scenario item is not on map it a bought one from a shop
 
Last edited:
Level 12
Joined
Mar 13, 2020
Messages
421

In the Comments you See i show a example map of upgrading tooltips ingame
 
Level 7
Joined
Nov 6, 2019
Messages
186

In the Comments you See i show a example map of upgrading tooltips ingame

TY for link, however, i dont want it to edit a ability i already know how to do that one, due to rarely any abilities in my map, i need to edit Item/Upgrades or Unit Description, if it possible, if not meh i figure a different way to put the code sin the map randomly
 
Level 12
Joined
Mar 13, 2020
Messages
421
TY for link, however, i dont want it to edit a ability i already know how to do that one, due to rarely any abilities in my map, i need to edit Item/Upgrades or Unit Description, if it possible, if not meh i figure a different way to put the code sin the map randomly
You don’t get it in the comment section i Post a example map of Howe to Change strings ingame aka tooltips... it’s Not about the Main Thread
 
Level 7
Joined
Nov 6, 2019
Messages
186
I ReChecked Again all ur tutorial is, how to change Ability Tooltip, and item tooltip when item is bought, that again wont work as i know how to change when bought, but to be done before buying.
 
Level 7
Joined
Nov 6, 2019
Messages
186
Ah now i got you... so you Wang to Change the Item Tooltip before ist can be Buyed so when it’s still in the Shop

Exactly and as i want the code to show up on a random item in the shop, aswel as the code that shows been a random number, i cant just put in the description beforehand

Anywho i dont think it possible though, but i did put in way to add code randomly on map in end not perfect but works.
 
Level 6
Joined
Dec 29, 2019
Messages
82
Exactly and as i want the code to show up on a random item in the shop, aswel as the code that shows been a random number, i cant just put in the description beforehand

Anywho i dont think it possible though, but i did put in way to add code randomly on map in end not perfect but works.
I am afraid its not doable, since you cannot change object data during the game. You can only change them with natives on specific instance of objects, for example specific ability on specific unit, or specific item on specific unit. Items which are displayed in shops are not instaces, their tooltips are always gathered from Objects Data.

This kind of behavior would be possible only using by creating Custom UI with its own rules ... but that would be much more complicated.

Why do you actually want to change tooltip on the shop btw ?
 
Level 7
Joined
Nov 6, 2019
Messages
186
I am afraid its not doable, since you cannot change object data during the game. You can only change them with natives on specific instance of objects, for example specific ability on specific unit, or specific item on specific unit. Items which are displayed in shops are not instaces, their tooltips are always gathered from Objects Data.

This kind of behavior would be possible only using by creating Custom UI with its own rules ... but that would be much more complicated.

Why do you actually want to change tooltip on the shop btw ?


It’s all good, didn’t think it was, but was worth a try, in other note been considering making Custom UI per shop anyways just not 100% sure as dunno how to put a stock delay and cool-down, I added a way to get code in map anyways now.

It was like a Code Guess, and wanted it to choose 4 random items and add a number to it, just for fun basically

I set each code to add to one of 5 random items when bought in end

Also custom ui per shop with a 7 player map I would have to make UI per person to track the cool-down on buying item again right

Or I would add a skill tree system for adaptive mode, but again would need ui per person to teach there chosen skills

Unless is another way
 
Level 12
Joined
Mar 13, 2020
Messages
421
It’s all good, didn’t think it was, but was worth a try, in other note been considering making Custom UI per shop anyways just not 100% sure as dunno how to put a stock delay and cool-down, I added a way to get code in map anyways now.

It was like a Code Guess, and wanted it to choose 4 random items and add a number to it, just for fun basically

I set each code to add to one of 5 random items when bought in end

Also custom ui per shop with a 7 player map I would have to make UI per person to track the cool-down on buying item again right

Or I would add a skill tree system for adaptive mode, but again would need ui per person to teach there chosen skills

Unless is another way

You can still bypass it by Using dummy Abilitys as items for a Unit and trigger the Gold amount it Cost and give the item to the Unit per trigger... just a Bit More Creative... and ist works... just an example how to bypass certain limitations...
 
Level 7
Joined
Nov 6, 2019
Messages
186
You can still bypass it by Using dummy Abilitys as items for a Unit and trigger the Gold amount it Cost and give the item to the Unit per trigger... just a Bit More Creative... and ist works... just an example how to bypass certain limitations...

ah so saying use dummy ability that does nothing to trigger the cooldown on custom ui, however if it a custom ui button, there is no unit to trigger the ability.

and a shop with 12 items, 7 players, wouldnt i still need 7 different UI's one per person, if not it would share the cooldown?

Made Basic UI, not good with Photoshop or anything like that :p

So if i do end up making this into a thing, The Boxes, i add in the RUID, however is it possible to add tuff to the ui and remove it in game, as if not i to get all the Icons and put them in the RUID, seems like a lot of work

Basically is there a Script like Jass or GUI, Add Icon "ItemID" To Box1, like multiboard u can change the icon via a command

One more thing, i know all this is nothing to do with board name lol but still

i got Custom UI in game already, nothing interesting, but has multiple buttons

is there a way to put all the button triggers into 1 Trigger, so it less messy, Example

  • B1U
    • Events
      • Game - B1U becomes Not equal to 0.00
    • Conditions
    • Actions
      • Set VariableSet B1U = 0.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • C1 Equal to 9
        • Then - Actions
          • Set VariableSet C1 = 0
          • Set VariableSet C1S = (String(C1))
          • Custom script: call BlzFrameSetText(CodeB1, udg_C1S)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
        • Else - Actions
          • Set VariableSet C1 = (C1 + 1)
          • Set VariableSet C1S = (String(C1))
          • Custom script: call BlzFrameSetText(CodeB1, udg_C1S)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
this is only way i know how to trigger the buttons on custom UI, unlike dialog buttons i cant put all the buttons in 1 trigger, as i dont know what condition to use for, if B1U is clicked trigger this part of the trigger, in Dialogs there is a condition to check what button is clicked

Actually This Seems To Work, But Dunno if it the most Efficient Way.

  • The Code
    • Events
      • Game - B1U becomes Not equal to 0.00
      • Game - B1D becomes Not equal to 0.00
      • Game - B2U becomes Not equal to 0.00
      • Game - B2D becomes Not equal to 0.00
      • Game - B3U becomes Not equal to 0.00
      • Game - B3D becomes Not equal to 0.00
      • Game - B4U becomes Not equal to 0.00
      • Game - B4D becomes Not equal to 0.00
      • Game - CA becomes Not equal to 0.00
      • Game - JPSCCB becomes Not equal to 0.00
    • Conditions
    • Actions
      • -------- Button 1 Down --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • B1D Not equal to 0.00
          • C1 Equal to 0
        • Then - Actions
          • Set VariableSet B1D = 0.00
          • Set VariableSet C1 = 9
          • Set VariableSet C1S = (String(C1))
          • Custom script: call BlzFrameSetText(CodeB1, udg_C1S)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • B1D Not equal to 0.00
            • Then - Actions
              • Set VariableSet B1D = 0.00
              • Set VariableSet C1 = (C1 - 1)
              • Set VariableSet C1S = (String(C1))
              • Custom script: call BlzFrameSetText(CodeB1, udg_C1S)
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Sound - Play BC <gen>
              • Custom script: endif
            • Else - Actions
      • -------- Button 1 Up --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • B1U Not equal to 0.00
          • C1 Equal to 9
        • Then - Actions
          • Set VariableSet B1U = 0.00
          • Set VariableSet C1 = 0
          • Set VariableSet C1S = (String(C1))
          • Custom script: call BlzFrameSetText(CodeB1, udg_C1S)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • B1U Not equal to 0.00
            • Then - Actions
              • Set VariableSet B1U = 0.00
              • Set VariableSet C1 = (C1 + 1)
              • Set VariableSet C1S = (String(C1))
              • Custom script: call BlzFrameSetText(CodeB1, udg_C1S)
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Sound - Play BC <gen>
              • Custom script: endif
            • Else - Actions
      • -------- Button 2 Up --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • B2U Not equal to 0.00
          • C2 Equal to 9
        • Then - Actions
          • Set VariableSet B2U = 0.00
          • Set VariableSet C2 = 0
          • Set VariableSet C2S = (String(C2))
          • Custom script: call BlzFrameSetText(CodeB2, udg_C2S)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • B2U Not equal to 0.00
            • Then - Actions
              • Set VariableSet B2U = 0.00
              • Set VariableSet C2 = (C2 + 1)
              • Set VariableSet C2S = (String(C2))
              • Custom script: call BlzFrameSetText(CodeB2, udg_C2S)
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Sound - Play BC <gen>
              • Custom script: endif
            • Else - Actions
      • -------- Button 2 Down --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • B2D Not equal to 0.00
          • C2 Equal to 0
        • Then - Actions
          • Set VariableSet B2D = 0.00
          • Set VariableSet C2 = 9
          • Set VariableSet C2S = (String(C2))
          • Custom script: call BlzFrameSetText(CodeB2, udg_C2S)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • B2D Not equal to 0.00
            • Then - Actions
              • Set VariableSet B2D = 0.00
              • Set VariableSet C2 = (C2 - 1)
              • Set VariableSet C2S = (String(C2))
              • Custom script: call BlzFrameSetText(CodeB2, udg_C2S)
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Sound - Play BC <gen>
              • Custom script: endif
            • Else - Actions
      • -------- Button 3 Up --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • B3U Not equal to 0.00
          • C3 Equal to 9
        • Then - Actions
          • Set VariableSet B3U = 0.00
          • Set VariableSet C3 = 0
          • Set VariableSet C3S = (String(C3))
          • Custom script: call BlzFrameSetText(CodeB3, udg_C3S)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • B3U Not equal to 0.00
            • Then - Actions
              • Set VariableSet B3U = 0.00
              • Set VariableSet C3 = (C3 + 1)
              • Set VariableSet C3S = (String(C3))
              • Custom script: call BlzFrameSetText(CodeB3, udg_C3S)
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Sound - Play BC <gen>
              • Custom script: endif
            • Else - Actions
      • -------- Button 3 Down --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • B3D Not equal to 0.00
          • C3 Equal to 0
        • Then - Actions
          • Set VariableSet B3D = 0.00
          • Set VariableSet C3 = 9
          • Set VariableSet C3S = (String(C3))
          • Custom script: call BlzFrameSetText(CodeB3, udg_C3S)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • B3D Not equal to 0.00
            • Then - Actions
              • Set VariableSet B3D = 0.00
              • Set VariableSet C3 = (C3 - 1)
              • Set VariableSet C3S = (String(C3))
              • Custom script: call BlzFrameSetText(CodeB3, udg_C3S)
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Sound - Play BC <gen>
              • Custom script: endif
            • Else - Actions
      • -------- Button 4 Up --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • B4U Not equal to 0.00
          • C4 Equal to 9
        • Then - Actions
          • Set VariableSet B4U = 0.00
          • Set VariableSet C4 = 0
          • Set VariableSet C4S = (String(C4))
          • Custom script: call BlzFrameSetText(CodeB4, udg_C4S)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • B4U Not equal to 0.00
            • Then - Actions
              • Set VariableSet B4U = 0.00
              • Set VariableSet C4 = (C4 + 1)
              • Set VariableSet C4S = (String(C4))
              • Custom script: call BlzFrameSetText(CodeB4, udg_C4S)
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Sound - Play BC <gen>
              • Custom script: endif
            • Else - Actions
      • -------- Button 4 Down --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • B4D Not equal to 0.00
          • C4 Equal to 0
        • Then - Actions
          • Set VariableSet B4D = 0.00
          • Set VariableSet C4 = 9
          • Set VariableSet C4S = (String(C4))
          • Custom script: call BlzFrameSetText(CodeB4, udg_C4S)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • B4D Not equal to 0.00
            • Then - Actions
              • Set VariableSet B4D = 0.00
              • Set VariableSet C4 = (C4 - 1)
              • Set VariableSet C4S = (String(C4))
              • Custom script: call BlzFrameSetText(CodeB4, udg_C4S)
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Sound - Play BC <gen>
              • Custom script: endif
            • Else - Actions
      • -------- Button Close --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • JPSCCB Not equal to 0.00
        • Then - Actions
          • Set VariableSet MCInt = 0
          • Set VariableSet JPSCCB = 0.00
          • Custom script: call BlzFrameSetVisible(CodeBD, false)
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play BC <gen>
          • Custom script: endif
        • Else - Actions
      • -------- Button Accept --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CA Not equal to 0.00
          • C1 Equal to CI1
          • C2 Equal to CI2
          • C3 Equal to CI3
          • C4 Equal to CI4
        • Then - Actions
          • Set VariableSet JPSCCB = 0.00
          • Set VariableSet CA = 0.00
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Sound - Play AG <gen>
          • Custom script: endif
          • Set VariableSet MCInt = 0
          • Set VariableSet JPSCCB = 0.00
          • Custom script: call BlzFrameSetVisible(CodeBD, false)
          • Game - Display to (Player group((Triggering player))) the text: [|cffff0000U|rD|cff...
          • Game - Display to (All players) the text: ((Name of (Triggering player)) + Cracked the Code!)
          • Set VariableSet MCReward = (Random integer number between 5 and 35)
          • Set VariableSet JPS[(Player number of (Triggering player))] = (JPS[(Player number of (Triggering player))] + MCReward)
          • Game - Display to (Player group((Triggering player))) the text: ([|cffff0000U|rD|cff0000ffA|r]: |cffd45e19JPS|r Rewarded " + ((String(MCReward)) + "))
          • Special Effect - Create a special effect attached to the origin of MagicalChest using war3mapImported\AnnihilationBlast.mdx
          • Special Effect - Destroy (Last created special effect)
          • Wait 0.50 seconds
          • Unit - Remove MagicalChest from the game
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Denied Less than or equal to 1
              • CA Not equal to 0.00
            • Then - Actions
              • Set VariableSet JPSCCB = 0.00
              • Set VariableSet CA = 0.00
              • Set VariableSet Denied = (Denied + 1)
              • Game - Display to (All players) the text: [|cffff0000U|rD|cff...
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Sound - Play BC <gen>
              • Custom script: endif
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Denied Greater than or equal to 2
              • CA Not equal to 0.00
            • Then - Actions
              • Set VariableSet JPSCCB = 0.00
              • Set VariableSet CA = 0.00
              • Set VariableSet MCInt = 0
              • Set VariableSet JPSCCB = 0.00
              • Custom script: call BlzFrameSetVisible(CodeBD, false)
              • Game - Display to (Player group((Triggering player))) the text: [|cffff0000U|rD|cff...
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Sound - Play AD <gen>
              • Custom script: endif
              • Special Effect - Create a special effect attached to the origin of MagicalChest using war3mapImported\AnnihilationBlast.mdx
              • Special Effect - Destroy (Last created special effect)
              • Wait 0.50 seconds
              • Unit - Move MagicalChest instantly to (Random point in CameraBounds <gen>), facing (Center of Region 000 <gen>)
              • Wait 0.50 seconds
              • Set VariableSet Denied = 0
            • Else - Actions
 

Attachments

  • CSUI.png
    CSUI.png
    162 KB · Views: 33
  • image_2021-12-04_020636.png
    image_2021-12-04_020636.png
    662.5 KB · Views: 33
Last edited:
Level 12
Joined
Mar 13, 2020
Messages
421
Most of the Time we create ui Stuff in Multiplayer Maps for Each Player overlaping and Then you Set all to Not visible and With getlocalplayer we Set Each of Them visible only for a certain Player Same With Healthbars i did 8 healthbars 8 manabars all overlaping and hide all of Them and then turning step by step for Each Player the Right bar visible...

You can Test Around and check of you get some Good Results

Check out tasyens stuff in the spell Section he has a custom shop like in league of legends and if i remember Right he had some random item example on the bottom of his Shop and some recipe examples for the items your Hero had...
Just Check ist out and check his code.. Maybe it will bring some Inspiration

Let ne know if i helped a Bit
And sorry for my Bad english :)
 
Last edited:
Level 7
Joined
Nov 6, 2019
Messages
186
Most of the Time we create ui Stuff in Multiplayer Maps for Each Player overlaping and Then you Set all to Not visible and With getlocalplayer we Set Each of Them visible only for a certain Player Same With Healthbars i did 8 healthbars 8 manabars all overlaping and hide all of Them and then turning step by step for Each Player the Right bar visible...

You can Test Around and check of you get some Good Results

Check out tasyens stuff in the spell Section he has a custom shop like in league of legends and if i remember Right he had some random item example on the bottom of his Shop and some recipe examples for the items your Hero had...
Just Check ist out and check his code.. Maybe it will bring some Inspiration

Let ne know if i helped a Bit
And sorry for my Bad english :)

Will have a look tomorrow, and from what i read, you are saying i do need 7 different UI one per player.
 
Last edited:
Level 7
Joined
Nov 6, 2019
Messages
186
You can test Multiplayer stuff by Hosting your map local and have 2 warcraft sessions Open one Hosting and one joining the Lobby so you can also Check out for desyncs


yeah i found out that recently, only issue with multiple UI meens i to set up for example 12 buttons per player not just the 12 for all

Had a Quick Look, Cant Find it, i Tasyen does Code for Origin Locations and such, didnt seen info on Tasyen doing Custom ShopUI's

And besides Tasyens guides mostly Lua, i barely know jass :p, but it is 4AM so tomorrow i will have a proper look., and yes ty for help and info :)
 
Status
Not open for further replies.
Top