Scripting unit/behaviour/weapon/etc. data is possible

Vestras

Retired
Reaction score
248
Yes, that's right. Clicking isn't necessary for that either. (Some of you might know already though)
Some of you might also know that I'm developing a WC3/SC2 IDE (Integrated Development Environment) called Moonlite.
Now, I don't know how you guys feel about object editing in the GE, but I for one don't like how I am forced to constantly click (like GUI) around.
However, I have good news for those of you who feel the same as me:
Since the way objects are defined in maps is through Xml, it's possible to actually "script" a map's objects instead of clicking. I'm planning to make Moonlite support this.

But, yes, there is a but, I need your help. Since the formats of the WE was rather tricky and never actually the same (there was always some random thing that modified the format into being something else that I had to write code for), I need your help to find out how the format looks so I can write a .xsd document (a file that describes how Xml files should "look", look it up) for the code completion of Moonlite.

In order to extract the data files, you will have to use an MPQ extractor. The files are located at this path: "Base.SC2Data\GameData\". Here you will find an array of files, and I want you to post the contents of all other files than the "WaterData.xml" file.

Here are some data I've extracted, just to give you an idea of how it'd work:
BehaviorData.xml:
Code:
<?xml version="1.0" encoding="us-ascii"?>
<Catalog>
    <CBehaviorBuff id="Explode">
        <InfoFlags index="Hidden" value="1"/>
        <EditorCategories value="Race:Terran,AbilityorEffectType:Units"/>
        <RemoveValidatorArray value="CliffLevelEqualOrLesser2"/>
        <FinalEffect value="MarauderSet"/>
        <ExpireEffect value="MarauderSet"/>
    </CBehaviorBuff>
</Catalog>

MoverData.xml:
Code:
<?xml version="1.0" encoding="us-ascii"?>
<Catalog>
    <CMoverMissile id="MarauderWeapon">
        <MotionPhases index="0">
            <Driver value="Ballistic"/>
            <Acceleration value="0"/>
            <MinSpeed value="10"/>
            <MaxSpeed value="10"/>
            <IgnoresTerrain value="1"/>
            <ParabolaClearance value="-1"/>
            <YawPitchRoll value="5568.75"/>
            <PowerslideAngle value="358.9892"/>
            <AttachReacquireDeflection value="358.9892"/>
            <FlightTime value="-1"/>
        </MotionPhases>
    </CMoverMissile>
</Catalog>

UnitData.xml:
Code:
<?xml version="1.0" encoding="us-ascii"?>
<Catalog>
    <CUnit id="Marauder">
        <Response value="Flee"/>
        <LifeRegenRate value="125"/>
    </CUnit>
    <CUnit id="MarauderLMWeapon">
        <BehaviorArray Link="Explode"/>
    </CUnit>
</Catalog>

ValidatorData.xml:
Code:
<?xml version="1.0" encoding="us-ascii"?>
<Catalog>
    <CValidatorLocationCompareCliffLevel id="CliffLevelEqualOrLesser2">
        <WhichLocation Value="SourceUnit"/>
        <OtherLocation Value="OriginPoint"/>
        <Compare value="LE"/>
    </CValidatorLocationCompareCliffLevel>
</Catalog>

WeaponData.xml:
Code:
<?xml version="1.0" encoding="us-ascii"?>
<Catalog>
    <CWeaponLegacy id="Marauder">
        <Range value="10"/>
    </CWeaponLegacy>
</Catalog>

Get to it :)

EDIT: I'll upload the schemes to my website for editing when I get a little further, then you guys can contribute as we proceed.
EDIT 2: I wrote a .xsd generator tool. It generates .xsd files from .xml files, so now I don't have to write them anymore. I uploaded it to this post. (Hint: type "help" without quotes)
 

Attachments

  • generator.zip
    26.7 KB · Views: 323

overload119

New Member
Reaction score
5
I am patiently waiting for your IDE.

Is it going to be injectable into Galaxy editor. Don't tell me we have to alt-tab, and CnP all the time :(

Code completion, and that thing TESH had where it outlines the methods? In that area, put a little description of what it does too? Please, please!

In regards to your post, I don't really get what you want from us. Is it the data files? Why don't you just extract them yourself, it isn't hard =/.

I actually seem to have this lying around back from when I was making maps manually, it might have what you want.
 

Attachments

  • GameData.zip
    307.7 KB · Views: 359

Vestras

Retired
Reaction score
248
I am patiently waiting for your IDE.

Is it going to be injectable into Galaxy editor. Don't tell me we have to alt-tab, and CnP all the time :(

Code completion, and that thing TESH had where it outlines the methods? In that area, put a little description of what it does too? Please, please!

In regards to your post, I don't really get what you want from us. Is it the data files? Why don't you just extract them yourself, it isn't hard =/.

