Building requirements

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Wepf
Inhabitant of a Megacity
Reactions:
Posts: 285
Joined: 14 Oct 2021, 10:19
Location: Your lucid dream
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re:

#61

Post by Wepf »

Lobby wrote: 13 Mar 2017, 21: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
User avatar
CommanderABab
AB
Reactions:
Posts: 11080
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Re:

#62

Post by CommanderABab »

Wepf wrote: 17 Nov 2021, 05:25
Lobby wrote: 13 Mar 2017, 21: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
User avatar
Wepf
Inhabitant of a Megacity
Reactions:
Posts: 285
Joined: 14 Oct 2021, 10:19
Location: Your lucid dream
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Re:

#63

Post by Wepf »

CommanderABab wrote: 17 Nov 2021, 20:01
Wepf wrote: 17 Nov 2021, 05: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, 15:20, edited 1 time in total.
Reason: Clean up the quote
User avatar
Wepf
Inhabitant of a Megacity
Reactions:
Posts: 285
Joined: 14 Oct 2021, 10:19
Location: Your lucid dream
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Building requirements

#64

Post by Wepf »

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
User avatar
CommanderABab
AB
Reactions:
Posts: 11080
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Building requirements

#65

Post by CommanderABab »

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
					}

				]
			}
		]
		
}]
User avatar
Yakka
Inhabitant of a Conurbation
Reactions:
Posts: 413
Joined: 06 Jan 2020, 09:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Building requirements

#66

Post by Yakka »

Is there a way to hide the requirements text?
Like i want building A upgraded to building B (as shown up here) and building C requires building A while building D requires building B and i don't want building C upgrade requirements text shows up.
User avatar
JustAnyone
Developer
Reactions:
Posts: 3470
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Building requirements

#67

Post by JustAnyone »

You can use "hide if fulfilled" in a requirement condition
User avatar
Yakka
Inhabitant of a Conurbation
Reactions:
Posts: 413
Joined: 06 Jan 2020, 09:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Building requirements

#68

Post by Yakka »

JustAnyone wrote: 19 Dec 2021, 17:38 You can use "hide if fulfilled" in a requirement condition
Can you provide some examples :json
User avatar
Yakka
Inhabitant of a Conurbation
Reactions:
Posts: 413
Joined: 06 Jan 2020, 09:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Building requirements

#69

Post by Yakka »

Is there a way to make building A that require Upgrade B or C
User avatar
JustAnyone
Developer
Reactions:
Posts: 3470
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Building requirements

#70

Post by JustAnyone »

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)
User avatar
Yakka
Inhabitant of a Conurbation
Reactions:
Posts: 413
Joined: 06 Jan 2020, 09:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Building requirements

#71

Post by Yakka »

Can i make a requirement for city size?

I made something oversized for small map

(Size 1,2,4 in console language.)
User avatar
FVI
Inhabitant of a Planet
Reactions:
Posts: 1449
Joined: 22 Feb 2022, 18:00
Location: That island above France
Plugins: Showcase Store
Version: Beta

Platform

Re: Building requirements

#72

Post by FVI »

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?
User avatar
Patchouli Knowledge
Townsman
Reactions:
Posts: 62
Joined: 26 Sep 2020, 09:42

Re: Building requirements

#73

Post by Patchouli Knowledge »

how to understand "count"
User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: Building requirements

#74

Post by Bearbear76 »

Patchouli Knowledge wrote: 24 Sep 2022, 13:24 how to understand "count"
Lobby wrote: 13 Mar 2017, 21: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).
User avatar
burgernamn
Former aster dude
Reactions:
Posts: 172
Joined: 15 Apr 2022, 10:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Building requirements

#75

Post by burgernamn »

are there more types or are they hidden
Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”