#plugin-lua-and-fun

1 messages · Page 6 of 1

torpid spear
#

..why would you reply ping a message from january

dusky pike
#

idk

surreal tinsel
#

Helo

surreal tinsel
#

What is this channel for

potent jolt
#

this channel is for questions about the lua scripting that plugins can use

#

or FUN

kindred nest
potent jolt
# native timber What is metatables for

metatables are used to give a table "fallback" keys (thats are usually functions) that are retrieved when a value isnt found in the actual table. Theyre also used to overwrite mathmatical operators for tables

native timber
potent jolt
#

probably a python fan

stoic vector
#

How can I make a plugin that lets me spray paint any building I desire?

trim remnant
#

I don't think that's possible

stoic vector
trim remnant
#

Sure

#

But I don't think it's possible in general

stoic vector
stoic vector
native timber
#

Skill issue

#

@stoic vector your idea basically means a new sprites for every game building and no plugin compatibility, if i got it right. Just drop it bro

neon mason
#

Safely assuming that you want the Vandalism to be visible in your city

torpid spear
#

that's not what they meant

#

they just want to issue the graffiti disaster

#

that's what I think they meant, at least

#

in that case it's City.issueDisaster

stoic vector
native timber
# stoic vector Right

I dont think its a good idea to make plugin which only usage is making the game harder

stoic vector
native timber
zinc isle
native timber
#

Language inconvenience

zinc isle
native timber
#

By plugin i consider uploaded plugin, so its an issue from my side. You want to continue this useless argument, or whatever it is?

zinc isle
#

Well yeah, seeing as how you support private plugins. Realistically, their idea sounds good. If they can pull it off, that's amazing. And if they post it on the store, there's no issue with that as long as it complies with store rules. It would add something new and valuable and a lot of time would be put into it as well so 🤷‍♀️

native timber
kind cairn
#

Build less police stations 😊

zinc isle
native timber
native timber
#

They agreed as i see btw

zinc isle
native timber
#

Misunderstanding i dunno

#

Think what you want to, but i meant what i just said

zinc isle
#

Why shouldn't they upload it then?

native timber
#

Because they said that "they love to see their city crumble" and they agree that you shouldn't make plugin which only makes game harder

What are we even talking about?

snow arrow
#

Hello. How can i fix that ? When use drawCity(), the object seem to be in front of the building, but i want it to be behind all the buildings

#

Or is there any other function that can help me do it?

potent jolt
#

if you want to draw on your building you can use script:draw

#

depends on what exactly you need

snow arrow
potent jolt
#

thats gonna be a hard one

#

you could draw the stars, then draw the building's frame over it a second time

gaunt owl
#

Man I love your plugins

#

Huge fan

snow arrow
potent jolt
#

forgot to mention script:draw only gets called if the building is visible on the screen

#

so if you draw next to it it might cut off early

gaunt owl
#

I'm lucky

mighty cargo
#

?

trim remnant
kind cairn
#

I have a question
Why TT doesn’t use Phyton for coding plugins

#

Just curious

torpid spear
#

why would it...

#

lua is more widespread

light plinth
#

Also very slow

#

Python, I mean

snow arrow
potent jolt
#

it happens more often than youd think

potent jolt
#

how do i determine whetehr the gui is hidden

#

thought i ought to fix those screenshots with complex industry sidebar buttons on them

light plinth
#

Settings.hideUI or whatever its called

potent jolt
#

im literally only asking for the key

#

if i knew what it was called i would have it fixed already

#

in other news, check out what ive managed to do

light plinth
potent jolt
#

looks like the settings table isnt called Settings to begin with

potent jolt
#

for future askers, it was Theotown.Settings.hideUI

sharp belfry
elfin geyser
#

hey guys, i wanted to ask cuz I'm having "rawget" not implemented on nil error with 1.12.24 when my GUI gets closed calling window.delete() but seemed to work and fine with my other devices having version 1.12.23, any thoughts?

light plinth
#

There have been no GUI related changes between 1.12.23 and 1.12.24

elfin geyser
#

ohh thanks for letting me know

elfin geyser
#

does the game support comparator lua function?

potent jolt
#

depends on what you want to do

edgy tundra
#

Whats the way to make script which sense chat message,"error blahblahblah" if you haven't upgraded some building and trying to build another which requires the upgrade

So like if you have b1 upgraded you can build b2, if not, it just returns error via debug.toast or whatever.

Im familiar with lua but not theotown ways of scripting using it.

potent jolt
#

i have done this before, you can lock the building behind a FUN variable that is set to 1 when the required building gets upgraded

#

i will share the script momentarily

potent jolt
#

now i just need to find where i put the code for locking buildings behind it

#

ah yes

#

