Ships#
Here are some yacht graphics by Lobby and theo:
As always, please give them credit when you reuse it for a plugin. Don't use it outside of TheoTown without permission.
The JSON itself is very simple. Use ship as type and provide at least 4 frames. It may look something like:
[
{
"id":"$shipyacht00",
"type":"ship",
"frames":[
{"bmp":"yacht_green.png","w":17,"h":15,"count":4,"handle x":8,"handle y":12},
{"bmp":"yacht_blue.png","w":17,"h":15,"count":4,"handle x":8,"handle y":12}
]
}
]
Here we provide 8 frames, 4 for each variant of the yacht. The game will pick a variant randomly when spawning a ship. Move frames using handle x and handle y until it looks good. Setting them correctly is difficult, so do it by trial and error.
If your ship is longer than one tile use "length":2
to indicate this.
However, the longer the ship the more likely are graphic issues. That's why the game never added the long container ships.
Spawning ships from a building is fairly simple. It looks similar to car spawning before car spawners were added:
ship radius
is currently ignored. Use it for the future.
This page has been adapted from a topic on the official TheoTown forum.