#plugin-lua-and-fun

1 messages · Page 12 of 1

open arch
#

@weak mural when will be the next update or can I try it today?

#

I dont think I will have the time in other days pls

stoic vector
#

can someone help me how to make pavement?

#

I forgor🗿

#

and If I could ask for default texture

potent jolt
#

you can find those on the forum

#

under the resources section

stoic vector
#

thanks

#

uuh

#

I cant find them

#

I'm so stupid that I don't know how to use theotown forums 😎

open arch
#

ian help me

potent jolt
#

these are what you need

stoic vector
#

omg thanks

#

Ur the best

#

now how to code it

#

bruh i forgor that it has json files

stoic vector
open arch
#

I need ians phone number

#

Even tho it would cost gold prices for me to call internationally

stoic vector
#

sad

#

I would give it to you but

#

I don't have it

weak mural
open arch
#

Unfortunate

#

I thought you done the layer oriantation feature

torpid spear
#

can I do something like this to generate repetitive animations?

#

it doesn't quite work

weak mural
#

if you using the merge function, make sure there are no animation tag before on your main draft.

torpid spear
#

yeah, there are no

weak mural
torpid spear
#

kluche

#

lol

#

thanks, I'll take a look into that

weak mural
#

next time i will use the alias id tag. lol

torpid spear
#

this is more complicated than I thought

stoic vector
#

home house

stoic vector
torpid spear
#

eliminated

potent jolt
#

you should utilize a template

#

also, build the string then just call draft.append only once

torpid spear
#

that would be a good idea

potent jolt
#

also

#

look into using string.format

#

its a lot cleaner

#

also its faster

torpid spear
#

sure will

dark nacelle
#

Hi

solid scarab
#

watafak

hushed lion
#

The Profile 😳

elfin geyser
torpid spear
#

by using Draft.append I have successfully minified my json from 4.3k to 2.5k lines

#

we need to go deeper

weak mural
#

cut the frame. bear_yes

torpid spear
#

😳

stoic vector
#

Oh, Kulche, ik, it's silly question, but how to make random frame choosing

torpid spear
#

what do you mean

#

"random frame" is probably what you're looking for

stoic vector
#

For example, i have 12 frames, and i need to get random frame

#

I place this building, and magically choosing random one from 12 frames

torpid spear
#

as I said then

stoic vector
#

This is possible if you use multiple frames in 1 image

torpid spear
#

it doesn't have to be a single image

#

it will work as soon as you provide at least 2 frames

stoic vector
#

When I have something like this

#

(Just for an example)

torpid spear
#

refer to what I've already said

#

unsure if it works with airplanes tho

stoic vector
#

It's just for example and I use it as a deco

mellow depot
#

Hi evb

#

Occupation ground

#

What is this and how does it use?

peak zenith
#

Help. How to increase Police Car numbers?

#

Wait... in pca.theotown I put 3x3 size. Not 1x1.

tired escarp
#

Uhhh. Don't

#

The Default number is enough

fluid trail
#

is it possible to make animations with the decals?

drifting bramble
#

I think i know what you wanna do

#

And i also think that is possible

fluid trail
cerulean crypt
#

"script": "#LuaWrapper",
"meta": {
"luawrapper": {
"dev": true,

	"privileged":"mmmm",  // Don't forget to provide a key
	
	"title":"Tutorial",
	"text":"Should open a link",
	"frames":[{"bmp":"yt.png"}],
	"strict lua":true,
	"script":"1main.lua"
	}
	}
#

Help
This one not show

winter vapor
#

Botton

cerulean crypt
weak mural
#

don't use wrapper if you use this function and it still not show the GUI.

cerulean crypt
#

function script:event(_, _, _, event)
if Tile.isBuildingWorking(x,y) then
if event == Script.EVENT_TOOL_ENTER then
GUI.get('cmdCloseTool'):click()
showDialog()
end
end

#

Help

torpid spear
#

where did you define showDialog()

#

since it's not an ingame function

