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

Discussion in 'Starcraft 2 (SC2) Editor Help' started by Vestras, May 8, 2010.

  1. Vestras

    Vestras Retired

    Ratings:
    +249 / 0 / -0
    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.
     
  2. Lyerae

    Lyerae I keep popping up on this site from time to time.

    Ratings:
    +105 / 0 / -0
    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)?
     
  3. phyrex1an

    phyrex1an Staff Member and irregular helper Staff Member

    Ratings:
    +446 / 0 / -0
    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.
     
  4. punwisp

    punwisp New Member

    Ratings:
    +34 / 0 / -0
    How would I send the map
     
  5. Lyerae

    Lyerae I keep popping up on this site from time to time.

    Ratings:
    +105 / 0 / -0
    Upload it, use a filesharing site, FTP...
     
  6. Vestras

    Vestras Retired

    Ratings:
    +249 / 0 / -0
    I'm pretty sure Gex was planning to use Andromeda for it.

    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.
     
  7. punwisp

    punwisp New Member

    Ratings:
    +34 / 0 / -0
    FYI i pmed you a link to the map :3
     
  8. Vestras

    Vestras Retired

    Ratings:
    +249 / 0 / -0
    Yeah I know, just haven't had the time to take a look yet :)
     
  9. gex

    gex New Member

    Ratings:
    +6 / 0 / -0
    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).
     
  10. Joker(Div)

    Joker(Div) Always Here..

    Ratings:
    +86 / 0 / -0
    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. :/
     
    • Like Like x 1
  11. Sevion

    Sevion The DIY Ninja

    Ratings:
    +423 / 0 / -0
    Isn't it :-/

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

    punwisp New Member

    Ratings:
    +34 / 0 / -0
    Eh....
     
  13. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    A parent sets the default values for anything that derives from it.
     
  14. Sevion

    Sevion The DIY Ninja

    Ratings:
    +423 / 0 / -0
    Making a unit from scratch. Does that mean the unit gets default values from null? :p That's what I'm talking about.
     
  15. Lyerae

    Lyerae I keep popping up on this site from time to time.

    Ratings:
    +105 / 0 / -0
    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.
     

Share This Page