in your draft you can put ```json
"requirements": [{
"type":"CONDITION",
"text":"Upgrade a building to unlock this! (or whatever requirement you want)",
"condition": {
"type":"value",
"code":"The id of the upgrade",
"z":1
}
}],

#

@edgy tundra

#

this way you can use the game's way to lock upgrades

edgy tundra
#

Tyyy :3

potent jolt
#

its a bit of both

edgy tundra
#

Building is still locked

#

Or wait maybe I'm stup and this isn't the way it works

potent jolt
#

did you add the script to the building that has the upgrades

edgy tundra
potent jolt
#

yes

edgy tundra
#

So no idea

#

I did just copypasted the script and requirements module (inserted id into it obviously)

And nothing works

#

Like it is locked still

#

Weird

torpid spear
#

I love lua

#

local draft = draft get draft draft draft draft

#

the code looks sound to me so if it doesn't work, you're doing something wrong

edgy tundra
#

I do understand lua well and heres the proof but i don't really understand why doesn't it work in this case.

The issue is pretty stupid ig but u can't for some reason figure it out

potent jolt
#

whats your draft look like

#

(the json)

edgy tundra
potent jolt
#

hm, it should work

#

it works on my plugin

torpid spear
#

can't help without your plugin

potent jolt
#

actaully, did you let the game tick for a day? Fun takes a day to update

#

its an old logic system

potent jolt
#

but i cant help you more unless i have the full plugin

#

so i can check your implementation

elfin geyser
#

Hi, may I ask something?
I'm currently using a module to cache data during runtime, and I was wondering... does this cached data get cleared when a user switches tabs or minimizes the game, especially on mobile devices?
I'm targeting mobile users in particular and want to make sure runtime data isn't unexpectedly lost when the app is backgrounded.

Any insights would be appreciated!

light plinth
#

I'm not aware of any game functionality that would unload scripts in the background. Users switching tabs or minimizing the game should be treated as the game being force closed unexpectedly.

devout cargo
#

Hi

elfin geyser
#

quick question..

does using function script:init() in a module also get triggered when the main script uses that module with require()?

potent jolt
#

no

#

youll have to call an initialization function

#

can be a problem with a external plugin

elfin geyser
#

dang.. thanks

thorn sentinel
#

is there a pedestrian bridge plugin or not

molten fable
thorn sentinel
final silo
#

What lua does mean?

tired escarp
final silo
#

Ohh

tired escarp
#

It's a programming language

#

Hope u understand it

elder sail
#

Where can I learn Lua for free?

torpid spear
#

on the forums/lua api

runic cedar
#

Can i ask something?
I'm using mt manager to create plugin, but for some reason It's not working. Game doesn't load it anyway,i tried in z archiver, cx but still looks like game can't read my commands.... Guys ignore my grammar....
And please help, if someone can

cosmic igloo
runic cedar
torpid spear
#

are you sure this isn't something spewed out by ai...

devout wyvern
#

Are we gonna blame ai on everything now

potent jolt
#

this is exactly how ai generated code would look

torpid spear
potent jolt
#

the code in question uses event functions that dont exist and api calls that dont exist

#

ai would dream something like that up, humans dont do that

torpid spear
#

I love how ai will never say 'idk' and it will just make the most ridiculous shid up

potent jolt
#

and the onCustomButton function does not make sense in the context it is being used

#

either way its a trainwreck

elfin geyser
#

what is this.. a show off

light plinth
#

Ppunish 667883088172285962

rare grottoBOT
haughty vapor
#

A Helldrivers have arrived

light plinth
#

Rather stupid of them to do that in the only channel I read.

potent jolt
#

the honeypot

native prism
#

can a gui access plugins list?

#

can i modify how plugins show in a certain gui?

potent jolt
#

if its your plugin, yea

#

retrieving the gui components can be a bit complex because the id's are hidden

native prism
#

oh you mean 'my' plugin. I mean, if I created a gui, can I somehow show the list of the users currently installed plugins?

potent jolt
#

oh

#

no

#

you cant do that

native prism
#

figures why there's no in-game plugin manager

#

give me 4 months

potent jolt
#

why would you need that

#

games already got the plugin menu

native prism
#

compendium; if you have thousands of plugins installed (me) it'll be harder to find that specific plugin you need and sometimes you'll forget its name which makes it harder to search. So instead of going through that hell, I will make (if feasible) a plugins folder maker or something like that, I'll figure it out

tired escarp
#

It's literally the same as the plugin folder within the game

potent jolt
#

fair enough

#

but unfortunately you wont be able to detect plugins

native prism
#

can I somehow somehow use this?

#

it compiles all the plugins, so instead of users able to create files, I'll just sort out their plugins ✊🏻

native prism
tired escarp
#

Wait hold on
Are u referring to the plugins that have no plugin manifest?

#

There's two ways to find the plugin file
The actual plugin file in the plugin category or just remember what their ids are

native prism
#

and that

tired escarp
#

Tbh it's also the creator's fault for not sorting in the right category or alternatively makin their own category

potent jolt
#

im not sure they can be retrieved if the menu isnt open

#

youd have to figure that out

native prism
#

okay, I'll be back in 3 months, if I dropped no update after that it's safe to say I've given up

native prism
#

I wrote a "discovery" snippet that logs child IDs under GUI.getRoot() during runtime and it crashed 😭

native prism
#

I figured something out

#

still couldn't get the GUI ids though

tired escarp
#

Dawg... Why this image??? 😭

potent jolt
#

yea a lot of gui objects will just not have an id

native prism
#

I give up 🥀💔

dusky pike
native prism
#

Yeah, I've spent my days trying

#

and today is the day I'm actually giving up

vapid vessel
#

NEVER GIVE UPPP

terse blaze
#

I wonder what this channel for, because I never been here before and it seems abandoned

torpid spear
#

maybe read the channel description......

terse blaze
#

Oh yeah, never thought about that

brisk mason
#

Hi

#

Is there a function that returns the current ui size?

#

I tried to look for it on the Lua API website, but I failedbear_think

light plinth
#

As in, the user setting or?

brisk mason
#

I mean this

light plinth
#

Try TheoTown.SETTINGS.uiSize

brisk mason
#

Works well, thanksbear_heart

light plinth
#

Ppunish 1336067779350102107

rare grottoBOT
lost forge
#

Pls plugin ikn plis

potent jolt
lunar sail
#

Please make an IKN

potent jolt
#

dont wanna

potent heart
#

Hello

somber notch
#

Is there a way to get the camera position without isometric transformation like City.getView?

#

I just want the raw xy position of the camera.

somber notch
#

well that was hell lol

#

figured it out

#

spent so many hours trying to think out the math lol

potent jolt
#

ah supporting rotation

#

a classic

somber notch
#

I had to convert screenspace coords to world space for my shader so I could properly anchor effects to the city

#

Like cloud shadows, so they don’t just disgustingly shift around when panning, zooming, and rotating the camera

somber notch
somber notch
#

Now I'm working on fog:

weak mural
uncut field
#

It's cool to see that people still make cool stuff that isn't just more skyscrapers

somber notch
#

More progress on my shader plugin

potent jolt
#

its looking good

somber notch
#

And of course a comparison screenshot with just the Classic/default shader:

#

Looking to get this released in the next few days hopefully. Got a lot of cleanup to do.

#

Also need to figure out how to publish a plugin.

somber notch
#

Got the world position calculation for building sprites to scale their Y component to stick closer to the ground position, so that effects such as cloud shadows project onto them differently and don’t just appear flat as it moves across the city.

river stump
#

Hello, I use your help, this is the code but when you click nothing appears

#

It literally appears as if to build a building but without doing anything, or graphics at all

potent jolt
#

are you calling the showDialog function?

#

if you want it to be called when the user enters the tool, you may want to add this section ```lua
function script:event(x, y, _, event)
if event == Script.EVENT_TOOL_ENTER then
showDialog()
end
end

river stump
#

Thanks

median condor
#

Hello, would any of you have a sample for a lua code that generates a sound when you zoom in on a building ? Like when you zoom on roads and they produce a road sound, trees and they have birds chirping, etc...

cloud flame
torpid spear
cloud flame
#

Ii want to use it for animation but it keeps giving me BARBATOS value frames12 speed200 loop true at animation of type info.flowersoft.theotown.utiljson.JSONObject cannot be converted to JSONArray

torpid spear
#

that's not lua/fun

cloud flame
#

It's coding problem

torpid spear
#