cerulean crypt
#
	{
		"id":"$tencent_mark_john_joshua_cerrera",
		"type":"commercial",
		"title":"Tencent",
		"author":"",
		"frames":[{"bmp":"tencent.png"}], 
		"width":4,"height":4,
		"level":3,
		
		
		
		"script": "#LuaWrapper",
		"meta": {
		"luawrapper": {
		"dev": true,
		
		"privileged":"¿¿¿¿¿",  // Don't forget to provide a key
		
		"title":"Tutorial",
		"text":"Should open a link",
		"frames":[{"bmp":"yt.png"}],
		"strict lua":true,
		"script":"1main.lua"
		}
		}
	
	}
]```
weak mural
#

actually, i never use the finishInformationDialog, but it maybe like:

local function showDialog()
  -- Content
end

function script:finishInformationDialog(_, _, _, dialog)
  local button = dialog.controls:addButton{
    w = 0,
    text = 'text',
    icon = Icon.MENU,
    onClick = function()
      showDialog()
    end
  }
end```
cerulean crypt
#

What do u call this?

#

Is that window?

#

Why the button not appearing
If I try to add
Create dialogue

The building details are covered by dialogue tab

weak mural
#

i don't know why because i don't know how is your code.

cerulean crypt
cerulean crypt
weak mural
# cerulean crypt

are you want to create a button like this ^ or open the dialog when you click the building?

cerulean crypt
#

Yah

weak mural
# cerulean crypt

use logical operator.

function script:click(x, y, lvl)
  if Tile.isBuildingWorking(x, y) then
    showDialog()
    return false
  end
end```
digital kindle
#

Finally you gave me a clue to make openurl thing.

cerulean crypt
#

Oww its covert hahaha

digital kindle
#

Copied the message before you delete it.

potent jolt
#

Put a debug toast at the end of your function to verify it actually runs

#

Errors in GUI functions do not get toasted

cerulean crypt
potent jolt
#

Anything within finishdialog

#

Put it at the end

cerulean crypt
potent jolt
#

Ye

cerulean crypt
weak mural
#

so, the code is actually working.

#

remove that function if you want to open the default building dialog.

winter vapor
#

ahem

#

nitro scam

cerulean crypt
weak mural
cerulean crypt
cerulean crypt
# weak mural this
--actually, i never use the finishInformationDialog, but it maybe like:
---local function showDialog()
  -- Content
--end

function script:finishInformationDialog(_, _, _, dialog)
  local button = dialog.controls:addButton{
    w = 0,
    text = 'text',
    icon = Icon.MENU,
    onClick = function()
      showDialog()
    end
  }
end


--use logical operator.
function script:finishInformationDialog(_, _, _, dialog)
--function script:click(x, y, lvl)
  if Tile.isBuildingWorking(x, y) then
    showDialog()
   -- return false
  end
end
#

Idk what to do

dire flame
dire flame
#

Help

hushed lion
#

Ok

low jewel
#

ok

low jewel
strong cedar
potent jolt
#

Missing comma

digital kindle
#

Im making a simple welcome message by using toast,but when I wanted to add a username in it went error.

Here's the code:

    "Welcome back mayor",
    TheoTwon.getUserName(),
    ",You're running Theotown version ",
    Runtime.getVersion(),
    " ."
)
function script:enterCity()
    Debug.toast(
        "Welcome back to",
        City.getName(),
        ",Your beloved city."
    )
end```
torpid spear
#

TheoTwon is not a valid library

potent jolt
#

Also you shouldnt put code there

weak mural
#

typo is the hardest bug

potent jolt
#

Put it in script:init instead

digital kindle
#

Something like this huh?

    Debug.toast(
        "Welcome back mayor",
        TheoTwon.getUserName(),
        ",You're running Theotown version ",
        Runtime.getVersion(),
        " ."
    )
)
function script:enterCity()
Debug.toast(
    "Welcome back to",
    City.getName(),
    ",Your beloved city."
)
end```
potent jolt
#

no

#

script:init is an event function just like script:entercity

#

you need to use it the same way

digital kindle
#

So i should add a function in front of it?

potent jolt
#

and fix the brackets

#

and put end at the end of it

digital kindle
#

Something like this?

    Debug.toast(
        "Welcome back mayor",
        TheoTwon.getUserName(),
        ",You're running Theotown version ",
        Runtime.getVersion(),
        " ."
    )
end
function script:enterCity()
Debug.toast(
    "Welcome back to",
    City.getName(),
    ",Your beloved city."
)
end```
potent jolt
#

