Advanced tags for building plugins

Learn here how to create and use plugins.

Moderator: Plugin Moderators

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

Platform

Plugin Creator

Re: Advanced tags for building plugins

#141

Post by CommanderABab » Fri Oct 11, 2019 22:24

Kulche wrote:
Fri Oct 11, 2019 19:55
I think it may need a privileged code.
Yes, it would!
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

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

MsgmSgmsG
Small-town resident
Reactions:
Posts: 39
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 » 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...
I'm comeback!!
(Never forget my password anymore..)

Sorry for bad Englishㅠㅠ :fire

User avatar
Kamikazi
Inhabitant of a Megacity
Reactions:
Posts: 267
Joined: Sat Jan 27, 2018 0:58
Location: Zaragoza, ESPAÑA
Plugins: Show
Version: Beta
Phone model: Huawei Nova 5 Plus
Contact:

Platform

Plugin Creator

Re: Advanced tags for building plugins

#143

Post by Kamikazi » Sun Feb 02, 2020 12:10

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:

I make plane liveries, if you have any requests for one, DM ME

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

Platform

Plugin Creator

Re: Advanced tags for building plugins

#144

Post by CommanderABab » Sun Feb 02, 2020 14:46

You ask Lobby to join the trusted plugin creators group
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

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

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

Platform

Plugin Creator

Re: Advanced tags for building plugins

#145

Post by CommanderABab » Sun Feb 02, 2020 14:51

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.
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

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

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

Platform

Plugin Creator

Re: Advanced tags for building plugins

#146

Post by CommanderABab » Thu Feb 06, 2020 2:50

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,
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

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

User avatar
Bevise
Villager
Reactions:
Posts: 12
Joined: Thu Feb 27, 2020 15:39
Location: Vietnam
Plugins: Show
Version: Beta
Phone model: Samsung

Plugin Creator

Platform

Re: Advanced tags for building plugins

#147

Post by Bevise » Sat Mar 28, 2020 9:46

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

User avatar
Bevise
Villager
Reactions:
Posts: 12
Joined: Thu Feb 27, 2020 15:39
Location: Vietnam
Plugins: Show
Version: Beta
Phone model: Samsung

Plugin Creator

Platform

Re: Advanced tags for building plugins

#148

Post by Bevise » Mon Mar 30, 2020 14:15

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

User avatar
Ølsken
Former Bearbear65
Reactions:
Posts: 5058
Joined: Fri Feb 10, 2017 14:53
Plugins: Show
Version: Beta
Phone model: Samsung S10

Platform

Plugin Creator

Re: Advanced tags for building plugins

#149

Post by Ølsken » Thu Apr 02, 2020 12:52

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
Ølsken
Former Bearbear65
Reactions:
Posts: 5058
Joined: Fri Feb 10, 2017 14:53
Plugins: Show
Version: Beta
Phone model: Samsung S10

Platform

Plugin Creator

Re: Advanced tags for building plugins

#150

Post by Ølsken » 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
	  	}]
	}]
ImageJust my opinion

User avatar
Bevise
Villager
Reactions:
Posts: 12
Joined: Thu Feb 27, 2020 15:39
Location: Vietnam
Plugins: Show
Version: Beta
Phone model: Samsung

Plugin Creator

Platform

Re: Advanced tags for building plugins

#151

Post by Bevise » 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...
	  	}]
	},
	//building A
	{
		"id":"buildingA",
	  	other stuff...
	  	"requirements":[
	  	{
	  		"type":"BUILDING",
	  		"id":"buildingB_upgrade" //can only upgrade when B is upgraded
	  	}]
	}]
It doesnt work... :bb
:bc You know, Bevise is not my real name, but ... who cares about that?

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

Platform

Plugin Creator

Re: Advanced tags for building plugins

#152

Post by CommanderABab » Thu Apr 02, 2020 20:13

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
}
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

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

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: MSN [Bot] and 1 guest