Unit Cannon Modding Discussion

Discussion in 'Mod Discussions' started by stuart98, December 18, 2014.

  1. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    The implementation of the unit cannon looks to be a little hacky and it is not yet clear what our options are with modding it.

    The unit cannon consists of four json files. The build arm file and weapon file do exactly what you think they do and are not particularly interesting. The unit_cannon.json, in addition to the generic fields found in most unit.json files controls the amount of units that the unit cannon can store through the duplicate "socket_build" spawnpoints. It appears that increasing or decreasing the number of duplicate socket_build spawnpoints will increase/decrease the number of stored units.

    The most interesting field is unit_cannon_deploy.json. This appears to be a very hybrid of a transport, a tactical missile (especially a nuke), and a deploy projectile like that of the orbital launcher.

    This line: "interplanetary_type": "INTER_System",
    controls the movement of the projectile in the celestial layer. To restrict it to inter orbit, change it to this line:
    "interplanetary_type": "INTER_GravWELL",

    This field is borrowed from the nuke missile, which indicates how the projectile is handled.

    What's probably the most interesting line in the deploy projectile is this:

    "transporter": {
    "capacity": 1,
    "transportable_attach_offset": "root",
    "transporter_attach_bone": "bone_root"
    },

    This is a transport field similar to that of the Pelican or Astreaus. It is absent from the other spawn projectile in the game, interestingly. It is not yet clear if increasing the capacity will have any effect on how many units can be stored in a single projectile or if anything else can be done using this. It may be possible with some hacks to create a sort of load up already build units then shoot 'em out sort of unit cannon; it is unlikely to be doable at this early stage without some more hooks being added by Uber however.

    If you have experimented with modding this thing then it would be appreciated if you would post the results of your experimentation for others to view.
    Bsport, theseeker2, qazplm601 and 2 others like this.
  2. s03g

    s03g Member

    Messages:
    111
    Likes Received:
    22
    I've found by adding: "UNITTYPE_CannonBuildable" to a land unit that it enables the unit cannon to build said unit, I haven't experimented on an air unit as of yet however.

    I must say that it was most satisfying dropping 12 Vanguards on an AI's head :)
    reptarking and theseeker2 like this.
  3. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    Changing transporter.capacity to more than one alone doesn't make any change. I couldn't figure out a way to get the pods to carry more than one unit each.

    There seems to be some limit to the cannons rate of fire (or maybe it's a general rate of fire limit in the game). I was unable to fire all the pods quick enough to make them go inside each other (attempting to make it look like only 1 pod).

    Changing the roll off times (it's currently 3 for rolloff then 3 more delay before next unit is built) makes the animations timing screw up :(

    I'd be interested to know if anyone can figure out how to make all AA be able to shoot down the pods again, without giving every AA weapon an additional anti-entity weapon.
  4. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Some animation timings can be found in the units' anim tree file (eg. Recoil)
  5. theseeker2

    theseeker2 Well-Known Member

    Messages:
    1,613
    Likes Received:
    469
    any progress?
  6. zweistein000

    zweistein000 Post Master General

    Messages:
    1,362
    Likes Received:
    727
    If you add more "socket_build", into the "spawn_points": [], array the UC will carry more units.
  7. mered4

    mered4 Post Master General

    Messages:
    4,083
    Likes Received:
    3,149
    Thought that was the only option.
    Or you could add a type to the unit cannon pod that made it an air unit, thus allowing the AA to shoot at it.
  8. skyguy185

    skyguy185 New Member

    Messages:
    1
    Likes Received:
    0
    Adding more "socket_build", the number of units would not increase. Was there anything else that you had to change?

    I have tried this with a few different units, including the Vanguard and the Inferno, the only one that I was able to get to work was the Ant. The other icons would show up in the build menu for the UC, but clicking on them wouldn't do anything.
  9. zweistein000

    zweistein000 Post Master General

    Messages:
    1,362
    Likes Received:
    727
    Are you sure? That's how I made it work, no other changes.

    Also : "UNITTYPE_CannonBuildable" to any of the units works on my end.
  10. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    It sounds like you're directly modifying the vanilla files rather than creating an actual server mod.
  11. Maldor96

    Maldor96 Active Member

    Messages:
    213
    Likes Received:
    196
    I have found something interesting, their is now UC Spread in the PTE
    I see more accurate and inaccurate unit cannons in our future.
  12. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    I've found 60 is a pretty good spread.
  13. somdudewillson

    somdudewillson Member

    Messages:
    64
    Likes Received:
    22
    A small note: You cannot make the Unit Cannon launch most naval units, as one might expect, but naval fabricators work fine, although they will only deploy over water.
    Also you can't make the Unit Cannon shoot out structures easily, but that was kind of a given. (Annoying though, cause I like Unit Cannons so much I wanted my Unit Cannon to shoot Unit Cannons.)
    stuart98 likes this.

Share This Page