Tag list

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
FranchuFranchu
Inhabitant of a Country
Reactions:
Posts: 769
Joined: Sun May 28, 2017 0:07
Location: Retrophrenology
Plugins: Show
Version: Beta

Tag list

Post by FranchuFranchu » Sun May 06, 2018 21:30

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
Show
active
(optional)
If not set, plugin won't be loaded. Default is true.
Show
id
Unique identifier for each plugin.
Show
type
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
Show
title
(optional)
Title for the building. Should be English if distributed. Default is null.
Show
text
(optional)
Description for the building. Should be English if distributed. Default is null. If type is notification, it will set the notification text
Show
author
(optional)
Author name of the plugin.
Show
category
The ID of the category the plugin is in
Show
ordinal
Plugins with a lower ordinal will be listed first
Show
height
Tile width of the base of the building.
Show
height
Has to be the same as width.
Show
frames
Graphic frames definition of the plugin. Is an array of frames. Each frame has the form

Code: Select all

{"bmp":"image_name.png"}
At least one frame has to be given. If multiple frames are given, player may select one of them in the game (default).
Show
frames winter
(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.
Show
preview frames
The thumbnail/icon of our plugin
Show
random frame
Every time you place the building, a random frame from the frame array will be selected
Show
smoke
(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.
Show
animation
(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.
Show
animation fg
(optional)
It is like animation, but instead of putting the animation in the background, it puts it in the foreground
Show
level
(rci only)
For residential, commercial and industrial buildings only: Building level, should be 1, 2 or 3.
Show
needs road
(optional)
Determines whether a road connection is needed for this building. Default is true.
Show
needs land
(optional)
Determines whether building can only be built if at least one ground tile is land (not water). Default is true.
Show
needs water
(optional)
Determines whether building can only be built if at least one ground tile is water. Default is false.
Show
build time
(rci only, optional)
Build time in days. By default this value is inferred by height of the building.
Show
influence *
Sets the influence of the building
Possible keys are:
Show
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

Code: Select all

"influence noise":82,
Show
provide aspect *
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,
Show
animated
(optional)
If true, multiple frames will be used for animation. Use may not select specific frame anymore. Default is false.
Show
price
(not rci, optional)
Price of the building in Ͳheos. Default is 0.
Show
monthly price
(optional)
Monthly price of the building in Ͳheos. Default is 0. Can't be negative to avoid cheating.
Show
diamond price
(not rci, optional)
Price of the building in Ͳheos. Default is 0.
Show
power
(optional)
Produced amount of energy by this building in kWh. Default is estimated by building size.
Show
water
(optional)
Produced amount of water by this building in L/h (negative values for need). Default is estimated by building size.
Show
max count
(optional, not rci)
Max number of buildings of this type in the city. Default is -1 (no limitation).
Show
draw ground
(optional)
If set, ground tiles of the building will be drawn. Useful for buildings that are partly transparent on ground. Default is false.
Show
rotation aware
(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.
Show
workers
(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.
Show
habitants
(deprecated, optional, r only)
Number if habitants in this building. Is inferred based on size of the building by default.
Show
workers
(deprecated, optional, ci only)
Number of workers in this building. Is inferred based on size of the building by default.
Show
auto build
(optional, rci only)
If set, building can be built automaticially. Default is true.
Show
burnable

If set, building can be burnt. Default is true.
Show
conductive
(optional)
If true, this building will conduct energy. Default is true.
Show
super conductive
(optional)
If true, this building will conduct high voltage energy like transmission lines. Default is false.
Show
destroyable
(optional)
If false, the building cannot burn. Default is true.
Show
removeable
(optional)
If false, the building is locked so that it cannot be removed by the player. Default is true.
Show
meta
Can be used, for example, in cars to set in which kind of building do they spawn

Code: Select all

"meta":{"tags":{"carres0":{}}}
Scroll down to see all tags appliable inside the "tags" node.
Show
fun
Fun executed when the building is placed
See this
Show
on click fun
Fun executed when the building is clicked
See this
Show
random fun
Fun evaluated every day
See this
Show
upgrades
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.
Last edited by FranchuFranchu on Sat Aug 04, 2018 22:25, edited 5 times in total.
Reason: Added animation fg
Currently Conlanging

......Affirmative=Positive=True=Yeah=Yes=OK=K=Potassium=K=0°K=-237°C

User avatar
FranchuFranchu
Inhabitant of a Country
Reactions:
Posts: 769
Joined: Sun May 28, 2017 0:07
Location: Retrophrenology
Plugins: Show
Version: Beta

Tag list

Post by FranchuFranchu » Sun May 06, 2018 21:40

Ground
Show
border frames
Ground only.
An array of 16 frames to use when the ground touches another one. The image has to be like this
wbck.png
Show
edge frames
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
Show
edge border frames
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
Show
bmp
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
Show
x
The horizontal position of the frame in the graphic. Default is 0
Show
y
Like x, but vertically
Show
w
Sets the width of the frame to be selected
For example:

Code: Select all

"bmp":"jssj.png","w":32,
Will display only the left 32 pixels of the image
Show
h
Like w, but with height
Show
move x
Undocumented
Show
move y
Undocumented
Show
handle x
Sets X pivot point
Show
handle y
Sets Y pivot point
Show
ref
Undocumented
Show
count
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
Show
carres0
For level 1 residential cars
Show
carres1
For level 2 residential cars
Show
carres2
For level 3 residential cars
Show
carcom0
For level 1 commercial cars
Show
carcom1
For level 2 commercial cars
Show
carcom2
For level 3 commercial cars
Show
carind0
For level 1 industrial cars
Show
carind1
For level 2 industrial cars
Show
carind2
For level 3 industrial cars
Show
firework
See here


Roads
Show
bridge frames
16 frames. If not specified, it will be impossible to make bridges with this road
Image
Show
frames per bridge
Should be 16
Show
traffic lights
4 frames. If not specified, it will be impossible to make traffic lights with this road
Image
Show
speed
Speed of cars in the road. 1.0 is the dirt road's speed
Show
level
Roads with higher level will override other roads
Show
auto join
(default=true)
Determines whether neighboring roads should be joined automatically. May be useful for roads with multiple lanes (see value width below).
Show
allow bus
(default=true)
Determines whether bus stops may be place on this road.
Show
allow transfer
(default=true)
Determines whether buildings have a road connection if they are nearby.
Show
allow crossing
(default=true)
Determines whether road tool should allow X crossings. We discourage you to use it as it's no fun for the player.
Show
one way
(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.
Show
one way frames
(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.
Show
overrunnable
(default=true)
For one ways only. If true, cars may overrun others on this one way.
Show
width
(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".
Show
connectable
(default=true)
If true, this road can connect to neighbor cities.
Show
pile distant
(default=2)
In case you use bridges this is the intended distance between piles.
Currently Conlanging

......Affirmative=Positive=True=Yeah=Yes=OK=K=Potassium=K=0°K=-237°C

User avatar
FranchuFranchu
Inhabitant of a Country
Reactions:
Posts: 769
Joined: Sun May 28, 2017 0:07
Location: Retrophrenology
Plugins: Show
Version: Beta

Re: Tag list

Post by FranchuFranchu » Tue May 15, 2018 19:59

Not recommended plugin types
This plugin types are undocumented and unstable, so you are on your own here
Rail
(NOTE: Frame usage is undefined)

Show
on ground
Boolean
Show
pile frames
Frame array
Show
pile height
Number
Show
pile distance
Number
Train
Show
<example>

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
  }
]
Show
capacity
Undocumented
Currently Conlanging

......Affirmative=Positive=True=Yeah=Yes=OK=K=Potassium=K=0°K=-237°C

Locked Previous topicNext topic

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: No registered users and 1 guest