User Tools

Site Tools


ixe:json:start

This is an old revision of the document!


A unit is defined by a json file. The json file can contain the following fields.

UNIT ONLY

  • displayname: (string) The name that will be shown to the player.
  • permanentinventory: (bool) When true, the unit remains in the inventory at an amount of “0” even when all are built.
  • buildmenuhide: (bool) When true, this unit will not appear in the editor's table of units to build.
  • maxammo: (float) The max ammo for the unit.
  • ammo: (float) The starting ammo for the unit.
  • maxcammo: (float) The max AC ammo for the unit.
  • cammo: (float) The starting AC ammo for the unit [build 46 and later].
  • isportal: (bool) When true, this unit acts as a portal for packets.
  • isapex: (bool) When true, this unit acts as an apex ship.
  • enemy: (bool) When true, this unit is treated as an enemy (non player) unit.
  • collectcost: (int) The cost, in green packets, to collect this unit. When greater than 0, this unit becomes collectable.
  • selectable: (bool) Whether or not a unit is selectable by the player.
  • movable: (bool) Whether or not a unit can be moved by the player. In this instance, it means dematerialization based movement.
  • movelayer: (int) Used for legality of placement for movable units. When units are in different move layers, they do not collide and can be stacked.
  • hasphysics: (bool) When true, the unit is controlled by the physics engine.
  • moveconstraints: (int) When the unit has physics, this controls the rigid body contraints. The int is treated as a bit field with bit 0 meaning to freeze x-axis motion, bit 1 meaning to freeze y-axis motion, and bit 2 meaning to freeze rotation. Multiple bits can be set at the same time. So “7” would freeze all motion and rotation. “4” would freeze just rotation, etc.
  • gravityscale: (float) The scale at which gravity affects the unit when the unit has physics enabled. 1 is the default.
  • rotatemode: (int) How a unit rotates/flips when moving. 0 = NONE, 1 = FLIP, 2 = FOURWAY.
  • destroysonhealth: (bool) When true, the unit will auto destroy when the pixel count is too low. The “DeadFraction” is the maximum allowed amount of dead pixels.
  • deadfraction: (float) A fraction (0 to 1 range) that specifies the maximum dead pixel amount allowed on a unit before it self destructs, when destroyonhealth is true.
  • internalhealth: (float) An optional health that can be used to track damage on a unit. Not related to the pixel count. When the internalHealth starts greater than 0 and is then damaged down to 0, the unit is destroyed.
  • maxinternalhealth: (float) The max optional health.
  • internalhealthregen: (float) The regeneration rate of the optional health per game update.
  • internalhealthdamageovercreeper: (float) The damage that occurs to the optional health when over creeper.
  • internalhealthdamageoverac: (float) The damage that occurs to the optional health when over AC.
  • internalhealthdamageoverbot: (float) The damage that occurs to the optional health when over a bot.
  • enemyignore: (bool) When true, enemy units like phantoms and bots will ignore this unit.
  • darkraydamages: (bool) When true, a dark ray will damage the unit.
  • explosiondamages: (bool) When true, exploding sand will damage the unit.
  • nullifiable: (bool) When true, the unit can be nullified.
  • riftinhibitor: (bool) When true, the unit acts as a rift inhibitor objective.
  • ixecore: (bool) When true, the unit acts as an IXE core objective.
  • anchordistance: (int) The cell range to look for an anchor point. When non-zero, the unit will attempt to anchor itself to land in this range. If not fould, placement of the unit will be illegal.
  • anchoroffset: (float) The distance an anchor will attempt to maintain between the anchor and the anchor cell.
  • anchorlostmode: (int) What to do when an anchor cell is lost. 0 = destroy unit, 1 = remove anchor, 2 ignore and keep anchor.
  • movepathenabled: (bool) When true, the unit can manage the mouse drawn move paths. Used by the spirit ship, for instance.
  • playercandestroy: (bool) When true, the player can destroy the unit.
  • playercontrolbuildsupply: (bool) When true, the player can toggle the build supply for the unit.
  • playercontrolammosupply: (bool) When true, the player can toggle the ammo supply for the unit.
  • disablecollisions: (bool) When true, a physics controlled unit will not collide with other units.
  • autoammo: (float) The amount of ammo to automatically add to the unit each game frame.
  • autocammo: (float) The amount of AC ammo to automatically add to the unit each game frame.
  • ammorequesttime: (int) The game frame ammo request rate. Default is 6.
  • cammorequesttime: (int) The game frame AC ammo request rate. Default is 6.
  • ammosupply: (bool) When false, the unit won't request ammo or AC ammo. Defaults to true.
  • objectivetype: (int) The game objective type for the unit. The types are: 0 = NONE, 1 = IXE_CORE, 2 = INHIBITOR, 3 = ITEM, 4 = EMITTER, 5 = CREEPER, 6 = SPECIAL, 7 = MISSION
  • selfpowergeneration: (float) Similar to autoAmmo, except added in the late game update.
  • physicsmaterial: (int) The type of physics 'material] to use. The types are: 0 = NONE, 1 = LOW_FRICTION, 2 = NO_FRICTION.
  • destroyalso: (string) The name of another unit type to destroy when this unit is destroyed.
  • activateixecoresondestroy: (bool) When true, will activate any inactive ixe cores on the map when this unit is destroyed.
  • showinternalhealthbar: (bool) When true, will show a bar for the internal health.
  • internalhealthbarpos: [float,float] The position of the internal health bar.
  • showundercreeper: (bool) When true, the unit will visually sort behind the creeper.
  • sortingorder: (int) The visual sorting order.
  • label: {“text”:string, “size”:float, “color”:[r,g,b,a], “pos”:[x,y]}: Creates a text label on the unit.

