-
Forum
-
- It is currently 12 Nov 2026, 12:41
- All times are UTC
Find tutorials, documentation, and resources for creating and using TheoTown plugins.
-
CommanderABab
- AB
- Reactions:
- Posts: 11263
- Joined: 07 Jun 2016, 19:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by CommanderABab » 16 Apr 2019, 15:32
Akira Maruni wrote: 16 Apr 2019, 14:04
I have an inspiration to make a zone that a bit similar with "Primitive Zone" plugin, but I try to make it with modern building. The purpose is to make the game looks more real with various RCI building in a zone rather than to build the same type building in a zone.
So, rather than I create the new buildings, I choose to create a code spawn some buildings from the game itself. Is it legal if I use in-game building ? What code should I use ?
CommanderABab wrote: 16 Apr 2019, 15:31
Can be done, but it's complicated and the code is long.
First step: collect the ids and sizes of the in-game buildings you wish built in your zone. Remember it's not a good idea to mix polluting industries with residential buildings.

my avatar:

-
Lemme Go
- Townsman
- Reactions:
- Posts: 74
- Joined: 06 Sep 2017, 11:51
- Plugins: Showcase Store
-
Platform
Post
by Lemme Go » 17 Apr 2019, 02:40
How to spawn the building ?

-
JustAnyone
- Honorary Contributor
- Reactions:
- Posts: 3664
- Joined: 23 Jul 2017, 10:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Post
by JustAnyone » 17 Apr 2019, 18:48
Lobby wrote: 30 May 2017, 22:37
Since version 296 you may let buildings (e.g. decorations) automatically spawn in map creation. To do so, we added an object called "spawn" which contains probability
p, main spawn height
height and max deviation from it
radius.
A small sample plugin that spawns grass in the ocean:
Code: Select all
[
{
"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
}
}
]
To give you some intuition about what height means I measured some height values in this map:
-
Imran M
- Inhabitant of a Country
- Reactions:
- Posts: 832
- Joined: 24 Oct 2018, 11:41
- Plugins: Showcase Store
-
Plugin Creator
Platform
Post
by Imran M » 18 Apr 2019, 11:38
CommanderABab wrote: 17 Apr 2019, 21:39
JustAnyone wrote: 17 Apr 2019, 18:48
*quoting Lobby*
Thanķs, but that isn't what he is talking about!
You used a different k
I just love the DOPE-amine you get after completing a plugin!
-
Imran M
- Inhabitant of a Country
- Reactions:
- Posts: 832
- Joined: 24 Oct 2018, 11:41
- Plugins: Showcase Store
-
Plugin Creator
Platform
Post
by Imran M » 18 Apr 2019, 20:09
I just love the DOPE-amine you get after completing a plugin!
-
Lobby
- Inhabitant of a Supercluster
- Reactions:
- Posts: 3756
- Joined: 26 Oct 2008, 10:34
- Plugins: Showcase Store
-
Post
by Lobby » 28 Sep 2019, 20:00
It's an attribute for cars; If you set it to false (e.g. for fire engines) they won't be charged by tollbooths.
-
Lakan Haraya
- Metropolitan
- Reactions:
- Posts: 129
- Joined: 28 Mar 2019, 07:34
- Location: Philippines
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by Lakan Haraya » 02 Oct 2019, 04:25
FranchuFranchu wrote: 15 Feb 2019, 19:44
Lua is 5th grade math compared to C, Assembly and other low level languages
Well, please teach us! PLEASE!

"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors
“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”
-
Kulche
- Inhabitant of a Continent
- Reactions:
- Posts: 1194
- Joined: 07 Jun 2017, 18:28
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by Kulche » 02 Oct 2019, 13:31
You have so much books that you don't need a teacher.
get yoked!!
-
Lobby
- Inhabitant of a Supercluster
- Reactions:
- Posts: 3756
- Joined: 26 Oct 2008, 10:34
- Plugins: Showcase Store
-
Post
by Lobby » 02 Oct 2019, 22:59
Or you could use YouTube

-
MsgmSgmsG
- Small-town resident
- Reactions:
- Posts: 41
- Joined: 05 Aug 2018, 04:06
- Location: Planet Earth
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by MsgmSgmsG » 09 Dec 2019, 13:33
Can i use "frame alignment" in RIC?? I try this tag in my 1×1 house plugin but I have to place residential zone before i place this house...
I'm comeback!!
(Never forget my password anymore..)
Sorry for bad Englishㅠㅠ

-
CommanderABab
- AB
- Reactions:
- Posts: 11263
- Joined: 07 Jun 2016, 19:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by CommanderABab » 02 Feb 2020, 12:51
MsgmSgmsG wrote: 09 Dec 2019, 13:33
Can i use "frame alignment" in RIC?? I try this tag in my 1×1 house plugin but I have to place residential zone before i place this house...
You could also use a frame aligned 1x1 park type that when built removes itself, builds the residential zone, then the frame aligned 1x1 house.
my avatar:

