Advanced tags for building plugins

Learn here how to create and use plugins.

Moderator: Plugin Moderators

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

Plugin Creator

Platform

Re: Advanced tags for building plugins

#201

Post by CommanderABab »

Hidden Content
This board requires you to be registered and logged-in to view hidden content.
So the main thing is it uses "random fun" with checks for if it can be built at the random spot.

In the notification, note that it uses a very low probability of actually sending the notification.
Last edited by CommanderABab on 26 Apr 2022, 18:40, edited 1 time in total.

User avatar
Ryk_Mak_2050
Settler
Posts: 4
Joined: 25 Dec 2021, 18:57

Re: Advanced tags for building plugins

#202

Post by Ryk_Mak_2050 »

Can you provide the emergency vehicle code? I have the code to increase number of emergency vehicles but do not respond when I call an emergency.

User avatar
Thiên Ân
Villager
Posts: 16
Joined: 07 Jul 2022, 21:23

Re: Advanced tags for building plugins

#203

Post by Thiên Ân »

How does the animated tag work?

User avatar
Lobby
Developer
Posts: 3714
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: Advanced tags for building plugins

#204

Post by Lobby »

It's a legacy attribute to animate your buildings. For that, simply provide multiple frames to the "frames" attribute and then use "animated":true to let the game know that it should use these frames to animate the building. Nowadays I recommend to use separate animation objects instead that you can then reference to in the "animation" attribute.

User avatar
Mako1137
Inhabitant of a Megacity
Posts: 164
Joined: 05 Dec 2021, 22:31
Location: Sacramento, CA
Plugins: Showcase Store
Contact:

Platform

Re: Advanced tags for building plugins

#205

Post by Mako1137 »

What about waste disposal?

User avatar
Mako1137
Inhabitant of a Megacity
Posts: 164
Joined: 05 Dec 2021, 22:31
Location: Sacramento, CA
Plugins: Showcase Store
Contact:

Platform

Re: Advanced tags for building plugins

#206

Post by Mako1137 »

Hey @Example of @Lobby, what is the tag for waste disposal?

User avatar
Mako1137
Inhabitant of a Megacity
Posts: 164
Joined: 05 Dec 2021, 22:31
Location: Sacramento, CA
Plugins: Showcase Store
Contact:

Platform

Re: Advanced tags for building plugins

#207

Post by Mako1137 »

Question:

Does the "ordinal" tag have to start from 0?

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

Plugin Creator

Platform

Re: Advanced tags for building plugins

#208

Post by CommanderABab »

No, you can use negative(-1) to always be first. High number to always be last.

User avatar
burgernamn
Former aster dude
Posts: 176
Joined: 15 Apr 2022, 10:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

#209

Post by burgernamn »

are there no tags for rails?

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

Plugin Creator

Platform

Re: Advanced tags for building plugins

#210

Post by Bearbear76 »

aster dude wrote:
24 Nov 2022, 08:38
are there no tags for rails?
Do you mean?

Code: Select all

"flag train": true
EDIT: You can always look at how the game implements railways here.

User avatar
burgernamn
Former aster dude
Posts: 176
Joined: 15 Apr 2022, 10:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

#211

Post by burgernamn »

Bearbear76 wrote:
24 Nov 2022, 15:45
aster dude wrote:
24 Nov 2022, 08:38
are there no tags for rails?
Do you mean?

Code: Select all

"flag train": true
EDIT: You can always look at how the game implements railways here.
yeah, thx man

User avatar
HenryEdwardRud
Villager
Posts: 20
Joined: 20 Aug 2020, 15:38
Plugins: Showcase Store
Contact:

Re: Advanced tags for building plugins

#212

Post by HenryEdwardRud »

Sigitfajarn wrote:
05 Apr 2022, 05:04
anyone know tow to make the building does'nt need water and energy supply?
I think

"water": 0,
"power": 0
Last edited by HenryEdwardRud on 05 Jan 2023, 19:15, edited 3 times in total.

User avatar
HenryEdwardRud
Villager
Posts: 20
Joined: 20 Aug 2020, 15:38
Plugins: Showcase Store
Contact:

Re: Advanced tags for building plugins

#213

Post by HenryEdwardRud »

Pederont wrote:
26 Apr 2022, 14:31
Is there a way I can make a decoration spawn on map randomly on random location? Similar to spawn tag but evaluated every given time and only on empty tiles.

I'm thinking of a plugin like easter egg thing.
I found this example from lobby

[
{
"id":"$myspawntest00",
"type":"decoration",
"width":1,
"height":1,
"frames":[{"x":0,"y":0,"w":32,"h":16}],
"needs water":false,
"needs land":false,
"draw ground":true,
"spawn":
{
"p":0.01,
"height":-600,
"radius":600
}
}
]

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

Plugin Creator

Platform

Re: Advanced tags for building plugins

#214

Post by CommanderABab »

HenryEdwardRud wrote:
04 Jan 2023, 19:08
Sigitfajarn wrote:
05 Apr 2022, 05:04
anyone know tow to make the building does'nt need water and energy supply?
I think

"water": "-0"
"power": "-0"
This is best coded as

Code: Select all

"water": 0,  "power": 0,
as numbers don't need quotes in json and unneeded negative signs are discouraged.

User avatar
Alexander-Max
Settler
Posts: 5
Joined: 04 Feb 2023, 03:55

Plugin Creator

Platform

Re: Advanced tags for building plugins

#215

Post by Alexander-Max »

wow

User avatar
burgernamn
Former aster dude
Posts: 176
Joined: 15 Apr 2022, 10:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

#216

Post by burgernamn »

is there a list for the language tags?

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

Plugin Creator

Platform

Re: Advanced tags for building plugins

#217

Post by CommanderABab »

First poet of this topic.

User avatar
zaqxswcdevfr
Settler
Posts: 6
Joined: 23 Aug 2024, 12:08
Location: Southern Gaza
Plugins: Showcase Store

Re: Advanced tags for building plugins

#218

Post by zaqxswcdevfr »

Wie man die Mindeststädtische Bewertung zum Zeitpunkt des Baus festlegt

User avatar
birdn4t0r
Villager
Posts: 19
Joined: 02 Jan 2021, 08:40
Location: Seattle
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

#219

Post by birdn4t0r »

Lobby wrote:
23 Feb 2017, 00:20
(...)
Show
influence *
Possible keys are:
Show
(...)
"influence level0"
"influence level1"
"influence level2"
(...)
What are these influence keys for? Doesn't seem to be anything on them anywhere in the documentation that I can access.

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”