This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ixe:json:start [2025/01/17 00:04] – created virgilw | ixe:json:start [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | A unit is defined by a json file. The json file can contain the following fields. | + | A unit is defined by a JSON file. Below is a list of all JSON tags that can be used. |
- | ==== UNIT ONLY ==== | + | A guide for how to use these JSON tags to create |
- | *displayname: | + | |
- | *permanentinventory: | + | |
- | *buildmenuhide: | + | |
- | *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: | + | |
- | *selectable: | + | |
- | *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: | + | |
- | *moveconstraints: | + | |
- | *gravityscale: | + | |
- | *rotatemode: | + | |
- | *destroysonhealth: | + | |
- | *deadfraction: | + | |
- | *internalhealth: | + | |
- | *maxinternalhealth: | + | |
- | *internalhealthregen: | + | |
- | *internalhealthdamageovercreeper: | + | |
- | *internalhealthdamageoverac: | + | |
- | *internalhealthdamageoverbot: | + | |
- | *enemyignore: | + | |
- | *darkraydamages: | + | |
- | *explosiondamages: | + | |
- | *nullifiable: | + | |
- | *riftinhibitor: | + | |
- | *ixecore: (bool) When true, the unit acts as an IXE core objective. | + | |
- | *anchordistance: | + | |
- | *anchoroffset: | + | |
- | *anchorlostmode: | + | |
- | *movepathenabled: | + | |
- | *playercandestroy: | + | |
- | *playercontrolbuildsupply: | + | |
- | *playercontrolammosupply: | + | |
- | *disablecollisions: | + | |
- | *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: | + | |
- | *cammorequesttime: | + | |
- | *ammosupply: | + | |
- | *objectivetype: | + | |
- | *selfpowergeneration: | + | |
- | *physicsmaterial: | + | |
- | *destroyalso: | + | |
- | *activateixecoresondestroy: | + | |
- | *showinternalhealthbar: (bool) When true, will show a bar for the internal health. | + | |
- | *internalhealthbarpos: [float, | + | |
- | *showundercreeper: | + | |
- | *sortingorder: | + | |
- | *label: {" | + | |
- | ==== PARTS ==== | + | ===== Unit Tags ===== |
- | | + | |
- | | + | :The name that will be shown to the player. |
- | | + | ? |
- | | + | :When true, the unit remains in the inventory at an amount of " |
- | | + | ? |
- | | + | :When true, this unit will not appear under the map editor' |
- | | + | ?maxammo (float) |
- | | + | :The max energy ammo for the unit. |
- | | + | ?ammo (float) |
- | | + | :The starting energy ammo for the unit. |
- | | + | ?maxcammo (float) |
- | | + | :The max anticreeper ammo for the unit. |
- | | + | ?cammo (float) |
- | | + | :The starting anticreeper 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. |
- | | + | ? |
- | | + | :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 (such as player-built ships use). |
- | | + | ?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. This means it will collide with sand and other physics-having units, and be affected by gravity. |
- | | + | ? |
- | | + | :When the unit has physics, this controls the rigid body constraints. 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 |
+ | * 0 = no constraints | ||
+ | * 1 = can't move horizontally | ||
+ | * 2 = can't move vertically | ||
+ | * 3 = can't move in any direction | ||
+ | * 4 = can't rotate | ||
+ | * 5 = can't rotate or move horizontally | ||
+ | * 6 = can't rotate or move vertically | ||
+ | * 7 = can't rotate or move in any direction | ||
+ | ? | ||
+ | :The scale at which gravity affects the unit when the unit has physics enabled. 1 is the default. | ||
+ | ?rotatemode (int) | ||
+ | :How a unit rotates/ | ||
+ | ? | ||
+ | :When true, the unit will auto destroy when the pixel count is too low. The " | ||
+ | ? | ||
+ | :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. | ||
+ | ? | ||
+ | :An optional health that can be used to track damage on a unit. Not related to the pixel count. If internalhealth starts greater than 0 and is then damaged down to 0, the unit is destroyed. | ||
+ | ? | ||
+ | :The max optional health. | ||
+ | ? | ||
+ | :The regeneration rate of internalhealth per game update (30 updates/sec in normal speed). | ||
+ | ? | ||
+ | :The damage that occurs to internalhealth per game update when touching creeper. | ||
+ | ? | ||
+ | :The damage that occurs to internalhealth per game update when touching anticreeper. | ||
+ | ? | ||
+ | :The damage that occurs to internalhealth per game update when touching a bot. | ||
+ | ? | ||
+ | :When true, enemy units like phantoms and bots will ignore this unit. | ||
+ | ? | ||
+ | :When true, dark rays will damage the unit. | ||
+ | ? | ||
+ | :When true, exploding sand will damage the unit. | ||
+ | ? | ||
+ | :When true, the unit can be nullified. | ||
+ | ? | ||
+ | :When true, the unit acts as a rift inhibitor objective. | ||
+ | ?ixecore (bool) | ||
+ | :When true, the unit acts as an IXE core objective. | ||
+ | ? | ||
+ | :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 found, placement of the unit will be illegal. | ||
+ | ? | ||
+ | :The distance an anchor will attempt to maintain between the anchor and the anchor cell. | ||
+ | ? | ||
+ | :What to do when an anchor cell is lost. 0 = destroy unit, 1 = remove anchor, 2 ignore and keep anchor. | ||
+ | ? | ||
+ | :When true, the unit can manage the mouse drawn move paths. Used by the spirit ship, for instance. | ||
+ | ? | ||
+ | :When true, the player can order the unit to self-destruct. | ||
+ | ? | ||
+ | :When true, the player can toggle the build supply for the unit. | ||
+ | ? | ||
+ | :When true, the player can toggle the ammo supply for the unit. | ||
+ | ? | ||
+ | :When true, a physics controlled unit will not collide with other units. | ||
+ | ?autoammo (float) | ||
+ | :The amount of ammo the unit regenerates each game frame. | ||
+ | ?autocammo (float) | ||
+ | :The amount of anticreeper ammo the unit regenerates each game frame. | ||
+ | ? | ||
+ | :The time (in game updates) between ammo requests. Default is 6. | ||
+ | ? | ||
+ | :The time (in game updates) between ammo requests. Default is 6. | ||
+ | ?ammosupply (bool) | ||
+ | :When false, the unit won't request ammo or anticreeper ammo. Defaults to true. | ||
+ | ? | ||
+ | :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 | ||
+ | ? | ||
+ | :Similar to autoammo, except added in the late game update. | ||
+ | ? | ||
+ | :The type of physics ' | ||
+ | ? | ||
+ | :The name of another unit type to destroy when this unit is destroyed. | ||
+ | ? | ||
+ | :When true, will activate any inactive ixe cores on the map when this unit is destroyed. | ||
+ | ? | ||
+ | :When true, will show a bar for the internal health. | ||
+ | ? | ||
+ | :The position of the internal health bar. | ||
+ | ? | ||
+ | :When true, the unit will visually sort behind the creeper. | ||
+ | ? | ||
+ | :The visual sorting order. | ||
+ | ?label {" | ||
+ | :Creates a text label on the unit. | ||
+ | |||
+ | ===== Part Tags ===== | ||
+ | ?rotation (float) | ||
+ | :The rotation of the part. | ||
+ | | ||
+ | :Whether the part should rotate when the part is flipped. | ||
+ | | ||
+ | :If the part should be fully built upon unit spawn. | ||
+ | | ||
+ | :If creeper damages the part. | ||
+ | | ||
+ | :If anticreeper | ||
+ | | ||
+ | :If bots damage | ||
+ | | ||
+ | :The maximum amount of energy the unit can store for energy dispatch. | ||
+ | | ||
+ | :An array of three values for energy production. Min is the minimum | ||
+ | | ||
+ | :If the part causes digitalis to grow. | ||
+ | | ||
+ | :The rate at which creeper damages each pixel of a part. Default is 10000. | ||
+ | | ||
+ | :The rate at which part pixels heal when damaged and not under creeper. Default is 10000. | ||
+ | | ||
+ | :The game updates it takes to regrow a part pixel. Default is 500. | ||
+ | | ||
+ | :Whether sand damages the pixels of this part. | ||
+ | | ||
+ | :If sand particles | ||
+ | | ||
+ | :When true, a unit with a show_range will always show the range with a range circle. | ||
+ | | ||
+ | :The range to reveal FOW (fog of war). | ||
+ | | ||
+ | :For physics controlled units, the unit will be frozen if this is true and the part is over any sand that blocks movement. | ||
+ | | ||
+ | :For physics controlled units, this will apply a force upwards when over a sand that is a liquid. | ||
+ | | ||
+ | :The physics drag for the whole unit when this part is over a liquid sand. | ||
+ | | ||
+ | :The default drag on the whole unit. | ||
+ | | ||
+ | :The layer that determines | ||
+ | | ||
+ | :The upgrade gems awarded when the part is destroyed with destroy actions enabled. | ||
+ | | ||
+ | :The physics collider for the part. The type can be " | ||
+ | | ||
+ | :The path name for the image to use for the part' | ||
+ | | ||
+ | :The pivot for the part. [0.5,0.5] is the center. | ||
+ | | ||
+ | :The visual sorting order used for the part' | ||
+ | | ||
+ | :The exclusion mask for the part' | ||
+ | | ||
+ | :The x,y scale of the part. | ||
+ | | ||
+ | :The path to an image that contains frames of an animation. | ||
+ | | ||
+ | :A list of RPL scripts to attach to the part. Each {script} consists of a " | ||
+ | | ||
+ | :A list of controllers to attach to the part. Each {controller} consists of a " | ||
+ | | ||
+ | :A list of sub parts. Each {part} consists of a " | ||