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: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Advanced tags for building plugins

Post by Lobby »

Welcome to the world of plugins!

Types are listed in the first post of this thread under type. For influences see here.
User avatar
FranchuFranchu
Inhabitant of a Country
Reactions:
Posts: 797
Joined: 27 May 2017, 22:07
Location: Freezing in Argentina
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by FranchuFranchu »

use

Code: Select all

"ordinal":0,
Did you know you can't blink while smiling :) ?
User avatar
Baby Racoon
Settler
Reactions:
Posts: 1
Joined: 24 Apr 2018, 13:29
Plugins: Showcase Store

Re: Advanced tags for building plugins

Post 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!
Geometry Dash Player ;)
Plugin Maker
FILIPINO! B)
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab »

Baby Racoon wrote: 29 Dec 2018, 14: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!
my avatar:
User avatar
FranchuFranchu
Inhabitant of a Country
Reactions:
Posts: 797
Joined: 27 May 2017, 22:07
Location: Freezing in Argentina
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post 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
You do not have the required permissions to view the files attached to this post.
Did you know you can't blink while smiling :) ?
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab »

my avatar:
User avatar
Madbro
Small-town resident
Reactions:
Posts: 37
Joined: 23 Jan 2019, 08:33
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by Madbro »

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
Madbro the Madman B)
From ideas :mine To artworks :img Then JSON :json And Plugin :plugin And finally.. bugs. :calc
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Advanced tags for building plugins

Post 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
  }
]
User avatar
THEMAX
Inhabitant of a Universe
Reactions:
Posts: 4313
Joined: 14 Sep 2017, 15:30
Location: Astrellia, UHAE
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post 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 .
Emperor of Atlantean federated empire
Image
Founder state of Internationxal council
Leader of AEOY and steel pact
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab »

From the small pump code:

Code: Select all

...,
    "needs water":true,
    "needs land":true,
    ...
my avatar:
User avatar
THEMAX
Inhabitant of a Universe
Reactions:
Posts: 4313
Joined: 14 Sep 2017, 15:30
Location: Astrellia, UHAE
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post 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 .
Emperor of Atlantean federated empire
Image
Founder state of Internationxal council
Leader of AEOY and steel pact
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3666
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by JustAnyone »

You could try spawning random cars with lua.
:pickle:
User avatar
Brody Craft
Inhabitant of a Infinity
Reactions:
Posts: 8034
Joined: 24 Jan 2017, 09:15
Location: SE Asia
Plugins: Showcase Store
Version: Beta

Platform

Re: Advanced tags for building plugins

Post by Brody Craft »

TheoTown feels like coding on roblox now.
When you get to be called a Board Index because you are too good.>:3
User avatar
Imran M
Inhabitant of a Country
Reactions:
Posts: 834
Joined: 24 Oct 2018, 11:41
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by Imran M »

Brody Craft wrote: 10 Feb 2019, 10: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!
I just love the DOPE-amine you get after completing a plugin!
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3666
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by JustAnyone »

Lua is easy like 5th grade math.
:pickle:
User avatar
Brody Craft
Inhabitant of a Infinity
Reactions:
Posts: 8034
Joined: 24 Jan 2017, 09:15
Location: SE Asia
Plugins: Showcase Store
Version: Beta

Platform

Re: Advanced tags for building plugins

Post by Brody Craft »

JustAnyone wrote: 10 Feb 2019, 16:51 Lua is easy like 5th grade math.
Well, you already mastered lua, sooo....
When you get to be called a Board Index because you are too good.>:3
User avatar
FranchuFranchu
Inhabitant of a Country
Reactions:
Posts: 797
Joined: 27 May 2017, 22:07
Location: Freezing in Argentina
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by FranchuFranchu »

Lua is 5th grade math compared to C, Assembly and other low level languages
Did you know you can't blink while smiling :) ?
User avatar
Imran M
Inhabitant of a Country
Reactions:
Posts: 834
Joined: 24 Oct 2018, 11:41
Plugins: Showcase Store

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by Imran M »

FranchuFranchu wrote: 15 Feb 2019, 19:44 Lua is 5th grade math compared to C, Assembly and other low level languages
I think it's because I haven't had enough time to experiment with lua, since I was busy with school and term tests. I'd like to dedicate more time to lua over the holiday right now. BUT, Fortnite is giving season 8 battle pass as a reward to people who complete 13 challenges, and I really want to have a skin for once...

(That was a long post that has little relevance what so ever)
I just love the DOPE-amine you get after completing a plugin!
L
Lemme Go
Townsman
Reactions:
Posts: 74
Joined: 06 Sep 2017, 11:51
Plugins: Showcase Store

Platform

Re: Advanced tags for building plugins

Post by Lemme Go »

I have an inspiration to make a zone that a bit similar with "Primitive Zone" plugin, but I try to make it with modern building. The purpose is to make the game looks more real with various RCI building in a zone rather than to build the same type building in a zone.

So, rather than I create the new buildings, I choose to create a code spawn some buildings from the game itself. Is it legal if I use in-game building ? What code should I use ?
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Advanced tags for building plugins

Post by CommanderABab »

Can be done, but it's complicated and the code is long.
my avatar:
Previous topicNext topic