Starting forces

Discussion in 'Mod Discussions' started by wondible, March 1, 2016.

  1. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I recently noticed a bit of server code that creates units at the start of the game. It appears to be used to create four mex in the first tutorial. It looks like the code should run in every game, and is controlled by the system json.

    In theory it could be used with a mod that disabled factories to create fixed-force skirmishes, or for a more traditional style single player game where you assault an entrenched position.

    From gw_tutorial_p1.js (which is just a javascript wrapped planet json)

    Code:
            "units":[
                {
                   "pos":[164.57559204101562,-176.419921875,107.3885498046875],
                   "orient": [0, 0, 1, 4.371139E-08],
                    "army": 1,
                    "unit_spec":"/pa/units/land/metal_extractor/metal_extractor.json"
                },
                ....
            ],
    
    The tricky part would be getting valid coordinates. Modding possibilities include editor extensions that use fake mex/csg, guessing with landing zones, army api, and using a modified bulk paste or something else with the fixup api.
  2. Mirolog

    Mirolog Well-Known Member

    Messages:
    294
    Likes Received:
    405
    Now that is interesting! But every unit needs it's own position and stuff, right?

    I think large groups of mobile units can be created by modified "carriers" that will spawn units (instead of drones), and then self-destruct after x seconds.

    Also it's cool when devs add a thing to spawn 4 mex in the tutorial, and same thing can create new gamemodes and enhance single-player experience.
    jackburton176 and martianhunter like this.
  3. Ksgrip

    Ksgrip Active Member

    Messages:
    612
    Likes Received:
    242
    Is it possible to randomize the coordinates of the units inside a radious? maybe taking as a central point the spawns of the map. By sure this would be not easy to do (if possible) But how cool would it be to make a mod that let´s you selecto what units you want to start with.
    martianhunter likes this.
  4. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    You might be able to make a client mod that set the positions and then updated the system. But you'd need to do your own sphere math, pray the radius is a good-enough estimator, and hope there are no CSGs in the way. Maybe something like UberMap could be used to write out all possible valid locations for pre-processed systems.
  5. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Yeah you could probably offer an option for a prepared system to have 10000 different possible spawns or similar and select one of them at random.
  6. Ksgrip

    Ksgrip Active Member

    Messages:
    612
    Likes Received:
    242
    There are so many nice things that devs tend to forget or simply not do cause they can´t.
    So sad that there is no single rts that has all the gooddies combined.

    I want an PA,TA style game. With 4x type map, with updgrades, factions that are actually different, map creator, mission creator, campaign, all command types possible ( a mix of supcom and Pa would be ideal )... so many things. Imagine that for once they throwed as much money as the bullcrap of battlefront 3 had into a rts (no starcraft super exaggerated cgi with some luckluster gamplay pleaseee¡).
    jackburton176 and martianhunter like this.

Share This Page