use the other plugins channels (and provide json)

#

json and lua are two separate languanges

cloud flame
#

Oh ok

light plinth
torpid spear
#

oh yeah that one plugin lol

median condor
#

Thanks JA, that will prove very helpful !

potent jolt
#

didnt this plugin stop working at some point 🤔

#

that could just be on my end

devout wyvern
lavish thistle
modest olive
#

yo coders

#

quick question

#

how do you define 0 pollution on the json?

#

Or are industrial buildings bound to emit pollution whatever?

zinc isle
modest olive
# zinc isle "influence pollution" : 0

Did I write it in the correct place? Maybe the game just ignores it? Because when I wrote "influence noise" it also didn't seem to be changing anything

torpid spear
#

you cant change influences of rci drafts unless youre privileged

#

which is a shiddy change and should be reverted, at least for the basic influence types

modest olive
torpid spear
#

....a new category??

#

what do categories have to do with anything

modest olive
#

oh right

#

WELL DAMN

#

my whole plan is foiled

torpid spear
#

in the future, please use support or discussion channels if you're not looking for lua related help

zinc isle
#

But no one would live there

modest olive
potent jolt
#

yep

inland birch
#

It's growing.

fringe mica
potent jolt
#

your intention is to open a dialog when the user enters the tool?

#

for starters, the onClick in the luawrapper doesnt exist and wont do anything

potent jolt
#

and you can put the GUI.createDialog inside the if instead of showDialog()

stone saffron
#

Is it possible to make a bus station compatible with the trans upd,by using the plugin creator Web only?

thorn jungle
#

I guess so. Check the plugin forum.

stone saffron
#

Thx

fringe mica
#

Thanks erksmit. I'll try that 🙂

trim remnant
#

@icy peak please issues from other server's out of this one, and please keep messages on topic to the channel description

trim remnant
#

Even so, unless I know for sure I'm not going to ban someone for that

#

Furthermore as staff we do not ask

mighty ridge
summer aurora
tall cave
#

Lua

river stump
#

Hello, a question, What else is missing for it to be another transport system?

torpid spear
#

where on earth did you find that...

#

oh that actually exists? zamn

#

is your plugin privileged

river stump
#

But it still doesn't work and I don't have permissions to see that full information in the Forum

river stump
torpid spear
#

then it aint gonna work

river stump
#

Yes, already see this ;-; just is for privilege user

#

How can I get of the permission?

torpid spear
#

become a trusted member of the plugin creator community

river stump
#

And how can i be a trusted member of the plugin creator community?

zinc isle
#

well i guess not just active and well-known bt in a good reputation sort of way - which would not get you there if you try to extract the source code like 5 times

river stump
zinc isle
river stump
zinc isle
#

that was a reference to something else entorely, sorry

#

you just have to be active to become trusted

#

oh man youre working with lua?

river stump
#

Ok, is fine

river stump
zinc isle
#

honestly you can create a privileged creator request through

#

uh @torpid spear do you remember the new protocol for this

torpid spear
#

nope

zinc isle
#

probably shoot justanyone or lobby a direct message through forum maybe? never hurts to ask i suppose. Tell them what you are trying to do with examples of your past work if you do and whatyou are trying to accomplish

#

I dont remember how I did mine

river stump
#

Ok, thanks

lavish thistle
#

Hello, is it possible to add audio to a plugin with a duration of 30 seconds to 1 minute?

#

I've tried several Lua codes, but the audio gets cut off after 10 seconds.

#

However, this issue doesn't occur on PC; it only happens on Android (and potentially iOS as well)

frosty zinc
#

Yo does anybody know how to get the empire State building as a plugin just asking

thorn jungle
#

Plugin store.

zinc isle
#

Can you not spam this everywhere

dreamy meadow
#

Sorry, where should post that?

#

I am new

zinc isle
lost sluice
#

hey im new here can anyone tell me where or on which software do you build these plugins

rare grottoBOT
# lost sluice hey im new here can anyone tell me where or on which software do you build these...

Step 1: Download a baseplate of your choice It is recommended to keep it small if you are just starting.
Step 2: Download a pixel drawing app. It is recommended that you get one with layers and transparency options. You can find a list of suggested options here
Step 3: Here are some tutorials that show how to make a house. One by Theo and one by Kulche
Here's a tutorial by rtobby that provides tips on improving the plugin quality
You may find more tutorials in the getting started page and on the forum
And even more tips pinned in plugin discussion
Step 4: Last step is to create a json. You can create one by using PCA or use this tutorial here to make one. To make one manually, you can use any text app which allows you to save files as a .json
Feel free to ask for help or suggestions on the forum or on the server

Bonus step: Once done, you can upload your plugin on the store which once approved can be downloaded in-game by anyone or post it on the forum showcase or both! Remember that store plugins must oblige to the store rules

frigid rose
#

plugin thats make more income please

zinc isle
clever bronze
#

.

spare terrace
#

i wish we could have websockets e_e relying on log.txt suck

short laurel
#

Hello

lean snow
#

how do i install plugin?

#

*desktop

rare grottoBOT
# lean snow how do i install plugin?

TheoTown files are located under such directories:

  • Windows: C:\Users(insert username)\TheoTown or %USERPROFILE%\TheoTown
  • Linux: ~/TheoTown
  • MacOS: /user/TheoTown
  • Android: /storage/emulated/0/Android/data/info.flowersoft.theotown.theotown/files
    By default you should be in /storage/emulated/0/. Uninstalling the game on Android will delete all files, unless you decide to keep the files when prompted by uninstaller. (android 11 onwards restricts access to external storage for apps, so if the files cannot be accessed this way, opt for the in-build manager explained below)
  • ios: Search "TheoTown" in the file manager app

If you cannot access game files through these directories, game has an in-built file manager for mobile devices which is accessible from the region view menu.

You can find your plugin, music, region and city files there as well as logs for debugging purposes.

peak pine
#

E

#

How do I make my own plugin

#

I don't know where to start

torpid spear
#

Ptag creation

rare grottoBOT
# torpid spear Ptag creation

Step 1: Download a baseplate of your choice It is recommended to keep it small if you are just starting.
Step 2: Download a pixel drawing app. It is recommended that you get one with layers and transparency options. You can find a list of suggested options here
Step 3: Here are some tutorials that show how to make a house. One by Theo and one by Kulche
Here's a tutorial by rtobby that provides tips on improving the plugin quality
You may find more tutorials in the getting started page and on the forum
And even more tips pinned in plugin discussion
Step 4: Last step is to create a json. You can create one by using PCA or use this tutorial here to make one. To make one manually, you can use any text app which allows you to save files as a .json
Feel free to ask for help or suggestions on the forum or on the server

