UNITTYPE with hard coded behavior?

Discussion in 'Mod Discussions' started by wondible, June 17, 2014.

  1. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    We have a complete list of unit types in constants.js. Some are tags for fabbers and factories to select (I suspect *Build are that type), but others appear to have built in game effects. Do we know which ones have special logic (and what that is) ?

    Commander

    Untested: lose when all dead.

    Fabber

    Untested: spectator fabber count. Determines selections. If it has the fabber unit type, then it is selected only with majority fabbers. Otherwise, it is selected with majority non fabbers.

    Debug

    Tank

    Bot

    Bomber

    Fighter

    Gunship

    Transport

    Teleporter

    Scout

    Structure

    Mobile

    Untested: spectator mobile count

    Wall

    Sub

    Nuke

    NukeDefense

    Heavy

    Artillery

    Tactical

    LaserPlatform

    AirDefense

    SurfaceDefense

    OrbitalDefense

    MetalProduction

    EnergyProduction

    Construction

    Land

    Naval

    Air

    Orbital

    Basic

    Advanced

    CmdBuild

    FabBuild

    FabAdvBuild

    FabOrbBuild

    FactoryBuild

    CombatFabBuild

    CombatFabAdvBuild

    Economy

    Factory

    Can't move because orders are given to built units instead of the unit itself. Builds units internally; without Factory units must be placed in the world. Untested: spectator factory count.

    Defense

    Offense

    Recon

    NoBuild
    Last edited: June 22, 2014
  2. YourLocalMadSci

    YourLocalMadSci Well-Known Member

    Messages:
    766
    Likes Received:
    762
    I thought that was the "hover_time": -1, setting in the navigation component of the .json? Is that incorrect
  3. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    That could be; I was changing a bunch of stuff at once.
  4. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    The gunship is rather interesting. I believe it also has behavior tag to strafe while attacking. That would be neat to give some units if one were modding.
  5. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I think that is aggressive_behavior: circle.
  6. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    It doesn't seem to do anything, I gave it to my hover tank, yet it did what it always does. :p
  7. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    because it is incapable of moving on it's side axis.

    Now, if we could figure out how to get it to move side by side without having to face the side, that would be great, it would be the PA Magrider.
  8. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    We really need to test of the hover tank drives around the enemy in circles when it's attacking.
  9. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Could it bone/anim thing? Maybe for the gunship the main body is the 'turret'
  10. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    I know it has two separate muzzle bones, so I'd think those would rotate. You may be right though. :eek:
  11. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Facing discussion can move to it's own thread: https://forums.uberent.com/threads/unit-facing-and-strafing.60996/
  12. Dementiurge

    Dementiurge Post Master General

    Messages:
    1,094
    Likes Received:
    693
    If the behavior is hard-coded, it's probably hard-coded to "type: air" and you won't be able to use it with a land unit.
  13. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    I could be wrong, but many of these probably don't have any hard-coded behaviours. Rather, they are used a method of filter units - for example, the "buildable_types" attribute of a unit determines what that unit can construct. The value of this attribute for the vehicle factory is:

    Code:
    (Land & Mobile & Tank & Basic | Tank & Fabber & Basic & Mobile) & FactoryBuild
    What this means is the vehicle factory can build anything that has the following buildable types:
    • All of: UNITTYPE_Land, UNITTYPE_Mobile, UNITTYPE_Tank, UNITTYPE_Basic and UNITYPE_FactoryBuild
      OR
    • All of: UNITTYPE_Tank, UNITTYPE_Fabber, UNITTYPE_Basic, UNITTYPE_Mobile and UNITYPE_FactoryBuild
    The type of movement a unit makes is likely more dependent on the navigation -> type value.
  14. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Most of these are only used for build types, but a few have other uses.
    Fabber also determines selections. If it has the fabber unit type, then it is selected only with majority fabbers. Otherwise, it is selected with majority non fabbers.

Share This Page