#plugin-support
1 messages · Page 26 of 1
Check your plugin store downloads and your plugin folder
I only use the plugin folder
Remeber to delete the .zip file if you have it in the plugin file with and unziped files
I directly use zip files
Can you send the zip?
Just a minute
I have a few plugins with "roaddeco" in their names but all them are different
Btw the problem is caused by$anim_roaddeco_sample40_00
The problem it's that I don't know what file contains the repeated name. There are a lot of "roaddeco_xxxxx"
Just send them all
I'll take a look when I can
No hurry
i see the problem
the Gelbe Line and Yellow line are the same thing
just in a different language
Lol
just delete other of the two and it should be fixed
In lrt category
Ok I haven’t had any luck finding it there but I’ll try again
Did u download it from store?
I have another post in forum
U need to delete that
This was a old version
Ok. Where do I find the new version?
@flat sonnet I checked the forum and found nothing
Lrt in in store r the latest version
Ok.
@flat sonnet thank you I just got it
Where can I find this table of keys? Or do I need to make that myself?
I want to add a hotkey to a button
The table exists but it is not documented
Not all of them
I've been trying to figure out what tilde key is called
or if it's even in the table
Debug.toast(Runtime.toJson(Keys))
thx
Hi
Regardless of what I try the game keeps throwing out this error
java.lang.IllegalStateException: When loading "$diag.black01": May not find draft parts to steal frames from
I can't seem to get the game find anything to draft from
Are you sure that plugin is loaded before yours?
Well how do I ensure that certain plugin loads first?
slaps 00000 in front of folder name
Will that actually work?
Noted
Can't you just slap ordinal tag in it
ordinal is for categories
Yo can I make a road plugin run of 1 frame and not 16?
use that frame 16 times
"frames":[{"steal":"Rail_Parts","frame":1}]
So would I copy this 16 times?
yes
Pjsk py
imagineArray = []
for i in range(16):
imagineArray.append({'steal': 'rail_parts', 'frame": 1})
imagineArray
Traceback (most recent call last):
File "<string>", line 3
imagineArray.append({'steal': 'rail_parts', 'frame": 1})
^
SyntaxError: EOL while scanning string literal
Pjsk py
imagineArray = []
for i in range(16):
imagineArray.append({'steal': 'rail_parts', 'frame': 1})
imagineArray
[{'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}]
something like that
thank you
shh
Specified command can only be used by the bot owner
Ow
only python scripts
$ java -version
[stderr] java version "1.8.0_231"
[stderr] Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
[stderr] Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
[status] Return code 0
Page 1/1
I can run everything
:D
Does anyone know how to make a button in a dialog execute lua and close the dialog at the same time? When I do onClick = dialog.close it won't let me add lua
When I press the reset button, I want to close the dialog and move the camera view
Unfortunately, I couldn't find anything like this in the examples
dialog.close()
Thank you
I'm surprised that wasn't used anywhere in the examples
I've only been able to find dialog.close
if you have time to read, just read my open source code, you will find many functions you need. https://github.com/dist-ian/AnimationDevTool
this another examples from devtools by Lobby. closeDialog() is same as dialog.close().
Alternatively in the onclick you can do ```
onclick = function (self)
self.close()
end
This is what I've used in the textplacer
Also note that this stops the rest of the function from executing
For some reason my game seems to crash when i start it, yet there hasn't been any update lately and my plugin space is mostly clear.
hmmmm

I didn't even know you released your code. Thanks for the help
yw
Some times this bug appears
I cannot scroll down the tab
It stuck why?
I need to quit and back again
I cannot scroll
#bugs-n-crashes it's from the game, sorry
@hollow flax pls make forum tutorial for the movable GUI button🥺

Epic
If it depends on each other, you can't
Dang it
Can you name the plugin please
these are mdk's sunken highway walls
Aka SHW
WHATS THE difference between bike lane pack 1 and 2
Ok so..
I made 60 variants of them
But i the limit is 42
So i ended up splitting 30 30
¯\_(ツ)_/¯
I think im gonna make a bike lane pack 3 lol, (maybe)
what limit?
Or 16 16
i use https://pca.theotown.com to make plugin JSON code i made the plugin by using this, and it only can have 42 variants in them and i have 60
An easier way to create plugins via friendly UI interface.
So i ended up splitting them
30 30
Is that byte?
Pjsk py 1024 * 1024 * 7
7340032
7 megabytes
What is the limitations of pt space
depends on your device vram
Why 14x14 size of light animation
Turn off when i fully zoom the game?
I also have a plugin like that, but it doesn't matter
Rendering limit to avoid huge lag
Can we detect when a city is in winter mode?
there should be a virtual variable for that
1 tile road is divide by 4 sections, 1 tile road need 4 dirs numbers (idk what it's called). dirs number from 1,2,4,8. you can sum the dirs number to make one section have two directions. e.g 3 is sum of 1 and 2, so if the car in that section, the car able to move to east and north.
yes
[
{
//...
"dirs" : [
1,1,1,1, // frame 0
1,1,1,1, // frame 1
1,1,1,1, // frame 2
... // frame 3 - 15
]
},
// same as
{
//..
"dirs": [
1,1,1,1,1,1,1,1,1,1,1,1,1,...
]
}
]```
Teach me how to plugin im idiot
Thankyou very much
Whats the color hex for sand
check world texture
this one contains the sand textures
What is this? A bus for titans?
Why
You can change the number
bruh, your codes leaked
Just chamge the number to a number you want
It is a pity there are no norms for the train mods, the path to change, semaphores, etc.
Can i make plugins on Mobile
Yes u can
How?
Read the pins on #plugin-discussion
Ok thanks
Guys
I need help
I have tried to include multiple images in a single element
however when I open the plugin in the game, only the last frame appears
You're putting them into a single object
Separate them into different objects
[{one image}, {second image}] instead of [{one image, second image}]
You could make the sand transparent
And use "draw ground":true to draw the sand textures below
Thank you
However, I'm not sure about making the sand transparent
I would like it to look like a beach
Ah, I see
I think maybe yes
i need help to upload my plugins, when i click to upload and put my profile name and my password says the name will be more but i already managed to log into the game, what should i do
says being inactive
the color used to draw the shadows is black with 10% transparency?
It depends which one looks good
i usually do 27-33%
Thank you
What shadows?
This is a very late reply lol
Those roof details
I just select black color, and then make transparency to around 10 and then start making texture on the roof
What's the function again determining if Ui is hidden or not?
GUI:isVisible(), returns bool, module GUI as stated in the api
I need help right now im stuck with these i used "script:earlyTap()" to a certain building to open dialog box when it's tapped and used a statement :
if not Script.EVENT_TOOL_ENTER then
If Tile.getBuildingDraft():getId == "x" then
Dialogbox()
end
end
I want to disable that tap sensitive when i enter any tool, 'cause the dialog always appears when i used remove tool and clicked its own tile

Why does Script.EVENT_(TYPES) doesn't work outside event script
@hollow flax it now can be clicked by remove tool but the dialogbox still poped-up
use script:click
I can't use that because the main script is not attached to any building draft it's seperated
that's why Tile.getBuildingDraft exists
Not work
code?
function script:click(x,y,level)
local get = Tile.getBuildingDraft(x,y):getId()
local cv = Tile.isBuildingInConstruction(x,y)
if Tile.isBuilding(x,y) then
opener(x,y,get,cv)
return false
end
end
Dunno why
function script:click(x,y,level)
local get = Tile.getBuildingDraft(x,y):getId()
local cv = Tile.isBuildingInConstruction(x,y)
if get == 'theidofthebuilding' and cv then
opener(x,y,get,cv) -- idk the parameters.
return false
end
end
I did lately these but nothings work
Here's the full :
local function opener(get,cv)
if not cv then
if get == "$aosMarket09765"then
showDialog()
return false
elseif get == "$aoswarehouse7" then
WarePanel()
return false
elseif get == "$Aostownhall01" then
GovDialog()
return false
elseif get == "$AosSmugDocked" then
pickTrade(index)
end
for i = 1, #max do
if get == merchlist[i] then
Scale = max[i]
MerchantShip()
end
end
return false
end
end
function script:click(x,y,level)
local get = Tile.getBuildingDraft(x,y):getId()
local cv = Tile.isBuildingInConstruction(x,y)
if Tile.isBuilding(x,y) then
opener(get,cv)
return false
end
end
so the building is still in construction?
Nope
I do use "if not cv then" To avoid opening of the dialog box while in construction
if with the earlyTap works, just prevent with
if not GUI.get'cmdCloseTool':isVisible() then
local get = ...
local cv = ...
opener(get,cv
end
use isBuildingWorking
Whats the function of :isVisible() ? I mean how does it work
GUI.get'cmdCloseTool':isVisible() Nice hack thanks
if you can see the button, it's return true
I get it now imma just confused at the first place lol
Hello
How can I use this?
As for my sand castles, I am going to make a variant with beach sand and another variant with normal sand
But, sand?
what?
I don't want him to draw grass
"draw ground" makes the base of the building transparent
so you can add any ground under it
no problem
@eternal lake does building "$bank00" Already had night anim?
Im working with it right now and thinking about its functionality by the used of lua, so if it already has night anim can you send me its array if you dont mind 🥺
No clue, I'll take a look later
Id is "$bank00" From the com json thanks in advance
Is there a way i can move a png into a zip?
Ah, ty
np
Wait.. how do i unzip it?
I use RAR on android
On PC I use an app call 7zip
You're welcome
(Hopefully i dont screw things up)
(Nah that's pretty hard to do)
Hello just want to ask if "setVisible" Will work if i attach it to a function that has gui insides e.g lua showDialog():setVisible(false) i tried this but nothings work i just want to clarify if it just a bug in my version
Is there a was i can open this using Json genie
only set the gui objects (e.g. local dialog = GUI.createDialog{...} dialog:setVisible(false))
perhaps
If a gui object is the return value of the function that should work
You need to call it first
Can you check #bugs-n-crashes for a major game ruining bug involving diamonds I reported please?
whats the plugin that installs a day and night cycle?
It's not a plugin
oh
It comes from the game
how do I get it?
settings
np
when I click on settings it doesnt take me anywhere
hm?
no buttons under the other section work
the game folder?
what do you mean they "don't work"?
like I click the button and nothing happens
the check/cross?
try restaring
np
if I turn on winter is it like that forever
no
You can set seasons to automatic to get winter graphics in winter time
It is based on irl date though
my bad
no problem
Function for spend diamonds anyone know? I need it
TheoTown.spendDismonds(30)```
Thanks
Guys
What if the game developers want to add a plugin idea to the original game?
this happened a few times
What if TheoTown lua version was 5.3 or 5.4?
I used this plugin yesterday, it's good, but today it's gone, it's not showing up in my game
It was just there on my end a few minutes ago
Try using the steam version of the game on PC, if you have one
plugin requires 1.9.68 or later
rollout are slower than steam
rollouts are based on time and country or state or province
because it's for users below version 1930 or something
1.8.74*
whats a console command
Open it from experimental settings
where would that be
Settings
The command that you need to run is already stated on its description
yup
Maybe he made it on porpuse
This blinks this every second
I wonder what happend to that building
I still need to investigate why that happens. for me, it just fixed itself after I kept install/uninstall other plugins
Its this i Just installed it and started blinking in the town when i placed it that building in every second
Yeah that's my plugin
Maybe I'll try updating by changing the animation ID to see if that's the problem
Maybe
i dont see why you wouldnt be able to
Guys, is a meter in the game 2 pixels?
sort of
I need to create scale monuments
its slightly less
theonians are 3 pixels tall
so its more like 3 pixels = 2 metres
must be dutch
well one of the pinned messages in #plugin-discussion says 7px = 4m so if you really want accuracy thats what you need
1m = 2px is probably good enough though
Thank You
Erksmit: Tells you how it always has been
Him: Nope that's wrong. I'll do it my way
well its not like theres a canon scale
It's not like everyone has used that same scale for years lmao
true that
The following code always reads nil, does anyone know why? Tile.getBuildingFrame seems to work fine.
local x, y = City.getView()
local name = Tile.getBuildingName(x, y)
Debug.toast(name)
end```
i don't recommend that, but the way is you need to declare the local vars outside the function.
local x, y, name
function script:update()
x, y = City.getView()
name = Tile.getBuildingName(x,y)
Debug.toast(name)
end```
I still have the issue
I tried something like this earlier
I'm not sure why this function doesn't work while the other one does
try to use if name ~= nil then Debug.toast(name) end.
logical is important if you using lua. it can be prevented like the toast appearing every frames, ignore return nil, or something like that.
Might have something to do with floating point numbers
Getview returns a float
Maybe you have to round that before you can use tile.getbuildingname
Also you should check if the values are within the city border with tile.isvalid
anyways i reccomend doing ```lua
function script:update()
local x, y = City.getView()
x = math.floor(x)
y = math.floor(y)
if(Tile.isBuilding(x, y)) then
local name = Tile.getBuildingName(x, y)
Debug.toast(name)
end
end
i dont know what the building name will be if there is no building on the tile
you always want to round down so you get the tile the camera is looking at
'then' expected. lol
Then what?
then for if
What if if is not enough?
return false
Getting mixed signals here, you're returning false, but have bear checkmark emoji beside it
fixed
fixed
update 1:
fixed syntax error
I already tried rounded coords
I have tried this already
The game will recognize buildings correctly, but it won't detect the name
You can always just get the draft and get it's title
i think so, but there's something wrong with the getBuildingName function. 
That was my backup plan
Just making sure I wasn't going insane about that function
ill write a quick script to test it out
yep im getting the same thing
getting the draft and getting its title works fine though
maybe getBuildingName gets some other attribute
function script:update()
local x, y = City.getView()
local draft = Tile.getBuildingDraft (x, y)
Debug.toast(draft:isPrivileged())
end
This code will return true for any vanilla building
I expected it to only do this for landmarks and other premium buildings
Is there a way I can do that?
guess you could check their types and if they have diamond prices
What about premium buildings that don't cost diamonds, like the military?
Кто русс
what do you mean undocumented?
look inside content json files
If there's example or a trace of them being used, they are documented in my book
Manga's guide to theotown plugins?
When you need to release a new edition of a book for every tt update
Now I legit want a tt guide book
You can always just let the player base do all the documentation
Now that's self documenting code
That would be pretty epic
my c# code
I will post here regarding to my plugin "Regional bank" Due to receiving complains about it's problem, i dunno why it is fine on my device but if you and my plugin and experiencing some problems you can ping me here and elaborate the problem tnx :)
Some comments say list boxes won't appears on them
Why do the coordinates change when the map rotates?
Rotating can make an object's position go from 18, 15 to 14, 13
x, y = City.getView()
x = math.floor(x+0.5)
y = math.floor(y+0.5)
draft = Tile.getBuildingDraft(x, y)
Debug.toast(draft)
screenWidth, screenHeight = Drawing.getSize()
Drawing.drawLine ((screenWidth/2)-4, screenHeight/2, (screenWidth/2)+4, screenHeight/2, 1)
Drawing.drawLine (screenWidth/2, (screenHeight/2)-4, screenWidth/2, (screenHeight/2)+4, 1)
end```
If you use this code, put the crosshair on the building, and rotate, you'll notice that the game wont detect the building anymore
After rotating:
When I move the cursor over to the tile it should be on (16, 14), the game will finally detect it
Even if there are other buildings there
I can confirm that this issue isn't caused by rounding either
0 | 0 | 0
1 | 0 | Map Height
2 |Map Width| Map Height
3 |Map Width| 0```
actually, the x and y are changed when the city is rotated, but the building (i though) still in the rotation 0.
Is this supposed to happen (the building being at rotation 0)?
You should only round X and y down by the way
Because if you're over .5 of a tile you're still looking at that same time
Oh
But I'll take a look at this
Well if works I wouldn't touch it
For science
For the rotation pretty sure the top left corner will always be 0,0
Would be nice if we had a on rotate event for script:event
I'm surprised that's not a thing already
Maybe you could read the rotation and see if it's changed the next frame
Yeah that would be the only way
Then doing whatever rotation logic when you detect the change
Probably not a great idea to get rotation every frame
*getview
But if that's the only way
I think there's a dedicated rotation function
City.getRotation()
Nice
I don't have any rotation support in my plugins
God knows what happens when you rotate while using my tools
What tools have you made?
Text placing tool and cinematic camera tool
The camera goes into a random direction for a bit but when it generates new endpoints it ends up just fine
I did t have it installed to test it though
Pretty sure it works out for it
Cuz it'll keep going like nothing happened
Except rotated ofc
Idk about the text placer
Haven't tested that one
About a month ago I was trying to make a camera tool that would go between two player-set points, but I just couldn't figure out how to get it working
Pretty sure that'll bug out when you're in placing mode
And for some reason it broke on larger maps
Ah yeah
I was thinking of adding an option for that
Instead of random points
I should be able to add it in fairly easily
Are your endpoints always generated the same distance away?
Nah
Just a min of 10 tiles away from the current endpoint
From there it can be anywhere
It has a 50/50 chance to pick lower or higher X value
Same for y
Then it generates a number between X+10 and city width for example
I was pretty close to getting mine to work, but I just gave up and worked on other stuff
Still waiting Android to update so I can release my mining pit plug-in...
I've looked at your code a little bit. I should take a deeper look sometime
It's definitely not perfect but it gets the job done
Why do you need a Android update to release your plugin?
Supports shorelines
I need to disable that
But that feature hasn't come to Android yet
It's been nearly two months now that I think about it
Ah right
I thought you meant Android itself
You could release it anyways but you wouldn't show up in new plugins by the time Android gets that update
I'd encounter bugs with path finding fun, I'd add frame for it to set frames per move e.g ```
"build":"draft",
"x":1,
"frame":0
Idk anything about fun
isn't the frame start from 1?
No , 0
fun is hard to debug
Can i change the sound of my cars?
The first image was in the default rotation the second one is rotated and moving backwards
You probably playing on sandbox mode not free mode
It's free mode, just made mistake with first message
May it be any plugin which is blocking them?
Your frame index is wrong.
Does anyone know what plugin this is?
If you do then send me by DM
I'm pretty sure they are private plugin /only released on Korean forum
Theres another forum!?
It's not official forum
Oh
Or that plugin can be part of Korean building package we are working on
How do i update a plugin without replacing the zip
why not?
I think if i replace the zip, people who placed the buildings from the plugin the building will dissapear
(I think)
it will if they have different ids
I don't think so. if you keep the same ID it doesnt make it disappear
Ohh
Its possible to change the sound car
Where i can get the ingame
Resource code?
I want to use ingame rails00
Do you have the link?
They aren't, unfortunately only 2 city rotation had the frame what is supposedly be, while the 2 encountered that problem, the second image I've sent.
Still clueless they're the only one experiencing these errors
,i downloaded my own plugin just to see if it's works fine and yeah it is.
They probably just loaned the Max amount and are now in debt when paying it back
A button to insta pay back loans would be neat though
You have to ask why and how they lost the money, then you look the problem at your codes.
If they have pressed the loan button, then you look at all functions that related with loan.
Also you should add X and y to the money spending
Budgetitem would be nice too
So its shown on the expenses screen
unfortunately, the x and y are bassed on tiles, not screen coordinates.
How about earnMoney with negative value? 
Can't just use the location of the building?
That's what I've used for the decoletter tool
It's passed thru abs()
But like that way the users know the money is being spent by the bank
With active dialog on the screen, idk if red price will visible.
I bet 40% it's not even the problem with the coding, people just don't get it
Ye
That's what I'm guessing
They probably just borrowed the Max amount
Maybe lock big loans behind city rank?
Also I couldn't click the ? Button
Because your money only 105k, not 150k. 
Is that issue with building coordinates a problem with the game, or should I try to fix this issue myself?
The rotation?
Ask ja
He probably knows if that's intended behaviour or not
Or lobby
Ah, help button. Idk if that button is out of dialog.
@steel verge
Yeah I got the character wrong
Nice bot
Angery pidroid
What coordinate issue?
.
It's the way perspective is shown
I tested this. Rounding up is definitely the way to go. Rounding down will offset the tile by one to the right.
I guess so
Oof
I just found out that City.getView() does not work well with elevated terrain
It detects to tile at level 0 instead of the one you're actually looking at
thats the behavior i would want with my camera tool
Yeah
But this is bad for my tool
Too bad there isn't an option for it
I'm not even sure how I could fix this
Time for some experimentation
I haven't found out how to do that yet
why do you need the tile the user is looking at anyways
oh is it a filter
No. Its like WAILA from modded minecraft. It gives you info about the item you are looking at
ah right
you could make it on tap maybe
pretty sure that one accounts for elevation
That kind of defeats the point
true that
If you tap the building, that pulls up its info
not if you make it a tool
On a side note, TIL that RCI decos can have untouchable on them
now that you mention it
Im not sure I understand
did not know that
if youre in a tool tapping on buildings wont open their popup
if you make your plugin draft a tool you can do that
then with the sidebutton you enter the tool
I think having to open the tool would defeat the purpose. This is just meant to give players quick info about a building
Fair enough
But i think I get what youre saying
I discovered that when trying to make a pin to sidebar function for my tool
Not quite sure how to actually enter a draft from a lua function but I've seen it done before
Has something to do with createdraftdrawer
But yknow
It's not documented
I think ian figured it out
Yeah I think there's some code floating around somewhere where it's used
It's also used in the tree tool but there its used to display a set of drafts
Im so glad I got that area tool working. It makes my testing a lot easier
Its too bad the game doesn't support RCI buildings with the builder functions
As far as I can tell it doesn't
Also not with privilege code?
I tried for a while to get that working
Privileged doesn't work either
Damn
Even on PC
I got a neat preview feature coming up for the text placing tool on pc
Will preview the text you're about to place at your cursor position
Doesn't quite work yet though
I haven't quite figured out how that sort of thing works yet either
I cheated with my area tool so I wouldn't have to add a preview myself
This was the issue I had
Lobby told me to draw it in script:draw city instead to get it right
But I gotta do a bunch of stuff to be able to draw it there
Thats rough
The feature only exists on pc anyways so I'm not in a hurry to get it out
Although I could preview it in the middle of the screen for mobile maybe
Like it does when placing a building
I needed privilege to place decoletters
It seems to work for me now
But they're iaps
I swear I tried adding my code before
Maybe
I remember trying to find if a building was privileged with its draft, but it always returned true
Regardless of the building
Ah right for finding dlc buildings right?
Yeah
I remember that one
Now I'm curious what builder.getbuildingprice will return for diamond buildings
try to invert it. ex the text are 'TheoTown', create from 'n' to 'T', then place 'T' in the cursor.
for i=TextLen-1, 0, -1 do
Builder.buildBuilding(draft,x-i,y)
end```
Oh thanks for these problems i think i gonna use GUI.getclientWidth for these
Btw @terse void i had problems with active loans its own array always passed its value to other city even it was declared in City.getStorage() for its save and load state :/
are you load it when you enter city?
thank you
Of course
What's the difference between: ```lua
local table = {}
table:add(element)
--AND
table.insert(table,element)
??
"add" only for array. table = Array() table:add('foo')
I forgot to empty the table that's why it has loop hole for every item
@hollow flax does "stg" Variable from loading city/theo storage are constant or user define? E.g
local function TheoTown()
--return storage
end
local function saveState()
local stg = TheoTown()
stg.var = 1
end
the basic things :
- if variable is function, the value is always update everytimes it called.
- if variable is defined value, the value is constant until you change it.
what i mean is if it can be change into something
--from
local stg = TheoTown()
--to
local stg1 = TheoTown()
i don't understand, what you want to do?
Ah you know change naming variable to avoid confusion
ah, variable name. it's can't be changed.
If you assign it's value in the same way you should be able to rename it no problem
Whelp i have no idea for a plugin
Can someone send a link to forum for how to make a fence plugin?
I dont know how to find stuff on forum ;-;
You sure?
Ty
Does anyone know the name of this plugin?
@vale minnow do you have the link pls?
https://forum.theotown.com/viewtopic.php?t=5821 or download the one of the store
my road set called road pack is also inspired on mexican highways with permissions
Thank you
Okok
How do I change the build time of something?
And also I am making a park, how do I let it give that green sphere of "park-happiness"
Maybe
"build time":
thats marked as rci only on the forum but you can try
Hmm, now that i can code a basic plugin, maybe ill try to learn night anim next, and maybe learn how to add influences
I agree with you
And do you guys now how to make that sphere?
Wdym?
My brain is having a bad time lol, i want to ask a question but dont know how to say it
Nevermind
Thats gonna work?
Maybe
Oh lol
Testing a plugin is pain for me, my TT need to load 7000
How do i add multiple frames
It took me 10 min just for my brain to think of that..
you do json [ {"bmp": "frame1.png"}, {"bmp": "frame2.png"} ]
Ohhhhh
alternatively you can use 1 image and get multiple frames out of that
slightly more complicated though
Ty, i was thinking to do that but im afraid if it will crash
how the frames are used depends on plugin type
light and light switching should be true
also
light and light switching should be in your animation draft
not your building draft
night frames should point to an animation draft
What is "night frames"? I've never used that before
I think im not ready for night animation.. ;-;
Normally you need to define animation to make night frame
terribly inefficient
light animation must be defined before its building
Reeeee
How to make plugin
Read the pins on #plugin-discussion
Warning dont get lazy making graphics
My fence keep drowning, it suppose to be taller but instead half of the fence went underground (being below the terrain) what should i do?
Your y is wrong maybe ??
Dont know..
Try change it
It works on my shorter fence
Uhhh, imma look at forum first
Ok
I dont know tho, i looked at forum, the Y is always 4 (im not so sure)
Make it higher
To?
Experiment
👀
6 maybe
My TT loads for a long time... crashing making my life hard lol
1 plugin?
Uhhh

Yeah, i need someone to be a tester lol, my TT loads so slow
Oof
15
Oh, thats low
Sure, dm
How do i release multiple plugin in 1 zip
Extracting ?
Welp, i messed up badly
Messed what
Oh my god.. im so stressed rn
U deleted something ?
I fixed it
Nice
Just put all of them in 1 zip
Ohh, that works? I tought it will breaks
Yeah just like I have tons of folders in my slow traffic package zip
You can also simplify by writing all plugins in 1 json file
Does it means i need 3 plugin.manifest?
Only 1 because it's 1 plugin package
I don't make plugin.manifest but I'm pretty sure
Hm
Wait
That means
Put each file on a zip
And then put all of those file zips in another zip
Idk tbh

Eh if you're uploading to plugin store you don't need manifest file
should I use 32x32 or 64x64
I... oh
I dont know why but it still dont work tho
Why did it keep failing
You didnt put one of the code files or graphics
I did -_-
It might have been formatted wrong
This is the plugin im trying to sell
idk, try putting them in a folder
Try exporting as .plugin and upload that
how do i enter a draft from lua?
nvm
i found lua City.createDraftDrawer(draft).select()
also
im trying to create a button that looks the same as if it was created by Theotown.RegisterToolaction
but that function doesnt work outside of tools
also
can i invoke a function in another script?
unfortunately, Script.EVENT_TOOL_ENTER is only for generic tool.
i guess i could register a console command and call that using city.execute
Why this is not work
Question by @rjroldan1#3808
I can't see anything wrong in the screenshot
Although you could simplify it a bit since youre doing lua theme:setVisible() theme:delete() theme = nil in every if case
How did you get that code?
How can i delete GUI that stored inside a variable to set new arguments for it.
Here's my code but it doesn't make the var. theme nil again
local function newTheme(theme,dialog)
theme:setVisible(false)
theme:delete()
theme = nil
theme = dialog.content:addCanvas{--args}
end
local function gui()
--create gui
--stuff
theme = dialog.content:addCanvas{--args}
--other stuff
newTheme(theme,dialog)
end
By @rocky geode
That first function should delete the canvas properly
But the last line is useless
Because theme is discarded after the function is done
Tables are a reference type in lua
It's kind of hard to explain
are the contents same in each themes? why you don't seperate the content and the theme?
local gui
local function content(parent)
-- content
end
local function theme1(name)
-- theme
content(parent)
end
local function theme2(name)
-- theme
content(parent)
end
-- call the main theme
theme1(gui)
-- to change the theme
gui:delete()
theme2(gui)```
good idea
Having the API docs page open is a must
Probably JSON error
you can also just specify a min version for your draft instead of all that script
Dynamically defining drafts is a horrible idea
Trust my word, I use dynamically typed programming language
It's pain
i wonder why the draft is hidden using version?
i use Draft.append to make drafts easier with loops.
inb4 Draft.append bypasses DraftLoader's comment remover method
actually, draft append only run while init.
i guess thats not the worst
epic plugin?
yes
yeye
30 fps
got it installed
or lower
oh that one
that was amazing
yes
oh
that one
lol
that epic plugin is bound to become first of upcoming new mode to the game
trust me making a busy loop in script:update is essential for plugin development
me calling Draft.getDraft()
Remember DSA pull request?
yeah
Lol
@trail furnace you mean the boat is off center ?
If you wanna fix that make the boat go in the middle
frames
May i ask why Tile.getBuildingDraft(x,y):getId() to check nearby tile drafts is not working on if statement in a building owning the script
local function main(x,y)
for i = x,20 do
local draft = Tile.getBuildingDraft(i,y):getId()
if draft == "$deco" then
Builder.remove(i,y)
end
end
end
function script:daily(x,y)
main(x,y)
end
because the tile is not building, occur an error, and break the script.
Is there a way to fix this?
Ohhh
It's fixed now btw thanks
Thanks
What delay ms should i put in Runtime.postpone(function()end,ms) is this should be integer or a decimal, what is the max delay ms?
Always had been
@terse void how about a planck second ?
If I wanted a delay of a Planck second I'd just do _ = nil
What would a tree plugin look like?
a little something like this
I was thinking about the code
i know
something like ```json
[{
"id":"$flowers00",
"type":"tree",
"frames":[{"x":704,"y":480,"w":32,"h":16,"count":6}],
"influence nature":1,
"price":10,
"spawn":{
"p":0.01,
"height":-600,
"radius":600
},
"burnable": false
}]
except with your own frames and id ofc
what happens if I use .manifest plug-in in online mode and someone visits me?
A missing plugin dialog will appears with a download button
can they download it?
If you use plugin with manifest in online mode, it's normal. But, if you use plugin without manifest, it's a bug.
Afaik, you can't use plugin without manifest file in online mode.
Also the plugin will not appears on local tab in plugin store.
imo they should become required
Nah, why do you need it when you build a bug plugin?
well without the disabling old plugins ofc
Nah
Interesting Facts: Besides flat 🌏, DSA Moon/Planet has Day-night cycle

How does budget item works or whats the sequence structure for it
I thought it only display your total expenses and doesn't affect monthy spend
It is literally tidally locked
Tidally locked or in other words the speed of its rotation is the same as it revolves around the Earth. In simplest word, the moon is facing to us on its same surface.
Theonia Moon is awesome, it has rebel behavior than our real moon.
Anyone know how to not make despawn the cable car plugin by montemarino?
it always despawns inside the station
@rocky geode I think it's the right time to publish your version of cable car. 🤔
I don't think I can do it
Ow yes with a couple of edit, these will be the next
Bruh, I just saw the reply ping and didn't looked at the text ping, thought you were saying it to me lol
My bad wait lemme think
I don't have that plugin but pretty it's because it targeted its own spawner, it will only be despawn if the creator make a start up and end up platform, since spawning cars are random
Or maybe a oneway cable tracks
As for now i guess avoid placing its own spawner next to the previous spawner 🤷♂️