yes

#

note that the toast puts commas between every seperate argument in debug.toast

#

so your first toast will likely come out unintended

digital kindle
#

Lesser comma?

potent jolt
#

your first toast would come out like

#

"Welcome back mayor,erksmit,,You're running Theotown version ,11945a, ."

#

also fix your TheoTwon typo

digital kindle
#

Something like this?

    Debug.toast(
        "Welcome back mayor TheoTown.getUserName(), You're running Theotown version Runtime.getVersion()"
    )
end

function script:enterCity()
Debug.toast(
    "Welcome back to",
    City.getName(),
    ",Your beloved city."
)
end```
potent jolt
#

no that would toast "Welcome back mayor TheoTown.getUserName(), You're running Theotown version Runtime.getVersion()", literally

#

you can put strings together in lua with the .. operator

cerulean crypt
#

Why this are not showing after clicking

#

Is this right?

torpid spear
#

remove the function(), probably

cerulean crypt
#

Show dialog is an ID?

#

Can I change it?

#

What should I write this

potent jolt
#

I see the issue

#

Lua is very simple

#

That means a local function needs to be before anything calling it

#

So you need to put showdialog before finishinformationdialog or it won't work

stoic vector
torpid spear
#

when you get bored with the existing region creation gui

open hamlet
#

rip

#

hello guys, how do you make night frame code

#

lol

wary pewter
#

night mode: "true"

torpid spear
#

not scripting

open hamlet
#

oh oops

torpid spear
#

answered in dms anyway

exotic flume
low jewel
#

?

exotic flume
#

?

misty python
soft aspen
winter vapor
#

Its made by him

#

(Ploogin)

soft aspen
#

I mean in the game

tired escarp
#

it's in wip

torpid spear
#

it is not available, it's a work in progress plugin

soft aspen
#

Ok

cerulean crypt
#

icon = draft:getFrame(),

#

How can i change it into other frames?

torpid spear
#

by setting your 'icon' variable to something else

potent jolt
#

use the :setIcon function on the button object

#

or just get a diffrent frame

cerulean crypt
#

How to write it

#

local button = dialog.controls:addButton:SetIcon( string png = "nil" ){}

#

?

torpid spear
#

what is this abomination

#

put your icon draft in a variable and set it as icon

#

that would be the best solution probably

cerulean crypt
#

My 3 attempt won't work

#

How to use it properly

#

Draft.getDraft('$animationid'):getFrame(),

#

?

potent jolt
#

Why not

#

It gets the frame doesn't it

#

Isn't this exactly what you want

cerulean crypt
#

That's lobby reply to me

torpid spear
#

what.

#

also, using 'botton' instead of 'button' in ids is very concerning lol

#

you grab the drafts on init, not when generating the ui

#

getDraft won't do anything by itself

potent jolt
#

i dont know what the issue is

cerulean crypt
# potent jolt this is the intended result of the code you posted

''local function showDialog()
local dialog = GUI.createDialog{
icon = Icon.PLAY_AD_VIDEO, -- Icon of the dialog
title = 'Open video', -- Title of the dialog
text = 'Are you sure that you want to open the tutorial video on Youtube?', -- Text for the inner area of the dialog
width = 220, -- Width of the dialog, 300 by default
height = 120, -- Height of the dialog, 160 by default
closeable = true, -- Show close button, true by default
pause = true, -- Pause game when dialog is open, true by default
onUpdate = function() end, -- Called every frame
onCancel = function() end, -- For closeable dialogs when close button is hit
onClose = function() end, -- When the dialog gets closed

-- An array of actions that will be shown as buttons, nil by default
actions = {
  {
    icon = Icon.CANCEL, -- Icon on the button
    text = Translation.control_cancel,  -- Text on the button
  },
  
  {
    
    icon = draft:getFrame(),     -- Icon for the 
    text = 'Show video',      -- Text on the button
    onClick = function()
end,           -- Will be called when the button gets clicked
    golden = true       -- Will make the button golden, false by default
  }
}

}
end

function script:init()
local building = Draft.getDraft('$tencent_yt_botton_.anim')
end

function script:finishInformationDialog(_, _, _, dialog)
local button = dialog.controls:addButton{
w = 0,
---SetIcon( string yt = "nil" )
text = 'How i made it',
frameDefault = NinePatch.GOLD_BUTTON,
framePressed = NinePatch.GOLD_BUTTON_PRESSED,
icon = Icon.PLAY_AD_VIDEO,
onClick = function()
showDialog()
end
}
end''

potent jolt
#

well for starters

#

you cant open links via lua

stoic vector
#

What kind of programming language does TheoTown use?

stoic vector
#

Java for base game, on PC you need to install 64-bit java to run the game

stoic vector
potent jolt
#

you have a misconception of whats required to make plugins

#

you should check out some guides on the forum to get an idea

stoic vector
#

I understand.

cerulean crypt
#

Is that correct?

weak mural
#

depends on what you want to do.

#

TLDR: yes.

cerulean crypt
#

How to connect this

  local dialog = GUI.createDialog{
    icon = Icon.PLAY_AD_VIDEO,   -- become a frame
{}
{}
{}
}end
#

Into this

 local botton = Draft.getDraft('$tencent_yt_botton_.anim')
 showDialog()
end```
#

