So I have discovered in some places in my map where a vertical cliff "|" meets a up-right cliff "/", ground units are able to just walk down off the cliff. Interestingly, however, they cannot walk back up. What's the deal with these cliffs having holes in them? Do I have to manually draw in the pathing then?
Now any time you need to access the current players, just use your variable. If you want to know the handle of each of the players, just loop through the player group and get the handles. If you are trying to check for a particular handle, you could create the following little function:
Hmm, I tried this and the alpha value is having no effect on the image shown, even when I set it to zero. (The color value is definitely having an impact, so I know I'm applying the action to the right set of dialog items.)
I don't know anything about how mods work so I can't help you in that regard, however...
It sounds to me like your defeat condition is stricter than the default melee defeat condition, so perhaps you don't have to worry about actually overwriting the default melee trigger, but rather, you just have to add in your own end game trigger. Something like:
Events:AnyunitdiesActions:PickeachplayerinAllPlayersanddoCheckDefeat(PickedPlayer)// where CheckDefeat is a placeholder for whatever your precise defeat condition would be,// probably something involving Number of Units in Unit Group == 0
I would say use set Dialog Item Desatured Flag to True and then play around with Set Dialog Item Desaturated Color to emulate the colors for each race.
Well, no one in the Triggers forum could help me out with this one, maybe you guys can.
I'm trying to do the simplest thing in the world - make some dialog images 50% transparent using the Set Dialog Item Alpha Mask action. However, I can't seem to create the right image to yield a 50% transparent result. Does anyone know how to properly use this?
Can I ask you question? Why are you so interested in crypting your triggers? I mean, I don't want to make you angry, but it could be more benefit for everybody to have an 'openware' trigger script. Honestly, if someone really wants to see your script, it's sure that he'll find a way to read it (hackers can easily broke government heavy duty firewalls, so a starcraft 2 map could be a joke next to that). I think you should instead add comments like if you're taking information in the script don't forget to add my name in your map.
Because reading the script = hacking the bank.
I would love to be able to have my script available for anyone to read who wants to learn a thing or two about how I coded some feature of my map. However, as long as Blizzard insists on storing banks client-side rather than server-side, this cannot be.
I would like to move the mission timer so it sits nicely tucked inside the top right corner of the minimap frame. However, when I try to move it, it gets cut off. I figure there must be some subtlety I'm missing.
I definitely want to stay away from manual obfuscation because the tradeoff of a slight security benefit for a huge increased likelihood of bugs and increased difficulty of debugging is not worth it.
I think I will write my own script obfuscator, could anyone explain to me quickly the process of extracting a map's script, and then re-inserting it after I've run the obfuscation?
yes the values are not changed, just their name. you can still export your keys to a mod or library which makes it a bit harder to access but still possible. in fact it's not possible to protect your script. you can still add lots of unused keys so some1 has to figure out first which one to use.
That doesn't address the issue, because TriggerDestroy takes a trigger parameter, whereas TriggerCreate takes the string name of the function as its parameter. Thanks though.
It is not very secure. A map can be unlocked by changing its .s2ma format to .SC2MAP and adding in the components file, though it does not store GUI triggers, only the raw galaxy needed to run the map.
So this means that though I have stored encryption keys in data strings as per MasterWraith's suggestion, someone could still open the map by the process you described and obtain the keys?
If the encryption keys are the only thing that you are worried about, simply put them into a data field somewhere and look them up via catalog functions on initialization. If they can't obtain your data, then they can't obtain your keys.
Thanks, will do. But that's not all I'm worried about, that's just one part. I would like all code related to saving and loading bank data to be obfuscated so that no one can reverse engineer the algorithms and then crack the keys via brute force, or bypass the entire system via memory hacking after reading my triggers and understanding how to circumvent the validation.
Also I'm wondering, is the Blizzard "locking" feature actually secure? Can people open up the map with an MPQ editor or maybe some other program that just bypass the lock?
So I just found out you can easily download a program to read any map file's triggers... Okay, I guess everyone else knew this already but this scares me a lot.
I see that in the editor, there is an option for script obfuscation, but it also says it may cause errors when custom script refers to auto-generated identifiers. Are auto-generated identifiers only those wacky variables in for loops and switch statements, or could i have a problem with variables where I have the script identifier based on name box checked?
Next question, I googled trigger obfuscation quickly and found this Galaxy Obfuscator, which, based on its description, looks like it would do a very good job of making the code an absolute pain in the ass to read. However, it also doesn't work - just gives me an "Error - unexpected [" every time I try to run it (maybe it doesn't know how to handle arrays?!). I'm wondering if there are any other good obfuscators out there that actually work. Or, is the blizzard one robust enough?
Final question - sometimes when I look at map's scripts I see something like "string/external/0123401" and sometimes I just see the literal value. I have several encryption algorithms in my map that rely on keys, so they're pretty much useless if someone can just go into the script and read out the key. How can I make it so these crucial key strings aren't written out literally in my script?
Update: Yeah okay there's no way the Blizzard obfuscator is going to work on my map. It looks like dynamic triggering is highly incompatible with the built-in script obfuscator (unless someone else has managed to find a way to use TriggerCreate("func_name") without getting errors when obfuscating?) What do all you map makers do who don't want people reading your triggers?
0
So I have discovered in some places in my map where a vertical cliff "|" meets a up-right cliff "/", ground units are able to just walk down off the cliff. Interestingly, however, they cannot walk back up. What's the deal with these cliffs having holes in them? Do I have to manually draw in the pathing then?
0
@NeroClaudiusDrusus: Go
I'm not exactly sure what you're asking but perhaps this is it.
First create a global variable of type Player Group called "players".
Then create a trigger:
And another trigger:
Now any time you need to access the current players, just use your variable. If you want to know the handle of each of the players, just loop through the player group and get the handles. If you are trying to check for a particular handle, you could create the following little function:
0
@Stexen: Go
Hmm, I tried this and the alpha value is having no effect on the image shown, even when I set it to zero. (The color value is definitely having an impact, so I know I'm applying the action to the right set of dialog items.)
0
@Kabelkorven: Go
I don't know anything about how mods work so I can't help you in that regard, however...
It sounds to me like your defeat condition is stricter than the default melee defeat condition, so perhaps you don't have to worry about actually overwriting the default melee trigger, but rather, you just have to add in your own end game trigger. Something like:
0
@FunkyUserName: Go
I would say use set Dialog Item Desatured Flag to True and then play around with Set Dialog Item Desaturated Color to emulate the colors for each race.
0
I'm not really worried about someone stealing it - I wouldn't mind that. I just don't want people hacking the game/banks.
0
Well, no one in the Triggers forum could help me out with this one, maybe you guys can.
I'm trying to do the simplest thing in the world - make some dialog images 50% transparent using the Set Dialog Item Alpha Mask action. However, I can't seem to create the right image to yield a 50% transparent result. Does anyone know how to properly use this?
0
Because reading the script = hacking the bank.
I would love to be able to have my script available for anyone to read who wants to learn a thing or two about how I coded some feature of my map. However, as long as Blizzard insists on storing banks client-side rather than server-side, this cannot be.
0
I would like to move the mission timer so it sits nicely tucked inside the top right corner of the minimap frame. However, when I try to move it, it gets cut off. I figure there must be some subtlety I'm missing.
0
@MasterWrath: Go
I definitely want to stay away from manual obfuscation because the tradeoff of a slight security benefit for a huge increased likelihood of bugs and increased difficulty of debugging is not worth it.
I think I will write my own script obfuscator, could anyone explain to me quickly the process of extracting a map's script, and then re-inserting it after I've run the obfuscation?
0
That doesn't address the issue, because TriggerDestroy takes a trigger parameter, whereas TriggerCreate takes the string name of the function as its parameter. Thanks though.
0
So this means that though I have stored encryption keys in data strings as per MasterWraith's suggestion, someone could still open the map by the process you described and obtain the keys?
0
Thanks, will do. But that's not all I'm worried about, that's just one part. I would like all code related to saving and loading bank data to be obfuscated so that no one can reverse engineer the algorithms and then crack the keys via brute force, or bypass the entire system via memory hacking after reading my triggers and understanding how to circumvent the validation.
Also I'm wondering, is the Blizzard "locking" feature actually secure? Can people open up the map with an MPQ editor or maybe some other program that just bypass the lock?
0
@ScrinKing: Go
This would be an example of a width 4 cliff:
Still looking for an answer
0
So I just found out you can easily download a program to read any map file's triggers... Okay, I guess everyone else knew this already but this scares me a lot.
I see that in the editor, there is an option for script obfuscation, but it also says it may cause errors when custom script refers to auto-generated identifiers. Are auto-generated identifiers only those wacky variables in for loops and switch statements, or could i have a problem with variables where I have the script identifier based on name box checked?
Next question, I googled trigger obfuscation quickly and found this Galaxy Obfuscator, which, based on its description, looks like it would do a very good job of making the code an absolute pain in the ass to read. However, it also doesn't work - just gives me an "Error - unexpected [" every time I try to run it (maybe it doesn't know how to handle arrays?!). I'm wondering if there are any other good obfuscators out there that actually work. Or, is the blizzard one robust enough?
Final question - sometimes when I look at map's scripts I see something like "string/external/0123401" and sometimes I just see the literal value. I have several encryption algorithms in my map that rely on keys, so they're pretty much useless if someone can just go into the script and read out the key. How can I make it so these crucial key strings aren't written out literally in my script?
Update: Yeah okay there's no way the Blizzard obfuscator is going to work on my map. It looks like dynamic triggering is highly incompatible with the built-in script obfuscator (unless someone else has managed to find a way to use TriggerCreate("func_name") without getting errors when obfuscating?) What do all you map makers do who don't want people reading your triggers?