Try searching this forum for it, very interesting function that allows you to change stuff in data editor thru triggers.
Anyway, it's the only action function of Catalog type in triggers, basically what it does is... well, changes stuff in data editor for certain player.
As I said in previous post, you first need to make some text keys (they link to text aka hotkeys), I did it by creating new button called A, then changing text key and hotkey value multiple times like: Button/Hotkey/A, key A, Button/Hotkey/B, type in B, etc.
After you're done, that's pretty much all you had to do in data, you can delete this button (I think) as you already have text keys and texts they link to set up (if you want to double check, open Text window and look for IDs you just created and text associated with those).
Now for the trigger part, create and for an event use player sends text message or sth like that (you can use any event to set up binds, like player presses key but you'll need conditions to check for each key as there's no function that converts key pressed into string, how you set this up is up to you)
Let's say i use local variable of type string, that is pre-set for "Button/Hotkey/", then I modify it to add the inputted text message (should've put conditions to check if it's only one letter, not some special sign like ;,<>" etc. or it will bug out).
After i got my variable as useable String that will link to existing text value (like Button/Hotkey/C linking to C), I can use Catalog Field Value Set.
As catalog i use preset "Buttons" (which means i want to change something from buttons tab in data table).
Entry is ID of button u want to change (like Attack, Stop etc.), let's use Attack here.
fieldPath is value i want changed, in this case it's Hotkey (you can look em up if you use "show raw data" in data editor).
Player that this change will affect, nothing interesting here.
Value is the stuff that we wan't in place of old one, in this case old one is Button/Hotkey/Attack which links to "A", but we want to swap it to sth else like "C" so we input Button/Hotkey/C (inputting local variable here).
After this is done keybing should be changed. Hope u understand.
Yea that's good for 'sets' of hotkeys. You must duplicate whole upgrade, create new text keys and link to all buttons for each set made that way. Anyway, if you create enough text keys for each possible bind (A-Z), you can use Set Catalog value function to change keybinds, I was playing with it for a while, and using enough variables to check if binds are not used already etc. you can make fully customizable hotkeys.
For example, I've made text key Button/Hotkey/A that linked to text "A". Then i've made trigger to check if A button is pressed, then used action Set catalog value Buttons "Attack" Hotkey to value Button/Hotkey/A, which sucesfully changed hotkey to A. Made same IFs for B/C button etc. linking to similar text keys, and hotkey was working as well.
You could use it if you're fluent enough with triggers to make checks if buttons are taken/etc.
As title says, I've encountered this problem when changing text key's, they're pretty much anywhere in data editor. I was trying to make new ID to store my value. As it turns out, it keeps making new IDs for each keystroke, so when i was naming my key I ended up with this many IDs (and text attached to them ofc, tho it's clearable):
Button/Hotkey/C
Button/Hotkey/CB
Button/Hotkey/CBu
Button/Hotkey/CBut
Button/Hotkey/CButt
Button/Hotkey/CButto
Button/Hotkey/CButton
Button/Hotkey/CButtonF
Button/Hotkey/CButtonFi
Button/Hotkey/CButtonFiv
Button/Hotkey/CButtonFive
And text editor only allows to remove text IDs that has links to default data sources (like hotkey/move). Any way to remove unused IDs like this?
EDIT: nvm you can remove those if you open map in MPQ editor and find appropriate txt file... still kinda sux u can't do this from editor level.
do this if you want to make few hotkey setups. Dunno if it's possible to make em fully customizable, maybe with catalog values or sth, that's as much help i can give you atm.
Took me a while to get this working but it's not really hard.
Open upgrade tab in data editor, and create new upgrade. To effects, link to buttons binds you want to change.
EDIT TEXT KEY, add sth to the end to make new key or you'll overwrite default keybind there. Input new keybind.
You may also want upgrade that will link keybinds back to their default values, but that is up to you (don't change text key then).
In trigger editor, run Tech Tree - Set upgrade level for player, and change keybind upgrade's level you just made to 1 (if you have multiple keybind upgrades set their levels to 0 so you'll be able to swap to them again)
Attaching screen from data editor and map I tested this on (U sets binds to ASDFG, I changes to QWERT)
Events
Map initialization
Local Variables
<integer> int =0
Conditions
Actions
For each integer int[int is local variable here] from 1 to 14 increasing by 1 do (Actions):
Actions
IF
(Player(int)) is in (Active Players) == false
THEN
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (int) matching Excluded: Dead, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
ELSE
Trigger goes somewhat like this, few things may differ but I was typing it off my head. IF part is comparison, Player Group - Player in Player Group.
From what i know that's normal behavior (stuff for all players always appears even if they're not present), just create an action in map initialization, that will loop thru all players, check if they're in (Active Players) player group, if not kill/remove their units.
You can use upgrades to change the Hotkey field of a button. I haven't tested if it works, but if it does, just make an upgrade that changes hotkeys and change it's level with triggers or w/e.
I said they sync high scores every game, which means they do something along those lines:
Every player stores highest scores he ever saw, and when he meets people with lower high scores, players with lower scores save those as their's highest ever met, that way they can spread those somehow fast.
And they're keeping their own hi-scores as well ofc, and implementation of this may be different but the general idea is the same, all banks are stored locally.
You can't store banks on battle.net. They use local banks for every player and sync scores every game, but that is flawed as you can't really protect local banks and people can easily hack/manipulate those.
0
Try searching this forum for it, very interesting function that allows you to change stuff in data editor thru triggers.
Anyway, it's the only action function of Catalog type in triggers, basically what it does is... well, changes stuff in data editor for certain player.
After this is done keybing should be changed. Hope u understand.
0
Yea that's good for 'sets' of hotkeys. You must duplicate whole upgrade, create new text keys and link to all buttons for each set made that way. Anyway, if you create enough text keys for each possible bind (A-Z), you can use Set Catalog value function to change keybinds, I was playing with it for a while, and using enough variables to check if binds are not used already etc. you can make fully customizable hotkeys.
For example, I've made text key Button/Hotkey/A that linked to text "A". Then i've made trigger to check if A button is pressed, then used action Set catalog value Buttons "Attack" Hotkey to value Button/Hotkey/A, which sucesfully changed hotkey to A. Made same IFs for B/C button etc. linking to similar text keys, and hotkey was working as well.
You could use it if you're fluent enough with triggers to make checks if buttons are taken/etc.
0
As title says, I've encountered this problem when changing text key's, they're pretty much anywhere in data editor. I was trying to make new ID to store my value. As it turns out, it keeps making new IDs for each keystroke, so when i was naming my key I ended up with this many IDs (and text attached to them ofc, tho it's clearable):
Button/Hotkey/C
Button/Hotkey/CB
Button/Hotkey/CBu
Button/Hotkey/CBut
Button/Hotkey/CButt
Button/Hotkey/CButto
Button/Hotkey/CButton
Button/Hotkey/CButtonF
Button/Hotkey/CButtonFi
Button/Hotkey/CButtonFiv
Button/Hotkey/CButtonFive
And text editor only allows to remove text IDs that has links to default data sources (like hotkey/move). Any way to remove unused IDs like this?
EDIT: nvm you can remove those if you open map in MPQ editor and find appropriate txt file... still kinda sux u can't do this from editor level.
0
http://forums.sc2mapster.com/development/triggers/10342-hide-buttons-on-command-card/#p11
do this if you want to make few hotkey setups. Dunno if it's possible to make em fully customizable, maybe with catalog values or sth, that's as much help i can give you atm.
0
You must also save map after selecting things to import for them to actually work.
0
Took me a while to get this working but it's not really hard.
Attaching screen from data editor and map I tested this on (U sets binds to ASDFG, I changes to QWERT)
0
Events
Map initialization
Local Variables
<integer> int =0
Conditions
Actions
For each integer int[int is local variable here] from 1 to 14 increasing by 1 do (Actions):
Actions
IF
(Player(int)) is in (Active Players) == false
THEN
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (int) matching Excluded: Dead, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
ELSE
Trigger goes somewhat like this, few things may differ but I was typing it off my head. IF part is comparison, Player Group - Player in Player Group.
0
From what i know that's normal behavior (stuff for all players always appears even if they're not present), just create an action in map initialization, that will loop thru all players, check if they're in (Active Players) player group, if not kill/remove their units.
0
You can use upgrades to change the Hotkey field of a button. I haven't tested if it works, but if it does, just make an upgrade that changes hotkeys and change it's level with triggers or w/e.
0
File -> dependencies -> add Liberty (campaign)
0
Sry my bad, it should go like this:
<img path="Assets\Textures\icon-mineral.dds" width="32" height="32"/>
You may need to use styles to change text font as well.
0
take example from UI part of actors - texts: mineral text +100
when you put image in text it is something like that:
"img source(?)=[image path here]"
add height and width beetween " " as well:
"img source(?)=[image path here] width=32 height=32"
i've put (?) coz im not sure if it's source but you should have that part already
0
I said they sync high scores every game, which means they do something along those lines:
Every player stores highest scores he ever saw, and when he meets people with lower high scores, players with lower scores save those as their's highest ever met, that way they can spread those somehow fast.
And they're keeping their own hi-scores as well ofc, and implementation of this may be different but the general idea is the same, all banks are stored locally.
0
Try to modify the actor of lockdown or whatever you're using by adding this to events:
And choose color from there (it may not be exactly settintcolor, just look for something like this).
0
You can't store banks on battle.net. They use local banks for every player and sync scores every game, but that is flawed as you can't really protect local banks and people can easily hack/manipulate those.