Advanced tags for building plugins

Learn here how to create and use plugins.

Moderator: Plugin Moderators

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

Platform

Plugin Creator

Re: Advanced tags for building plugins

#141

Post by CommanderABab »

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

MsgmSgmsG
Small-town resident
Reactions:
Posts: 41
Joined: Sun Aug 05, 2018 6:06
Location: Planet Earth
Plugins: Show
Version: Beta

Platform

Plugin Creator

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...
I'm comeback!!
(Never forget my password anymore..)

Sorry for bad Englishㅠㅠ :fire

User avatar
Kamikazi
Inhabitant of a Megacity
Reactions:
Posts: 326
Joined: Sat Jan 27, 2018 0:58
Location: Zaragoza, ESPAÑA
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

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?
🇪🇸Soy un spanish🇪🇸
...¡ARRIBA VIVA ESPAÑA!
:space✈️Aviation enthusiast✈️ :space
:76: A proud TT76 Tester :76:

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

Platform

Plugin Creator

Re: Advanced tags for building plugins

#144

Post by CommanderABab »

You ask Lobby to join the trusted plugin creators group
Image

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

Platform

Plugin Creator

Re: Advanced tags for building plugins

#145

Post by CommanderABab »

MsgmSgmsG wrote:
Mon Dec 09, 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.
Image

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

Platform

Plugin Creator

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,
Image

User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 214
Joined: Thu Feb 27, 2020 15:39
Location: Pearl Island, Vietnam
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#147

Post by Bevise »

What is privileged code in Theotown ???
You know, Bevise is not my real name, but .. who cares about that?

User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 214
Joined: Thu Feb 27, 2020 15:39
Location: Pearl Island, Vietnam
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#148

Post by Bevise »

Lobby wrote:
Mon Jan 28, 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. :?
You know, Bevise is not my real name, but .. who cares about that?

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5296
Joined: Fri Feb 10, 2017 14:53
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Advanced tags for building plugins

#149

Post by Bearbear76 »

Bevise wrote:
Sat Mar 28, 2020 9: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. :)
ImageJust my opinion

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5296
Joined: Fri Feb 10, 2017 14:53
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Advanced tags for building plugins

#150

Post by Bearbear76 »

Bevise wrote:
Mon Mar 30, 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
	  	}]
	}]
ImageJust my opinion

User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 214
Joined: Thu Feb 27, 2020 15:39
Location: Pearl Island, Vietnam
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#151

Post by Bevise »

Ølsken wrote:
Thu Apr 02, 2020 13:02
Bevise wrote:
Mon Mar 30, 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
You know, Bevise is not my real name, but .. who cares about that?

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

Platform

Plugin Creator

Re: Advanced tags for building plugins

#152

Post by CommanderABab »

Bevise wrote:
Thu Apr 02, 2020 15:10
Ølsken wrote:
Thu Apr 02, 2020 13:02
Bevise wrote:
Mon Mar 30, 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
}
Image

User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 214
Joined: Thu Feb 27, 2020 15:39
Location: Pearl Island, Vietnam
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#153

Post by Bevise »

So, building A and B must be in the same file??
You know, Bevise is not my real name, but .. who cares about that?

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

Platform

Plugin Creator

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
Image

User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 214
Joined: Thu Feb 27, 2020 15:39
Location: Pearl Island, Vietnam
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#155

Post by Bevise »

CommanderABab wrote:
Fri Apr 03, 2020 3: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.
You know, Bevise is not my real name, but .. who cares about that?

MarioBitMap
Villager
Reactions:
Posts: 16
Joined: Fri Jul 31, 2020 22:54
Location: Spain
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

#156

Post by MarioBitMap »

CommanderABab wrote:
Sun Feb 02, 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!

Code: Select all    Reset

[ { "id":"MarioBitMap", "category":"Plugin_Creator", "skills":[{"skill":"Pixel_Artist"},{"skill":"Learning_C++_&_TTJson/Lua"}] } ]
JSON checker
Check

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

Platform

Plugin Creator

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

User avatar
TheoKier[YT]
Villager
Reactions:
Posts: 11
Joined: Fri Sep 11, 2020 4: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 :)

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”