Difference between revisions of "Modding"

From Airships Wiki
Jump to: navigation, search
m (Another spacing issue)
(All Core Attributes added, need descriptions for some)
Line 20: Line 20:
=== <u>Preliminary Information:</u> ===
=== <u>Preliminary Information:</u> ===
The basic structure of attributes is:
The basic structure of attributes is:
<div style="width:70%">
<div style="width:70%"><blockquote>
  <code>"Attribute": "value",</code>
  <code>"Attribute": "value",</code>
</div>
</blockquote></div>
Where <code>"Attribute"</code> will be the attribute you want to add and <code>"Value"</code> is the value you want to set the attribute to.
Where <code>"Attribute"</code> will be the attribute you want to add and <code>"Value"</code> is the value you want to set the attribute to.


Line 100: Line 100:


Creates a flipped version of the module.
Creates a flipped version of the module.
Not required.


Used for modules that can be flipped horizontally. (i.e. cannons, telescopes, propellers, etc.)
Used for modules that can be flipped horizontally. (i.e. cannons, telescopes, propellers, etc.)
Line 116: Line 118:


Creates a vertically flipped version of the module.
Creates a vertically flipped version of the module.
Not required.


Used for modules that can be flipped vertically. (i.e. dorsal turrets, sails, engine pods, etc.)
Used for modules that can be flipped vertically. (i.e. dorsal turrets, sails, engine pods, etc.)
Line 150: Line 154:
Sets the category (or categories) the module will be in in the In-Game Editor.
Sets the category (or categories) the module will be in in the In-Game Editor.


If not provided, the module will not appear in game.
Required, if not provided the module will not appear in game.


<code>"value"</code> here will be the name of the category you are putting the module in.
<code>"value"</code> here will be the name of the category you are putting the module in.
Line 174: Line 178:


<hr style="width:50%">
<hr style="width:50%">
<code>
'''"required": "value,"'''
</code>
Sets the required technology/bonus needed to place the module.
Not required, game will default to no requirement.
<code>"value"</code> here can be a technology or bonus.
Default Technologies:
<div style="width:70%">
<pre>
</pre>
</div>
Default Charge Bonuses:
<div style="width:70%">
<pre>
</pre>
</div>
<hr style="width:50%">
<code>'''"w": "value",'''</code> and <code>'''"h": "value",'''</code>
Defines the width and height of the module.
Required.
<code>"value"</code> for both will be how many tiles a module is wide/high.
<hr style="width:50%">
<code>'''"AILogic": true,"'''</code>
Defines what Logic the AI should use with this module.
Not required, but makes the AI not fully utilize your module. (Not required for every module)
<code>"AILogic"</code> here will be one of six values:
<div style="width:70%">
<pre>
isExplosive, isSail, isWeapon, isGun, isCannon, isRam
</pre>
</div>
<hr style="width:50%">
<code>'''"aiMaxY": "value",'''</code>
Defines the max height the AI can fly to with this module.
Not required, only used for monsters.
<code>"value"</code> here will be a y-value, where negative y increases height and positive y decreases height.
<hr style="width:50%">
<code>'''"createsExceptionalCombatEventAfterMs": "value",'''</code>
<hr style="width:50%">
<code>'''"countsAsActiveCrew": true,"'''</code>
<hr style="width:50%">
<code>'''"instantlyDestroyed": true,'''</code>





Revision as of 03:31, 29 April 2022

The game can be modded using JSON files.

Underconstruction.png This page is under construction. Please help review and edit this page.

Modding Guide Blog Posts

Other Resources

Modding Attribute List

Preliminary Information:

The basic structure of attributes is:

"Attribute": "value",

Where "Attribute" will be the attribute you want to add and "Value" is the value you want to set the attribute to.

Some attributes can be given a list of values as well:

"AttributeParent": { "value1", "value2", "value3" },

In this guide, attributes will have applicable values listed alongside them, so for now just know that not all attributes take the same values.


A note about JSON: when adding attributes you put a comma at the end only if there is another attribute after it.

For example, if there are only 3 attributes in a file, you would only have 2 commas as the last attribute doesn't need it:

[
  {
    "Attribute1": "value",
    "Attribute2": "value",
    "Attribute3": "value"
  }
]

This is also the case when adding attributes within other attributes:

[
  {
    "AttributeParent": { 
      "subAttribute1": "value",
      "subAttribute2": "value",
      "subAttribute3": "value"
    }
  }
]


Appearance Attributes will require a spritesheet to get their graphics from.

1 Tile = 16 pixels, spritesheets are 63 x 63 tiles, or 1024 x 1024 pixels

When attributes require a coordinate on the spritesheet, the format is ( x , y ) or horizontal then vertical.

Both horizontal and vertical start from ( 0 , 0 ) on the top left and go to ( 63 , 63 ) on the bottom right.



Basic Attributes:

"name": "value",

Sets the name of the module.

Required to create a module.

"value" here will be the name of the module. This name is used to refer to this module in other files, so make sure it is not the same as another module.




{

"name": "value",

"flippedFrom": "value2"

},

Creates a flipped version of the module.

Not required.

Used for modules that can be flipped horizontally. (i.e. cannons, telescopes, propellers, etc.)

"value" here will be the name of the flipped module. (i.e. FLIPPED_EXAMPLE_MODULE)

"value2" here will be the name of the module being flipped. (i.e. EXAMPLE_MODULE)




"verticallyFlippedVersion": "value",

Creates a vertically flipped version of the module.

Not required.

Used for modules that can be flipped vertically. (i.e. dorsal turrets, sails, engine pods, etc.)

"value" here will be the name of the module being flipped vertically.




{

"name": "value",

"remove": true

},

Removes the specified module from the game.

Not required.

Used for removing modules from conflicting mods or for other reasons.

"value" here will be the name of the module you are removing.


"categories": [ "value" ],

Sets the category (or categories) the module will be in in the In-Game Editor.

Required, if not provided the module will not appear in game.

"value" here will be the name of the category you are putting the module in.

Default Categories:

BASIC, COMMAND_AND_CREW, LIFT, PROPULSION, RESOURCES, WEAPONS, TROOPS, AIRCRAFT, STRUCTURAL, SOLID_SHAPES, STRUTS, DECORATIVE

"availableFor": [ "value" ],

Sets the type of construct the module is available for in the In-Game Editor.

Not required, game will default to all.

"value" here can be AIRSHIP, LANDSHIP, or BUILDING.


"required": "value,"

Sets the required technology/bonus needed to place the module.

Not required, game will default to no requirement.

"value" here can be a technology or bonus.

Default Technologies:


Default Charge Bonuses:



"w": "value", and "h": "value",

Defines the width and height of the module.

Required.

"value" for both will be how many tiles a module is wide/high.


"AILogic": true,"

Defines what Logic the AI should use with this module.

Not required, but makes the AI not fully utilize your module. (Not required for every module)

"AILogic" here will be one of six values:

isExplosive, isSail, isWeapon, isGun, isCannon, isRam

"aiMaxY": "value",

Defines the max height the AI can fly to with this module.

Not required, only used for monsters.

"value" here will be a y-value, where negative y increases height and positive y decreases height.


"createsExceptionalCombatEventAfterMs": "value",



"countsAsActiveCrew": true,"



"instantlyDestroyed": true,



Appearance Attributes:

Structural Attributes:

Resource Attributes:

Weapon Attributes:

Weapon Appearance Attributes:

Audio Attributes:

Track-related Attributes:

Leg-related Attributes:

Tentacle-related Attributes: