• 0

    posted a message on Tutorial Map - Get started mapping !
    Quote from XXOmega: Go

    @vjeux: Go hmmm.. can't really finish the maps if you can't touch the terrain ATM then?

    Well, you can start it at least :) And you will be able to understand the underlying system of the maps. The editor will hide a great deal of complexity.

    Posted in: Tutorials
  • 0

    posted a message on Tutorial Map - Get started mapping !

    Pretty much yeah :)

    What we can do at the moment is very similar to what is going to be possible with the editor

    • Galaxy Editing: There will be some kind of wysiwyg thing to code, but nothing that we can't already do
    • XML Editing: There will be some kind of excel sheet that allow us to edit the values. Will speed up a little the process but does not give more power
    • Terrain Editing: This is where the editor is needed. It's not possible to edit the terrain at all atm. It is stored in binary form that is impossible to edit with a text editor

    All the functions are not available yet, only the strict minimum required for the AI to work is in. This will allow us to make better things.

    Posted in: Tutorials
  • 0

    posted a message on How To - Giving resources

    Here is a little demonstration video:

    Embed Removed: https://www.youtube.com/v/4sD7a7gEeYo?fs=1

    You can test it adding the files attached inside the Tutorial

    Look for the

    <!-- !Change -->
    
    comments in the following files: UnitData.xml, EffectData.xml, BehaviorData.xml and AbilData.xml

    Posted in: Galaxy Scripting
  • 0

    posted a message on How To - Giving resources

    Hello,

    For the Tower Defense I've come across a problem: giving resources to the player. Since there is no PlayerSetResource() function yet, this is pretty hard. Here is a little recap of my findings.

    MeleeInitResource

    The function MeleeInitResource gives the amount of mineral and vespene you want but it does it only one time. This is really strange but works that way. So it can't really be used.

    Mineral

    A way to get mineral is to gather it from a mineral field. I haven't managed to build a MineralField from a building. The solution is to make a unit gatherable. This is done adding those 3 lines inside UnitData.xml

        <ResourceState value="Harvestable"/>
        <ResourceType value="Minerals"/>
        <BehaviorArray Link="MineralFieldMinerals"/>
    

    You want to get the resources instantly:

    <!-- BehaviorData.xml -->
        <CBehaviorResource id="MineralFieldMinerals">
            <Capacity value="10"/>
            <Contents value="10"/>
            <HarvestTime value="0"/>
            <HarvestAmount value="10"/>
            <Flags index="RemoveWhenEmpty" value="1"/>
            <ReturnDelay value="0"/>
    

    Since you don't want your worker to get back and forth to the main building, you can set the worker to be a resource dropping site.

    <ResourceDropOff index="Minerals" value="1"/>
    

    Now, the unit will act like a coin. You click on it, the worker will collect it and get money.

    Spawn the unit

    You can now order any AI to train the harvestable unit using that Galaxy line:

    // player, priority, town, unit, count
    AITrain(2, 1, 0, "Larva", 1);
    

    In the Tower Defense perspective, it would be nice to have the mineral pop when the unit dies. It is possible! We are going to use the Zerg Building. There are many layers of XML to get this working, this is kinda complicated to edit it without the editor.

    <!-- UnitData.xml -->
        <BehaviorArray Link="ZergBuildingDies9"/>
    
    <!-- BehaviorData.xml -->
        <CBehaviorBuff id="ZergBuildingDies9">
            <Modification>
                <DeathResponse Chance="1" Effect="ZergBuildingSpawnBroodling9Delay"/>
    
    <!-- EffectData.xml -->
        <CEffectCreatePersistent id="ZergBuildingSpawnBroodling9Delay">
            <FinalEffect value="ZergBuildingSpawnBroodling9"/>
    
        <CEffectCreateUnit id="ZergBuildingSpawnBroodling9">
            <SpawnUnit value="Broodling"/>
            <SpawnCount value="9"/>
    
    Can't harvest enemy units

    There is a <RequiredAlliance value="Control"/> field. However, the only possible values are (Passive, Vision, Control, Spend, Trade, SeekHelp, GiveHelp, Chat, Defeat, Pushable). None of them include being enemy.

    It is possible to set an alliance between an AI and a player. The bad thing is that it cannot be done inside the map, you have to do through the launcher. And at the moment there is no command line launcher that is able to do it. Also, we don't want to be dependant from a particular launcher.

    A possible lead would be to use an ability to take control of the enemy unit. However it would require too much interaction and many layers of XML.

    Solution

    Arthas- just gave me a solution: In the <CEffectCreateUnit node we can add this magic line:

    <SpawnOwner Value="Neutral"/>
    

    This allow us to make a coin spawn on unit death. The unit will be neutral therefore harvestable. You can now give money to the player ! This involves many XML editing but it is possible and in an user friendly process.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Tutorial Map - Get started mapping !

    All the d?() functions print text inside the debug trigger window. In order to make it appear you must be in windowed mode :)

    Posted in: Tutorials
  • 0

    posted a message on Tutorial Map - Get started mapping !

    Would not be hard. Something like

    point p;
    if (command == "-moveto") {
      p = Point(StringToFixed(StringWord(message, 2)),
                StringToFixed(StringWord(message, 3)));
      // Update the order code to use this point
    }
    
    // Sample usage:
    // -moveto 53.3 12.2
    
    Posted in: Tutorials
  • 0

    posted a message on Tutorial Map - Get started mapping !

    Hello,

    At the moment, creating a map is a hardcore process, this is why I've packaged many tools together to make map editing easy.

    http://www.sc2mapster.com/maps/tutorial-how-get-started/

    How to start:

    • Extract the zip file anywhere you want
    • Copy "Starcraft II Beta/Versions/Base13891/" to "Starcraft II Beta/Versions/Base10000/"
    • Copy "Tutorial/Export/patch.SC2Archive" to "Starcraft II Beta/Versions/Base10000/patch.SC2Archive"
    • Run "Tutorial/launch_map.bat"
    • You should see a map with 4 drones and one of them is yours

    Now, you just have to edit the galaxy and xml files inside the Files/ folder. Run the launch_map.bat and Tadaa, all your modifications are taken in account directly.

    In order to make the learning curve easier I've added examples of basic code you would probably want to write. If you want to get deeper you can dig into the Documentation.

    I hope you are going to start making maps :)

    http://static.curseforge.net/thumbman/images/19/563/600x467/tutorial.PNG.-m1.png

    Posted in: Tutorials
  • 0

    posted a message on XML Files in wiki

    Well, it's not a battle about who is going to document the most. The goal is to have as many thing documented as possible. Small contributions are needed as well as big ones.

    Anyway you are right, go back to work and don't leave your cavern until it's perfect! ;) Then you will have all our deserved congratulations.

    Posted in: General Chat
  • 0

    posted a message on Can't get on the IRC

    http://webchat.freenode.net/

    Just use this web chat. Enter your nick and "sc2mapster" as channel

    Posted in: General Chat
  • 0

    posted a message on Making Data References within Data Values

    At the moment the only functions in the API are those strictly needed for the AI to work. We should see a lot more coming with the editor.

    This is also why this is important to document what we have right now, because if we don't we are going to be drown with the amount of functions :)

    Posted in: Miscellaneous Development
  • 0

    posted a message on XML Files in wiki

    Bifuu, this is an awesome job!

    Thanks a lot :)

    Posted in: General Chat
  • 0

    posted a message on Trigger Error in 'gt_MeleeInitialization_Func': Parameter out of bounds in 'PlayerGetAlliance' (value: 10, min: Passive, max: 9)

    The error message is really strange. The max shouldn't be Passive but 0 or something. I guess the loader is doing something strange.

    Posted in: Triggers
  • 0

    posted a message on Hello

    Hey!

    It is really sexy. I don't know if you have seen but you can create a new Asset and have a dedicated page on sc2mapster. It will allow you to manage different versions, have a full description and coverage. It should be easier to manage than mediafire upload link :)

    Posted in: Off-Topic
  • 0

    posted a message on Trigger Error in 'gt_MeleeInitialization_Func': Parameter out of bounds in 'PlayerGetAlliance' (value: 10, min: Passive, max: 9)

    Hey

    (You can use < < code > > ... < < /code > > to make things appear nicer :P)

    I don't really understand what you are trying to achieve with your SetAlliance function. You call a lot of times GetAlliance that returns a boolean but you are not using it ...

    Posted in: Triggers
  • 0

    posted a message on Hi from Germany

    Welcome :)

    Posted in: Off-Topic
  • To post a comment, please or register a new account.