Bonus step: Once done, you can upload your plugin on the store which once approved can be downloaded in-game by anyone or post it on the forum showcase or both! Remember that store plugins must oblige to the store rules

torpid spear
violet sorrel
#

Any List For Type Value?

torpid spear
cursive skiff
#

What script function is used to make local news appear when a building is being built?

torpid spear
#

local news..??

#

as in notifications?

cursive skiff
torpid spear
#

so a notification on building placement? use fun or lua

#

there are tutorials on the forums exactly for that

potent jolt
#

you can listen for event.building_finished and send the notification from
there

torpid spear
#

or use fun 🥰🥰🥰

potent jolt
#

may as well end it all now

cursive skiff
torpid spear
#

how does your script look like

#

you're probably not actually checking what event it is

cursive skiff
#

what should it be like?

torpid spear
#

😭

#

I won't comment on the quality of your code but you're missing the event type check

cursive skiff
torpid spear
#

lol

cursive skiff
#

I used "EVENT_FINISHED" before but nothing happened

torpid spear
#

how did you do it

cursive skiff
#

just changing part of the script function, I don't understand😭

torpid spear
#

you have to pass event as a function parameter and compare it to the constant

cursive skiff
#

Is this?

torpid spear
#

well, you're already using that one

#

so.. yes?

cursive skiff
#

and yes, new problems🗿

#

maybe i will give up

torpid spear
#

can't help without code

cursive skiff
#

function script:event (0,0,0,0,0)

torpid spear
#

what.........

cursive skiff
#

I don't even understand what I'm writing🗿

torpid spear
#

yeah you're gonna have to either have someone do it for you, or learn programming basics

cursive skiff
past tree
#

Hey guys Can I ask something? Where can I get the Sunray pluglin?

potent jolt
#

not in this channel, thats for sure

zinc isle
mellow herald
#

help😅

torpid spear
#

not lua related

fluid badger
#

plugin can use json?

torpid spear
#

yeah..?

ancient heron
haughty current
#

what is fun ? is it Json too ?

random stratus
#

It's a bunch of stuff, you'd learn it later in plugin developments

olive lava
#

Hi

haughty current
#

im currently on the json stage of plugin creation

olive lava
#

I'm a new member

zinc isle
#

you can use it to make a building make noise on click etc

cursive skiff
#

does this work also for Lua?

torpid spear
#

no idea but you'll be better off using TheoTown.translate

cursive skiff
torpid spear
#

lol what

#

this ain't google translate

cursive skiff
#

ah, wait

wheat valve
#

Does anyone else find the Lua documentation somewhat confusing, particularly the drafts section? It appears that many functions include parameters related to drafts, but not all of them clearly explain what drafts are or where they can be found. This can be quite overwhelming for new developers who are trying to use Lua. I only understood this better after discovering the “list of drafts” plugin by 1code. Thank you to whoever created it.

summer terrace
#

yo guys can u help me for make a income code

zinc isle
slender sail
#

Hey guys, where can I show progress on my plugin?

#

?

rose spindle
#

Maybe just let the game itself block the OP code?

torpid spear
#

it wouldn't be a problem if theotown was a normal paid game on all platforms

#

but with the freemium model we do have to enforce stuff like that

rose spindle
#

Whats the corelation with Theotown being freemium or not? isnt the difference is only about the existance of diamonds instead of income

#

Also idk if he meant to publish the plugin or not

torpid spear
#

it's probably a pretty thin line, but most "lazy" ways or getting extra money are gated behind diamonds

#

I really fail to understand why would you want to figure out such an elaborate way to cheat when there's literally a free sandbox mode

#

anyway, let's stick to lua here

cosmic igloo
#

Are people still cheating in this game where it literally give you diamonds in a daily basis. Impatient

lilac spire
#

Okay, guys, I have a problem, so, i was making a supermarket plugin right? I added Price, Monthly Price, Build Time attributes and etc, I typed the numbers in on the other attributes, but when I tried to type the numbers on thr price and monthly price, it won't work, I clicked multiple time, but still won't work

torpid spear
#

not lua related

lilac spire
#

nope

#

I'm using the theotown plugin creator

torpid spear
#

then use the correct channel

#

I'm going to warn the next time someone misuses this channel

potent jolt
plucky glacier
#

Where i get a template?

strong musk
#

still in island developmentDuckPray

pliant glade
#

im sorry, but.. anyone here that have a sun beam (ig) plugin?

dull python
#

How do I install the plugin via Zacher?

#

zachiver

silk crest
open dagger
#

if i use on click fun, then how to see building attributes?

brave spade
#

plugin buar kerajaan gitu ada gak?

cerulean hawk
#

Tuto oii gwe newbie

tired escarp
#

Can you two speak English please

crimson fable
#

Flezi asked if there was a plugin to create a kingdom or not.

As for Dadang, he asked for a tutorial on how to play because he is a beginner.

patent crescent
red igloo
pure raven
#

pls help me, is the coding correct? please correct

light plinth
#

No, it is not.

torpid spear
#

I love ai slop

pure raven
tired escarp
#

Dawg ... Are you seriously trying to make a money-making plugin?

green umbra
pure raven
torpid spear
#

the images don't even fully load for me

#

you ain't getting anywhere with this pal

pure raven
torpid spear
#

"i want to exploit the game so that i don't have to play it" get out of here

smoky glacier
#

Peak user

#

Comes to the official server and ask the official staff on how to exploit the game

olive summit
#

Hi

#

Me want a very nice plugin from money and lvl city have names or plugins???

zinc isle
#

what do you mean?

olive summit
#

I'm looking for a plugin that generates money and city level; could it be one?

olive summit
#

¿¿No?? y el de cocacola? genero muchos ingresos

#

Sorry im not use traductor wait

#

No?? And what about Coca-Cola? It generates a lot of revenue.

zinc isle
#

Income generating is restrcited to privileged creators

brazen crypt
#

For me, this is a plugin that generates a lot of money.

torpid spear
#

next offtopic message here yields a warn and I won't even feel bad about it

#

thanks

twin creek
#

It's called diamond mine project

#

I got 410 diamond and idk where that came from but I think it's the diamond plugin

potent jolt
#

(it doesnt do that)

#

maybe read the description before claiming there are cheat plugins

#

there are no cheat plugins

#

if you want money and city level, why are you not playing in sandbox

twin creek
torpid spear
#

that's a question only you can answer

#

next time please use appropriate channels

agile garden
#

