Page 1 of 1
Tag list
Posted: 06 May 2018, 21:30
by FranchuFranchu
This is the list of tags in TheoTown. For basic information how to write a plugin, please have a look at the
basics tutorial.
Attention: Do
not use these information to reconstruct addons whose contents you found somewhere else. That's not how we want you to use the plugin system. Please use it only for your own graphics/graphics others explicitly provided you for usage in the game.
So here we present (almost) all tags which can be used in your plugin description file, and to which type of plugins you can put them in:
Note: RCI means
Residential
Commerical
Industrial
All Plugins
(optional)
If not set, plugin won't be loaded. Default is true.
Unique identifier for each plugin.
States the type of the plugin. Possible values are:
- residential
- commercial
- industrial
- farm
- harbor ind
- harbor pier
- park
- sport
- public
- religion
- award
- energy
- water
- medic
- police
- swat
- fire brigade
- education
- bus depot
- destroyed
- decoration
- buoy
- railway station
- waste disposal
- body disposal
- military
- building
- category
- notification
- ground
- terrain
Buildings
(optional)
Title for the building. Should be English if distributed. Default is null.
(optional)
Description for the building. Should be English if distributed. Default is null. If type is notification, it will set the notification text
(optional)
Author name of the plugin.
The ID of the category the plugin is in
Plugins with a lower ordinal will be listed first
Tile width of the base of the building.
Has to be the same as width.
Graphic frames definition of the plugin. Is an array of frames. Each frame has the form
At least one frame has to be given. If multiple frames are given, player may select one of them in the game (default).
(optional)
Works as frames. If you define it you have to provide the same number of frames as in frames. These frames will be used when winter is enabled.
The thumbnail/icon of our plugin
Every time you place the building, a random frame from the frame array will be selected
(optional)
List of smoke sources. Have a look at the
listing of defined smoke types for more information. Position is relative to pivot point of the building.
(optional)
Similar to smoke, can be used to place smaller animations on your building. Position is relative to pivot point of the building. May look like
Code: Select all
"animation":[{"id":"$animationblinkingredlight3x3","x":70,"y":-107}],
to position a 3x3 pixel sized blinking red light at the specified relative position.
(optional)
It is like animation, but instead of putting the animation in the background, it puts it in the foreground
(rci only)
For residential, commercial and industrial buildings only: Building level, should be 1, 2 or 3.
(optional)
Determines whether a road connection is needed for this building. Default is true.
(optional)
Determines whether building can only be built if at least one ground tile is land (not water). Default is true.
(optional)
Determines whether building can only be built if at least one ground tile is water. Default is false.
(rci only, optional)
Build time in days. By default this value is inferred by height of the building.
Sets the influence of the building
Possible keys are:
influence pollution"
"influence noise"
"influence health"
"influence police"
"influence fire department"
"influence park"
"influence sport"
"influence education low"
"influence education high"
"influence culture"
"influence management"
"influence religion"
"influence passenger bus"
"influence passenger train"
"influence residential"
"influence commercial"
"influence industrial"
"influence level0"
"influence level1"
"influence level2"
"influence radioactive"
"influence nature"
"influence waste disposal"
"influence body disposal"
Example
Can be used to set the student capacity of a school
Possible keys are:
"provide aspect education high"
"provide aspect education low"
"provide aspect health care"
For example:
Code: Select all
"provide aspect education high":5000,
(optional)
If true, multiple frames will be used for animation. Use may not select specific frame anymore. Default is false.
(not rci, optional)
Price of the building in Ͳheos. Default is 0.
(optional)
Monthly price of the building in Ͳheos. Default is 0. Can't be negative to avoid cheating.
(not rci, optional)
Price of the building in Ͳheos. Default is 0.
(optional)
Produced amount of energy by this building in kWh. Default is estimated by building size.
(optional)
Produced amount of water by this building in L/h (negative values for need). Default is estimated by building size.
(optional, not rci)
Max number of buildings of this type in the city. Default is -1 (no limitation).
(optional)
If set, ground tiles of the building will be drawn. Useful for buildings that are partly transparent on ground. Default is false.
(optional)
If set, given frames will be used for rotation. In this case you have to provide a multiple of 4 frames. Default is false.
(optional, rci only)If residential, same as "habitants". If commericial or industrial, same as "workers". Is inferred based on size of the building by default.
(deprecated, optional, r only)
Number if habitants in this building. Is inferred based on size of the building by default.
(deprecated, optional, ci only)
Number of workers in this building. Is inferred based on size of the building by default.
(optional, rci only)
If set, building can be built automaticially. Default is true.
If set, building can be burnt. Default is true.
(optional)
If true, this building will conduct energy. Default is true.
(optional)
If true, this building will conduct high voltage energy like transmission lines. Default is false.
(optional)
If false, the building cannot burn. Default is true.
(optional)
If false, the building is locked so that it cannot be removed by the player. Default is true.
Can be used, for example, in cars to set in which kind of building do they spawn
Scroll down to see all tags appliable inside the "tags" node.
Fun executed when the building is placed
See
this
Fun executed when the building is clicked
See
this
Fun evaluated every day
See
this
Sets the upgrades the building can have
Value is an array of plugins.
Some additional notes:
- price, monthly price, water, power and influences will be added to corresponding values of the building when the upgrade is applied
- You can also provide animations as for regular buildings, but no smoke
- You can set "only one":true in an upgrade to state that no other upgrade may be active at the same time. We use this for example for the radio station were you can have selected only one program at the same time.
Tag list
Posted: 06 May 2018, 21:40
by FranchuFranchu
Ground
Ground only.
An array of 16 frames to use when the ground touches another one. The image has to be like this
wbck.png
2 16×48 frames to use when the ground is at the edge of the map. They have to be like this
world_0_0.png
No idea. Everything I know is that they have to be 32 frames. Try using the same frames as the ones you used at "frames"
Frames
Sets the file to get the image from.
The file has to be in the same folder as your code
Default is
the world texture
The horizontal position of the frame in the graphic. Default is 0
Sets the width of the frame to be selected
For example:
Will display only the left 32 pixels of the image
This will repeat the frame <value> times to the right
Code: Select all
"frames":[
{"bmp":"a.png","w":32,"h":16}
{"bmp":"b.png", "w":32,"h":16}
]
Is the same as
Code: Select all
"frames":[
{"bmp":"a_and_b_put_together.png",
"count":2,
"w":32,"h":16}
]
...
TODO: HANDLE X AND HANDLE Y
REASON: NO IDEA WHAT IT IS
Meta tags
For level 1 residential cars
For level 2 residential cars
For level 3 residential cars
For level 1 commercial cars
For level 2 commercial cars
For level 3 commercial cars
For level 1 industrial cars
For level 2 industrial cars
For level 3 industrial cars
Roads
16 frames. If not specified, it will be impossible to make bridges with this road
4 frames. If not specified, it will be impossible to make traffic lights with this road
Speed of cars in the road. 1.0 is the dirt road's speed
Roads with higher level will override other roads
(default=true)
Determines whether neighboring roads should be joined automatically. May be useful for roads with multiple lanes (see value width below).
(default=true)
Determines whether bus stops may be place on this road.
(default=true)
Determines whether buildings have a road connection if they are nearby.
(default=true)
Determines whether road tool should allow X crossings. We discourage you to use it as it's no fun for the player.
(default=false)
If true, cars can only drive into one direction on this road type. You then have to provide 64 instead of 16 frames. First 16 frames will be used for alignment SOUTH_EAST, the next 16 frames for NORTH_EAST, then NORTH_WEST and at least SOUTH_WEST. You may save texture space by providing the first 16 frames multiple times and use one way frames for an alignment specific overlay.
(default=[])
For one ways only. Here you can provide 4 frames which will then be used as overlay dependent on road alignment. The order is SOUTH_EAST, NORTH_EAST, NORTH_WEST, SOUTH_WEST.
(default=true)
For one ways only. If true, cars may overrun others on this one way.
(default=1)
Number of lanes that should be built at the same time from road tool. In combination with flag one way this can be used to define highways or alleys. For alleys you can define decorations that should be used with decoration buildings.
Show
decoration buildings (default=[])
Only used if width is odd and greater than 2. An array of ids of 1x1 sized decoration buildings that should be used for decoration purposes. For example the default alley uses "$decoroad00".
(default=true)
If true, this road can connect to neighbor cities.
(default=2)
In case you use bridges this is the intended distance between piles.
Re: Tag list
Posted: 15 May 2018, 19:59
by FranchuFranchu
Not recommended plugin types
This plugin types are undocumented and unstable, so you are on your own here
Rail
(NOTE: Frame usage is undefined)
Train
Code: Select all
[
{
"id":"$train00",
"type":"train",
"frames":[
{"x":512,"y":802,"w":20,"h":20,"count":2,"handle x":10,"handle y":16},
{"x":512,"y":802,"w":20,"h":20,"count":2,"handle x":10,"handle y":16},
{"x":552,"y":802,"w":20,"h":20,"count":2,"handle x":10,"handle y":16},
{"x":552,"y":802,"w":20,"h":20,"count":2,"handle x":10,"handle y":16}
],
"capacity":80
}
]