#plugin-lua-and-fun

1 messages ยท Page 1 of 1 (latest)

stoic vector
light plinth
#

Known, the users of that are marked to the game

#

and logged

potent jolt
#

Using pcall like that is bad practice

stoic vector
elfin geyser
#

A divided time as fps sounds fancy

potent jolt
#

Deleting messages is bad practice

vale basin
#

Hey im making my first plugin, still have to create the transparent background, but how do i code it so its all the the same building

tired escarp
#

Make the background transparent. If it is a decoration u put on the city [ "draw ground":true, ] . Remove the brackets if u want to use the code but if it is a flying plane u don't need to put that code

potent jolt
vale basin
#

I have it nvm

#

To be below 1024 pixels

stoic vector
trim remnant
#

@stoic vector If you don't mind me ask, what plugin have you made, you seem to know alot about scripting for a new user

vale basin
#

Sorry my bad

rose spindle
potent jolt
#

its only a visual indicator

elfin geyser
#

Why do smart cars despawned after re-entering city once they reached they target even there's another event will happen after it reaches the target (car:driveTo())

stoic vector
#

on JustAnyone's DM

elfin geyser
light plinth
#

I could not reproduce what you were referring to

#

Could you provide the full code to reproduce the problem

elfin geyser
#
-- This script will wait for the player to tap on two buildings A and B.
 -- After that, it will spawn a police car from A that will drive to B and
 -- then back to A where it despawns.
 -- This will repeat indefinitely.
local carDraft = Draft.getDraft('$carpolice00')
local startBuilding, endBuilding

function script:enterCity()
  startBuilding, endBuilding = nil, nil
end

function script:earlyTap(x, y)
  local b = Tile.getBuilding(x, y)
  if b and not startBuilding then
    Debug.toast('Selected start building')
    startBuilding = b
    return false
  elseif b and not endBuilding then
    Debug.toast('Selected end building')
    endBuilding = b
    return false
  end
end

function script:onCarReached(car)
  local stg = car:getStorage()
  -- Drive back if first ending, otherwise do nothing -> car will despawn
  if stg.ctr == 0 then
    car:driveTo(stg.x, stg.y)
    stg.ctr = stg.ctr + 1
  end
end

function script:nextDay()
  if #Car.getCars() == 0 and startBuilding and endBuilding then
    -- Let's spawn a car
    Car.spawn(
      carDraft,
      startBuilding:getX(),
      startBuilding:getY(),
      endBuilding:getX(),
      endBuilding:getY(),
      nil,
      {
        x = startBuilding:getX(),
        y = startBuilding:getY(),
        ctr = 0
      }
    )
  end
end
#

That's based from the docs

light plinth
#

Let's see

potent jolt
#

i cant replicate either

weak mural
#

it's clearly said: -- Drive back if first ending, otherwise do nothing -> car will despawn

elfin geyser
#

Nvm i fix it now, i just put some nil value that breaks the script

potent jolt
#

But which one

delicate ice
#

my lua knowledge will come in SO HANDY here

tired escarp
#

Are you Com Sci major?

potent jolt
#

Scripting is easy if you know lua

#

The api isn't hard

elfin geyser
#

It is

elfin geyser
#

How should i know whether the screen orientation was landscape or portrait

#

Not from the game settings, but like an event listener

weak mural
#

screen height > screen width

potent jolt
#

I would check whenever the settings stage is exited, but that doesn't account for auto screen rotation

potent jolt
weak mural
#

height > width is to check the portrait orientation. if width >= height it must be landscape.

elfin geyser
#

i think that's the only thing to do since game can't change orientation even you put values on the settings

potent jolt
#

It's not a good idea to be changing a user's settings

elfin geyser
#

Is there any ways to set up scale and cast properly frames inside listbox items, ive tried showing it with onDraw of canvas and used drawing functions but it goes always outside the canvas

potent jolt
#

i dont know what you want to do

elfin geyser
potent jolt
#

havent you already done that in complex industry

elfin geyser
#

It aligns properly caused I'd use addIcon{} but with drawingRect it messed up

elfin geyser
potent jolt
#

what args are you passing to drawrect

elfin geyser
#

All parameters returned by onDraw() of addCanvas{}

potent jolt
#

maybe use getpadding and getclient width/height so that you only use the inner available area

#

i think rn you ignore padding

elfin geyser
#
addCanvas{
    w = 30, h = 30,
    onDraw = function (self, x, y, w, h)
        Drawing.setScale(1, 1)
        Drawing.drawRect( frame, x, y, w ,h)
        ...
    end
}
#

This what i did but the frame wont align properly

potent jolt
#

how exactly wont it

elfin geyser
#

Ow i found Drawing.setClipping() maybe that should work

potent jolt
#

setclipping will cut off your drawing if it goes outside the area

elfin geyser
#

Ok it doesn't work

woeful matrix
#

ok i want your help what is this error ???

#

when I go in the plugins folder i have named Cyper tower image as Cyper tower it should work right but it but it doesn't

south garnet
#

The image name is wrong

#

Change the image name in the json

woeful matrix
#

Btw if you guys are wondering this plugin is not mine i changed the name thinking it would work but it hasn't

#

this was the original name and it didn't work it showed the same error

#

I*went into json editor and changed the id and name also

visual dirge
#

note that I don't know how to fly planes, and anyway it's too big to fly properly in theotown

elfin geyser
#

I hate how you named your file, and i think the computer think that was a virus

#

I would recommend to avoid coding using other char. set

potent jolt
woeful matrix
#

ok

potent jolt
#

You should do your research next time, then you would've known that

