Difference between revisions of "Modding"
(spacing fixes) |
(Modding page rework part 1) |
||
Line 1: | Line 1: | ||
{{Under construction}} | |||
The game can be modded using JSON files. | The game can be modded using JSON files. | ||
Watch this video on modding to get started: | |||
[https://www.youtube.com/watch?v=QMS20xI5g14 Airships Modding Tutorial Video] | |||
== Modding Resources == | |||
=== <u>Official Resources</u> === | |||
* [http://zarkonnen.com/airships/modding_guide Modding Introduction] | |||
* [http://zarkonnen.com/airships/ | * [http://zarkonnen.com/airships/how_to_draw_graphics/ Mod Graphic Drawing Tutorial] | ||
* [http://zarkonnen.com/airships/ | * [http://zarkonnen.com/airships/peasant_revolt_mod/ Monster Nest Mod Example] | ||
* [http://zarkonnen.com/airships/modding_guide/bonusable_values Bonusable Values] | * [http://zarkonnen.com/airships/modding_guide/bonusable_values Bonusable Values Guide] | ||
* [http://zarkonnen.com/airships/ | * [http://zarkonnen.com/airships/modding_guide/special_eras Special Eras Modding Guide] | ||
* [http://zarkonnen.com/airships/ | * [http://zarkonnen.com/airships/modding_guide/crew_animation Crew Animation Guide] | ||
== Other Resources == | === <u>Other Resources</u> === | ||
* [https://www.moddb.com/mods/the-module-kit/tutorials/acts-module-string-reference-guide Module String Reference Guide] | |||
* [https://www.moddb.com/mods/the-module-kit/tutorials/acts-module-string-reference-guide Module String Reference Guide ( | (Contains useful information about specific attributes, but is otherwise outdated) | ||
* [https://gist.github.com/Zarkonnen/40a4962f9f2a4a29243fd0932ddec975 Loadables Data Dump] | * [https://gist.github.com/Zarkonnen/40a4962f9f2a4a29243fd0932ddec975 Loadables Data Dump] | ||
(To poke around the game's loadables) | |||
=== <u> | === <u>JSON Information</u> === | ||
The basic structure of | The basic structure of an attribute is: | ||
<div style="width: | <div style="width:35%"> | ||
<code>"Attribute": "value",</code> | <code>"Attribute": "value",</code> | ||
</div> | </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. | ||
There are three types of attributes used in ACTS modding: | |||
: <code>"value"</code> = string value | |||
: <code>value</code> = numerical value | |||
: <code>t/f</code> = true or false value | |||
Some attributes can be given a list of values as well: | |||
<div style="width: | <div style="width:35%"> | ||
< | <code>"AttributeValueList": { "value1", "value2", "value3" },</code> | ||
</ | |||
</div> | </div> | ||
Line 88: | Line 55: | ||
== | == Attribute List == | ||
===<u>Core Attributes</u>=== | |||
<div style=" | ; name | ||
:Module name referenced by the en.properties file and "flippedFrom" & "verticallyFlippedVersion" attributes. | |||
:In-Game displays this name in red when no language value is given. | |||
<div style="width:55%"> | |||
</ | <pre> | ||
{ | |||
"name": "value", | |||
} | |||
</pre> | |||
</div> | |||
; flippedFrom | |||
:Creates horizontally flipped variation of referenced "name". | |||
<div style="width:55%"> | |||
<pre> | |||
{ | |||
"name": "value", | |||
"flippedFrom": "nameValue", | |||
} | |||
</pre> | |||
</div> | |||
; verticallyFlippedVersion | |||
:Creates vertically flipped variation of referenced "name". | |||
<div style="width:55%"> | |||
<pre> | |||
{ | |||
"name": "value", | |||
"verticallyFlippedVersion": "nameValue", | |||
} | |||
</pre> | |||
</div> | |||
" | ; remove | ||
:Removes the specified "name" from the game. | |||
< | :Example use is removing modules from a conflicting mod. | ||
<div style="width:55%"> | |||
<pre> | |||
</ | { | ||
"name": "value", | |||
"remove": t/f, | |||
} | |||
</pre> | |||
</div> | |||
< | ; categories | ||
:In-Game Editor Module Category. Setting this value blank will make the module valid without appearing in-game. | |||
:Vanilla categories: BASIC, COMMAND_AND_CREW, LIFT, PROPULSION, RESOURCES, WEAPONS, TROOPS, AIRCRAFT, STRUCTURAL, SOLID_SHAPES, STRUTS, DECORATIONS | |||
:Custom categories can be added by creating a ModuleCategory folder and creating a json file inside. See data/ModuleCategory/categories.json for reference. | |||
<div style="width:55%"> | |||
<pre> | |||
{ | |||
"categories": [ "value" ], | |||
} | |||
</pre> | |||
</div> | |||
; availableFor | |||
:Types of craft the Module is enabled for In-Game Editor. Engine defaults to all. | |||
:Default types: AIRSHIP, LANDSHIP, BUILDING | |||
<div style="width:55%"> | |||
<pre> | |||
{ | |||
"availableFor": [ "value" ], | |||
} | |||
</pre> | |||
</div> | |||
; required | |||
:Required Technology, City, or Charge bonus to build the Module in Single Player. | |||
:See data/Tech/ folder for Technology bonus files. | |||
:See data/Charge/ folder for Charge bonus files. | |||
:Miscellaneous bonus files: strategicEras.json, eraModifiers.json, specials.json, upgrades.json | |||
<div style="width:55%"> | |||
<pre> | |||
{ | |||
"required": "value", | |||
} | |||
</pre> | |||
</div> | |||
; w | |||
:Width of the Module in Tiles. | |||
<div style="width:55%"> | |||
<pre> | |||
{ | |||
"w": value, | |||
} | |||
</pre> | |||
</div> | |||
; h | |||
:Height of the Module in Tiles. | |||
<div style="width:55%"> | |||
<pre> | |||
{ | |||
"h": value, | |||
} | |||
</pre> | |||
</div> | |||
; Module Definition Attributes | |||
:Specifies the Modules property for AI Logic. | |||
<div style="width:55%"> | |||
<pre> | |||
{ | |||
"isExplosive": t/f, //Rockets, Bomb Bays, Grenades, etc. | |||
"isSail": t/f, //Sails. | |||
"isWeapon": t/f, //Required for all weapon modules. | |||
"isGun": t/f, //All guns (Rifles, Cannons, Turrets, Sponsons, etc.) | |||
"isCannon": t/f, //Turrets, Cannons, Suspendium Cannons, Flak Cannons, etc. | |||
"isRam": t/f, //Rams. | |||
} | |||
</pre> | |||
</div> | |||
; aiMaxY | |||
<div style="width: | :Sets the maximum height this module can go. Used to limit monster AI. | ||
<div style="width:55%"> | |||
<pre> | <pre> | ||
{ | |||
"aiMaxY": value, | |||
} | |||
</pre> | </pre> | ||
</div> | </div> | ||
; createsExceptionalCombatEventAfterMs | |||
:This String is often used with Monsters. Triggers the AI for the Module after a specified number of Milliseconds. | |||
:ex. A Module with Capture Troops will Capture. A Module with a Weapon will Fire. A Module with Legs will begin to Walk. etc. | |||
<div style="width:55%"> | |||
<div style="width: | |||
<pre> | <pre> | ||
{ | |||
"createsExceptionalCombatEventAfterMs": value, | |||
} | |||
</pre> | </pre> | ||
</div> | </div> | ||
<div style="width: | ; countsAsActiveCrew | ||
:Specifies the Module acts as an Active Crew Member, capable of performing Module tasks without Troops occupying the Module, allowing Interior vision of the Module, and preventing Defeat of the craft under certain Conditions. | |||
<div style="width:55%"> | |||
<pre> | <pre> | ||
{ | |||
"countsAsActiveCrew": t/f, | |||
} | |||
</pre> | </pre> | ||
</div> | </div> | ||
; instantlyDestroyed | |||
:Instantly removes the Module from the battle on destruction, allowing for animated or simplified death sequences from other connected Modules. Most often used on Monster Modules. | |||
<div style="width:55%"> | |||
<div style="width: | |||
<pre> | <pre> | ||
{ | |||
"instantlyDestroyed": t/f, | |||
} | |||
</pre> | </pre> | ||
</div> | </div> | ||
===<u>Appearance Attributes</u>=== | |||
===<u>Appearance Attributes | |||
[[Category:Modding]] | [[Category:Modding]] |
Revision as of 05:04, 5 February 2023
The game can be modded using JSON files.
Watch this video on modding to get started: Airships Modding Tutorial Video
Modding Resources
Official Resources
- Modding Introduction
- Mod Graphic Drawing Tutorial
- Monster Nest Mod Example
- Bonusable Values Guide
- Special Eras Modding Guide
- Crew Animation Guide
Other Resources
(Contains useful information about specific attributes, but is otherwise outdated)
(To poke around the game's loadables)
JSON Information
The basic structure of an attribute 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.
There are three types of attributes used in ACTS modding:
"value"
= string valuevalue
= numerical valuet/f
= true or false value
Some attributes can be given a list of values as well:
"AttributeValueList": { "value1", "value2", "value3" },
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 (Note that spritesheets are 63 x 63 because they start from 0. Meaning that x & y go from 0-63.)
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.
Attribute List
Core Attributes
- name
- Module name referenced by the en.properties file and "flippedFrom" & "verticallyFlippedVersion" attributes.
- In-Game displays this name in red when no language value is given.
{ "name": "value", }
- flippedFrom
- Creates horizontally flipped variation of referenced "name".
{ "name": "value", "flippedFrom": "nameValue", }
- verticallyFlippedVersion
- Creates vertically flipped variation of referenced "name".
{ "name": "value", "verticallyFlippedVersion": "nameValue", }
- remove
- Removes the specified "name" from the game.
- Example use is removing modules from a conflicting mod.
{ "name": "value", "remove": t/f, }
- categories
- In-Game Editor Module Category. Setting this value blank will make the module valid without appearing in-game.
- Vanilla categories: BASIC, COMMAND_AND_CREW, LIFT, PROPULSION, RESOURCES, WEAPONS, TROOPS, AIRCRAFT, STRUCTURAL, SOLID_SHAPES, STRUTS, DECORATIONS
- Custom categories can be added by creating a ModuleCategory folder and creating a json file inside. See data/ModuleCategory/categories.json for reference.
{ "categories": [ "value" ], }
- availableFor
- Types of craft the Module is enabled for In-Game Editor. Engine defaults to all.
- Default types: AIRSHIP, LANDSHIP, BUILDING
{ "availableFor": [ "value" ], }
- required
- Required Technology, City, or Charge bonus to build the Module in Single Player.
- See data/Tech/ folder for Technology bonus files.
- See data/Charge/ folder for Charge bonus files.
- Miscellaneous bonus files: strategicEras.json, eraModifiers.json, specials.json, upgrades.json
{ "required": "value", }
- w
- Width of the Module in Tiles.
{ "w": value, }
- h
- Height of the Module in Tiles.
{ "h": value, }
- Module Definition Attributes
- Specifies the Modules property for AI Logic.
{ "isExplosive": t/f, //Rockets, Bomb Bays, Grenades, etc. "isSail": t/f, //Sails. "isWeapon": t/f, //Required for all weapon modules. "isGun": t/f, //All guns (Rifles, Cannons, Turrets, Sponsons, etc.) "isCannon": t/f, //Turrets, Cannons, Suspendium Cannons, Flak Cannons, etc. "isRam": t/f, //Rams. }
- aiMaxY
- Sets the maximum height this module can go. Used to limit monster AI.
{ "aiMaxY": value, }
- createsExceptionalCombatEventAfterMs
- This String is often used with Monsters. Triggers the AI for the Module after a specified number of Milliseconds.
- ex. A Module with Capture Troops will Capture. A Module with a Weapon will Fire. A Module with Legs will begin to Walk. etc.
{ "createsExceptionalCombatEventAfterMs": value, }
- countsAsActiveCrew
- Specifies the Module acts as an Active Crew Member, capable of performing Module tasks without Troops occupying the Module, allowing Interior vision of the Module, and preventing Defeat of the craft under certain Conditions.
{ "countsAsActiveCrew": t/f, }
- instantlyDestroyed
- Instantly removes the Module from the battle on destruction, allowing for animated or simplified death sequences from other connected Modules. Most often used on Monster Modules.
{ "instantlyDestroyed": t/f, }