Idk how to do there local function

cerulean crypt
#
        
        local icon 
        function script:init()
         text = 'Show video',      -- Text on the button
        icon = Draft.getDraft('tencent_yt_botton_.anim')draft:getFrame(1)
        end,
        onClick = function()
        end,           
        golden = true       
      }```
#

Is that correct

potent jolt
#

...what?

#

Nothing about this makes sense

#

The first 2 code snippets are fine on their own, I don't know what you want to achieve

#

The 3rd code snippet is just all sorts of incorrect

torpid spear
#

I'm afraid you have 0 lua knowledge

#

jumping straight into gui is never a good idea

smoky gate
#

as someone with 0 lua knowledge, i can absolutely confirm the expert's words, trust the sources bear_yes

stoic vector
#

I am literally the pinned message here

cerulean crypt
smoky glacier
trim remnant
#

Lmao

#

That was good

#

👏

exotic flume
low jewel
#

he just replied to desolan

exotic flume
#

Desolan edited it

low jewel
tranquil sleet
stoic vector
low jewel
winter vapor
#

how do i make the past decal stay like what marcato did in his decal pack?

  • is it a line of code in the .json or something else?
stoic vector
elfin geyser
#

not scripting?

winter vapor
#

breh

winter vapor
#

gotta move it to support i guess

potent jolt
#

the new building icons are cool and all

#

but now we need a function to display our own

#

or i just need the id of the frames to implement it myself

torpid spear
#

(the graphics are not final and might change in future versions)

#

((maybe))

potent jolt
#

yea but now complex industri icons look cringe in comparison

torpid spear
#

shut up, I made both of those :badeline:

potent jolt
#

Shhh the new ones are just animated fancily

#

With the funky background

digital kindle
stoic vector
hollow meteor
#

how to make religion plugin?

hollow meteor
#

Ok

cerulean crypt
torpid spear
#

that's how decals are made

cerulean crypt
#

Owww sounds good

stoic vector
digital kindle
stoic vector
#

Hello

#

¿How to change the type of soil when the base of a drawing has transparency?

serene elm
jade bobcat
#

yes

obsidian chasm
#

. . .

wary pewter
#

<@&368799288127520769> IP grabber here

#

@void wolf also works

#

He posted bit.ly links to rickroll and yeah

potent jolt
#

Can you copy Id

#

I'm on mobile

wary pewter
#

978373224620519495

potent jolt
#

Cheers

wary pewter
#

That's why you shouldn't click random links, kids

rare grottoBOT
#
Case #FAyKGK

NvrGnaGvUUp#0043 was banned for the following reason: rule 7

potent jolt
#

Tho not like ips are usefull

wary pewter
#

I mean afaik all they can do is control your device by IP

topaz bloom
#

1.1.255.255 here your ip

wary pewter
#

Damn doxed

potent jolt
#

Only thing you can do is dos them

wary pewter
#

Ah

potent jolt
#

You can't even get someone's accurate location with it

#

Just the isp reported location

smoky glacier
potent jolt
#

its rather off topic innit

wary pewter
#

You're off topic

stoic vector
#

ok

digital kindle
#

Is there any moveable button API that i could use in newer version of the game?
Since the forum one had an error.

uncut field
#

I think ian made one

digital kindle
#

Yes, i use 'ian s code but it didn't work.

weak mural
digital kindle
#

I guess i will use the build in sidebar thing.

weak mural
#

i figured out how to use "require" in the "LuaWrapper" script, but you still need to restart the game if the module changes.

fluid trail
#

what

potent jolt
#

You probably didn't define a required field for your draft

chilly burrow
#

@fluid trail maybe ur switching east for west

stoic vector
devout trout
low jewel
#

insane

potent jolt
#

real scripting hours

wary pewter
#

Good script

digital kindle
low jewel
#

rule 839484: tt advertising not allowed in the tt server

#

🧠

wary pewter
#

I mean it technically is but eh

stoic vector
smoky glacier
#

what the

stoic vector
#

he meant about light blue button, not diamond count

smoky glacier
low jewel
#

bro

soft salmon
#

5

serene elm
#

cinco

peak lion
smoky glacier
peak lion
#

Romania power man

#

I am a romanian too

smoky glacier
twilit thorn
#

@peak zenith also as for the vehicle frame, how can it recognize the rotation of the car?

peak zenith
#

[
{
"id": "$dense.pol.station.150",
"type": "police",
"author": "Plugin creator website 3.0 & Ryk_Mak_2050",
"width": 3,
"height": 3,
"frames": [
{
"bmp": "Dense Police Station.png"
}
],
"title": "Dense Police Station",
"text": "To accommodate your densely populated city. It has 7 Police Cars to patrol and respond to crime quickly.",
"price": 70000,
"influence police": 120,
"performance": true,
"monthly price": 150,
"build time": 47,
"power": -15,
"water": -15
}
]

twilit thorn
#

I mean the image

#

Like how it works for vehicles

twilit thorn
peak zenith
peak zenith
stoic vector
smoky glacier
#

and plugin scripting

bold jewel
#

Where do I write rotation aware? (QuickEdit)

potent jolt
#

Not the correct channel, but it doesn't really matter

#

You can put the line pretty much anywhere, I'd put it between line 21 and 22 because I think that looks nice

#

The line you need is

"rotation aware": true, 
light plinth
#

nice type annotation

#
"real swell of you": true
potent jolt
#

And on mobile as well, so I can't even see it

stoic vector
wary pewter
#

ok but did we ask

#

and are you literally moderating owner of the serve-

potent jolt
#

i can keep repeating that infinitely, but nobody is gonna listen anyway

#

might as well answer their question and get it over with

wary pewter
stoic vector
potent jolt
#

figured it out

wary pewter
#

thanks

potent jolt
#

you can do it for a variety of languages

#

watch this

#
function Io.exitCity()
    Io.all = nil
end
#

yea

fallow yarrow
#

How do i make those uhh

#

Those blue arrows to change deco

#

And to script it

#

I suck at scripting

torpid spear
#

this is not scripting

#

you simply add more entries to your frames

fallow yarrow
#

uhhh

#

Wha

#

Idk any of that stuff so tell me when im done with the textures

torpid spear
#

as erk said, "do you have a json"

potent jolt
#

should make an automated reply script at this point

#

itd answer about 60% of these questions

fallow yarrow
potent jolt
#

make one first

#

after that, you can deal with variants

fallow yarrow
#

p

#

i always get new messages here

#

But theyre not showing

potent jolt
#

banned nitro scams usually

#

they post here, get banned then pidroid deletes their message

potent jolt
#

damn, lua error levels do not work

green rock
#

so the game was written in lua? 🐸

torpid spear
#

no

#

lua is not a programming language like c or java

green rock
torpid spear
#

no idea how the insides look like

#

lua is a supplement for more control via plugins

potent jolt
misty python
#

is ian in this sever

#

server

#

oh found him

#

@weak mural do you accept animation dev tool suggestions

edgy vale
#

happen

weak mural
potent jolt
#

add war pls

weak mural
#

since the NeighborCity module is available, it should be possible to add war. lol

potent jolt
#

maybe, wouldnt be very interactable still since its just a virtual neighbor

weak mural
#

use car module to control the tank and artillery, bear_think

potent jolt
misty python
bold jewel
#

What should I change because it bugs

torpid spear
#

first, this is not scripting

#

second, what bugs

#

third, I don't see any errors here (unless??)

#

fourth, some attributes are redundant as they have those values by default

bold jewel
#

It says "Error with "$Night_Animation"

torpid spear
#

that's not helpful

#

also, that's not a very creative id name and it might cause conflicts

bold jewel
#

What should I write instead ?

torpid spear
#

anything else that isn't extremely generic

bold jewel
#

Ok

autumn bluff
#

After writing the plugin's basic code, what do I need to do next to get the night animation

autumn bluff
#

hello

viscid pebble
#

hi, I would like to learn how to make a plugin with multiple buildings, and which of them has also a rotation frame, how does it work? are there json I can use as standard/model? thankss

#

and also a night frame for both rotations obviously)

autumn bluff
#

How to fixed this code error guys ?

fallow yarrow
#

and uh i need to know how to make a perfect json for the decoration stuff

torpid spear
#

refer to the forums

#

it has all you need

viscid pebble
#

is a pack just a bunch of jsons in the same zip?

viscid pebble
#

because I have to correctly write in one json: the default+night and rotation+night, which isn't very intuitive to me at least

#

noob, what can I say

stoic vector
#

I Am Working On Something Better Than Ian's ADT
Going To Post Screenshots Soon.

potent jolt
#

well thats tough to beat

stoic vector
#

I Learned Lua When I Used To Make Private Roblox Game With My Friends.

weak mural
#

time to rest

potent jolt
#

more like

#

debugging
org.luaj.vm2.LuaError: ?:-1 attempt to call a nil value
for a afternoon

weak mural
#

os.exit()

fallow yarrow
fallow yarrow
#

uh huh

#

Is it ok if i copy a json and edit it to have some type of originality

torpid spear
#

why wouldn't it be ok

#

it's literally code

fallow yarrow
#

Oh yeah

#

Anyways gonna change abit of the code in Mdks Sunken highway wall json

#

Will be hard since idk which of the { ] are supposed to be in or not

light plinth
#

of the uploader

fallow yarrow
#

Ah bollocks

#

The codes wrong

#

Because i didnt copy the whole text

#

Theres no } and [ because it wont let me copy it

torpid spear
#

please stop using this channel for non scripting stuff

viscid pebble
winter vapor
#

i feel bad for this person

tired escarp
#

Check the pins in #plugin-discussion and yes and no, because you can make plugins on mobile as well.

spring token
hard silo
#

.json scares me because i have no idea how it works

#

And also I have no idea how to work lua

viscid pebble
viscid pebble
torpid spear
#

told you to stop using this channel for non scripting related matters, I'm gonna start warning next time

viscid pebble
#

alright

#

I didn't know, I thought it was the right place, now I'll stop

stoic vector
uncut field
#

Someone should change the channel description to explicitly say it's not for JSON. It might help a little

torpid spear
#

akshually fun attribute is json 🤓

potent jolt
#

technically, fun isnt scripting

stoic vector
#

That's why you should change channel description again...

potent jolt
#

Essentially, yea

misty python
#

you could say that it's now...

#

defunct

light plinth
#

Internally, it's transitions

#

Point invalidated

tired escarp
#

Is it possible to unable rotation on a composition?

uncut field
#

Why would you want to do that?

tired escarp
#

Because i made a composition without the other frames

low jewel
#

plugin creators still use functions

stoic vector
potent jolt
#

Now support slopes

winter vapor
#

What a great fps

cerulean crypt
# stoic vector

It can manage the population and size of each building?

||just a suggestion||

snow arrow
#

I have waited for that function for 4 years :v

stoic vector
autumn bluff
tired escarp
#

Wait. Is this selection tool?

stoic vector
# stoic vector

Similar to districts feature in Cities: Skylines but it's just for decoration (for now)

snow arrow
#

😄

crisp acorn
#

if there are too many updates for a building that it is not convenient to scroll through them, is there a way to divide them into several parts using LUA?

potent jolt
#

You mean a modular building?

stoic vector
frigid sparrow
#

If so then Im downloading it

soft salmon
#

?

soft salmon
frigid sparrow
soft salmon
#

A

#

Thanks

elder glacier
#

got this error when i click edit area @cursive parcel

wary pewter
#

Invalid user

potent jolt
elder glacier
#

oh

#

what a weird guy

#

anyway i still have that error👍

#

such a shame

potent jolt
#

You could create a GitHub issue

elder glacier
#

oh i see

crisp acorn
potent jolt
#

oh upgrades

#

possible, but unless you have a interest in lua scripting you'll find it too much effort

crisp acorn
#

I'm studying lua right now, and if it's possible, I'll try to do it. Although I don't understand everything yet, I can do simple functions and interface.

stoic vector
wary pewter
#

What is he trying to do by leaving the server? 🤔

smoky glacier
cerulean crypt
stoic vector
#

Hotfix released

potent jolt
#

It's not a set method I can explain

#

For a guide to gui

#

You're looking to edit the existing GUI for the upgrade button

crisp acorn
#

I looked through all the documentation, but i didn't find any code encoding upgrades

crisp acorn
potent jolt
#

Now that I look at it

#

I can't find a method for giving a building upgrades

#

Without that, you're not getting anywhere

stoic vector
#

Ok

potent jolt
#

Who asked you

stoic vector
#

Uh oh

potent jolt
#

That's not scripting

stoic vector
#

Ok

stoic vector
potent jolt
potent jolt
stoic vector
light plinth
elder glacier
#

@stoic vector the areas plugin keep having error when i click edit😭😭😭😭😭

#

ok so i found out that

#

it got errors everytime i minimized the screen

#

no

#

every time i change the screen resolution

crisp acorn
potent jolt
potent jolt
crisp acorn
#

Okay

stoic vector
#

Why io on other lua executors returns a table but nil in theotown?

light plinth
#

IO Library is removed from TheoTown

stoic vector
#

For security reasons?
One of my plugins may need it for it's translations (to free up space on main lua file)

light plinth
#

Translations should be provided with translation drafts

#

DSA, for instance, is translated in such manner

stoic vector
#

What about (without using translation drafts) providing translation files (for each language) on plugin folder and using local localTranslation=Runtime.fromJson(io.open(".../translation/en.json"):read())

{
  "1":"Translation A",
  "2":"Translation B",
  "3":"Translation C"
  ...
}```
stoic vector
#

@light plinth

wary pewter
#

??

stoic vector
#

@short ridge Don't ping admins for no reason

potent jolt
#

you can do this using the json meta table tag

#

if you really must

light plinth
#

No, io support will not be added.

stoic vector
#

For security reasons?

light plinth
#

Correct

torpid spear
#

what?

#

"light":bool?

misty python
#

That is json

#

Ban

elfin geyser
#

A quick question, Car.spawn() function returns a table with methods stored inside isn't?

potent jolt
#

pretty sure car objects work via metatable

#

like other objects