woeful matrix
#

bu i dont see bmp here

potent jolt
#

It's explained there

woeful matrix
#

ok can you link it please

potent jolt
wary pewter
#

ok minimod

elfin geyser
#

Anger issue

wary pewter
low jewel
#

โœ…

woeful matrix
spring token
#

So we can't make the shadows of buildings past their frame or whatever, but is it possible with lua?

south garnet
#

No

spring token
#

Ah

light plinth
#

Might be

#

But how would one implement them remains to be speculated

potent jolt
#

Probably not possible without the ability to read texture data

trim remnant
#

Ppunish @stoic vector

rare grottoBOT
#
Case #2416

yewongrr#6544 was banned for the following reason: Sharing scams or phishing content.

misty python
#

is it possible to execute console commands via lua scripts

torpid spear
misty python
#

right

elfin geyser
#

@light plinth

Is it really doing require for modules make it as global module?

I really don't know if that matters but i had the same file call transit.lua both from different plugin, i tried doing require on pluginB for module transit.lua on its folder(pluginB folder) but instead i fetched the module from pluginA, i noticed that because i tried to execute some function inside transit module(from pluginB) but it toast an error that it does not exist so i tried to toast all the keys from fetched module on PluginB and it toast all the keys existing from PluginA module

elfin geyser
#

Now i tried to disable PluginA and my PluginB works fine Again without errors

light plinth
#

im sorry?

elfin geyser
#

I mean i had pluginA and pluginB, they both has their own modules with same file name and owned main script controller to fetch their modules, File tree was PluginA next is B, I tried to fetch modules for PluginB but it fetches the module from PluginA even the path was at the pluginB folder

uncut field
#

So it's getting the module from the wrong folder because both plugins use the a copy of the module?

elfin geyser
#

Ye

light plinth
#

perhaps Lua caches modules by name?

potent jolt
#

are we gonna have to name our modules with unique prefixes

light plinth
#

I didn't design Lua, don't ask me

weak mural
#

actually, every modules have a name. but, if the name is exists, the first loaded module is a winner.

elfin geyser
elfin geyser
elfin geyser
#

@weak mural
Do you have the same thing with draw Rect like this one?, Like I did not covers all the screen on phones nowadays

potent jolt
digital kindle
elfin geyser
#

Nahhh its fine

elfin geyser
#

Aight as i thought it should start with negative x

elder glacier
sweet hollow
#

Ok

real anchor
#

how do you put the plugin manifest?

spring token
real anchor
#

thank you

random hamlet
#

me trying to read lua error when it disappears

light plinth
#

ask @potent jolt for his experience

random hamlet
#

how to get random value in script that isn't fixed?

#

should I put time in City.hash() or something like that?

potent jolt
random hamlet
#

bruh I forgot ๐Ÿ’€

#

thanks

potent jolt
#

as well

random hamlet
#

ah good

potent jolt
#

also

#

society if error levels actually worked

light plinth
#

new versions of the game will provide a out.txt file containing all of game's stdout and stderr

potent jolt
#

how's that any diffrent from just reading the log

light plinth
#

It contains everything

potent jolt
#

that ought to make my life easier

light plinth
#

also

#

300 lines of illegal errors

#

where game loads deprecated plugins

potent jolt
#

that is to be expected

weak mural
potent jolt
#

happens to the best of us

#

but the issue is that theres no stacktrace

#

so who knows where it happened

elfin geyser
#

Does the random character before .plugin file names was the key to decrypt the plugin?

potent jolt
#

i doubt its that simple

random hamlet
#

I couldn't figure out why does my code work wrong only to realize I misspelled math.random as math.rand

potent jolt
#

lol

#

what ide are you using

#

usually that should autofill

random hamlet
#

And also forgot to add 1- in front of my percentage calculator which turned 20% into 80%

potent jolt
#

or at least show something is wrong

elfin geyser
#

brakets

random hamlet
#

VSC but I was too lazy to install Lua thingie

potent jolt
#

brug

#

just install it

random hamlet
#

Yup I will

potent jolt
#

its like 3 clicks

random hamlet
#

Yes

#

I still didn't feel like it for some reason

#

Happens to the best of us

potent jolt
#

not to me

#

anything for the best intellisense experience

random hamlet
#

Anyways my global warming code is done

potent jolt
#

i didnt parse all the luadocs for nothing

#

does it create forest fires

random hamlet
#

More pollution - more disasters (each has different probability that depends on pollution)

potent jolt
#

lol

#

what makes pollution go up

random hamlet
#

Now I just need to make it so you can decrease the probability/view it and that's the hardest part (UI ๐Ÿคข)

random hamlet
#

Pollution

random hamlet
#

No I meant so you can build stuff to fight global warming

potent jolt
#

ah

#

yea

random hamlet
#

or build dictatorinator to lower riot probability

#

Is iterating over the entire map and adding up pollution influence a normal idea? ๐Ÿ˜ณ

potent jolt
random hamlet
#

Yeah that's bad

#

How else can I do something similar though

#

Can I get building influence?

potent jolt
#

i dont see functions for it

random hamlet
#

Wait wtf I just checked and there isn't

potent jolt
#

you could try

#

and count how many industrial buildings exist

random hamlet
#

Yeah but then non industrial stuff won't affect it

#

And also non polluting factory plugins won't work

#

Which is not cool

#

But maybe I should make it a setting or smth so users can change it

potent jolt
#

getting pollution of every tile is probably not feasible

random hamlet
potent jolt
#

ah yes

#

scopecreep

#

you cant count the amount of cars btw

random hamlet
#

