Building requirements

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Lobby
Developer
Reactions:
Posts: 3504
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta

Platform

#1

Post by Lobby »

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
  }
]

User avatar
Henderion The Mayor
Inhabitant of a Galaxy
Reactions:
Posts: 2109
Joined: Thu Aug 18, 2016 11:04
Location: Pevosi,Freetradezonia (Tanjong Sepat,Selangor,Malaysia)
Plugins: Show
Version: Beta
Contact:

Platform

Reply

#2

Post by Henderion The Mayor »

Thanks.

User avatar
Ahmad Nur Aizat
TheoTown Veteran
Reactions:
Posts: 8243
Joined: Tue Oct 25, 2016 15:20
Location: Johor Bahru
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

#3

Post by Ahmad Nur Aizat »

Nope, still don't understand

User avatar
Ahmad Nur Aizat
TheoTown Veteran
Reactions:
Posts: 8243
Joined: Tue Oct 25, 2016 15:20
Location: Johor Bahru
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

#4

Post by Ahmad Nur Aizat »

former member wrote:
Ahmad Nur Aizat wrote:Nope, still don't understand
What do you not understand? I can explain it
Everything

User avatar
Ahmad Nur Aizat
TheoTown Veteran
Reactions:
Posts: 8243
Joined: Tue Oct 25, 2016 15:20
Location: Johor Bahru
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

#5

Post by Ahmad Nur Aizat »

Sooooo, somekind of the requirements featured in usual gamemodes? (No, not sandbox)

User avatar
Ahmad Nur Aizat
TheoTown Veteran
Reactions:
Posts: 8243
Joined: Tue Oct 25, 2016 15:20
Location: Johor Bahru
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

#6

Post by Ahmad Nur Aizat »

I see...

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2023
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Tutorial: Building requirements

#7

Post by KINGTUT10101 »

Shouldn't this be in Tutorials and Documentation?

User avatar
MXD77
Inhabitant of a Megacity
Reactions:
Posts: 256
Joined: Mon May 15, 2017 0:05
Location: Gdańsk
Plugins: Show

Platform

Re: Tutorial: Building requirements

#8

Post by MXD77 »

Helpful thanks :bc
Happy owner of cat and dog :D
Have a niceday :)
And greatings from Gdańsk ;)

User avatar
22Alpha
Inhabitant of a Conurbation
Reactions:
Posts: 445
Joined: Sat Sep 23, 2017 14:29

Platform

Re: Tutorial: Building requirements

#9

Post by 22Alpha »

May I ask here, what is the building code for coal power plant?

and does the requirement code allow "or" condition? ie.

"In order to obtain the building, you are required to get plaza "OR" statue"
:mine

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2023
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Building requirements

#10

Post by KINGTUT10101 »

What is the ID for Large Infinity?

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2898
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: Building requirements

#11

Post by JustAnyone »

@Lobby is there any way for a building to require an upgrade to be built?
Last edited by JustAnyone on Fri Nov 24, 2017 22:13, edited 1 time in total.
Perfect way to comment stuff out :)
🦀Now available as administrator🦀
Image

:pickle:

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2898
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: Building requirements

#12

Post by JustAnyone »

Here is what I mean:
Screenshot_2017-11-19-12-32-13-974_info.flowersoft.theotown.theotown.png

Code: Select all

"requirement": {
			"requirements": [{
				"type": "UPGRADE",
				"data": {
					"id": "dsahqup3"
				}
			}]
		},
Perfect way to comment stuff out :)
🦀Now available as administrator🦀
Image

:pickle:

User avatar
CommanderABab
AB
Reactions:
Posts: 8574
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Building requirements

#13

Post by CommanderABab »

upgrade
888!888Currently using zeta 888. 888 What's that? :)
quantum road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
CommanderABab
AB
Reactions:
Posts: 8574
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Building requirements

#14

Post by CommanderABab »

Code: Select all

"requirement":{ "requirements":
        [ 
          {
           "type":"CONDITION",          
           "data":
           {            
             "condition":
               {"type":"and","inner":
                 [
                  {"type":"upgrade","id":"dsahqup3","min":1,"max":10},    
                  {"type":"value","id":"res","min":10000,"max":1000000000}
                 ]       
               },
             "text":"Needs a dsahqup3!, and 10000 inhabitants"                           
           }  
          }                
        ]
       },
888!888Currently using zeta 888. 888 What's that? :)
quantum road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2898
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: Building requirements

#15

Post by JustAnyone »

CommanderABab wrote:
Sun Nov 19, 2017 13:29

Code: Select all

"requirement":{ "requirements":
        [ 
          {
           "type":"CONDITION",          
           "data":
           {            
             "condition":
               {"type":"and","inner":
                 [
                  {"type":"upgrade","id":"dsahqup3","min":1,"max":10},    
                  {"type":"value","id":"res","min":10000,"max":1000000000}
                 ]       
               },
             "text":"Needs a dsahqup3!, and 10000 inhabitants"                           
           }  
          }                
        ]
       },
Doesn't work.
Last edited by JustAnyone on Fri Nov 24, 2017 22:13, edited 3 times in total.
Perfect way to comment stuff out :)
🦀Now available as administrator🦀
Image

:pickle:

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2898
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: Building requirements

#16

Post by JustAnyone »

JustAnyone wrote:
Sun Nov 19, 2017 12:34
Here is what I mean:
Screenshot_2017-11-19-12-32-13-974_info.flowersoft.theotown.theotown.png

Code: Select all

"requirement": {
			"requirements": [{
				"type": "UPGRADE",
				"data": {
					"id": "dsahqup3"
				}
			}]
		},
@Lobby this is what I meant.
Perfect way to comment stuff out :)
🦀Now available as administrator🦀
Image

:pickle:

User avatar
Lobby
Developer
Reactions:
Posts: 3504
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta

Platform

Re: Building requirements

#17

Post by Lobby »

So what is it supposed to do? That an upgrade needs another upgrade first to be applied? That's not supported (yet).
=^._.^= ∫

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2898
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: Building requirements

#18

Post by JustAnyone »

I have building A with upgrade named 3.
To build building B, I require upgrade named 3.
Perfect way to comment stuff out :)
🦀Now available as administrator🦀
Image

:pickle:

User avatar
CommanderABab
AB
Reactions:
Posts: 8574
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Building requirements

#19

Post by CommanderABab »

You could currently have building A, if upgraded to 3, build an annex next door which would be building B, or a 1x1 building C (of which could be only 1) which building B would require.
888!888Currently using zeta 888. 888 What's that? :)
quantum road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2898
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: Building requirements

#20

Post by JustAnyone »

@Lobby new upgrade thing is broken for me (1.3.81)
Perfect way to comment stuff out :)
🦀Now available as administrator🦀
Image

:pickle:

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”