PARTS

  • rotation: (float) The rotation of the part.
  • rotatewhenflipped: (bool) Whether the part should rotate when the part is flipped.
  • isbuilt: (bool) If the part should be built already.
  • creeperdamages: (bool) If creeper damages the part.
  • acdamages: (bool) If AC damages the part.
  • botdamages: (bool) If bots damages the part.
  • powerdispatchstoremax: (float) The maximum amount of energy the unit can store for energy dispatch.
  • powergeneration: [float:min, float:max, int:rampTime]. An array of three values for energy production. Min production (starting production), max production, and ramp time in game updates.
  • digitalissource: (bool) If the part causes digitalis to grow.
  • damagerate: (int) The rate at which creeper damages each pixel of a part. Default is 10000.
  • damageheal: (int) The rate at whcih part pixels heal when damaged and not under creeper. Default is 10000.
  • regrowthtime: (int) The game updates it takes to regrow a part pixel. Default is 500.
  • sanddamages: (bool) Whether sand damages the pixels of this part.
  • sandparticlesdamage: (bool) If Sand Particles can damage the part.
  • alwaysshowrange: (bool) When true, a unit with a show_range will always show the range with a range circle.
  • fowrange: (int) The range to reveal FOW (fog of war).
  • constrainwhenoverblockingsand: (bool) For physics controlled units, the unit will be frozen if this is true and the part is over blocking sand.
  • applyupforcewhenoverliquid: (bool) For physics controlled units will apply a force upwards when over a sand that is a liquid.
  • dragwhenoverliquid: (float) The physics drag for the whole unit when this part is over a liquid sand.
  • defaultdrag: (float) The default drag on the whole unit.
  • shothitlayer: (int) The layer that determins what shots hit the part. 0 = Default, 1 = Shot_Hits1, 2 = ShotHits2
  • upgradegems: (int) The upgrade gems awarded when the part is destroyed with destroy actions enabled.
  • collider: {“type”:string, other args}. The physics collider for the part. The type can be “none”, “circle”, “box”, “capsule”. For “none” there are no additional args. For “circle” and additional arg of “radius”:float is supported. For “box” two addional args are supported “width”:float, and “height”:float. For “capsule” three addional args are supported “width”:float, “height”:float, and “direction”:“horizontal”|“vertical”.
  • image: (string) The path name for the image to use for the parts pixels.
  • pivot: [float,float] The pivot for the part. 0.5,0.5 is the center.
  • sortingorder: (int) The visual sorting order used for the parts pixels.
  • colliderexcludemask: (int) The exclusion mask for the parts collider.
  • scale: [float,float] The x,y, scale of the part.
  • anim: (string) The path to an image that contains frames of an animation.
  • scripts: [ {script} ] A list of RPL scripts to attach to the part. Each {script} consists of a “name”:“scriptname” field and then any name:value args to be passed into the script.
  • controllers: [ {controller}] A list of controllers to attach to the part. Each {controller} consists of a “name”:“controllername” field and then any nam:value args to be passwed into the script.
  • parts: [ {part}] A list of sub parts. Each {part} consists of a “name”:“part_json”, “position”:[float,float], “rotation”: float, “sortingorder”:int, “active”:bool.
ixe/json/start.1737072256.txt.gz · Last modified: 2025/02/14 14:56 (external edit)