I thought there was a function for that but I wasn't sure

#

Well population then

potent jolt
#

thats for retrieving all the cars that your script spawned

random hamlet
#

Ah ok

random hamlet
potent jolt
random hamlet
#

Wait this exists

#

Lesssgooo

potent jolt
#

now i go figure out how to make warehouses that can switch resource types for complex industry

elfin geyser
#

That's a lot of work

#

How about we can put all the resource types at the beginning and lets just use a case after building it, like what type should it take

potent jolt
#

i can make it switchable on the go

elfin geyser
#

I can't figure it out how does it work when you already occupied spaces on that warehouse

#

Anyway gui on the way again?

potent jolt
#

?

elfin geyser
#

Generic warehouse gui

potent jolt
#

yea i got that much

#

but what do you mean

elfin geyser
#

On what

potent jolt
#

the whole message

#

i dont know what youre asking

elfin geyser
#

About switchable

random hamlet
#

does anyone here know how to make building ui? (override the default one so I can draw my own stuff when it's opened)

#

I'd like to leave the upgrade button, though... so it's probably not possible

random hamlet
#

thanks

potent jolt
#

if you use script:click and return false it wont make any dialog, if you want to make it completely custom

random hamlet
#

@potent jolt I think complex industry has multiple files, how are you dealing with that?

potent jolt
#

instead i use the strict lua tag, so that the game crashes when an error occurs

#

this does mean i do not get script reloading

random hamlet
#

hard

#

I just copypasted functions I need for now

potent jolt
#

lol

random hamlet
#

pretty

potent jolt
#

you probably shouldnt need require anytime soon

potent jolt
#

if you want to share data between scripts i reccomend using city storage for niw

#

or you can use the draft call function

random hamlet
#

okay

#

by the way, is there a way to make update unlocked only when the previous update is enabled?

potent jolt
#

what do you mean

#

if you want to disable a script, thats possible

random hamlet
#

so you need to buy update 1 before being able to buy update 2 (in a building)

potent jolt
#

oh

torpid spear
#

you mean upgrade

potent jolt
#

so just upgrades

random hamlet
#

oh yeah upgrade

#

bruh

potent jolt
#

probably

random hamlet
#

how, though, getting started links to this

torpid spear
#

because that's the tutorial

random hamlet
#

hm I guess I can try with this

torpid spear
#

the original post got deleted along with the member though

random hamlet
#

sad

random hamlet
potent jolt
#

ofc

weak mural
potent jolt
#

i think you can put the requirement type as upgrade

#

i have some reference material somewhere

random hamlet
#

figured it out, I think it works now

#

for some reason a button doesnt work if I click it on the same Y as the upgrade button

#

if I click on the top of the check info button it works

#

if I click on the bottom it doesnt

#

huh

potent jolt
#

how did you add that check info button

#

that bottom row is the action button row for the dialog

#

my geuss is the click event goes to that layout instead of your button

random hamlet
#

just like this... (very lazy and I guess its wrong?)

potent jolt
#

you should add it to dialog.actions

random hamlet
#

alr

potent jolt
#

(im not sure if that naming is correct)

#

thing is whenever i add action buttons i do it when creating the dialog

#

i havent tried doing it after creation

weak mural
#

dialog.controls, not content.

random hamlet
random hamlet
potent jolt
#

lol

#

this is where the fun begins

#

wait a sec

#

i think ive seen this

random hamlet
potent jolt
#

ah

#

probably attempting to get a building for a tile that does not contain one

random hamlet
#

but if I remove the getId it works fine

potent jolt
#

ah

random hamlet
#

cropped accidentally but the line below is Builder.remove(x,y)

potent jolt
#

hm

#

do you interact with bld afterwards

random hamlet
#

no

#

its in a for loop btw

potent jolt
#

i forgot what triggers that error

#

but ive literally had it yesterday

random hamlet
#

please try remembering it later because I have no idea tf is happening bear_fire_st

potent jolt
#

well

#

its indicative that it errored inside the tt api

#

which is also why there is no error line

#

so, you mustve passed a incorrect argument to it

#

and it didnt catch it

random hamlet
#

I replaced it by getBuildingDraft... lol

weak mural
#

building has not isValid function, and use colon ":" for get/set functions of the object.

potent jolt
#

clearly something goes wrong after getting the building

#

try toasting the building

potent jolt
random hamlet
#

that's the point, I am not using any isValid function

potent jolt
#

complex industry has no isvalid calls

#

my geuss is

random hamlet
#

so I changed it to bld:getId()

#

and it worked

#

It's just me forgetting the syntax again

potent jolt
#

brug

#

ah

#

yea

#

that makes sense

#

if you use . it doesnt pass the building to getId

#

using : is equivalent to bld.getid(bld)

#

also

#

this implies building object has a undocumented isvalid function

weak mural
#

yeah

potent jolt
#

hm, i need to figure out a way to retrieve all complex industry drafts

#

actually

#

callAll should suffice

random hamlet
#

where removeZone

potent jolt
#

good question

random hamlet
#

I was wondering what'll happen if I do Builder.buildZone(nil,x,y)

#

interesting

#

oh wait it actually removes the zone but I guess it reappears under the buildings?

#

yep it does

#

@potent jolt you can remove zones with builder

#

awesome

potent jolt
#

ah right

#

Builds the specified zone draft or removes it if draft is nil.

#

its documented as well

random hamlet
#

Can I erase garbage from roads with lua?

#

I assumed it was a road deco

#

but removeRoadDeco doesnt work with it

#

smth like

if Tile.getRoadDraft(x,y)~=nil and Tile.countRoadDecos(x, y)==0 then
  local dr = Tile.getRoadDraft(x,y)
  Builder.remove(x,y)
  Builder.buildRoad(dr, x,y,x,y)
end

technically kinda works but fucks up bridges

light plinth
#

It's a road occupation

random hamlet
#

ah okay

random hamlet
# random hamlet

now for some reason bld:isEmpty() (instead of not bld:isWorking()) causes the same error, weird

light plinth
#

Check if Tile.isEmpty works

#

basically, building functions are all a wrapper to tile functions

potent jolt
#

can i change a gui object's onclick after its been created

light plinth
#

only one way to find out

potent jolt
#

didnt have all day so i patched in support for adding it on creation

random hamlet
#

me vs city storage

#

(two of these are supposed to be disabled)

weak mural
potent jolt
#

i cant, its created by a helper function

weak mural
#

helper?

potent jolt
#

a gui function i didnt write

light plinth
#

sounds like hadestia

weak mural
#

in general, you have to: get the gui object data (parent, w, h, so on) -> delete the object -> build the new object with the last data.

potent jolt
#

well you see

#

the function callsign looks a little like

#

---@param arg table contain object value
--arg.h = height [optional]
--arg.color = table of rgb values [optional]
--arg.frame = NinePatch [optional]
--arg.padding = table of values [optional]
--arg.content = table of arguments [optional]
--arg.background = whether to toggle default background [optional]
----content.icon.icon = icon or frame [optional]
----content.icon.align = table of x & y float value
----content.label.text = text
----content.label.align = table of x & y float value
----content.label.color = table of rgb values [optional]
----content.value.text = text
----content.value.align = table of x & y float value
----content.value.colorize = boolean (set color same as label of has) [optional]
----content.value.color = table of rgb values [optional]
---@return GUI[] canvas/layout
function GuiUtils.addListboxItem(arg)
#

besides

#

i simply added support for onclick to the function itself

elfin geyser
#

What does this mean

elfin geyser
random hamlet
random hamlet
#

so I decided to just not save these bools

#

only radius + blacklist

#

imma test if everything else works, then I'll test in mobile

#

and then i'll upload it

#

Im sure mods will find a bug and/or I'll have to rewrite half of my code

potent jolt
#

had problems saving the bools?

#

are you saving them directly to storage

elfin geyser
random hamlet
#

I forgot

#

You're a madlad

#

Respect

#

Hey, maybe I could try too, it'd be an awesome way of spending time when I can't get to my laptop

elder glacier
digital kindle
elfin geyser
#

Do this object has an id? (Tool icon area)

elfin geyser
autumn bluff
#

What are the lines of school-level code, everyone?

#

Like primary and high-school ???

elfin geyser
#

"provide aspect education [low/high]": int

random hamlet
elfin geyser
#

@weak mural do you have the same problem with smart cars? Like it stays stationary when it reaches the target after city reload

#

Thanks in advance

weak mural
#

no. smart cars are still in the last position after city reload. bear_think

elfin geyser
potent jolt
#

sounds like their route is not stored properly

#

whats your storage look like

elfin geyser
#

Deployment

#

event Listener

function script:onCarReached(car)
    pcall(function ()
        local data = car:getStorage()
        local transit = Transit.all[data.terminal_id][data.id]
        if transit:isTargetSpawner(data.target_id) then
            transit:reset(true)
        else
            transit:updateStation(data.target_id, 1)
            local target = transit:findNextTarget()
            car:driveTo(target.x, target.y)
            data.target_id = target.id
        end
    end)
end
random hamlet
#

(it's a drawRect grid)

#

:trollface:

elfin geyser
#

How did you

random hamlet
#

im doing something very (relatively) cool

#

also laggy but im on pc so who cares

potent jolt
#

are you calculating this gradient on a per pixel basis

random hamlet
#

yes.

potent jolt
#

lol

random hamlet
#

(its a test of something)

potent jolt
#

show performance impact

elfin geyser
#

That's aghhh massive

random hamlet
#

well the fps is low (On my laptop) but everything's usable and I can close the dialog normally

potent jolt
#

i mean

#

debug overlay

#

how much frame time is used by it

random hamlet
#

ah

#

its not updated with overlay but for a split second cyan takes up a bit less than 2/3 of the pie chart

#

not on this screenshot though

potent jolt
#

lol

random hamlet
#

closer to 1/2 actually

potent jolt
#

seems like an acceptable performance loss to me

#

ship it

random hamlet
#

if the game doesnt crash & you can close the overlay then everything is fine

potent jolt
#

already uses more resources than complex industry in its entirety

#

with ~30 buildings

random hamlet
#

@potent jolt check this out

potent jolt
#

nice

#

whats it do

random hamlet
#

it just makes a heightmap of the city

#

hills+build height

#

then I can do this

#

and thats all

#

but its fun

#

I had this genius idea for a long time

#

I cant use this tool on online regions :(

random hamlet
#

@potent joltis there any way to export an actual image with lua plugin?

potent jolt
#

not really

random hamlet
#

okay

potent jolt
#

you could encode it to a base64 string and log it

#

but tahts about it

random hamlet
#

I think having Tile:getMapColor(x,y) would be kinda based

#

this will be theotown graphics in 2015

potent jolt
#

nice

elfin geyser
#

Wow you grid all the tiles from the map

#

What's the size per matrix

random hamlet
#

but it can have lower resolution

#

and skip through 3 tiles

#

vs highest

elfin geyser
random hamlet
#

Ah

#

Wdym, the 3D plane? Not sure

potent jolt
random hamlet
potent jolt
#

but more importantly

#

overwriting existing functions

random hamlet
#

Still don't really understand what could you overwrite them with

potent jolt
#

eh, wouldnt be hard to return incorrect data and cause other plugins to crash

elfin geyser
elfin geyser
#

Lol that's thing i don't need

random hamlet
#

why is label with cords 270,40 in a different place from slider with cords 270,40

elfin geyser
#

Maybe the city was rotated

random hamlet
#

I mean on a dialog

elfin geyser
#

I can't figure out

random hamlet
#

(imagine if rotating the city would affect gui dialogs ๐Ÿ’€ )

elfin geyser
#

The starting cords does

#

As far as i know cords start at left always even rotating the city

#

Oh i guess im wrong

random hamlet
#

@elfin geyser do you know how to add custom icons?

light plinth
#

broken in 1.10.75

#

but dw about it

random hamlet
#

I wonder if can you create a tool with selections like this with lua

#

and is it possible to share values between files?

#

I want to have a marker tool which allows to set the source rectangle the heightmap will be rendered for

#

but I'd need a separate lua for tool code

#

I like the sidebar button tho

random hamlet
#

how

potent jolt
#

you will need to manage the selection state yourself

#

but you can use script:draw on a tool

#

it will be called for every tile

#

if you want some reference

#

look at the tree tool

random hamlet
#

okay

random hamlet
potent jolt
#

easiest way would be to use city storage

#

actually

#

i havent investigated usign globals for that purpose

#

but technically, that would be possible

random hamlet
#

interesting

random hamlet
potent jolt
#
local currentHoverX, currentHoverY
function script:draw(tileX, tileY, hoverX, hoverY)
    if toPlaceFramesFinished then
        -- draw preview if on desktop (besides the performance hit on desktop isnt a problem)
        if platform == 'desktop' then
            currentHoverX = hoverX
            currentHoverY = hoverY
        end

        if validTile(tileX, tileY) then


        else
            -- mark unsuitable tile red
            Drawing.setTile(tileX, tileY)
            Drawing.drawTileFrame(Icon.TOOLMARK + 16 + 2)--what the funk is this even pointing to
        end
    end
end
#

i have this in my private version of text placer tool

#

it marks unsuitable tiles red

#

script:draw is called for every visible tile while in the tool

#

and you can use the undocumented Theotown.setToolfilter function to filter which tiles will be called or not

#

theres also TheoTown.setToolmarker but taht is undocumented as well

#

and i dont know how it works

#

this block contains a set of undocumented tool functions

#

registertoolaction is for placing those buttons in the top right of the screen

#

settoolfilter can be used to prevent excess script:draw calls

random hamlet
#

finally

#

it doesnt like unzooming though

potent jolt
#

probably just smooth zooming artifacts

#

also maybe consider only drawing the border tiles

#

to save performance

#

theres a dedicated function for collecting those tiles

random hamlet
#

def not smoothing artefact

elfin geyser
#

Just make the border tiles only visible

random hamlet
#

why cant I get this to work right

elfin geyser
#

โ€ข main child
โ€ขโ€ข layout
โ€ขโ€ขโ€ข left canvas (w = -(layout_client_w * 0.3))
โ€ขโ€ขโ€ข right layout (vertical = true)(x = -(layout_client_w * 0.3))
โ€ขโ€ขโ€ขโ€ข slider 1
โ€ขโ€ขโ€ขโ€ข slider 2
โ€ขโ€ขโ€ขโ€ข ...

#

Menus would take the 30% of the layout from.the right

random hamlet
#

?

#

Nah menu is not the problem

elfin geyser
#

Well then set a width for the black canvas

random hamlet
#

I'm making so you can make a heightmap of the specific part of the map

#

But it doesn't work for now

elfin geyser
#

Oh i thought you had problem with gui hierarchy

random hamlet
#

i don't use layouts btw

elfin geyser
#

Increasement of height for specific tile won't work if there's a building , water pipes or wires on it

random hamlet
#

changing game window size really messes up the dialog

potent jolt
#

then dont do that

#

smh

random hamlet
#

makes sense

#

but is there any chance it'll mess up on different screen resolutions?

potent jolt
#

it should scale just fine when the dialog is made

random hamlet
#

there is no way to get fps?

#

I think it'd be cool to automatically close the popup if someone tried to render max resolution heightmap on a calculator and has like 2 fps for more than 5 seconds

#

but I'm probably overengineering this

potent jolt
#

between 2 script;update

#

also

#

lua execution is synchronous with the rest of the game

#

if its calculating, the game is frozen

random hamlet
#

๐Ÿ’€

#

@potent jolt how to fix

#

should I make the whole thing smaller because it's big even on pc?

potent jolt
#

probably

random hamlet
#

Will probably be messed up on smaller phones but it works on mine so it's fine

elfin geyser
#

Lol

random hamlet
#

now when my lua plugins were appro... wait I wanted to finish climate change plugin

trim remnant
#

Ppunish @stoic vector

rare grottoBOT
#
Case #2504

Echnon#9525 was banned for the following reason: Sharing scams or phishing content.

potent jolt
#

new message in plugin scripting

#

its always a scam

random hamlet
#

Why do they target us scripters :(

elfin geyser
wary pewter
#

Why is it always this channel

digital kindle
#

Probably related to scripting like,fake antivirus,bitcoin scam,NFT scam,etc...

grizzled bough
#

I'm confused

random hamlet
#

๐Ÿ’€

digital kindle
#

Is there a lua function to tell music name?

vale bough
#

Can someone help me with a simple industrial json

#

1x1

potent jolt
elfin geyser
#

Help me also with jason

random hamlet
#

why does that result in this if i'm not messing with alpha

#

but this doesn't

#

(multiplying by 1.0 didnt help)

#

*light/light works...

#

nvm doesnt really work

#

wait

#

im a dumbass

#

I used mix wrong

#

or maybe I didn't

potent jolt
#

lol

random hamlet
#

I multiplied mix fac by col.a and it works now

potent jolt
#

hows your shader ventures going

random hamlet
random hamlet
#

(I created funy deepfry shader, flashbanged shader, red shader and blue shader)

#

(all by accident)

potent jolt
#

lol

#

just up the saturation and call it vibrant

random hamlet
#

I want to add a bit of contrast + add atmosphere shading (dark colors become bluer)

potent jolt
#

fair

random hamlet
#

will be the most popular plugin ever

potent jolt
#

should be support for that

random hamlet
#

yeah

#

I mean its just messing with colors

halcyon jay
#

Hello, my name is ์นญ์นญ์ด.

#

It is my city ํŠธ๋กค๋งจ.

random hamlet
#

the fog

#

@potent jolt check this out

potent jolt
#

yoo

#

gatorade

random hamlet
#

I have no idea if do shaders need plugin.manifest but imma put it just in case

halcyon jay
#

๋ฏธ๋ž˜์˜ ๋น„๊ทน์ด๋ผ...

random hamlet
halcyon jay
random hamlet
#

Ppunish 970923962735407124

smoky glacier
rare grottoBOT
#
Case #2529

์นญ์นญ์ด#8615 has been warned: Repeat use of wrong channels

random hamlet
#

It's fine, but use #language-bar to chat in korean and please use proper channels

digital kindle
random hamlet
#

it was a mistake in code which I already fixed, also check #information for example

errant gale
weak mural
#

@light plinth i want to know, what the "extend" mean in this information? #information message

because i still can add a new values into default libraries, but, cannot iterate environments anymore. (1.10.78)

light plinth
elfin geyser
#

Nice we don't need to put unique module names for each plugins

elfin geyser
potent jolt
#

why use that when you can already show notifications

weak mural
#

actually, package.loaded can be useful for using module inside luawrapper scripts. it's cleaner than make it as global.

light plinth
#

It breaks the package loading sandbox that has been introduced, henceforth it was removed.

weak mural
#

is this Add table identity preservation for storage tables for more compact and reliable serialization?

light plinth
#

It's :star2: Isolate Lua module importing between plugins

#

the former is because hadestia had some recursion action going on

#

and lobby decided to add support for it

potent jolt
#

and other cases that would otherwise result in duplicate tables

elfin geyser
elfin geyser
#

Gezz i thought Script.EVENT_REPLACED was already there, why it was at .79

light plinth
#

Because 78 was already released at the time of your request

elfin geyser
#

๐Ÿ˜” long wait again

potent jolt
#

jebaited

elfin geyser
#

No no no

elfin geyser
#

Textframe{}s inside listbox object are unable to scroll why

potent jolt
#

probably nested scrollable items doesnt work

elfin geyser
#

it works fine before

#

Around 10.9 and below

elfin geyser
#

Is there feature to make listbox slidable than scrollable

weak mural
ripe plank
#

Hey guys

#

Whats the code for police or health

potent jolt
#

"influence health":0, "provide aspect health care":0

#

"influence police":0

ripe plank
#

Thx

potent jolt
#

influence is the range it covers and aspect is how many patients the hospital can have

ripe plank
#

So where can I learn the others?

potent jolt
#

waste disposal and body disposal are not available to unprivileged plugins

ripe plank
#

Oh thanks

merry ivy
#

tiny picnic decos for parks

#

fec wrong channel

neon mason
#

How do i make a decal

cerulean crypt
#

How to make botton frames

cerulean crypt
#

Just like this

torpid spear
#

what do you mean

#

you just want to add a custom frame to a button?

#

simply use icon = draft in your button definition

random hamlet
cerulean crypt
#

I think the mod are too strict on that

#

I'm not good in lua

random hamlet
#

it doesnt look good tho

#

fixing the button would be nice

cerulean crypt
torpid spear
#

it's still unclear what are you even trying to achieve

potent jolt
#

lol

#

he wants a ninepatch

#

@cerulean crypt a ninepatch is a series of 9 frames in this order

#

theyre stretched to make the full button

torpid spear
#

you just want to resize the golden button or what?

#

also I love self promo in plugins

potent jolt
#

and then you can set the framedefault and framedown of the button to that ninepatch

random hamlet
#

self promo ๐Ÿคข

weak mural
#

it's quite easy to draw the subs button.

weak mural
cerulean crypt
#

Wow thanks I will try that later

random hamlet
#

I thought drawing a button was easier

#

I just hope it wont be always stuck on the main screen

potent jolt
#

you could use a button and use its ondraw for the sub text and logo

random hamlet
#

or just dont self promote

potent jolt
#

no GunR

cerulean crypt
elfin geyser
#

Isn't that too complicated than doing as gui object?

weak mural
#

it is a gui object. lol

elfin geyser
#

Oh lol I thought it was done just using drawings

weak mural
#

don't forget the onDraw field is exist

elfin geyser
#

I don't understand why it needs 'do' loop

weak mural
#

to scope local x, y, h that's will not change those from function argument if any drawing objects after that.

elfin geyser
#

Ahh i see thanks for the knowledge

weak mural
elfin geyser
#

Yeah i got it

misty python
#

well, i remember what a variable is

potent jolt
#

wild

#

epic script

misty python
#

shut the hell up!!

#

are you happy now

#

you know

#

vsc is free

#

why not use vsc

light plinth
#

it's electron

misty python
#

isn't discord electron as well

#

or am i mixing it up with react native

light plinth
#

Correct

#

Discord desktop app is Electron

#

Android and iOS is react native

misty python
#

well then, why complain about vsc being electron when we're already using an electron application

light plinth
#

but the electron itself is just a browser running discord react client

#

You see

#

VSC devs at least are competent

#

*mostly

#

Discord aren't

#

It's slow as heck

misty python
potent jolt
#

vsc is fast

#

discord is garbo

light plinth
#

look at who decided to wake up

potent jolt
#

i know right

#

i suprise myself sometimes

light plinth
#

40 min biking

#

3 hours sleep

potent jolt
#

perfectly balanced

misty python
#

tf is a path

light plinth
#

Don't worry about it

#

Just check it

#

It's an environment variable

random hamlet
#

Is the26 becoming a coder now

light plinth
#

Which lets shell know where binaries are located

misty python
#

shell restart is what, like explorer.exe restart or wha

potent jolt
#

cmd

light plinth
#

or windows shell

potent jolt
#

lets you use the commands in cmd

misty python
random hamlet
#

I learned it myself ๐Ÿ˜Ž

light plinth
#

Have to restart windows for java path updates to be noticed

random hamlet
potent jolt
#

theres other implications but thats not your problem

random hamlet
potent jolt
misty python
#

i can make it so an object disappears when you click on it in roblox

misty python
#

is that enough

potent jolt
#

ill never forgive minecraft 1.12

light plinth
#

lol

#

Me with 4 java installs

#

ah

#

and bundled one with ASS

misty python
#

rate my code

#

0 errors

#

0 warning

light plinth
#

chief

#

that's a setup screen

misty python
#

it's code anyways

potent jolt
#

chief

light plinth
#

Code collects usage data

#

cringe

potent jolt
#

download lua langauge server

misty python
potent jolt
#

and mayhaps, obtain erksmit documentation

light plinth
#

vscodium fans, where you at

misty python
potent jolt
#

or download erksmit scripts for perusal

#

(complex industry not included)

misty python
#

erk

#

what theme do you use

potent jolt
#

code theme

light plinth
#

simple

#

ddlc

potent jolt
#

(i never changed it)

light plinth
#

Doki doki themes

#

or whatever

torpid spear
#

lobby uses light mode ๐Ÿคฎ๐Ÿคข

light plinth
#

lobby doesn't code under the bed like us

potent jolt
#

rtobby uses discord light what do you expect

#

lobby is a upstanding daytime programmer

torpid spear
random hamlet
#

Someone changes vsc theme?

misty python
#

why does this have one piece's logo wtff

light plinth
#

Vue

misty python
light plinth
#

my man

random hamlet
#

Wtf is vue

#

Is that another obscure language

light plinth
#

reactive JavaScript framework

random hamlet
#

Close enough

potent jolt
#

its another js framework whatd you expect

light plinth
#

i like it

potent jolt
#

thats the one thats like angular but lite isnt it

light plinth
#

I use it with php

misty python
#

i should learn php

light plinth
#

who's angled grinder

#

and why is it lite

potent jolt
#

worked on a react website today

#

wasnt fun

light plinth
potent jolt
#

not yet

misty python
#

erk which one

light plinth
#

good

potent jolt
random hamlet
#

All of them of course

light plinth
#

downgrade to log4j

#

and send production IP

potent jolt
#

the more lua it is the better

potent jolt
#

gottem

light plinth
#

pain

misty python
light plinth
#

look up

#

doki doki

#

in the extension browser

misty python
#

lovely

light plinth
#

rico delgado

random hamlet
#

The26 I was surprised you're becoming a coder

#

But this

light plinth
#

it's good

potent jolt
#

it comes with the title

misty python
#

hmm weird

#

there's no dislike button

light plinth
#

i use rem theme to assert dominance when in public

random hamlet
#

I don't code in public and I don't change themes

light plinth
#

then I change it back

misty python
light plinth
#

because I can't see my 3000th line of code in the code preview

misty python
#

@light plinth HELP HOW DO I OPEN GET STARTED AGAIN

light plinth
#

no idea

zinc isle
#

brute force

light plinth
#

might as well wipe windows and reinstall endeavour os

misty python
#

kulche

#

save my life

#

i need to open get started again

torpid spear
misty python
#

please

#

i beg you

#

kulche please

#

i can even call you kulche458 if you want

light plinth
#

because kulche457 was already taken

torpid spear
misty python
#

YES!!!!!!!!

torpid spear
misty python
#

noobs i didn't need your help ๐Ÿ˜Ž

light plinth
#

too many Polish for my liking

misty python
#

don't eat pierogi z serem from bar janosik

torpid spear
#

pierogi z serem ๐Ÿคข
pierogi ruskie ๐Ÿ’ช

misty python
#

now to figure out how to get the piss to spread

potent jolt
#

script update

#

obviously

#

for that framerate dependent animation

misty python
#

shut the heck up

light plinth
#

imagine using web interface for git

misty python
#

screw you, notepad++

#

now vsc is my best friend

#

oh lmao

potent jolt
#

screw notepad++

#

dont like it

misty python
#

cat moment

light plinth
#

notepad for when you need to open those 3 gig csv files

misty python
#

anyways, @potent jolt, what is that funny erksmit documentation you want me to install

#

here we can see a wild erksmit searching for prey in the game Genshin Impact

potent jolt
#

now hold on just a second buster

#

im a programmer not a documenter

#

or like

#

actually

#

@light plinth exclusion of . prefixed folder when exporting a plugin when

misty python
#

it's just 130 kilobytes bear_shrug

potent jolt
#

yea but that doesnt stop me from including the 7mb .git folder in complex industry

misty python
#

fix yo unused lines

potent jolt
#

shut it, its machine generated

misty python
#

sounds like an excuse

potent jolt
#

of course it is

misty python
#

now shut up and let me become the most famous and talented lua programmer the world has ever seen

potent jolt
#

alright

misty python
#

nah jk we can keep talking

#

i dont wanna start

potent jolt
#

no get writing GunR

misty python
#

how do i even start

potent jolt
#

look for the scripting tutorial ofc

#

getting started has a dedicated lua section

#

after you do the basic tutorial do real time script editing, its convenient in your case

misty python
#

eh i don't need gui for now ยฏ_(ใƒ„)_/ยฏ

elfin geyser
#

Yellow pad best IDE

uncut field
#

Only professionals use online gdb for programming

#

Or you know, that's the impression my professors give me

#

Two years in and most students don't know what a compiler is

potent jolt
#

simply interpret it

uncut field
#

Let me generate binary by hand real quick

#

Can't be that hard, there's only two numbers

misty python
#

question

#

if i want a function to be triggered on a daily basis, what do i need to do with script:nextDay

potent jolt
misty python
#

at least the math.random works

#

what, i can't do this

#

@potent jolt you are my savior, please tell me what the heck am i supposed to do

potent jolt
#

wheres your declaration of xcoord

misty python
potent jolt
#

bro

misty python
#

what now

potent jolt
#

you just assigned the function building.getx to xcoord

#

instead of running the function

#

you tried to add 1 to building.getx

misty python
#

heck i'm dumb

#

okay then tell me how to get the x coordinate

#

lmao

potent jolt
#

observe

#

Building.getX()

misty python
#

:clueless:

potent jolt
#

also

#

first off

#

you can only call getX on a building object, not on the Building table itself

#

alright

#

so what do you want to do

#

spread piss?

misty python
#

yes

#

obviously

potent jolt
#

use script:getDraft() to get the draft the script is attached to

misty python
potent jolt
#

whichever that is

#

cant say i know which one that will be

misty python
#

okay then how do i figure out what index should it be

potent jolt
#

read the doc

#

Gets the position of a specific building of a specific draft by it's index. The index starts with 1 and ranges up to City.countBuildings(draft).

misty python
#

to quote ian, anything works if you read the documentation carefully.

potent jolt
#

you can just use a for loop and range up to the building count

misty python
#

@potent jolt i'm dumb

#

how am i supposed to get the stuff that something a City.countBuildings(draft) would return?

potent jolt
#

lol

#

you got the draft using script:getDraft() right

misty python
#

ye

potent jolt
#

then pass that to the countbuildings

#

and it gives a number

misty python
#

okay i think you might need to give me a little example

#

i learn best from those :)

potent jolt
#
for 0, buildingcount, 1 do
  get yer building
  do stuff with it
end
#
local draft = script:getDraft()
local buildingcount = City.countBuildings(draft)
misty python
#

thank

potent jolt
#

you can call getdraft in script:init instead

#

if you do it daily ja will break your kneecaps

misty python
#

i would like to save my precious kneecaps

#

okay, but then if i get the coordinates with getbuilding, how can i make it so it spreads to a nearby tile

#

like, how can i modify one of the coords or smth

#

@potent jolt expect a lot of pings lol

potent jolt
#

lol

#

i got time

#

you can use the builder module

#

to build your draft on the other tile

misty python
potent jolt
#

ye

#

you might wanna use it to remove any building already present

misty python
#

so

#
Builder.buildBuilding(draft, location)
#

how am i supposed to add to the location

#

let's say i have this right now @potent jolt

#

still not using a for loop but whatever

potent jolt
#

eh

#

why do you just

#

instead of calling the same thing 4 times

#

consider changing slimelocation and calling it once

potent jolt
misty python
#

but my question is, how am i supposed to edit the coords returned by slimelocation

#

oh hang on, do i need to like, ```lua
Builder.buildBuilding(slimeDraft, slimeLocation, slimeLocation)

#

okay so i am starting to make some progress

#

it is spreading, but not in the way i like

potent jolt
#

you see

#

i thought youd have gotten this from roblox already

#

but functions in lua can return multiple values

misty python
#

i might've, but i probably forgor

potent jolt
#

city.getbuilding returns a x and a y paremter

#

you can recieve them like

#

slimex, slimey = getbuilding

#

right now slimelocation will just be the x coordinate

#

and youll discard the Y

misty python
#

does it return as a table

potent jolt
#

no

misty python
#

how is it returned in my case

potent jolt
#

getbuilding returns x, y

#

2 return values

#

2 assignments

misty python
#

oh now i get it

potent jolt
#

local x, y = getbuilding

#

would work

misty python
#

okay this is weird

potent jolt
#

gotta point out that this is exclusively a lua thing

misty python
#

my result happens to be weird

potent jolt
#

lol

#

what did you do

misty python
#

typically it doesn't spread

#

but it only spreads in the 5 locations i originally put and that stayed while the script is updated

#

even if demolished it just reappears

potent jolt
#

lol

elfin geyser
#

Also why calling City module outside functions

potent jolt
#

well where do you get the slimecount and locations

misty python
#

oh nice

#

now it works after relaunching the game

elfin geyser
#

Check your logs

misty python
#

oh god

potent jolt
#

did you enable script reloading

#

if you didnt

misty python
#

i did