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: 329

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: 364

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
413
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
400
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: 410

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: 302

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
447
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
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top