It that possible make this?
As the view zooms in, the building gradually becomes transparent, rather than suddenly disappearing.

zinc isle
#

probably not, you can make the building stay when youre zoomed in with the correct build height but not make it transparent

potent jolt
#

that wont be possible with lua or fun

torpid spear
#

unless you do some magic with 39825203853 draw calls

potent jolt
#

that just sounds like the volumetric fog plugin

random stratus
#

Yuhh, how to make something blow up

#

Like that DSA ICBM thing

potent jolt
#

you could draw a explosion animation and use the Builder to remove buildings and spawn debris

torpid spear
#

or just spawn a nuke lol

urban hemlock
#

Hello dev,

How can I show a dialog when a building is fully constructed, and also when it is deleted?
Which function or callback should I use for this?

I tried using the "onClick function", but when I do that, the notification always appears and the building stats window (like hospitals, etc.) cannot be opened.

Thank you.

#

This my json dev 🫰🏻

potent jolt
#

you have to use lua and use the events

frigid stirrup
urban hemlock
frigid stirrup
#

Owhhh

#

Gimana tuh bg bikin nya

urban hemlock
urban hemlock
# frigid stirrup Gimana tuh bg bikin nya

You can make the building a park type and add anti-pollution.
But this no longer works properly because the developer has fixed it, so it’s basically just decorative now.

potent jolt
#

check the forums too

urban hemlock
random stratus
#

How to make like, a thing blow up a certain moment after it's built, and play a custom sound

#

Nothing in documentations

urban hemlock
green umbra
urban hemlock
green umbra
#

I need the file
Btw what are you make?

harsh cradle
#

👍

long hinge
#

@urban hemlock ada plugin cuan ga yah

dreamy ingot
#

No no Indonesia

urban hemlock
urban hemlock
#

Could someone help me?

silk crest
#

who have Ren's Wilderness plugin?

urban hemlock
livid prism
#

help.. i need info on commercial plugin zone

zinc isle
potent jolt
urban hemlock
torpid spear
#

that's... your entire code?

urban hemlock
#

Cek this

urban hemlock
torpid spear
#

jesus christ

urban hemlock
#

Can you tell me please?

torpid spear
#

what exactly are you trying to achieve

dreamy ingot
urban hemlock
urban hemlock
dreamy ingot
torpid spear
#

something like ambient sound from the building?

urban hemlock
#

Exactly That's on my mind

urban hemlock
#

Does that make sense?

torpid spear
#

see TheoTown.playSound

#

oh you're using the one from the City module

potent jolt
#

also the logic you copied from the sample plugin is partially wrong

urban hemlock
#

So what exactly should I do? Could you point out what needs to be changed or fixed in my script?

#

This is actually keeping me up at night 😵

urban hemlock
torpid spear
#

are you telling me you "wrote" this without ever seeing the documentation

urban hemlock
torpid spear
#

don't take it as a perfect solution, but maybe you could try playing the sound on construction complete and city load instead of every day

#

I'm not sure about moving/deleting the building though

#

I'm unfamiliar with how the playsound function works

urban hemlock
#

That makes sense , thanks for the suggestion.
I wanted to try this because I don’t see many plugins exploring this idea, so I’ll experiment with the approach you mentioned and see how it behaves.

#

Especially among plugins in my local Indonesian community, or maybe I just haven’t seen many yet since I’m still new here 😅

urban hemlock
frigid stirrup
opaque fable
dreamy ingot
wanton isle
#

guys hwo you guys can program plugin with lua even tho you can only upload it by json and images?

potent jolt
#

the json can mention a lua file that will be run

#

the json defines the building and lua can do extra things

frank shoal
torpid spear
#

json records data

#

lua performs actions

potent jolt
#

yea

#

were all about having fun with lua

zinc isle
#

I dont think kulche particularly likes lua, but he also like torturing himself with new lua experiments every now and then

#

In the name of fun

torpid spear
#

I wish theotown used a less unhinged language for plugins

#

but at least lua is pretty flexible and easy to learn

urban hemlock
#

Sometimes I wish the game supported Java too, so plugins could be more flexible and fun haha.

zinc isle
#

Oh that would not end well

#

Imagine all the chances of it being malicious

#

Someone had in the past figured out how to make a malicious plugin

#

Java would probably make it so much easier

urban hemlock
#

True, Java could make it easier to access user identities or abuse devices.
I was thinking it might be safer if Java plugins were restricted to the creator only and not shared publicly, but even then it could still pose a security risk to the game.
Never mind that idea.

sand canyon
timber flicker
brisk mason
#

Hello, is there a script that gets called when the settings panel is closed? Like script:leaveSettings or something similar.

light plinth
#

You may want to look at stage enter and leave events

brisk mason
#

Thanks

potent jolt
#

what kind of animation

whole falcon
#

Animation that is adjusted according to random frame, so if a random frame of certain set of wall colors is selected, the animation will automatically be adjusted so it has the same set of wall colors with the selected random frame

potent jolt
#

thats doable but couldnt you do that with regular animations

zinc isle
#

Was trying to randomise my animation frames when placed

#

My json worked fine before I made the lua file

#

I dont know why it crashes loading the template

zinc isle
thorn jungle
#

What the hell is "Ě"? Did you really put that on your code?

torpid spear
#

your indices have to start from 1, not 0

whole falcon
#

Can someone give me a code example of random animations using lua?

torpid spear
#

it's easier to just have a bunch of identical frames and attach a different animation to each frame

zinc isle
zinc isle
#

Can I pretty please have the code you used

zinc isle
torpid spear
#

you'd use script event and then check if the event is placed (or whatever event you want to use)

thorn jungle
#

Damn.

whole falcon
torpid spear
#

"frame": index

#

or "frames": [array of indices]

whole falcon
#

But I want a certain frame in the animation to be selected randomly than painstakingly code everything manually

torpid spear
#

yeah, and I gave you a solution to that...

whole falcon
#

Do you just put the anim index casually or what?

whole falcon
#

Or do you mean to use fun instead?

hearty hearth
#

Hi, somebody. I come here for know where server to download rock and grass decal. Sorry my English so bad.

#

I spend 5hours for searching that decal on forum. But didnt find it, a friend said it was only on discord.

whole falcon
#

Not here

zinc isle
torpid spear
#

lua uses indexing from 1

#

json from 0

zinc isle
# torpid spear json from 0

it told me that doesnt make sense but anyway my json doesnt even reach the script before it crashes. It crashes at the template of all things and I cant figure out why. It tells me I have a trailing comma at price but like what?

torpid spear
#

guess send me the plugin

potent jolt
#

