Unit types

Discussion in 'Mod Support' started by Ksgrip, September 19, 2015.

  1. Ksgrip

    Ksgrip Active Member

    Messages:
    612
    Likes Received:
    242
    How do I create new Unit types? I know that we can get to use Custom1,2,3,4 but how do I define them, for example to create new build types?. Also how do I define new build types?
  2. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Unit types are sadly hard-coded.
  3. Ksgrip

    Ksgrip Active Member

    Messages:
    612
    Likes Received:
    242
    So how can I define at leat Custom1,2...?
  4. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    You mean like this? "buildable_types": "(Custom3) & FactoryBuild",

    That goes in a unit.json. Remember to have new units defined in build.js.
  5. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Use Custom1 to Custom4 (or UNITTYPE_Custom1 as appropriate to context) wherever you would use another attribute like Tank, AirDefense, Basic, etc.

    Beyond that we'll need a more specific example.
  6. Ksgrip

    Ksgrip Active Member

    Messages:
    612
    Likes Received:
    242
    So if I want to define a new build list just as the adv fabbers have, how do I do so?
  7. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Look at how they're defined in advanced fabber jsons, modify for your own project.
  8. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    So like T3 structures? The more specific the better we can help.

    Add say UNITTYPE_Custom1 to the new/modified units, and Custom1 to the fabber's buildable_types in a similar manner to Advanced in the advance fabber, probably with '|' (or) between clauses.

    Depending on your meaning of 'build list', you may also have to shadow ui/main/shared/js/build.js
    Ksgrip likes this.
  9. Ksgrip

    Ksgrip Active Member

    Messages:
    612
    Likes Received:
    242
    [Qthwondible, post: 1112884, member: 1965145"]
    So like T3 structures? The more specific the better we can help.

    Add say UNITTYPE_Custom1 to the new/modified units, and Custom1 to the fabber's buildable_types in a similar manner to Advanced in the advance fabber, probably with '|' (or) between clauses.

    Depending on your meaning of 'build list', you may also have to shadow ui/main/shared/js/build.js[/QUOTE] Thanks!!
  10. Ksgrip

    Ksgrip Active Member

    Messages:
    612
    Likes Received:
    242
    Also thisbis for anyone who knows how to solve this problem. Tofay I was tryingto expand the build tab so I can fit more facyories into it. My interest is to have 7 colums but as soon as I change yhe default 6 value the game changes the tab so another row appears instead of a colum making a 4*6 tab, having a 3*7 values. Anyine knows why this is caused and how to solve it? @womdible, @stuart98
  11. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
  12. Ksgrip

    Ksgrip Active Member

    Messages:
    612
    Likes Received:
    242
    So there is no way to have a seventh colum working? That is a shame:(. Also i though the fabricator only used five of the six colums because of how units are indexed. The tging is that I want to use the modx factories alongsidr the vanilla ones ( t1 & t2 ) also stuart thanks for quick answering:))

Share This Page