Advanced tags for building plugins

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#141

Post by CommanderABab »

Kulche wrote:
11 Oct 2019, 19:55
I think it may need a privileged code.
Yes, it would!

User avatar
MsgmSgmsG
Small-town resident
Reactions:
Posts: 41
Joined: 05 Aug 2018, 06:06
Location: Planet Earth
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#142

Post by MsgmSgmsG »

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...

User avatar
Kamikazi
Inhabitant of a Conurbation
Reactions:
Posts: 471
Joined: 27 Jan 2018, 00:58
Location: ESPAÑA
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Advanced tags for building plugins

#143

Post by Kamikazi »

How do you get access to the privilege code for waste and corpse disposal thing for plugins?

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#144

Post by CommanderABab »

You ask Lobby to join the trusted plugin creators group

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#145

Post by CommanderABab »

MsgmSgmsG wrote:
09 Dec 2019, 15: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.

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#146

Post by CommanderABab »

I've seen some people use

Code: Select all

"once":true,
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

Code: Select all

"max count":1,

User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 502
Joined: 27 Feb 2020, 15:39
Location: Phu Quoc Island, Vietnam
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Advanced tags for building plugins

#147

Post by Bevise »

What is privileged code in Theotown ???

User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 502
Joined: 27 Feb 2020, 15:39
Location: Phu Quoc Island, Vietnam
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Advanced tags for building plugins

#148

Post by Bevise »

Lobby wrote:
28 Jan 2019, 13: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. :?

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

Plugin Creator

Platform

Re: Advanced tags for building plugins

#149

Post by Bearbear76 »

Bevise wrote:
28 Mar 2020, 09:46
What is privileged code in Theotown ???
If you are a trusted plugin creator you get a privileged code, basically allows you to do stuff normal creators cannot. :)

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

Plugin Creator

Platform

Re: Advanced tags for building plugins

#150

Post by Bearbear76 »

Bevise wrote:
30 Mar 2020, 14: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
	  	}]
	}]

User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 502
Joined: 27 Feb 2020, 15:39
Location: Phu Quoc Island, Vietnam
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Advanced tags for building plugins

#151

Post by Bevise »

Ølsken wrote:
02 Apr 2020, 13:02
Bevise wrote:
30 Mar 2020, 14: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... :bb

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#152

Post by CommanderABab »

Bevise wrote:
02 Apr 2020, 15:10
Ølsken wrote:
02 Apr 2020, 13:02
Bevise wrote:
30 Mar 2020, 14: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... :bb

Code: Select all

{  "id":"upgradedbuildingB",
    "hidden":true,
   //everything else same as buildingB except no upgrade statement
}

User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 502
Joined: 27 Feb 2020, 15:39
Location: Phu Quoc Island, Vietnam
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Advanced tags for building plugins

#153

Post by Bevise »

So, building A and B must be in the same file??

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#154

Post by CommanderABab »

buildingB and upgradebuildingB would need to be in the same file.
buildingA could be in a separate file as long as it was loaded after buildingB

User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 502
Joined: 27 Feb 2020, 15:39
Location: Phu Quoc Island, Vietnam
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Advanced tags for building plugins

#155

Post by Bevise »

CommanderABab wrote:
03 Apr 2020, 03:13
buildingB and upgradebuildingB would need to be in the same file.
buildingA could be in a separate file as long as it was loaded after buildingB
Why did my B building disappear after I upgrade it? Building A said that id was not found. Can you make an example file? I will download it and refer.

User avatar
MarioBitMap
Villager
Reactions:
Posts: 16
Joined: 31 Jul 2020, 22:54
Location: Spain
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#156

Post by MarioBitMap »

CommanderABab wrote:
02 Feb 2020, 14:46
You ask Lobby to join the trusted plugin creators group
And, are there any requirements for it? Where is the group managed? Maybe discord, or forum? :bt
Thanks in advance!

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#157

Post by CommanderABab »

Hidden Content
This board requires you to be registered and logged-in to view hidden content.

User avatar
TheoKier[YT]
Villager
Reactions:
Posts: 18
Joined: 11 Sep 2020, 04:58

Re: Advanced tags for building plugins

#158

Post by TheoKier[YT] »

Hi i know it might sound off topic but is there a sample json for waste disposal i would love to create one :)

User avatar
1Code
Inhabitant of a Megacity
Reactions:
Posts: 302
Joined: 30 Jan 2020, 16:56
Location: https://bit.ly/3P5dhnT
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

#159

Post by 1Code »

Add "budget item", "privileged", and some missing attributes to...
<..>

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Advanced tags for building plugins

#160

Post by KINGTUT10101 »

Are there any tags that remove this price indicator?
image.png

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”