id need to see the whole thing

#

vscode should point it out too

zinc isle
whole falcon
torpid spear
#

"animation":[{"id":"id", "frame": index}]

#

or

#

"animation":[{"id":"id", "frames": [index 1, index 2, ...]}]

whole falcon
#

But I'm still curious how did they make random roofs like this?

zinc isle
#

I am very sure he doesnt use lua

sonic citrus
#

and it is the case that every time you place one of those buildings, the roof and colour get randomised

stray crater
torpid spear
#

the plugin does, in fact, use lua and animations

zinc isle
#

Ive seen his files though

#

I remember going through the json

#

But I assume that your European pack

torpid spear
#

it sure is

urban hemlock
timid wigeon
whole falcon
#

Kulche, since you're the one who also made the European tenement pack (besides Lobby), can you teach me how to do these random roofs, or can you just give me the code?

torpid spear
#

you can either set animation's transparency to 0, or use an animation with speed 0 and an extra empty frame that you can switch to

whole falcon
#

Can you explain it more?

torpid spear
#

no, because there's nothing left to explain

#

if you have any specific questions I'll answer them

#

I'd advise against dabbling in lua if you have no prior experience in plugin creation

whole falcon
#

So, do you just use math.random for generating random roofs in European tenements plugin, or do you tweak it further to increase randomness?

#

I tried setAnimationFrame where i use math.random, but the animation didn't generate randomly

torpid spear
#

I can't help without your code

#

and yes, it's completely random

whole falcon
#

And it didn't generate randomly

#

Already try math.random as frame but it still didn't work

light plinth
#

That code is non functional whatsover

torpid spear
#

my guy, did you really use code from a message that says "my lua doesnt work"

#

what did you expect

zinc isle
#

amazing

#

keep doing that and your lua will never work

whole falcon
torpid spear
#

no, figure it out yourself

#

it's not open source

zinc isle
#

Ppunish 667407171859775499

rare grottoBOT
urban hemlock
#

Hi Dev, where can I find the complete list of language IDs used in the game?
I checked the Lua documentation, but it seems incomplete. It only shows default [de] German and [fr] French.

zinc isle
#

this is the tutorial on inline translations

urban hemlock
urban hemlock
whole falcon
#

Can someone tell me how to get all the coordinates of a specific building by draft?

torpid spear
#

as in you want to find all the instances of a select building and get their positions?

whole falcon
#

Can i use countBuildings ([draft]) as index in getBuilding?

torpid spear
#

that's the intended use

urban hemlock
#

Sir, where can I find the complete list of available icon enums in the game? For example, all Icon constants such as Icon.CITY, Icon.RESIDENTIAL, Icon.EDUCATION, etc.

torpid spear
#

use the assets plugin from lobby

#

I believe it was called plugin creator tools or something

urban hemlock
last path
#

What is the ideal size for a thumbnail?

torpid spear
#

not lua related

#

pretty sure there isn't one

urban hemlock
zinc isle
#

Also no idea why you always ping kulche, he will answer even if you dont when hes available

urban hemlock
#

Oh, that’s my mistake, I probably mentioned him accidentally. Sorry about that.
Yes, I was thinking the same, it might be a bit unfair. But what if I set a high diamond price for it in the store, since it adds some extra features? Would that still not be allowed?
I’m just curious, that’s why I experimented with making a plugin like this.

zinc isle
#

Well for that you would have to ask the dev

#

Usually for any features ikey that you acquire permissions for from lobby since its related yo monetization

whole falcon
#

Can someone help me?
I want the toast to appear right after the building finishes but it didn't

function script:init()
    local house = Draft.getDraft("$coalition_mapping.decoration.2026-02-06-23:25:29.64")
    end

function script:event(x,y,level,event,source)
    if event == Script.EVENT_FINISHED then
        Debug.toast("thanks for building "..house:getTitle())
    end
end
urban hemlock
gilded ridge
#

who knows how to make it like this

torpid spear
#

the plugin creator tools code could provide some insights

gilded ridge
#

when json i relax, but when lua i surrender🥲

torpid spear
#

if you don't have experience with lua, I'd recommend starting with something simpler

gilded ridge
gilded ridge
torpid spear
#

..whatever that means?

gilded ridge
#

for theotown

#

u feel me?

torpid spear
#

no, what kind of a tutorial do you expect

#

most functions are documented

#

the bottom fragments of the code are probably the most important

gilded ridge
#

hmm I reviewed it yesterday, but it didn't refer to what I wanted, but never mind I'll try it again

gilded ridge
#

@torpid spear wow, thanks its work

torpid spear
#

congratulations

whole falcon
#

Can i set an animation inside another animation using lua?

zinc isle
whole falcon
#

For efficiency, of course

whole falcon
zinc isle
whole falcon
urban hemlock
#

By the way, thank you for the suggestion. I’ve already received permission from the lobby 🫰🏻

#

Thanks you so much @zinc isle

zinc isle
#

amazing, good luck!

whole falcon
#

So, Can i set an animation inside another animation using lua?

urban hemlock
#

Would it be okay if I use the sample assets?

zinc isle
#

Yeah you just have to credit theo and lobby

urban hemlock
#

Of course, I’ll credit them. Thank you so much!

whole falcon
#

How does draft:setFrame(frameIndex,frame) work?
Since frame is an int, if i set it to 2, does it take the second frame in the specified draft?

torpid spear
#

it sets the buildings frame to the specified index

potent jolt
#

although frame is a number you should only use numbers you got from a getFrame call

#

if you set it to 2, youll set it to the 2nd frame ever loaded by the game

#

and who knows what that is

#

or it might crash, who knows?

shy locust
#

should I make a transpiler for javascript -> lua?

#

I do have alot of experience in both so it wouldn't be hard

#

plus I've made python -> other language compilers too

#

why does nobody does nothing here

timber flicker
#

you have to wait for someone who has knowledge of this

shy locust
#

ohk

potent jolt
#

sure

urban hemlock
#

Most contributors focus more on visual design than Lua or feature development, so technical topics don’t always get much attention. That’s probably why discussions like this can take a bit longer to get responses.

potent jolt
#

i simply dont need it

#

and i dont think a transpiler would handle the intricacies of metatables properly

#

complex industry works just fine without it

#

and yea of all the scripts CI has the gui ones are by far the longest

shy locust
shy locust
#

or potentially loca ai powerd or using my frnd's online ai powered transpiler

shy locust
shy locust
# potent jolt i simply dont need it

it's for those who know javascript but also want to do theotown plugin scripting, context switching from a language to another (unless python -> lua) is always a pain since you are already adapted to do In a language