-
CommanderABab
- AB
- Reactions:
- Posts: 11263
- Joined: 07 Jun 2016, 19:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by CommanderABab » 06 Feb 2020, 00:50
I've seen some people use
in their plugins maybe not knowing what it does. This allows a plugin to only show any notifications once per the lifetime of a building.
If you only want a plugin to be built once, use
my avatar:

-
Bevise
- Inhabitant of a Conurbation
- Reactions:
- Posts: 495
- Joined: 27 Feb 2020, 13:39
- Location: Phu Quoc Island, Vietnam
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by Bevise » 30 Mar 2020, 12:15
Lobby wrote: 28 Jan 2019, 11:06
See
here and
here.
There's a simplified syntax that looks like:
Code: Select all
"requirements":[
{
"type":"RANK", // Requires a specific city rank
"lvl":2
},
{
"type":"BUILDING", // Requires a specific building
"id":"$theidofarequiredbuilding"
},
{
"type":"HABITANT_COUNT", // Requires a population of at least 1000
"count":1000
}
]
I want to build Building A, it requires Building B to be upgraded. How to write codes? Please help me.

...OOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOO OOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOO
A_Vietnamese_plugin_creator
OOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOO OOOOO OOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOO
-
Bearbear76
- Inhabitant of a Multiverse
- Reactions:
- Posts: 5701
- Joined: 10 Feb 2017, 12:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Post
by Bearbear76 » 02 Apr 2020, 11:02
Bevise wrote: 30 Mar 2020, 12:15
I want to build Building A, it requires Building B to be upgraded. How to write codes? Please help me.
I think this should work
Code: Select all
//building B
[{
"id":"buildingB",
other stuff...
"upgrades":[
{
"id":"buildingB_upgrade", //upgraded building B id
other stuff...
}]
},
//building A
{
"id":"buildingA",
other stuff...
"requirements":[
{
"type":"BUILDING",
"id":"buildingB_upgrade" //can only upgrade when B is upgraded
}]
}]
Just my opinion
retired
-
Bevise
- Inhabitant of a Conurbation
- Reactions:
- Posts: 495
- Joined: 27 Feb 2020, 13:39
- Location: Phu Quoc Island, Vietnam
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by Bevise » 02 Apr 2020, 13:10
Ølsken wrote: 02 Apr 2020, 11:02
Bevise wrote: 30 Mar 2020, 12:15
I want to build Building A, it requires Building B to be upgraded. How to write codes? Please help me.
I think this should work
Code: Select all
//building B
[{
"id":"buildingB",
other stuff...
"upgrades":[
{
"id":"buildingB_upgrade", //upgraded building B id
other stuff...
}]
},
//building A
{
"id":"buildingA",
other stuff...
"requirements":[
{
"type":"BUILDING",
"id":"buildingB_upgrade" //can only upgrade when B is upgraded
}]
}]
It doesnt work...

...OOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOO OOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOO
A_Vietnamese_plugin_creator
OOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOO OOOOO OOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOO
-
CommanderABab
- AB
- Reactions:
- Posts: 11263
- Joined: 07 Jun 2016, 19:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by CommanderABab » 02 Apr 2020, 18:13
Bevise wrote: 02 Apr 2020, 13:10
Ølsken wrote: 02 Apr 2020, 11:02
Bevise wrote: 30 Mar 2020, 12:15
I want to build Building A, it requires Building B to be upgraded. How to write codes? Please help me.
I think this should work
Code: Select all
//building B
[{
"id":"buildingB",
other stuff...
"upgrades":[
{
"id":"buildingB_upgrade", //upgraded building B id
other stuff...
}]
},//*** add this code to buildingB:
"fun":[
{
"condition": {
"type": "upgrade",
"id": "buildingB_upgrade"
},
"actions": [{
"type": "remove"
},
//*** builds what you are checking for in place. :)
{"type": "build","id": "upgradedbuildingB","x":0,"y":0}
],"p":100
}
]
//building A
{
"id":"buildingA",
other stuff...
"requirements":[
{
"type":"BUILDING",
//*** change "buildingB_upgrade" below to "upgradedbuildingB"
"id":"buildingB_upgrade" //can only upgrade when B is upgraded
}]
}]
It doesnt work...
Code: Select all
{ "id":"upgradedbuildingB",
"hidden":true,
//everything else same as buildingB except no upgrade statement
}
my avatar:

-
Bevise
- Inhabitant of a Conurbation
- Reactions:
- Posts: 495
- Joined: 27 Feb 2020, 13:39
- Location: Phu Quoc Island, Vietnam
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by Bevise » 03 Apr 2020, 01:03
So, building A and B must be in the same file??
...OOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOO OOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOO
A_Vietnamese_plugin_creator
OOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOO OOOOO OOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOO