Advanced tags for building plugins

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
Ryk_Mak_2050
Settler
Reactions:
Posts: 4
Joined: 25 Dec 2021, 16:57

Re: Advanced tags for building plugins

Post by Ryk_Mak_2050 » 22 May 2022, 11:14

Can you provide the emergency vehicle code? I have the code to increase number of emergency vehicles but do not respond when I call an emergency.
Thiên Ân
Villager
Reactions:
Posts: 14
Joined: 07 Jul 2022, 19:23

Re: Advanced tags for building plugins

Post by Thiên Ân » 03 Aug 2022, 17:40

How does the animated tag work?
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3756
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Advanced tags for building plugins

Post by Lobby » 03 Aug 2022, 17:47

It's a legacy attribute to animate your buildings. For that, simply provide multiple frames to the "frames" attribute and then use "animated":true to let the game know that it should use these frames to animate the building. Nowadays I recommend to use separate animation objects instead that you can then reference to in the "animation" attribute.
User avatar
Mako1137
Metropolitan
Reactions:
Posts: 122
Joined: 05 Dec 2021, 20:31
Location: Sacramento, CA
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by Mako1137 » 11 Aug 2022, 19:01

What about waste disposal?
The Shark who eats Sea Pickles (:
User avatar
Mako1137
Metropolitan
Reactions:
Posts: 122
Joined: 05 Dec 2021, 20:31
Location: Sacramento, CA
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by Mako1137 » 12 Aug 2022, 00:39

Hey @Example of @Lobby, what is the tag for waste disposal?
The Shark who eats Sea Pickles (:
User avatar
Mako1137
Metropolitan
Reactions:
Posts: 122
Joined: 05 Dec 2021, 20:31
Location: Sacramento, CA
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by Mako1137 » 17 Sep 2022, 18:39

Question:

Does the "ordinal" tag have to start from 0?
The Shark who eats Sea Pickles (:
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab » 17 Sep 2022, 20:11

No, you can use negative(-1) to always be first. High number to always be last.
my avatar:
User avatar
burgernamn
Inhabitant of a Megacity
Reactions:
Posts: 173
Joined: 15 Apr 2022, 08:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by burgernamn » 24 Nov 2022, 06:38

are there no tags for rails?
im more active on my discord
User avatar
Bearbear76
Inhabitant of a Multiverse
Reactions:
Posts: 5701
Joined: 10 Feb 2017, 12:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by Bearbear76 » 24 Nov 2022, 13:45

aster dude wrote: 24 Nov 2022, 06:38 are there no tags for rails?
Do you mean?

Code: Select all

"flag train": true
EDIT: You can always look at how the game implements railways here.
Just my opinion
retired
User avatar
burgernamn
Inhabitant of a Megacity
Reactions:
Posts: 173
Joined: 15 Apr 2022, 08:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by burgernamn » 24 Nov 2022, 19:20

Bearbear76 wrote: 24 Nov 2022, 13:45
aster dude wrote: 24 Nov 2022, 06:38 are there no tags for rails?
Do you mean?

Code: Select all

"flag train": true
EDIT: You can always look at how the game implements railways here.
yeah, thx man
im more active on my discord
User avatar
HenryEdwardRud
Villager
Reactions:
Posts: 17
Joined: 20 Aug 2020, 13:38
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by HenryEdwardRud » 04 Jan 2023, 17:08

Sigitfajarn wrote: 05 Apr 2022, 03:04 anyone know tow to make the building does'nt need water and energy supply?
I think

"water": 0,
"power": 0
Last edited by HenryEdwardRud on 05 Jan 2023, 17:15, edited 3 times in total.
User avatar
HenryEdwardRud
Villager
Reactions:
Posts: 17
Joined: 20 Aug 2020, 13:38
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by HenryEdwardRud » 04 Jan 2023, 17:09

Pederont wrote: 26 Apr 2022, 12:31 Is there a way I can make a decoration spawn on map randomly on random location? Similar to spawn tag but evaluated every given time and only on empty tiles.

I'm thinking of a plugin like easter egg thing.
I found this example from lobby

[
{
"id":"$myspawntest00",
"type":"decoration",
"width":1,
"height":1,
"frames":[{"x":0,"y":0,"w":32,"h":16}],
"needs water":false,
"needs land":false,
"draw ground":true,
"spawn":
{
"p":0.01,
"height":-600,
"radius":600
}
}
]
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab » 05 Jan 2023, 01:43

HenryEdwardRud wrote: 04 Jan 2023, 17:08
Sigitfajarn wrote: 05 Apr 2022, 03:04 anyone know tow to make the building does'nt need water and energy supply?
I think

"water": "-0"
"power": "-0"
This is best coded as

Code: Select all

"water": 0,  "power": 0,
as numbers don't need quotes in json and unneeded negative signs are discouraged.
my avatar:
User avatar
Alexander-Max
Settler
Reactions:
Posts: 5
Joined: 04 Feb 2023, 01:55

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by Alexander-Max » 20 Feb 2023, 10:21

wow
:66:
User avatar
burgernamn
Inhabitant of a Megacity
Reactions:
Posts: 173
Joined: 15 Apr 2022, 08:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by burgernamn » 27 Mar 2023, 10:20

is there a list for the language tags?
im more active on my discord
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab » 27 Mar 2023, 15:45

First poet of this topic.
my avatar:
User avatar
zaqxswcdevfr
Settler
Reactions:
Posts: 6
Joined: 23 Aug 2024, 10:08
Location: Southern Gaza
Plugins: Showcase Store

Re: Advanced tags for building plugins

Post by zaqxswcdevfr » 27 Aug 2024, 10:27

Wie man die Mindeststädtische Bewertung zum Zeitpunkt des Baus festlegt
User avatar
birdn4t0r
Villager
Reactions:
Posts: 18
Joined: 02 Jan 2021, 06:40
Location: Seattle
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by birdn4t0r » 01 Oct 2024, 23:43

Lobby wrote: 22 Feb 2017, 22:20 (...)
Show
influence *
Possible keys are:
Show
(...)
"influence level0"
"influence level1"
"influence level2"
(...)
What are these influence keys for? Doesn't seem to be anything on them anywhere in the documentation that I can access.
User avatar
Matthew H
Settler
Reactions:
Posts: 7
Joined: 26 Mar 2025, 04:18
Location: Vacnvouer, BC, Canada
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by Matthew H » 01 Jul 2025, 03:36

Lobby wrote: 22 Feb 2017, 22:20
Show
map color
Only for terrain and zones. For example:

Code: Select all

"map color":{"r":255,"g":255,"b":0}
will make the terrain look yellow in the map
this should be updated, map color definitely also works for roads
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab » 02 Jul 2025, 17:22

birdn4t0r wrote: 01 Oct 2024, 23:43
Lobby wrote: 22 Feb 2017, 22:20 (...)
Show
influence *
Possible keys are:
Show
(...)
"influence level0"
"influence level1"
"influence level2"
(...)
What are these influence keys for? Doesn't seem to be anything on them anywhere in the documentation that I can access.

Residential, commercial, and industrial. "influence level2":50 used in a residential will influence other level 3 residentials to spawn nearby if the zoning is right.
Previous topicNext topic