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

Vestras

Retired
Reaction score
248
Ofc, with xml you have xls. But, I'm going to quote myself here:


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.

Can you please elabroate? I'm not sure I understand. But I'm not the maker of Andromeda, so I'm not the one controlling that, but I'm pretty sure that the language will be the same, and integrated in the same tool, if that's what you mean.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
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)?

Hmm. You have a point.
How would that work though? Would you create an entirely new language, or just use a pre-existing language (Lua, Python, etc)?
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
Can you please elabroate? I'm not sure I understand. But I'm not the maker of Andromeda, so I'm not the one controlling that, but I'm pretty sure that the language will be the same, and integrated in the same tool, if that's what you mean.
Some pseudocode:
Code:
superMarine = do
     m <- extend marine
     increaseLife 200 m
     return m

main = do
      createUnit superMarine player1

This code would create a new unit type (superMarine) and set its life to 200 more than the normal marine, in game it would create one of those units for player one. Notice how the same variable used for creating the superMarine unit type is used to also create the unit in game. Essentially, "creating unit types" should just be another API in the main language.
 

punwisp

New Member
Reaction score
34
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?

How would I send the map
 

Vestras

Retired
Reaction score
248
Hmm. You have a point.
How would that work though? Would you create an entirely new language, or just use a pre-existing language (Lua, Python, etc)?

I'm pretty sure Gex was planning to use Andromeda for it.

Some pseudocode:
Code:
superMarine = do
     m <- extend marine
     increaseLife 200 m
     return m

main = do
      createUnit superMarine player1

This code would create a new unit type (superMarine) and set its life to 200 more than the normal marine, in game it would create one of those units for player one. Notice how the same variable used for creating the superMarine unit type is used to also create the unit in game. Essentially, "creating unit types" should just be another API in the main language.

Well, in GMSI Gex had code like:
Code:
Map map = loadMap("myMap.w3x");      //Loads a map to the struct Map
map.objects.hpea.Ubertip = "test";   //sets the peasant's ("hpea") ubertip to test
saveMap(map,"myChangedMap.w3x");     //Saves the map to a file

And if that's done via Andromeda, and all it is really is just another API, then that could be like what you describes. However I don't think Gex want to have that sort of code in generic Andromeda code, since GMSI scripts could be thousands of lines. But I'll talk to him about having access to the map API in generic Andromeda code, could be interesting.
 

gex

New Member
Reaction score
6
Here are my thoughts about a "build script language" for sc2:

Since I am already developing andromeda and have developed a build tool for WC3 (GMSI), I thought about creating a build tool for SC2 using Andromeda as language (since you already write triggers in andromeda).

I don't have finished my thoughts but I think it will be possible to embed build code into normal andromeda code/triggers. So it will be possible like you said: Creating unit types in the triggers that use them.

For example something like that:

Code:
class A{
 //... insert normal andromeda code for your game logic here
}

#beginbuild
unittype u = new unittype("Marine"); //Creates a new unit type based on the marine
u.Hp += 200; //The new unit type has 200 hp more than the marine
#endbuild

Something like that. Of course, the syntax for the build blocks is not yet set, but this is how it is probably gonna look like.

Of course, there will be mechanisms to avoid duplicate building (if you have already created the marine, you don't want to create it again).

There will also be mechanisms to control when to execute the build blocks (for example, you want to change the version number in the map name, but only whenever you create a new release of your map).
 

Joker(Div)

Always Here..
Reaction score
86
I can't wait for one of these scripting unit tools to come out. Currently, creating a new unit takes waaaay too long. Modifying is a nightmare. :/
 

Sevion

The DIY Ninja
Reaction score
413
Isn't it :-/

I don't even understand how to make a unit from scratch... What's this shit about "Parent" and whatsis?
 

Sevion

The DIY Ninja
Reaction score
413
Making a unit from scratch. Does that mean the unit gets default values from null? :p That's what I'm talking about.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
I think new objects inherit from a base object of the same type.
So, if you make a unit, it inherits the attributes of the base unit type.

Could be null though. Haven't played with the Data Editor much.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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