Page 6 of 8

Re: Advanced tags for building plugins

Posted: Wed Jun 27, 2018 18:14
by Lobby
Welcome to the world of plugins!

Types are listed in the first post of this thread under type. For influences see here.

Re: Advanced tags for building plugins

Posted: Thu Jun 28, 2018 0:25
by FranchuFranchu
use

Code: Select all

"ordinal":0,

Re: Advanced tags for building plugins

Posted: Sat Dec 29, 2018 16:04
by Baby Racoon
I am Sorry But... I don't understand what does "h","w","x"or"y" mean.
I know it's Height,Width,etc
But it is needed to count pixels in width or height?
Example:
34 pixels in Height
And 30 pixels in width so the values are
"h":34,
"w":30
Is this right??
Please help me :)
Also in handle x and y
Give me some illustration.. Please for the sake of my Future:/
*I DO NOT FORCE YOU TO THIS*
Thanks!

Re: Advanced tags for building plugins

Posted: Sat Dec 29, 2018 17:08
by CommanderABab
Baby Racoon wrote:
Sat Dec 29, 2018 16:04
I am Sorry But... I don't understand what does "h","w","x"or"y" mean.
I know it's Height,Width,etc
But it is needed to count pixels in width or height?
No

Example:
34 pixels in Height
And 30 pixels in width so the values are
"h":34,
"w":30
Is this right?? Yes, but the "w" should be a multiple of 32 for most simple frame statements.

Please help me :)
Also in handle x and y x tracks to w, y tracks to h.
Using 4, a positive handle y would move where the image is drawn down 4 pixels, positive x would move it right 4 pixels.


Give me some illustration.. Please for the sake of my Future:/
*I DO NOT FORCE YOU TO THIS*
Thanks!

Re: Advanced tags for building plugins

Posted: Sun Dec 30, 2018 17:57
by FranchuFranchu
If you want to use the part of the image inside the black square:

Code: Select all

"bmp":"example.png",
"w":130,
"h":86,
"x":114,
"y":164

Re: Advanced tags for building plugins

Posted: Tue Jan 01, 2019 0:50
by CommanderABab

Re: Advanced tags for building plugins

Posted: Sun Jan 27, 2019 3:56
by Madbro
Hello! I want to ask about how to get “monthly income” and “unlock requirements” feature into the plugin.

Re: Advanced tags for building plugins

Posted: Sun Jan 27, 2019 8:51
by Kulche
Check "Privileged Plugins" section to get some info about monthly income.

Re: Advanced tags for building plugins

Posted: Sun Jan 27, 2019 13:46
by CommanderABab
Kulche wrote:
Sun Jan 27, 2019 8:51
Check "Privileged Plugins" section to get some info about monthly income.
Which is a forum not available to everybody... :/

Re: Advanced tags for building plugins

Posted: Sun Jan 27, 2019 15:12
by Kulche
Really? :bb

Re: Advanced tags for building plugins

Posted: Sun Jan 27, 2019 16:47
by sairam
Yes!

Re: Advanced tags for building plugins

Posted: Sun Jan 27, 2019 18:36
by Lobby
For income you can just use :json

Code: Select all

"monthly price":-1
Right now you can't produce more income than that to prevent cheating. You may ask for it after you have a plugin that could make use of it.

Please elaborate what you mean by "unlock requirements” feature.

Re: Advanced tags for building plugins

Posted: Mon Jan 28, 2019 10:50
by Madbro
Lobby wrote:
Sun Jan 27, 2019 18:36
For income you can just use :json

Code: Select all

"monthly price":-1
Right now you can't produce more income than that to prevent cheating. You may ask for it after you have a plugin that could make use of it.

Please elaborate what you mean by "unlock requirements” feature.
There’s buildings that requires level, population or a specific building to unlock, here I want to ask how to do this in plugin :teach

Re: Advanced tags for building plugins

Posted: Mon Jan 28, 2019 13:06
by Lobby
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
  }
]

Re: Advanced tags for building plugins

Posted: Tue Feb 05, 2019 1:22
by THEMAX
How can I make a building need to be placed on both water and land as the small pump building ? It’s for my nuclear plugin package for the pump .

Re: Advanced tags for building plugins

Posted: Tue Feb 05, 2019 1:29
by CommanderABab
From the small pump code:

Code: Select all

...,
    "needs water":true,
    "needs land":true,
    ...

Re: Advanced tags for building plugins

Posted: Sun Feb 10, 2019 11:49
by THEMAX
Can the random frame be used for a vehicle and if it can , how can I make it work ?
I would be interested for that so vehicles color variations spawn randomly .

Re: Advanced tags for building plugins

Posted: Sun Feb 10, 2019 11:53
by AnyBear65
You could try spawning random cars with lua.

Re: Advanced tags for building plugins

Posted: Sun Feb 10, 2019 12:30
by Brody Craft
TheoTown feels like coding on roblox now.

Re: Advanced tags for building plugins

Posted: Sun Feb 10, 2019 14:22
by Imran M
Brody Craft wrote:
Sun Feb 10, 2019 12:30
TheoTown feels like coding on roblox now.
Yep, especially the lua. I dipped a toe into lua because of a cousin. We didn't even get past print since it took too long!