#

I'm gonna make for more languages, just not those like c, c++, java etc

potent jolt
#

i dont see the application since lua is very easy to adapt to if you know javascript or python

#

it would need to be able to handle script event functiond well at the least

zinc isle
shy locust
shy locust
shy locust
potent jolt
#

theres only like 30 poeple actually doing scripting

shy locust
shy locust
shy locust
zinc isle
#

Im not going to argue with you but im just saying that the probability of that happening is close to none

shy locust
#

I'm not arguing either

#

I'm js saying this is for some ppl

#

like really niche so yea

potent jolt
#

well were not going to stop you

vast juniper
#

Can i use Draft:getContent() for other draft types?

potent jolt
#

nope, data type drafts only

#

youll need to use the other get functions for other properties

vast juniper
#

So, is there a way to count animations inside a building draft?

potent jolt
#

doesnt seem like it, you could ask lobby about it on the forum

urban hemlock
#

Hello sir, may I release this topic plugin on the store?
This plugin allows players to write their own custom topics, and it will not interfere with the game’s default topics, as the chance of appearing is very low.
If this is allowed, what would be a reasonable diamond price? 👀

zinc isle
urban hemlock
shy locust
urban hemlock
shy locust
urban hemlock
weary portal
#

Halo

torpid spear
#

please use #general if you don't have any lua questions

urban hemlock
#

Is it possible to change the game’s day/night cycle and in-game clock using Lua,
or is it limited by the engine?
The documentation only exposes getTime, not setTime.

potent jolt
#

yea thats not possible

potent jolt
#

you used to be able to change a users settings but that may not work anymore

#

if you want to force only day or night

urban hemlock
#

Understood. Thank you.

elfin geyser
#

Do Tile and Building libraries be use during enterCity?

elfin geyser
#

i think there's a bug using Tile.getBuilding(x,y) always returning nil value on version 1.12.61a

potent jolt
#

i can confirm this happens to me too

torpid spear
#

@potent jolt any way to make finishInformationDialog not display the default building info panel

#

no I'm not waiting for a response from anybody else

potent jolt
#

and it wont open

torpid spear
#

lol

#

sure

potent jolt
#

wait finishInformationDialog?

#

i mean

#

at that point, its already finished

#

why not use script:click

torpid spear
#

doesn't change anything

potent jolt
#

let me refer to complex industry

#

yea no it is script:click you want

#
function script:click(x, y)
    local building = Tile.getBuilding(x, y)
    if building:isInConstruction() then
        return true
    end
    x, y = building:getXY()
    local id = City.hash(x, y)
    local export = IndustriBuilding.getById(id)
    if not export then
        error(string.format('User clicked on a export building with id %d but it is not registered.', id))
    end

    ---@cast export export
    ExportGui.showExportDialog(draft, export)
    return false
end
#

just returning false will prevent the default dialog from opening

#

alternatively you can just wipe the contents of the dialog in finishInformationDialog

torpid spear
#

oh yeah that works fine, thanks

#

any ideas if I can automatically open a building info panel via lua without reconstructing it manually?

#

aka the dialog from when you click a building in the build bar

#

I can't find anything in the docs about that

potent jolt
#

oh that panel? yea no idea

torpid spear
#

guess it's time to dm ja

potent jolt
#

you could try dumping the gui structure while that menu is open and check what its made out of

torpid spear
#

sounds like effort

potent jolt
#

indeed

lone temple
light plinth
#

Ppunish 784062770256543744

rare grottoBOT
elfin geyser
#

quick question, how do i update the "tool" title realtime while using it?

potent jolt
#

its probably a label with a certain id, youd just need to find the id

elfin geyser
#

you're right nice..

#

Anyway, is there an event listener that triggers when a GUI is deleted? something like an onDelete event for a target GUI?

potent jolt
#

i dont know if gui tables are read only or not

#

but if they are not

#

you can get the onDelete function and overwrite it with one that calls the original ondelete at the end

urban hemlock
#

Sir, I want to ask, when I try to open the video, nothing happens. Is something wrong, or does it require a privileged key or something else?

potent jolt
#

i dont know how this works, but i am certain privilege is required

urban hemlock
#

Oh, got it. No wonder nothing happened. I already tried changing the whole script and JSON, but it still didn’t work. Thank you, sir.

weak mural
#

i want to share my plugin codes, but there are undocumented function and method.

vast juniper
#

Can someone tell me, how do i check if an animation in certain slot (for example, 10th animation) even exist in the first place, using Lua?

timber flicker
#

@zinc isle apologize for pinging

formal cove
#

Im working on lua script and shader stuff

I had a question, if possible, could future updates allow setting custom #define values from lua side before shader compilation?

(im using translator, sorry for my bad grammar)

potent jolt
formal cove
#

If I use a uniform (for example a float used as a boolean flag) to enable or disable certain shader effects

uniform float enable_waving_trees;

if (enable_waving_trees == 1.0) {
...
}

it would still require branching in the shader.

#

That means the code may still run even when the feature is disabled, which can be less efficient

But if using #define would allow the shader to exclude that code path entirely at compile time

#define ENABLE_WAVING_TREES // enabled
// #define ENABLE_WAVING_TREES // disabled

#ifdef ENABLE_WAVING_TREES
...
#endif

urban hemlock
#

But I'm curious why you want to use #define for the waving trees if you plan to enable it again later.
In Lua, you can't rewrite or remove code from inside the game, so changing a uniform value is usually the only way to toggle the feature at runtime.

potent jolt
#

then it is not possible

formal cove
#

But for heavy features like clouds or water shader, using #define is more efficient than if-else branching. Even if the branch is false, the GPU may still evaluate parts of it.

#

With #ifdef, the code is completely stripped at compile time, so there’s zero cost when disabled, which improves performance and reduces unnecessary computations.

#

It also helps avoid maintaining multiple shader variants (like lite/low/medium/high), since I can control features through compile-time flags instead.

urban hemlock
potent jolt
#

why not make it first and then see if the performance is ok

#

premature optimisation is usually a bad idea

elfin geyser
#
plugins/tx-terminal-exchange/scripts/station_assigning.lua:365 vm error: java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
stack traceback:
    plugins/tx-terminal-exchange/scripts/station_assigning.lua:365: in function <plugins/tx-terminal-exchange/scripts/station_assigning.lua:361>

Is this a bug?

the error occurs when a building has no custom name. function works correctly once the building is manually renamed.

it should return nil when the building has no name (or is using the default name). However, instead, it triggers a NullPointerException

potent jolt
#

probably related to tile.getBuilding not working, try it outside of the beta branch

