• 0

    posted a message on Cliffs Have Holes - Ground Units Walking Off Cliffs

    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?

    Posted in: Terrain
  • 0

    posted a message on Detecting Players In Game

    @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:

    Events: Map Initialization
    Actions: Pick each player in (All Players) and do:
       If (Controller of Picked Player == User) Then Add Picked Player to players.
    

    And another trigger:

    Events: Any player leaves the game
    Actions: Remove triggering player from players.
    

    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:

    Function: PlayerWithHandleExists
    Parameters: String parameter_handle
    Return Type: Boolean
    Local variables: Integer i
    Body:  For each player i in players do:
      If (handle of player i == parameter_handle) Return true
    Return false
    
    Posted in: Triggers
  • 0

    posted a message on Set Dialog Item Alpha Mask - Alpha Mask Format?

    @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.)

    Posted in: Triggers
  • 0

    posted a message on Add a trigger into a mod file that overwrites the melee Melee initialization?

    @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:

    Events: Any unit dies
    Actions: Pick each player in All Players and do CheckDefeat(PickedPlayer)
    // where CheckDefeat is a placeholder for whatever your precise defeat condition would be,
    // probably something involving Number of Units in Unit Group == 0
    
    Posted in: Triggers
  • 0

    posted a message on Dynamically change race of button [Solved]

    @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.

    Posted in: Triggers
  • 0

    posted a message on Code Obfuscation & Map Security
    Quote from BlinkHawk: Go

    The best you can do is make editing your map such a pain in the ass, that anyone would refuse to steal it.

    I'm not really worried about someone stealing it - I wouldn't mind that. I just don't want people hacking the game/banks.

    Posted in: Triggers
  • 0

    posted a message on Set Dialog Item Alpha Mask - Alpha Mask Format?

    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?

    Posted in: Artist Tavern
  • 0

    posted a message on Code Obfuscation & Map Security
    Quote from tatatatate: Go

    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.

    Posted in: Triggers
  • 0

    posted a message on Moving the Mission Timer

    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.

    Mission Timer

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <Desc>
        <Frame type="MissionTimePanel" name="GameUI/UIContainer/ConsoleUIContainer/MissionTimePanel" file="GameUI">
            <Height val="44"/>
    
            <Frame type="Label" name="TimeLabel">
                <Anchor side="Top" relative="$parent" pos="Min" offset="30"/>
                <Anchor side="Left" relative="$parent" pos="Min" offset="-5"/>
                <Style val="@@MissionTimePanel"/>
                <AcceptsMouse val="true"/>
                <Tooltip val="@UI/MissionTimeTooltip"/>
                <RenderPriority val="1000"/>
            </Frame>
    
            <Frame type="Image" name="BackgroundImage">
                <Anchor side="Top" relative="$parent/TimeLabel" pos="Min" offset="-10"/>
                <Anchor side="Bottom" relative="$parent/TimeLabel" pos="Max" offset="10"/>
                <Anchor side="Left" relative="$parent/TimeLabel" pos="Min" offset="-15"/>
                <Anchor side="Right" relative="$parent/TimeLabel" pos="Max" offset="10"/>
                <Texture val="@@UI/MissionTimePanelBackground"/>
                <TextureType val="EndCap"/>
                <RenderPriority val="999"/>
            </Frame>
      </Frame>
    </Desc>
    
    Posted in: UI Development
  • 0

    posted a message on Code Obfuscation & Map Security

    @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?

    Posted in: Triggers
  • 0

    posted a message on Code Obfuscation & Map Security
    Quote from FunkyUserName: Go

    @Apollys: Go

    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.

    you might consider this useful for your triggerCreate problem. http://www.sc2mapster.com/forums/development/triggers/65013-trigger-destroy-script-obfuscation/

    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.

    Posted in: Triggers
  • 0

    posted a message on Code Obfuscation & Map Security
    Quote from Nebuli2: Go

    @Apollys: Go

    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?

    Posted in: Triggers
  • 0

    posted a message on Code Obfuscation & Map Security
    Quote from MasterWrath: Go

    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?

    Posted in: Triggers
  • 0

    posted a message on Can Only Create Even-Sized Cliffs?

    @ScrinKing: Go

    This would be an example of a width 4 cliff:

    Cliff

    Still looking for an answer

    Posted in: Terrain
  • 0

    posted a message on Code Obfuscation & Map Security

    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?

    Posted in: Triggers
  • To post a comment, please or register a new account.