Advanced tags for building plugins

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3756
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Advanced tags for building plugins

Post by Lobby » 26 Sep 2017, 12:12

I would create it as commercial building as casinos are commercials in real world, too. About income, that's currently not supported for plugin buildings.
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3664
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by JustAnyone » 25 Oct 2017, 19:15

So how does
p, height and radius works?
:pickle:
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3664
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by JustAnyone » 25 Oct 2017, 19:33

former member wrote: 25 Oct 2017, 19:31 P is probability
The lower, the rarer the building will spawn.
Height is how far from the coastline. You can see exactly on Lobby's picture.
Radius just is the max difference from height where building can spawn.
So if I want my building to always spawn on ground, what should I have written as radius and height.
:pickle:
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab » 25 Oct 2017, 19:38

Height 600, radius 500 ?
my avatar:
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3664
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by JustAnyone » 25 Oct 2017, 19:38

CommanderABab wrote: 25 Oct 2017, 19:38 Height 600, radius 500 ?
Gonna try this on 5 new maps.
:pickle:
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3664
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by JustAnyone » 25 Oct 2017, 19:45

OK. It spawns, but every time on the edge of the map.
:pickle:
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab » 25 Oct 2017, 19:47

If you use the same map every time, they will probably always occur in the same area. If you have a max count on the buildings, they will probably only occur at the southern end of the map unless the probability is extremely small.
my avatar:
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3664
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by JustAnyone » 25 Oct 2017, 19:48

CommanderABab wrote: 25 Oct 2017, 19:47 If you use the same map every time, they will probably always occur in the same area. If you have a max count on the buildings, they will probably only occur at the southern end of the map unless the probability is extremely small.
To fix it if I have max count, decrease probability by a lot, right?
:pickle:
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab » 25 Oct 2017, 19:56

Yes, or use a higher height and a small radius.
my avatar:
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3756
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Advanced tags for building plugins

Post by Lobby » 25 Oct 2017, 20:27

As your buildings won't be built on water (unless you explicitly allow them to be built there) you may use something like radius:1000, height:100.
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3664
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by JustAnyone » 12 Nov 2017, 10:03

Lobby wrote: 23 Jun 2017, 21:59 Added attribute sound click to provide a sound file (from within your plugin's directory) which will be played when user taps on your building.

Example:

Code: Select all

"sound click":{"file":"sound.ogg"}
A variety of audio formats is supported, see this listing for more information.
On what does sound play time depend?
:pickle:
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3664
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by JustAnyone » 12 Nov 2017, 11:53

Also a suggestion:

Code: Select all

"require IAP":true,
"IAP":"lobianajones"
:pickle:
cesareborgia94
Reactions:

Re: Advanced tags for building plugins

Post by cesareborgia94 » 18 Nov 2017, 14:47

What are the tags for building farmfields?
I tried making a new farmfield plugin but it always builds at roads despite setting the "needs roads: false".
User avatar
TheCrazyRobloxian
Villager
Reactions:
Posts: 19
Joined: 13 Nov 2017, 20:21

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by TheCrazyRobloxian » 20 Nov 2017, 21:00

hey, can someone give an example of how to use the rotation aware option?
Take care.
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3664
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by JustAnyone » 30 Nov 2017, 21:56

Crazy question #1:
Is there a possibility for one building created via plugin to have swat, police, fireman and healthcare emergency response?
Also I would like the ids for swat, police, fire truck and ambulance car.
:pickle:
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab » 30 Nov 2017, 22:01

No
my avatar:
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab » 30 Nov 2017, 22:04

JustAnyone wrote: 30 Nov 2017, 21:56 Crazy question #1:
Is there a possibility for one building created via plugin to have swat, police, fireman and healthcare emergency response? No.
Also I would like the ids for swat, police, fire truck and ambulance car.
Interesting statement!
my avatar:
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3756
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Advanced tags for building plugins

Post by Lobby » 30 Nov 2017, 22:37

It's not possible as the responsibility of a building is determined by it's type and a building cannot have multiple types at the same time.

For car ids, have a look at the listing in 3 in the Cars documentation.
BruceWillis24
Villager
Reactions:
Posts: 21
Joined: 08 Aug 2015, 22:42
Location: USA
Plugins: Showcase Store
Version: Beta

Platform

Re: Advanced tags for building plugins

Post by BruceWillis24 » 14 Dec 2017, 02:13

This might just be a dumb question, but can you create a building with say level 1 AND 2 so it keeps spawning throughout both levels?
BruceWillis24
Villager
Reactions:
Posts: 21
Joined: 08 Aug 2015, 22:42
Location: USA
Plugins: Showcase Store
Version: Beta

Platform

Re: Advanced tags for building plugins

Post by BruceWillis24 » 19 Dec 2017, 02:26

Thanks Koala

My next question for you guys:

What does the "Usage" attribute inside of a json do?

Say: "Usage:100"
Previous topicNext topic