This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ixe:mapmaking:custom [2024/12/09 15:34] – Fireswamp | ixe:mapmaking:custom [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Making Custom Units ====== | ====== Making Custom Units ====== | ||
+ | Custom units have two or three components: | ||
+ | * image (typically a JPEG or PNG file) - how the unit looks | ||
+ | * description (JSON file) - what components and behaviors go with the unit | ||
+ | * behavior ([[ixe: | ||
+ | |||
+ | A more complex unit can have multiple components, where each component is named in the base or root JSON, and each component can be made up the same as the root or base component. | ||
+ | |||
To make a custom unit, the 2 required pieces are a unit image and a unit JSON, both of which will need to be placed in the map folder for the map you are making. | To make a custom unit, the 2 required pieces are a unit image and a unit JSON, both of which will need to be placed in the map folder for the map you are making. | ||
===== Unit Image ===== | ===== Unit Image ===== | ||
- | The unit image is an image file, at time of writing | + | The unit image is an image file, at time of writing we do not yet have a list of what image formats are supported |
You want a program that can make pixel art png files, including deleting pixels so you can have non-rectangular shapes. | You want a program that can make pixel art png files, including deleting pixels so you can have non-rectangular shapes. | ||
Line 15: | Line 22: | ||
{ | { | ||
" | " | ||
- | " | + | " |
- | " | + | " |
" | " | ||
" | " | ||
- | " | + | |
- | " | + | " |
+ | " | ||
+ | " | ||
+ | " | ||
+ | | ||
" | " | ||
- | ], | + | |
- | + | " | |
- | " | + | { |
- | { | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | } |
- | } | + | ], |
- | ], | + | |
} | } | ||
</ | </ | ||
Line 42: | Line 52: | ||
- " | - " | ||
- " | - " | ||
- | - " | + | - " |
+ | - " | ||
+ | - " | ||
+ | - " | ||
+ | - " | ||
All that remains is to add the parts; below the " | All that remains is to add the parts; below the " | ||
Line 54: | Line 68: | ||
<tabbox Lathe> | <tabbox Lathe> | ||
< | < | ||
+ | |||
+ | <tabbox Freeze Cannon> | ||
+ | < | ||
<tabbox Sentinel Cannon> | <tabbox Sentinel Cannon> | ||
Line 63: | Line 80: | ||
<tabbox Sanddropper> | <tabbox Sanddropper> | ||
< | < | ||
+ | |||
+ | <tabbox Maker> | ||
+ | < | ||
</ | </ | ||
Save the file name as what you want your ship to be named in code (make sure to use the extension .json) and place that file with the image from the first step. | Save the file name as what you want your ship to be named in code (make sure to use the extension .json) and place that file with the image from the first step. | ||
+ | |||
+ | ===== Global JSON ===== | ||
+ | To add a global script to your map - one that will run without the need of a unit - you need to add a global.json file to the root of your project with the following content | ||
+ | |||
+ | <file json global.json> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | {" | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Scripting ===== | ||
===== Final Touches ===== | ===== Final Touches ===== | ||
Line 74: | Line 108: | ||
And with that, congratulations! | And with that, congratulations! | ||
+ | |||
+ | |||
+ | To see how all of the base game ships are constructed, | ||