• 0

    posted a message on How do I import galaxy script?

    Not sure if I can be of some help, but i guess trying wouldn't hurt.

    Quote from Verdagon: Go

    How do I put my galaxy script into my game?

    I'm not quite sure what you're asking.

    If you mean it literally, then

    1. open your map and save it as a SC2Components file.
    2. locate the folder "MAP_NAME.SC2Map" in your C: drive and open it.
    3. Locate and open the file MapScript.galaxy.
    4. override the "actual" map script.

    The "actual" map script will expose the InitMap() function which is not shown by the editor.

    Note, the commands "data->compile all" and "data->View Script" do not detect scripts created in this manner. The editor will allow you to save despite syntax errors. The best way to test your script is to actually play your map.

    If you mean "How to put a galaxy script into a library," then you need to realize that there's the GUI/XML library and there's the actual library folder created by the modder in the "MAP_NAME.SC2Map" folder.

    Quote from Verdagon: Go

    It turns out, .SC2Lib files are XML.

    Yup, to create the GUI/XML library just use trigger module; doing it by hand is too prone to glitches.

    1. launch the trigger module
    2. right-click on a white space under the library area
    3. select Library->New Library
    4. Right-click on the new library. Select New->New Custom Script.

    If your library requires an init function to be called, you can set the init function in the "Initialization function (optional)." Select your script/code to see it.

    It's probably best to write the script with a third-party tool, then copy&past it into the library.

    The other "library" is a folder that's created by modders under the S2MAP folder (you get the folder when you save your map as a component list).

    1. Open your MAP_NAME.SC2Map folder
    2. Create a folder called Library (or whatever you want)
    3. Create whatever .galaxy file you desire in that folder

    You can now reference that galaxy file in your script using the include command.

    For example, i would type include "Library/PhysicsEngine" to include the file "PhysicsEngine.galaxy" in my MapScript.

    It's obvious that the word library in SC2 is not completely analogous to what a library is in C plusplus. A library that's packaged as an XML is completely retarded, but hey so is Blizzard.

    Posted in: Galaxy Scripting
  • 0

    posted a message on A really dumb question, I know.

    @Halleflux

    http://i.imgur.com/0je6S.gif

    Right-click in the red circle. You should see an option for creating a custom script "thread."

    Any functions you make in the custom script thread are just declared. If you want to create a trigger that executes, be sure to invoke the function that registers the triggers' events, conditions, and actions. I usually just add the trigger function into the InitTrig function.

    As far as i know, the InitTrig function is only accessible via the mapscript.galaxy Just save your map as components and you'll see it under the saved folder.

    Or you can just make a GUI thread and use the action: "General - Script" --- see the .gif. I think the action has a limit though.

    ---
    Personally, i don't use the editor for scripting; it's too cumbersome and a waste of time. It's better to  use notepad++ with the galaxy language plugin. The plugin has better syntax highlighting capabilities.

    You can get notepad++ here: http://notepad-plus-plus.org/ and the galaxy plugin here: http://forums.sc2mapster.com/resources/third-party-tools/19619-galaxy-editor/. You might have to modify the galaxy plugin though, the original colors are horrible!

    By the way, if you're already familiar with programming, you might want to check out the native APIs: http://paste.sc2mapster.com/1979/. This and the data editor is where all the fun is at.

    Be careful though, some of the API do not work or they appears to work, but don't.

    Posted in: Galaxy Scripting
  • 0

    posted a message on No fly zone

    Does anyone know what APIs affect "No Fly Zones"? And what data type No Fly Zones" are?

    Posted in: Galaxy Scripting
  • 0

    posted a message on Footprint

    I'm not sure if this is what you need, but it's worth a shot

    Footprint number 1

    1. In the editor, go to the footprint tab
    2. Select footprint 1x1 (creep)
    3. If you want, rename the footprint.
    4. Hold down Ctrl and highlight layers+ and Shape+. Press enter.
    5. Set the Size X and Size Y to whatever value you desire.
    6. With the value None brush selected, paint all the squares gray.
    1. Under the layer drop down box, select placement apply
    2. Select the set none and paint all squares gray.
    3. Select the set one and click on the button define set.
    4. Uncheck everything, but no build. Click okay.
    5. Paint all squares purple.
    1. Under the layer drop down box, select placement check
    2. Select the set none and paint all squares gray.
    3. Select the set one and click on the button define set.
    4. Uncheck everything, but no build in the invalid section. Click okay.
    5. Paint all squares purple. Click okay once you're done.

    Footprint number 2

    1. In the editor, go to the footprint tab
    2. Select footprint 3x2
    3. If you want, rename the footprint.
    4. Hold down Ctrl and highlight layers+ and Shape+. Press enter.
    5. Set the Size X and Size Y to whatever value you desire.
    6. With the value None brush selected, paint all the squares gray.
    1. Under the layer drop down box, select placement apply
    2. Select the set none and paint all squares gray.
    1. Under the layer drop down box, select placement check
    2. Select the set none and paint all squares gray. Click okay once you're done.

    The second footprint is just an nulled footprint.

    1. In the unit tab, select your desired structure.
    2. Under movement - collision, uncheck everything but structure.
    3. Under movement - pathing footprint, select the first footprint.
    4. Under movement - pathing footprint - placement, select the second footprint.

    Test it out and tell me if works.

    Posted in: Data
  • 0

    posted a message on Footprint

    @EchoedRequiem: Go

    http://www.galaxywiki.net/wiki/Stacking_Buildings

    Quote:
    • Next change the "Data Type:" to "Units" and select "Photon Cannon" from the list.
    • In the box on the right, find "Movement - Collide" and double-click on the space to the right of it to open an "Object Values" window. Uncheck everything under "Collide" and click "OK" to close the window.

    Perhaps you should uncheck the collision flag from your unit?

    ==============================================================

    Anyways, I'm only theorycraft here. I'll try to find what you need when i have time to access the editor.

    Posted in: Data
  • 0

    posted a message on Footprint
    Quote from EchoedRequiem: Go

    ...I think it's simply not registering the footprint at all.

    http://forums.sc2mapster.com/development/data/21950-custom-footprint-bugged/#p7

    Looks like you're in the same boat.

    However, maybe i can point you into the right directions.

    First thing first, the footprint editor does seem work as far as layers are concern. By that i mean, the footprint editor does appear to generate similar XLM data to those of other existing footprints.

    What doesn't work is custom footprints: footprints you, and specifically you, have created. Luckily, you can modify an existing footprint and use it.

    Here are five existing footprints that are not used: footprint 1x1 (creep), footprint 3x2, footprint 1x2, Zerg Hole Small, and Xel' Naga Ship Alarm. DO NOT alter the footprint id and/or use the command "reset to parent/default value." Your map may glitch up and you'll have to manually delete the corrupted data by editing the footprintdata.xml

    I had to rebuild my entire map because of that crap.

    Also, could you post your footprintdata.xml and componentlist? Nothing of mine worked; it look like you had some success though.

    to access the footprintdata and componetlist:

    • Open your map
    • Go to save as
    • In the drop down menu from the "save as filetype" select SC2Component and save
    • Locate where you saved your map.
    • Open the SC2Component folder.
    • Look around for those two files: they can be read by notepad.
    Posted in: Data
  • 0

    posted a message on Custom Footprint Bugged?

    @Kueken531: Go

    Can you explain how you got the footprint to work for you? I tired manually creating the footprint via XML, but the editor continues pretends as though the footprint doesn't exist. I copied the XML data from the footprint "Footprint 6x6 (Contour)" and pasted into my custom footprint. Below is the xml data.

    <?xml version="1.0" encoding="us-ascii"?>
    <Catalog>
        <CFootprint id="FootprintWall1x2">
            <Layers index="Check" Area="-3,-3,3,3">
                <Rows value="xxxxxx"/>
                <Rows value="xxxxxx"/>
                <Rows value="xxxxxx"/>
                <Rows value="xxxxxx"/>
                <Rows value="xxxxxx"/>
                <Rows value="xxxxxx"/>
            </Layers>
            <Layers index="Place" Area="-3,-3,3,3">
                <Rows value="xxxxxx"/>
                <Rows value="xxxxxx"/>
                <Rows value="xxxxxx"/>
                <Rows value="xxxxxx"/>
                <Rows value="xxxxxx"/>
                <Rows value="xxxxxx"/>
            </Layers>
            <Layers index="Pathing" Area="-6,-6,6,6">
                <Rows value="......"/>
                <Rows value="......"/>
                <Rows value="......"/>
                <Rows value="......"/>
                <Rows value="......"/>
                <Rows value="......"/>
            </Layers>
            <Shape>
                <Radius value="3.6057"/>
                <Offsets value="-2,-3;2,-3;-2,3;2,3;-3,-2;-3,2;3,-2;3,2"/>
                <Borders value="0,4,0;1,0,0;2,3,0;3,7,0;4,5,0;5,2,0;6,1,0;7,6,0"/>
            </Shape>
            <EditorCategories value="FootprintGroup:SpecificDoodads"/>
        </CFootprint>
    </Catalog>
    

    I've exhausted every possible cause of the bug that could think of. Maverck, can you post your ComponentList (SC2COMPONENT file) and/or the footprint xlm? What did you use your footprint for?

    ~~ This is pissing me off. The only thing i can conclude is that custom footprints simply don't work, but maverck reports contradicts this. Does anyone have any ideas on what might be causing custom footprints to fail?

    Thanks

    Posted in: Data
  • 0

    posted a message on Custom Footprint Bugged?

    @Kueken531: Go

    Exactly the same as i would have made a one from scratch. I simply duplicated the footprint "footprint 1x1 (no build)," and gave it to the actor. However, the original footprint does work.

    @maverck: Go The footprint editor is the screen that prompts after you double-click "Layers+" or "Shape+" right? Or do you mean the footprint tab?

    As anyone reported this to Blizzard? You would think something as crucial as custom pathing would be fixed within a year's time.

    Is there an API that allows me to set a terrain cell as block vision, no ground units, no air units, etc...?

    Posted in: Data
  • 0

    posted a message on Custom Footprint Bugged?

    @DrSuperEvil: Go Sorry for the long delay in reply: i had to rebuild my entire map.

    Yes, I have defined set one as the following: block vision, ground - no spawn, no build, and no creep.

    I'll go over my entire steps.

    • In the data editor, create a new actor
    • In the actor properties prompt: the actor type is doodad, it's base on cActorDoodad, the doodad type is structure, and the field value is copied from rubble wall 90.
    • In the footprint editor, create a new footprint
    • It's footprint group is specific/structures and the field value is copied from "footprint 3x3 force field."
    • In the field, "Layers+" is double-clicked.
    • Size X is set to 2 and Size Y is set to 1
    • With the un-pathable terrain selected, the all 8 triangles are colored red.
    • Under "Layers: Placement Apply,"the set drop down menu is click and "Set one is selected."
    • The button define set is clicked.
    • Bock vision, ground - no spawn, no build, and no creep are check-marked. The others are not.
    • Okay button is clicked.
    • All 4 rectangle are then painted purple.
    • Okay button is clicked.
    • In the data editor, the actor is select
    • The actor is given the custom footprint
    • Save and exit the editor.
    • Reload the map
    • Place doodad; it does not snap to grid (snap to grid is off), red squares doesn't appear when placed (indicating un-pathable terrain), units can pass thru it, does not block line of sight.

    However, if i use a footprint that is not custom made (in blue text): it does snap to grid (even with snap to grid off), red squares appear when placed, units can pass thru it, and it does block line of sight. The premade footprints are the wrong shape though or only have some of the properties I'm looking for.

    Any ideas on what is going on with these custom footprints?

    Thanks.

    Posted in: Data
  • 0

    posted a message on Custom Footprint Bugged?

    I'm trying to give a custom doodad, a horizontal stone wall, a 2x1 footprint. The footprint should block vision, ground units, buildings, and air units. When i apply a custom footprint, the editor ignores it. However, when i apply the footprints already available in the editor, it works.

    My initial thought was that i copy something down wrong. So i copied an editor's footprints and made zero changes to it. I then apply the copy footprint onto doodad actor; it didn't work. Are custom footprints not allowed? Is there a way to get to my end goal?

    I've tried modifying the editor's footprints and using it on my doodad actor; it works. However, it's extremely bugged. The editor would map copy edited footprint and prevent you from editing or deleting the copy.

    Has anyone figure how to make custom footprint work?

    Posted in: Data
  • 0

    posted a message on As of today, is modding for Sc2 worth it?

    Hello.

    When Starcraft II was announced, I was absolutely ecstatic. I felt that i can leave the problems of Warcraft III's modding behind: DotA's incredible popularity, the deprecated JASS language, and the cumbersome Warcraft III's engine. Obviously, I couldn't justify creating a complete custom map for Warcraft III. And so, I signed up for Starcraft II's beta and immediately began learning the new editor (once it was released in a patch).

    Towards the end of the beta, I started to feel uneasy: something is disturbingly wrong. The editor was not what i expected. But more importantly, Blizzard... they seem different - their policies and attitudes didn't seem consistent with the Blizzard i grew up with.

    Once i launched the editor, i immediately began to screwing around with the new GALAXY language and I'd noticed:

    • You cannot declare variables anywhere (it must be on top... whatever)
    • No classes (whatever... us modders can always create a virtual one like vJASS)
    • No pointers or references (something i really, really hoping for)
    • Fixed variable type is used rather than the floating point type; this resulted in significant discrepancy between input value and output value.
    • No CreateCliffAtLoc API
    • No SetTerrainAtLoc API (strange how Wc3 had this API and Sc2 doesn't)
    • No way to controlling how "handles" values are assigned.
    • You can't modify the GUI via trigger (although Starjeweled seem to counter this)
    • You cannot create or change the various scripts created thru the "actor events editor" via trigger
    • Relatively small limit imposed on a function's size (WTF? Wc3 didn't have this)
    • Relatively small limit on how many operations a single function can do (again, WTF?)
    • No map linking, multiplayer-wise
    • You cannot identify which player belong to which lobby slot. (Player 2 is erroneously assigned the slot position of 2 despite being in the 10th lobby slot)
    • I think there's more, but... it's been almost two years since i used the Sc2 editor.

    As for Blizzard:

    • Censorship (your map couldn't upload with words like god, suicide, black, white... etc..)
    • 10 Mb per map (does anyone know if approaching this limit is easy or not?)
    • You cannot host maps, nor give your game a name.
    • You cannot kick people out of your game.
    • The countdown timer doesn't abort of someone leaves.
    • The popularity system
    • Everything about your map becomes the property of Blizzard.

    All of reasons above gave me a gut feeling that buying Starcraft II wasn't in my best interest for the time being. So, after roughly two years, have blizzard address some of these problems? Has the GALAXY language improved fundamentally? Is blizzard really serious about banning people over something as trivial as having the word god used in a game (if i were to find a way to bypass the filters)?

    I just want to know, as of today, what is it like to work with the GALAXY language, Blizzard's policies and behavior towards modders, and whether you feel modding for SC2 is worth it.

    Thank you very much.

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