• 0

    posted a message on [Trigger] Writing code in pure Galaxy

    @Ttn114: Go

    All includes are relative to the root dir in the MPQ. So in my example since everything is in the Cortex folder ALL of my includes (even the ones from inside Cortex) must begin "include Cortex/...".

    Also, you have to hit the save button in the import manager before you can compile test accurately.

    Posted in: Tutorials
  • 0

    posted a message on No Galaxy Script change for the Editor

    @Slarti: Go

    See my tutorial. It's not that bad. :P

    Posted in: General Chat
  • 0

    posted a message on MapCraft - play custom games online! (PC and Mac!)

    This is based on the work of limezor of SC2Mapster. (http://forums.sc2mapster.com/development/tutorials/563-how-to-play-online/)

    This program allows you to swap Lost Temple for any SC2Map/S2MA file and play that instead over Battle.net. As long as everyone swaps their file, it should allow multiplayer play.

    This tool is fully compatible with Microsoft Windows and Mac OS X.

    It will also allow you to launch custom games in single player. Not all maps support this feature but it works sometimes.

    Happy gaming!

    http://static.sc2mapster.com/content/images/20/314/Screen_shot_2010-05-02_at_3.24.08_AM.png http://static.sc2mapster.com/content/images/20/315/MapCraftWindows.png

    Downloads available at: http://www.sc2mapster.com/assets/mapcraft/

    Posted in: Third Party Tools
  • 0

    posted a message on Input Latency (Delay) over Battle.net

    In the big scheme of things, a 350ms delay is not very significant. Yes, most people could probably drop to at most 200ms, but statistically, Blizzard has to make sure that almost all people can play, not most people. Keep in mind, this isn't like WoW. In WoW, if you lagged behind, nothing bad would happen to the other people in the game. You'd just jump around like an idiot. In SC2, all of the data and gamestate has to be synchronized every 350ms (tickrate). (It's actually done through deltas, but we'll ignore that for simplicity) If the data isn't synchronized in that time, EVERYONE gets an ugly screen that says someone is lagging.

    Some people say that you could probably drop it down to even 100ms, which is kind of silly. Even on WoW pings are most often like 120ms, not 100ms or lower. Yes, some people do have great connections but most are in the 100-200ms range with spikes every so often higher. Also, WoW is from your residential connection to a server in a datacenter with excellent connectivity. In SC2, you're connecting to yet another residential connection which has it's own host of problems. There are bound to be spikes into the 250ms range at least, and this doesn't even take into account the people that have background apps running.

    In summary: this is NOT a result of poor coding. It's one of line of code that says to update every 350ms, and it's there for a reason. That said, I wish we could do 200ms. :P

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Mac] Launching custom games

    Updated with an easy-to-use Java application for those who can't use Terminal.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] Writing code in pure Galaxy

    @akastar: Go

    No. Use the import manager in your SC2Map MPQ file, not the SC2 MPQs.

    Posted in: Tutorials
  • 0

    posted a message on Requested additions

    I'd love to see the editor include the following:

    Terrain Modification
    Yes, some of htis is possible now. But let's add more. Let's go so far as to make it so we can make a region bump up a cliff level. And let's have it all affect pathing. It'd also be nice to abstract away some of the work with actors that we have going on now.

    A way to teach units abilities through triggers
    In WC3 I could give a peon the Windwalk ability half-way through the game, or make a Siege Engine have the Kaboom! ability like a Goblin sapper. It opens the door to a lot of interesting possibilities.

    Also function pointers would be nice to see in the Galaxy language.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on [Trigger] Writing code in pure Galaxy

    Data -> View Script (Ctrl + F11)

    Posted in: Tutorials
  • 0

    posted a message on Galaxy requires CRLF line endings?

    Well for now I'm solving the problem with unix2dos or svn propset eol-style: CRLF. Not a big deal anyways.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Is it possible atm to get a units attributes via triggers?

    native int UnitGetPropertyInt(unit p1, int p2, bool p3);
    native fixed UnitGetPropertyFixed(unit p1, int p2, bool p3);

    yay natives! <3

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Trigger] Writing code in pure Galaxy

    This is the method I use to import my .galaxy scripts into the editor and have them work.

    Step 0: Back up your map before attempting this! Really! There's a lot of potential for screwups.

    Step 1: Write some galaxy code! Ideally, all your code should be in a folder like "MotiveMe" so your directory structure might look like.

    Quote:

    MotiveMe/Main.galaxy
    MotiveMe/Support/AwesomeStuffHere.galaxy

    Step 2: Open the editor and the map you want to insert your custom code into.

    Step 3: Open the Script Editor (Inside Trigger Editor, Data -> View Script or Ctrl + F11) and edit it by adding an include at the top (under "include 'TriggerLibs/natives'" though). Also add to the MapInit function your initializer in the included file.

    Your new MapScript.galaxy file might look like:

    include "TriggerLibs/NativeLib"
    include "MotiveMe/Main.galaxy"
    
    //--------------------------------------------------------------------------------------------------
    // Library Initialization
    //--------------------------------------------------------------------------------------------------
    void InitLibs () {
        libNtve_InitLib();
        libMotv_InitLib(); // this is defined in MotiveMe/Main.galaxy!
    }
    
    //--------------------------------------------------------------------------------------------------
    // Map Initialization
    //--------------------------------------------------------------------------------------------------
    void InitMap () {
        InitLibs();
        InitTriggers();
    }
    

    Step 4: Once that's done, hit the compile button IN THE SCRIPT EDITOR. Make sure everything's up to spec! But you're not done yet!

    Step 5: Hit the save button and export your MapScript.galaxy file to, for example, "MainScript.galaxy".

    Step 6: Open the import manager (alternatively, you may use an MPQ editor capable of editing SC2 files for this purpose), and import the exported Galaxy file again.

    Step 7: Rename the Galaxy file you just imported to MapScript.galaxy and hit save. This will overwrite the editor-generated one.

    Step 8: Save and run! If you open the script editor again, your MapScript.galaxy file will be reset. Be warned.

    This method is probably the best method for writing Galaxy code outside of the editor atm. You can do all sorts of powerful things with it like write half your code in GUI and the other half in Galaxy if you're smart. ;)

    Posted in: Tutorials
  • 0

    posted a message on [Mac] Launching custom games

    If you're on a Mac and have no map editor like me, you might need to run custom maps on SC2 and have no way to do it. (No editor = no test document feature).

    So, I wrote you a shell script! But then I realized most users have no interest in a shell script. So I wrote you a Java app! The java application is attached below. Just run it and select the map, then hit launch. It's very easy to use.

    There is an issue that I haven't been able to figure out. Some maps will just fail to load for (from what I can tell) no reason. My own maps and a few others on SC2Mapster.com do load, but a lot do not. To fix this, try playing the map over Battle.net using my other tool. (http://forums.sc2mapster.com/general/general-chat/993-tool-mac-sc2-custom-map-launcher/)

    The exact method I use to open the map is below. It's jsut a terminal command I run.

    open "Starcraft II.app" --args -run "${MAPLOCATION}"
    

    Edit: New, better code! Also supports multiplayer! (Multiplayer solves loading issue)
    http://www.sc2mapster.com/assets/mac-map-launcher/

    Posted in: Tutorials
  • 0

    posted a message on Extreme terrain height issues.

    What you need to do is remove the "OnConstructionStart: FlattenTerrain" actor behavior from the building and allow it to "roll" with the terrain as well. This was a property in WC3 if I recall, but I haven't looked into the data editor much.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Stupid question, how do I open official maps?

    Check the tutorials forum, page 2. vjeux posted a great guide. :)

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