elfin geyser
#

how can i rollback with playstore

zinc isle
#

Rollback in what sense?

glad aspen
#

Ooo lua

#

Haven't used it in a while

zinc isle
#

time to pick up the pen again

glad aspen
rare grottoBOT
# glad aspen Also wait in confused do I use json or lua I read the tut on how to create plugi...

Press the link for a more comprehensive guide for plugin creation for beginners
The key points are summarised below:

Step 1: Download a baseplate of your choice It is recommended to keep it small if you are just starting.
Step 2: Download a pixel drawing app. It is recommended that you get one with layers and transparency options. You can find a list of suggested options here
Step 3: Here is a tutorial on how to make a house by Kulche
And tips on how to improve plugin quality from rtobby
Find more tutorials in the getting started page and on the forum
And even more tips pinned in plugin discussion
Step 4: Last step is to create a json. You can create one by using PCA or use this tutorial to make one. To make one manually, use any text app which allows you to save files as a .json
Feel free to ask for help or suggestions on the forum or on the server

Bonus step: Once done, you can upload your plugin on the store which once approved can be downloaded in-game by anyone or post it on the forum showcase or both! Remember that store plugins must oblige to the store rules

glad aspen
#

Wait if lua is limited what's the point of using it instead of json

torpid spear
#

limited slot?

glad aspen
torpid spear
#

you don't use lua instead of json

#

it's a completely different thing

glad aspen
torpid spear
#

okay?

glad aspen
#

So I'm more familiar with it

#

Instead of json but okay

#

Ig I'll use json

torpid spear
#

you have to use json

#

lua is not an alternative, it's for additional functionality

torpid spear
#

refer to the lua apo

#

api

glad aspen
# torpid spear api

I'm assuming the API is like a translator from one coding language to another right?

torpid spear
#

..translator?

#

no????

glad aspen
torpid spear
#

please just read the link

glad aspen
random hamlet
#

oops

#

Ppunish 564780556651462657

rare grottoBOT
random hamlet
#

cant believe I opened the channel for several seconds and a scambot popped up out of nowhere

elfin geyser
#

do we have custom filter for specific drafts using TheoTown.setToolFilter?

potent jolt
#

undocumented functions! yipeee!!

torpid spear
#

how refreshing

wraith sparrow
#

i13 terrain plugin isnt workin, please someone tell the creator

#

helpp

urban hemlock
torpid spear
#

there's EVENT_PLACED, but can I somehow differentiate whether a building was built by the user, or automatically by the game (as rci)?

urban hemlock
torpid spear
#

no

#

untouchable doesnt mean built by the user

urban hemlock
# torpid spear untouchable doesnt mean built by the user

But in cases like this, I believe that distinguishing between manually placed buildings and those generated automatically through zoning (RCI) can be handled by checking is.Untouchable in Lua. I suspect that privileged access may be required, although I’m not entirely certain since I haven’t been able to test it myself.

torpid spear
#

as i said, that doesnt work

#

a building placed by the user doesnt have to be untouchable

urban hemlock
#

Hmm, I didn’t know that. Thanks for the clarification.

#

?

#

What the

#

Ban them please

#

@zinc isle

clever gulch
torpid spear
#

okay im glad but this is lua support

clever gulch
#

ok

lyric rampart
#

So guys about road decorations fun, can I set the condition to road usage to check whether there's something on that tile, then make the road decorations switch to another image?

digital kindle
lyric rampart
#

Are you reacting to my questions or, to different people?, cause if I answer it then it's not reacting to my questions it'll be very embarrassing

floral dome
digital kindle
potent jolt
#

Would need to see the log or the source code, it probably happened in a gui callback or something

#

It loses the line number sometimes

lone dawn
#

@zinc isle

#

Eh

#

@void wolf we got some scam

void wolf
#

Pmodmenu 1374764571323138059

rare grottoBOT
void wolf
#

Pmodmenu 1374708137961197569

rare grottoBOT
void wolf
#

cheers

lone dawn
#

Cheer

digital kindle
lyric rampart
potent jolt
#

im pretty sure drafts need to be gotten in script:init and you cant get them outside of it

#

otherwise the code runs before all drafts are loaded

lyric rampart
potent jolt
#

im not sure, its not how ive wouldve written something like this

lyric rampart
#

But the logic is the same no?

potent jolt
#

yea looks like it

dusky maple
#

Does anyone have the Discord link for Yakka plugin center? DuckPray 😭

zinc isle
dusky maple
#

I tried the link in @digital kindle's bio but it shows a 404 error

digital kindle
dusky maple
#

Can anyone share the Rays Overlay plugin like this? Please 🙏

lavish thistle
brisk mason
#

How to use require()?bear_question

lyric rampart
#

Have a question, do fun have a condition Index for the time of day, and the weather conditions?

light plinth
lyric rampart
#

Thanks

lyric rampart
#

For example, this building will have animation playing when there's rain, or when it's in the middle of the day

light plinth
lyric rampart
#

Now I get it thanks

woeful osprey
#

how to write a click fun that change the specific frames of roads?

#

or change the total graphics of it or turn it into another id?

light plinth
#

To change it to a different ID, you'd need to demolish and build a new road. There is an action for frame changing, not sure what you want to accomplish.

woeful osprey
light plinth
#

I'm pretty sure changing the road frame will also change its connection status, unless that's what you intend.

woeful osprey
#

and is it possible to replace the existed road id to another one by click fun? could you show an example or a tutorial?

woeful osprey
woeful osprey
cerulean crypt
#

"build time": 0,
Does this code really work?

torpid spear
#

try privileges

median cypress
#

They can be obtained through a Facebook account.

#

irumi Kun

opaque fog
#

This has nothing to do with lua

cerulean crypt
#

Is this right?

‘’"meta": {"tags":
{"elevated_train_station"{}},
{"elevated_train_platform": {}}
},’’

river stump
#

The difference between "Station" and "Platform" is:

  • Station: Is for open the Transport Panel (This depends of the System mentioned, for example "elevated_train_station" that is for open the Transport Panel of Elevated Train).

  • Platform: Is for extended or mark the build as part of the station... If you put a "Platform" without a "Station", the platform is just other build, but with the "Station" close this work in conjunction

lyric rampart
lyric rampart
#

Did I mess up somewhere?

zinc isle
#

what eerror are you getting/

lyric rampart
#

Not an error per se, just it didn't remove the other and replacing it

zinc isle
lyric rampart
#

Soooo, nothing I can do?

dreamy ingot
lyric rampart
green igloo
potent jolt
#

BitMaP......