I actually seem to have this lying around back from when I was making maps manually, it might have what you want.

Oh, yes, yes, yes! Give me more! This is exactly what I need! The thing I need the most is someone who made an actual, functional map. (Something that is in a complete, presentable state)

The reason I can't do this myself is because I have a lot of work to do on Moonlite (xsd reading, making an xml editor, code completion, etc.) I simply don't have time to make maps.

It's not going to be integrated with the GE, and if you use all the features of Moonlite (scripting, object editing and importing files), the only thing (AFAIK) you'll need the GE for is terrain, map info and preplaced objects. Also, why would you CnP? Moonlite is integrated with the GE ;)

Outlines methods? What do you mean? Description of what? I don't understand :p
 

Sevion

The DIY Ninja
Reaction score
424
When he says integrated, I think he means he wants to know if it'll be like NewGen was.
 

Weep

Godspeed to the sound of the pounding
Reaction score
401
There's going to be a Mac version of Moonlite, right? ;)

Or at least, it'll run in WINE, right? :eek:

[/hijack]
 

Vestras

Retired
Reaction score
248
There's going to be a Mac version of Moonlite, right? ;)

Or at least, it'll run in WINE, right? :eek:

[/hijack]

Well, it could, if only Mono and WINE fully supported all Win32 APIs. Unfortunately they don't at the time, so no. Get yourself a copy of Windows 7 and install it to your Mac :thup:
 

overload119

New Member
Reaction score
5
This is what I mean by little tooltips that pop up when you put the first brackets in, it'll show.
 

Attachments

  • sketch.jpg
    sketch.jpg
    109 KB · Views: 404

Vestras

Retired
Reaction score
248
Awesome, when is it coming out :)?

The full version? Probably a couple weeks after Starcraft 2. Not promising anything though, there might be more tweaks than I think.
I was actually planning to release an open beta last week, but I decided I wanted to implement full Galaxy functionality now that the GE is out. Currently I'm implementing the object editing and then I need to integrate Andromeda with it. (Andromeda is going to be used by Moonlite a lot, Gex and I are working together on making Andromeda the background syntax checker, compiler, and code completion parser provider)
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
So... Just assuming, as I don't fully understand yet, but you want us to extract the Base.Sc2Data archive in the Sc2 Beta folder... Is that right?
 

Vestras

Retired
Reaction score
248
So... Just assuming, as I don't fully understand yet, but you want us to extract the Base.Sc2Data archive in the Sc2 Beta folder... Is that right?

Nope, in maps that are edited you will find the Base.SC2Data folder, which contains a GameData folder. Inside that folder, there are a lot of xml files, I want you to zip them and upload them in a post here. :)
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Is this what you needed? Wasn't sure...

Edit: Nevermind, this should be it.
 

Attachments

  • Gah.zip
    5.4 KB · Views: 295

punwisp

New Member
Reaction score
34
I'm liking this so far, including the talk of a simpler Object Editor and I guess, more features on the terraining?

And what kind of map do you need? A finished map in general? If thats what you want, I have a 4 player FFA map fully terrained and set up. After a bit of description and crap like that it will be set.
 

Vestras

Retired
Reaction score
248
I'm liking this so far, including the talk of a simpler Object Editor and I guess, more features on the terraining?

And what kind of map do you need? A finished map in general? If thats what you want, I have a 4 player FFA map fully terrained and set up. After a bit of description and crap like that it will be set.

Not terraining features, that will have to be done via the GE. (Implementing a 3D editor is too much for me :p)
Yes, I'll gladly take that map.

Also, Gex told me that he had an idea of a language for creating objects, like his GMSI. I don't know whether I should support that or generic Xml. His version seems more efficient.
What do you guys think?
 

Vestras

Retired
Reaction score
248
XML would be easier, I think.

Difficulty isn't a problem. I think in the end everyone would rather have an efficient language than an inefficient language. Let's put it in perspective: would rather you rather type/CnP ~5000 lines of Xml or have a ~20 line script to generate/modify the object(s)?
 

phyrex1an

Staff Member and irregular helper
Reaction score
446
Difficulty isn't a problem. I think in the end everyone would rather have an efficient language than an inefficient language. Let's put it in perspective: would rather you rather type/CnP ~5000 lines of Xml or have a ~20 line script to generate/modify the object(s)?
Ofc, with xml you have xls. But, I'm going to quote myself here:

My opinion is that blizzard is yet again making the mistake of separating the object editor and the trigger editor. The object editor should like the trigger editor generate galaxy code.
Don't go make the same mistake please. Make the language that generate the xml the same as the one that generates the galaxy. Make them integrated into each other. eg, for the setup function of your triggered AI you'll also be able to create new unit types. Running this code through your preprocessor would produce both the xml data for the units as well as the AI galaxy code.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top