CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on xml2galaxy Dialog Tool (Beta 0.1)

    I've begun writing a Python script that converts xml to galaxy code that creates dialogs. The purpose of this tool is to be able to quickly and easily layout the initial state of a dialog. This is how it works:

    <dialog name="testDialog" width="700" height="600" anchor="topLeft" x="100" y="100" modal="true">
    	<label name="title" anchor="top" y="50" width="100" height="40">Test Title</label>
    	<progress name="prog" anchor="topleft" x="50" y="50" width="150" height="40" min="0" max="100" val="50.5" />
    	<list name="hero" anchor="left" x="50" y="0" width="175" height="345">
    		<listitem>Hero 1</listitem>
    		<listitem>Hero 2</listitem>
    		<listitem>Hero 3</listitem>
    	</list>
    	<pulldown name="heroPull" anchor="bottomLeft" x="50" y="50" width="175" height="75">
    		<listitem>Hero 1</listitem>
    		<listitem>Hero 2</listitem>
    		<listitem>Hero 3</listitem>
    	</pulldown>
    	<image name="preview" anchor="topRight" x="50" y="75" width="150" height="375">Assets\\Textures\\btn-unit-terran-marinemercenary.dds</image>
    	<button name="select" anchor="bottom" y="75" width="150" height="45">Select Hero</button>
    	<checkbox name="checker" anchor="bottomRight" x="50" y="50" width="75" height="75" checked="true" />
    </dialog>
    

    You give this xml to the script, and it returns something like this:

    gv_testDialog.lv_dialog = DialogCreate(700,600,c_anchorTopLeft,100,100,true);
    
    gv_testDialog.lv_title = DialogControlCreate(gv_testDialog.lv_dialog,c_triggerControlTypeLabel);
    DialogControlSetPosition(gv_testDialog.lv_title,PlayerGroupAll(),c_anchorTop,0,50);
    DialogControlSe.......gv_testDialog.lv_checker,PlayerGroupAll(),c_anchorBottomRight,50,50);
    DialogControlSetSize(gv_testDialog.lv_checker,PlayerGroupAll(),75,75);
    DialogControlSetPropertyAsBool(gv_testDialog.lv_checker,c_triggerControlPropertyChecked,PlayerGroupAll(),true);
    

    The first thing you do is create a Record in your triggers. Add a variable called "dialog" and set it to the Dialog type. Then add a variable for each dialog item you placed in the xml, and use the "name" value of your xml items as the variable names. For the xml I posted as an example, your trigger window should look something like this: http://i.imgur.com/GnpoV.png

    To use this script, you either need Python installed on your system (tested with 2.6, will probably work with older versions), or you could use the exe version (I do not recommend using exe's from random people on the internet). You must run it from command line with the xml file containing the dialog as the first argument. For example:

    • I put xml2galaxy.py and my test.xml file in a folder at c:\sc2
    • I open the folder in explorer, hold shift while right clicking on the explorer area, and click "Open command window here". (This will only work if no file is selected).
    • I then type the command: xml2galaxy.py test.xml
    • The galaxy code is now in output.galaxy
    • If you receive errors it might be a bug (let me know) or a typo in your xml file.

    Right now it only does buttons, labels, progress bars, images, listboxs, pulldowns, and checkboxes. They also only take a few options. You can set more options from triggers in the editor for now. It is easy to change any of the items because they are in the record variable you create. So if you want to change the dialog, you just use the dialog functions in the trigger editor to modify the testDialog.dialog. You also create event responses the normal way. Just use the variables in the record for the events.

    If anyone has problems or questions, let me know. Thanks!

    DOWNLOAD (v0.1):

    Posted in: Third Party Tools
  • 0

    posted a message on Associating UI Frame elements with data

    @Helral: Go

    The problem is that when you have the dialogs become visible/invisible when the correct unit is selected, it has visible lag. For example: I select my hero and the XP bar shows up. I select a hostile mob and the XP bar dissappears. You can see the XP bar linger before it disappears. I used the select/deselect events to do it. Doing it using the frame layout would be instant, but I guess this is the best that can be done with the editor.

    Can you display values from the data editor?

    Posted in: UI Development
  • 0

    posted a message on Associating UI Frame elements with data

    How do you tell a frame element what data it should contain? For example: If I add a label to the InfoPaneUnit layout, how do I make the label show the text I want it to show? Specifically, I'd like to have the InfoPaneUnit layout show labels displaying my unit's custom attributes that are handled using galaxy code.

    Posted in: UI Development
  • 0

    posted a message on In game timer vs. timer window?

    @Tolkfan: Go

    ah, i forgot that timers have the speed setting too. thats much easier than what i suggested.

    Posted in: Triggers
  • 0

    posted a message on In game timer vs. timer window?

    @qxc0: Go

    hey qxc, big fan. i'm not sure about changing the in-game timer, but if you make a custom timer you can use the "Periodic Event" event in a trigger to update your timer. it has an option for game speed, so it will go the right speed. so if you can just do a periodic event for every 1 game seconds updating the timer by adding a second to it. are you using timer windows? just noticed your title says you are using timer windows (went to this from your twitter lol). i dont think you can set timer windows times manually, so you'd have to make a dialog for it.

    Posted in: Triggers
  • 0

    posted a message on Actor move towards caster

    @zeldarules28: Go

    The Colossus moves the end of its beams around using actors, so there should be a way to do this with actors.

    Posted in: Data
  • 0

    posted a message on Actor move towards caster

    @aczchef: Go

    It's an actor of the type "Model". I am messing with Site (Mover) trying to figure out how to use it, but no luck.

    Posted in: Data
  • 0

    posted a message on Actor move towards caster

    Let me ask a simpler question, how do you make an actor move at all once it's created?

    Posted in: Data
  • 0

    posted a message on Actor move towards caster

    I have a model actor that is created when an effect is started. It is positioned using a Site (Random Point in Circle) in the host operations of the model actor. The model actors are being created at random points correctly, but I can't figure out how to make them move towards the caster unit as soon as they are created. I want to make it so the model actor moves to the caster unit slowly and then disappears when it gets there. The caster never moves while this effect is going on. Anyone know how to do this?

    Posted in: Data
  • 0

    posted a message on [Trigger Library - Map] General Functions/Conditions
    Quote from LordAbyss: Go

    I could probably do a Phoenix Fire ability. It is quite simple to do the in the data editor and more efficient to do in the data editor.

    Edit: The reason why did those first couple functions is because their is no easy method of doing those unless you have some knowledge of the editor. My aim is to provide these things and make other people's creation easier and more efficient.

    I meant the greater than/less than etc functions. Those are pointless when you have if statements. Doing it that way is actually just going to clutter your function list.

    Posted in: Project Workplace
  • 0

    posted a message on [Trigger Library - Map] General Functions/Conditions

    @LordAbyss: Go

    Why have all those functions for things that if statements do?

    Posted in: Project Workplace
  • 0

    posted a message on Could someone fix and upload my map for me?

    @Phrosen: Go

    The problem is from showing the game UI while it is already visible. If you want me to take a look you can send me the map.

    Posted in: General Chat
  • 0

    posted a message on SotIS Unlocked
    Quote from s3rius: Go

    @Pimpmunkeh: Go

    I say my coding is so precious that I don't want anyone else to open my map, put his name in instead of mine and republish it under a slightly different name.

    I'd also say that it's so precious that I don't want people to be able to cheat my storage system to gain an unfair advantage over others (level hacking in rpgs and stuff).

    Yea, I'd say that.

    Agreed. It is fine if some people want to lack appreciation for their own creations, but some of us do like to be confident about ourselves. If I make a map that does something new/innovative, and someone wants to know how I did it, all they have to do is ask. I do not like it when others copy paste my code into their maps without attempting to learn from it or understand it. It is also annoying when someone thinks they have become a better artist because they piggy-backed off others work.

    People can take advantage of unlocking maps by taking credit for things they didn't make, figuring out how to modify bank files, and finding security flaws to cheat with that they otherwise would have never found.

    Posted in: General Chat
  • 0

    posted a message on SotIS Unlocked

    @s3rius:

    Hopefully Blizzard updates the locking soon. And hopefully, when they do update it, we don't have any new posts on mapster on how to break the new locks. My guess is the updated locking will come out with the Blizzard custom maps.

    Posted in: General Chat
  • 0

    posted a message on Could someone fix and upload my map for me?

    I just had something like this happen for me, and I remembered this post. I had done 'Show/Hide the world' in the UI trigger section to Hide, did a few things and then it was supposed to Show again. But I forgot to delete a Hide Game UI trigger and replace it with Hide world. So it was hide world, do stuff, show game UI. When I ran this, it brought up the credits like in your video. When I replace Show Game UI with Show World, it went away.

    So to test the bug, I put a Show Game UI action without ever hiding it. This brings up the credits. I'm pretty sure thats not intended. Do you have anywhere in your code that might Show Game UI even though it's already showing?

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