Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Wepf
Inhabitant of a Megacity Reactions:
Posts: 257 Joined: 14 Oct 2021, 08:19
Location: Your lucid dream
Plugins: Showcase Store
Version: Beta
Plugin Creator
Platform
Post
by Wepf » 17 Nov 2021, 03:25
Lobby wrote: 13 Mar 2017, 19:37
Never tested it, but in order to expect 1,000 poor inhabitants it should look like
Code: Select all
"requirements":[
{
"type":"HABITANT_COUNT",
"count":1000,
"factor0":1,
"factor1":0,
"factor2":0
}
]
What are the codes of the population of every class
Example: A 1000 population of rich
I play music and create theotown plugin (rarely)
Btw I'm from
and I'm 13
CommanderABab
AB Reactions:
Posts: 11269 Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta
Plugin Creator
Platform
Post
by CommanderABab » 17 Nov 2021, 18:01
Wepf wrote: 17 Nov 2021, 03:25
Lobby wrote: 13 Mar 2017, 19:37
Never tested it, but in order to expect 1,000 poor inhabitants it should look like
Code: Select all
"requirements":[
{
"type":"HABITANT_COUNT",
"count":1000,
"factor0":1,
"factor1":0,
"factor2":0
}
]
What are the codes of the population of every class
Example: A 1000 population of rich
factor0:1 = poor
factor1:1 = middle class
factor2:1 = rich
factor0factor1factor2:
100 = poor population of count
010 = middle class population of count
001 = rich population of count
111 = population of count
my avatar:
Wepf
Inhabitant of a Megacity Reactions:
Posts: 257 Joined: 14 Oct 2021, 08:19
Location: Your lucid dream
Plugins: Showcase Store
Version: Beta
Plugin Creator
Platform
Post
by Wepf » 17 Nov 2021, 23:48
CommanderABab wrote: 17 Nov 2021, 18:01
Wepf wrote: 17 Nov 2021, 03:25
What are the codes of the population of every class
Example: A 1000 population of rich
factor0:1 = poor
factor1:1 = middle class
factor2:1 = rich
factor0factor1factor2:
100 = poor population of count
010 = middle class population of count
001 = rich population of count
111 = population of count
Oh thx a lot
Last edited by JustAnyone on 18 Nov 2021, 13:20, edited 1 time in total.
Reason: Clean up the quote
I play music and create theotown plugin (rarely)
Btw I'm from
and I'm 13
Wepf
Inhabitant of a Megacity Reactions:
Posts: 257 Joined: 14 Oct 2021, 08:19
Location: Your lucid dream
Plugins: Showcase Store
Version: Beta
Plugin Creator
Platform
Post
by Wepf » 07 Dec 2021, 04:37
Hey, what are the codes for the building that requires an upgrade
Example:
To build the building name ABab, you have to upgrade the building upgrade name Commander first
I play music and create theotown plugin (rarely)
Btw I'm from
and I'm 13
CommanderABab
AB Reactions:
Posts: 11269 Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta
Plugin Creator
Platform
Post
by CommanderABab » 07 Dec 2021, 19:51
Code: Select all
[(
"id": "Commander,"
"type":"commercial",
//...frames, price, etc ...
"upgrades": [{
"id": "Commander.upgrade,//id of upgrade
"type": "commercial",//or other type
"title": "title of upgrade",
"text": "text describing upgrade.",
"frames": [],//if upgrade looks the same
"price": 7000,//of upgrade
"monthly price": 200,//added to Commander price
"influence park": 39,//added
"influence level1": 50,,//added
"influence lev2": 50,,//added
"power": -100,,//added
"water": -200,,//added
"level": 3
}//,you could have other upgrades here
],
"fun": [
{
"condition": {
"type": "upgrade",
"id": "Commander.upgrade",
"x": 0,
"y": 0//check here if an upgrade was done
},
"actions": [{
"type": "remove",
"x": 0,
"y": 0
},
{
"type": "build",
"id": "ABab" //this has to be same size as Commander
}
]
}
]
}]
my avatar:
JustAnyone
Honorary Contributor Reactions:
Posts: 3666 Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store
Platform
Post
by JustAnyone » 19 Dec 2021, 15:38
You can use "hide if fulfilled" in a requirement condition
JustAnyone
Honorary Contributor Reactions:
Posts: 3666 Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store
Platform
Post
by JustAnyone » 24 Dec 2021, 21:26
Only by using conditional requirements and fun (setting a fun variable to some value by upgrading a building and then using that value as a requirement)
FVI
Inhabitant of a Galaxy Cluster Reactions:
Posts: 2442 Joined: 22 Feb 2022, 16:00
Location: The largest island in Europe
Plugins: Showcase Store
Version: Beta
Platform
Post
by FVI » 04 Jun 2022, 09:17
But is this argument about the needs of a building? As in the DSA that to build the containment barriers you need the containment structures?
Patchouli Knowledge
Townsman Reactions:
Posts: 64 Joined: 26 Sep 2020, 07:42
Post
by Patchouli Knowledge » 24 Sep 2022, 11:24
how to understand "count"
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 » 24 Sep 2022, 12:16
Lobby wrote: 13 Mar 2017, 19:37
Never tested it, but in order to expect 1,000 poor inhabitants it should look like
Code: Select all
"requirements":[
{
"type":"HABITANT_COUNT",
"count":1000,
"factor0":1,
"factor1":0,
"factor2":0
}
]
If we are talking about this then it's simple "count" means the amount of people (as denoted with HABITANT_COUNT).
Just my opinion
retired
burgernamn
Inhabitant of a Megacity Reactions:
Posts: 173 Joined: 15 Apr 2022, 08:32
Plugins: Showcase Store
Plugin Creator
Platform
Post
by burgernamn » 04 Feb 2023, 11:28
are there more types or are they hidden
im more active on my discord
I_Support_Palestine
Townsman Reactions:
Posts: 55 Joined: 09 Jun 2024, 09:53
Location: Johor
Plugins: Showcase Store
Platform
Post
by I_Support_Palestine » 06 Jul 2025, 02:39
How about for 1000 medium inhabitants?
JustAnyone
Honorary Contributor Reactions:
Posts: 3666 Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store
Platform
Post
by JustAnyone » 07 Jul 2025, 22:12
Should be
Code: Select all
"requirements":[
{
"type":"HABITANT_COUNT",
"count":1000,
"factor0":0,
"factor1":1,
"factor2":0
}
]