#plugin-lua-and-fun

1 messages Β· Page 11 of 1

torpid spear
#

marcato are you ok??

stoic vector
#

No im fine

#

Just sleep deprivation drunk

#

Yes yes looa is simple jason

potent jolt
#

alright if thats what you want to believe

stoic vector
#

No need annoying ""

#

And long fool string of text heheheh

torpid spear
#

the sleep deprivation be hitting hard

stoic vector
#

Now time to code the City Destroyer 42-069

#

With it's first task

#

Burn every building in the city

torpid spear
#

I'm afraid that might burn some other stuff as well

#

like your device, and possibly its' surroundings

potent jolt
#

thats details

#

whyd i have to make a plugin that requires so much maths

torpid spear
#

I'm not going to even ask what are you doing

#

meanwhile I'm doing dsa stuff 🍡

light plinth
#

he's making a DSA dlc

torpid spear
#

we're going to uranus??

potent jolt
#

nah its cinematic camera tool

#

i want to make waypoints with diffrent zoom levels between them, so that the camera changes zoom level as it moves

#

but moving the zoom level linearly looks unnatural

#

so i will modulate the way the zoom goes with this

#

thats where excessive amounts of maths come in

torpid spear
#

yeah im out

potent jolt
#

i knew youd get it

light plinth
#

If your plugin doesn't use the gauss function like my discord bot does, I don't want it

potent jolt
potent jolt
#

had a genius idea

south garnet
#

Nice functions you got there

potent jolt
#

thanks theyre 3x^2-2x^3 and 6x-6x^2

light plinth
#

My God

#

Genius

potent jolt
#

with this i can calculate the required zoom change per frame

potent jolt
soft salmon
#

:0

potent jolt
#

i wonder if i slap a function into a default module like util would it stay there for the rest of the session

elfin geyser
#

Just do

potent jolt
#

this might get out of hand

stoic vector
#

lua.lua when

elfin geyser
#

So Complex industries are ongoing now?

potent jolt
#

ye im working on it

elfin geyser
#

I'll look up on your branch later

potent jolt
#

i deleted my branch im just working on main now

potent jolt
#

I don't reccomend looking at it right now anyways because I'm in the middle of refactoring a bunch of code

potent jolt
stoic vector
#

What does it mean, please help.

#

Game crashes every time I'm using my "texture pack"

#

Looks like a Lue error from one of kingtut's plugins i think

#

i have all plugins disabled

#

Ah

#

Looks like the game had a stroke

stoic vector
potent jolt
#

But the table you called it on didn't exist

stoic vector
#

hm

#

the same thing is when im opening the game

#

another error

potent jolt
#

You cannot call getabsoluteday outside a city

#

That's a different one

stoic vector
#

yes yes

potent jolt
#

Do you use math random

stoic vector
#

no

potent jolt
#

That's wack l

stoic vector
#

I just have my plugin

#

in jsons i used default game ids

potent jolt
#

Do you even use any scripts

stoic vector
#

no

#

json only

#

like in simple plugins

potent jolt
#

You must've broken something by overwriting base game stuff

stoic vector
#

oh

#

will try to fix it doing random things

elfin geyser
#

In not lua related that's probably an out of bound array indexes

uncut field
#

I breathe a sigh of relief everytime someone mentions that an error they found isn't from me

fringe mica
#

Thought this is the right place.
So how to fix the alignment of the car? The west and east frames are offset while the north and south frames aren't. Gfx and json were based on in-game cars. It's v2

torpid spear
#

we can't help without your plugin resources

#

also not scripting, move somewhere else

fringe mica
#

@torpid spear I'll pm you

torpid spear
#

sure

stoic vector
#

How do i issue a fire disaster on a certain building with a toggleable button

torpid spear
stoic vector
#

Also a custom dialog

torpid spear
#

see the gui compendium

elfin geyser
#

See all tge libraries

stoic vector
#

Does anyone have a cheatsheet for the icons

potent jolt
#

check in game

#

get the plugin developer tools plugin

#

it includes a gui example, with a list of all available icons

stoic vector
#

When I use my plugin, this error appears when loading the game. What does it mean?

#

I haven't any scripts or coding. Json only.

potent jolt
#

Game tried to get a random number

#

Those are in a range of 0 to n where n is passed by the game

#

Game tried to pass it a negative value

#

Obviously you can't do that

light plinth
#

landTiles array was empty

#

that means game failed to locate any of the following drafts

#

$ground00, $dirt00, $sand00

potent jolt
#

But why would that happen

light plinth
#
if (seed.equals(SEED_SAND) || seed.equals(SEED_SAND_ONLY)) {
            landTiles.add(Drafts.get("$beach_gnd00", GroundDraft.class));
        } else if (seed.equals(SEED_GRASS) || seed.equals(SEED_GRASS_ONLY)) {
            landTiles.add(Drafts.get("$ground00", GroundDraft.class));
            landTiles.add(Drafts.get("$dirt00", GroundDraft.class));
            landTiles.add(Drafts.get("$sand00", GroundDraft.class));
        } else if (seed.equals(SEED_SNOW) || seed.equals(SEED_SNOW_ONLY)) {
            landTiles.add(Drafts.get("$permanent_snow00", GroundDraft.class));
        } else {
            for (int i = 0; i < Drafts.LAND_TILES.size(); i++) {
                GroundDraft draft = Drafts.LAND_TILES.get(i);
                if (draft.autoBuild) {
                    if (draft.spawn == null) {
                        landTiles.add(draft);
                    } else {
                        spawnableTiles.add(draft);
                    }
                }
            }
        }
potent jolt
#

I get that

#

But it's on startup

#

And why would those drafts fail to load

light plinth
#

you can override drafts and or disable them

potent jolt
#

Probably overweote something you shouldn't have

torpid spear
#

placing graphics on the world texture would probably be a safer method

stoic vector
#

there was a graphics issue

#

i made count 12 but there were only 6 frames

#

i fixed it

potent jolt
#

Lua error always have lua vm in the stacktrace

#

Well, "always"

#

Except when they dont

stoic vector
#

so thats not my json issues

#

because frames and count values are equal

potent jolt
#

Try disabling your plugin

#

Or just move it out of the folder temporarily

stoic vector
#

no error

#

cool but what if I want to use my plugin

#

wait i will try to change ids

potent jolt
#

You probably still have a problem then

stoic vector
#

with other id works fine

#

That's why we will never have a texture pack for theotown

torpid spear
#

not true

stoic vector
torpid spear
#

try to use my method maybe

#

never had problems with that

stoic vector
#

yes

#

but with trees

torpid spear
#

also how does your plugin look like

torpid spear
stoic vector
#

i mean

#

my trees are higher

stoic vector
torpid spear
#

we need the code

#

πŸ˜”

stoic vector
#

oh

#

wait

#

this? First file is for ground and second one is for trees

torpid spear
#

and this causes errors?

stoic vector
#

but if i set games id

#

like $tree00

#

with my own id works well

torpid spear
#

if you want to overwrite game buildings you use "inherit" and define the values you would like to change

#

can I see how are you trying to overwrite it

stoic vector
#

yes

#

but i need to understand how firstly

#

Oh

#

found an example

#

like that as i understand

torpid spear
#

probably

#

also what is even title id

light plinth
#

title id is wrong

#

title id should refer to translation ID as defined in translations

#

should be kept empty when inheriting to keep the default values

stoic vector
#

oh

#

removed already

#

error again

#

even with inherit

torpid spear
#

show code

#

I would recommend to remove any redundant attributes

#

like the influences and metatags

stoic vector
#

will try to remove

#

error

torpid spear
#

mfw

#

error

stoic vector
#

it also wants me to add override

#

am i really need it with inherit

torpid spear
#

move inherit/overwrite to the very top

#

and try it with both of those

stoic vector
#

the same

potent jolt
#

overwrite overwrites the original draft

#

inherit inherits the tags of the original draft

#

also the order in which tags is placed in a draft is irrelevant

stoic vector
#

one more interesting thing. Trees are not moving now.

potent jolt
#

lol

torpid spear
#

you probably deleted the frames per variant part

stoic vector
#

some of them are in wind position

stoic vector
potent jolt
#

also

#

you only need to specify the tags that you want to change

#

theres no need to specify the width and heights again

stoic vector
#

Okay, I will go learn java first to solve the problem

potent jolt
#

simply reverse engineer the game

weak mural
stoic vector
stoic vector
#

The notes button aint workin for me

brazen sluice
steep barn
#

Can anyone help me I was trying to make a night animation

potent jolt
#

Or if you did, it's not a valid type

#

Hang on

#

I think you forgot to put a comma behind the type line

steep barn
#

How do I type the correct way ?

potent jolt
#

I can't tell you if I don't know how you wrote it in the first place

steep barn
#

I tried following this I ignore the ID and just went from type animation-> light true -> light switching true and frames

#

Let's say I got confused what is Array , Object and Value XD

stoic vector
#

Uhm

#

This channel is only for Lua and Fun discussions

elfin geyser
#

Is "TA" was Jeremiah?

stoic vector
#

Probably because of the city notes

potent jolt
inner maple
#

Dats cool

small forge
stoic vector
potent jolt
stoic vector
thorn sigil
#

How can I spcript on mobile or is it impossible

potent jolt
#

Although I don't reccomend it, it's entirely possible

#

All you need is a text editor

#

Preferably one with Lua syntax highlighting

thorn sigil
#

Ok

dusky stump
#

@thorn sigil

#

Use this app

daring sonnet
#

Know a good app for IPhone?

brazen sluice
#

ha, apple user

#

laugh at this person

elfin geyser
#

Sit and eat apple

thorn sigil
low jewel
#

too?

#

I remember him saying he uses an iphon3

#

or am I wrong

daring sonnet
potent jolt
#

Grabbed from a totally unrelated game

wary pewter
#

I'm not a new player but same

low jewel
#

can comfirm

#

comftim

light plinth
light plinth
brazen sluice
#

Wtf is moon doing in the game?

low jewel
#

ogg topic

rare grottoBOT
#
Case #6zKH3G

LipokReal#6241 was banned for the following reason: Spam.

stoic vector
#

Do not the soammig5

thorn sigil
low jewel
#

ok

serene elm
# potent jolt

i play this game for 2 years and i still dont know tf is that

wary pewter
#

It's some hacker coding stuff

smoky glacier
full topaz
#

Wow

potent jolt
#

haha good tutorials for lua

#

nice joke

dapper flicker
stoic vector
#

if.(seks)
then.DoSeks

end

#

Simple looa

lost kindle
random hamlet
merry shale
#

real!!!

stoic vector
#

peer

dapper flicker
potent jolt
potent jolt
stoic vector
#

Learning lua is probably like learning json

#

But just more different

potent jolt
#

Well no it's really not

lost kindle
#

I have no idea how lua works

stoic vector
#

Its easy

potent jolt
#

There's only like

#

4 types

stoic vector
#

Slightly easier than writing json

#

Without violently typing ""

potent jolt
#

Instead you can violently type then every if and for

stoic vector
#

if (seg.equals(FOOL)
then (seg.is(Fool)

end

potent jolt
#

While technically correct code, that's ugly

stoic vector
#

Loa is a fun and brain-straining

full topaz
#

Lua should be in the course major 🏫

uncut field
#

if (seg.equals(FOOL);
then (seg.is(Fool));

end;

#

Fixed it for you ;)

#

Now your Lua code is perfect

stoic vector
potent jolt
#

so many tabs

stoic vector
potent jolt
#

its needed

stoic vector
#

Complex industri scripts leaked???

potent jolt
#

😳

#

inferring the content of the scripts is left as a light excercise

open arch
#

oh noo

uncut field
#

For fun, you should combine all the scripts into one main script

#

Another light exercise for you

potent jolt
#

itd be uh

#

a few lines long

#

there are 1284 lines of lua

#

the longest script is the logistics script at 163 lines

#

it will probably become a lot longer with optimizations

weak mural
#

half of those are comments. lol

open arch
#

ian hot fire

potent jolt
#

I need to preserve my sanity

misty python
potent jolt
#

It's both lua how hard can it be

uncut field
#

Programmer level: 10000

#

This is what happens when I'm too lazy to come up with actual solutions to problems

#

Looks like yanderedev worked on this project

light plinth
#

sounds unoptimized

uncut field
#

What do you mean? 36 if statements aren't the pinnacle of design?

light plinth
#

They are only good if there are 36 if statements over multiple abstraction layers

#

otherwise, you're a yandev

potent jolt
#

you should implement isEven

viscid pebble
#

Hi everyone, can anyone help me pls? I drew a night frame for the windows of my building and I tried to implement it with a plugin in the game but it won't accept it. Is there something wrong with the code I am using, how can I fix it?

brazen sluice
#

""needs road":true" :(

viscid pebble
#

ok

#

πŸ˜‚I can fix that later but It won't help me much

potent jolt
#

whats the name of your image

viscid pebble
potent jolt
#

is it though

#

because its saying its wrong

viscid pebble
potent jolt
#

you put ()

#

your file name does not have ()

#

so, it is wrong

viscid pebble
#

aah, mamma mia!πŸ˜…

viscid pebble
potent jolt
# viscid pebble

As it says, you did not specify the width and height of your building

#

This measurement is in tiles

viscid pebble
#

I get it

viscid pebble
#

The game Is making fun of me or I am clearly missing something πŸ˜‚πŸ˜­

potent jolt
#

Ah

#

You see

#

The game does not support rectangular buildings

viscid pebble
#

I had meant that height there as the height of my Image and I didnt understand It was referring to the baseplate..

#

I am for real trying to figure out things my self but wtf did I messed up this time?

#

such a noobπŸ™ƒ

viscid pebble
viscid pebble
potent jolt
#

Not on the frames line?

#

I'd have to see the entire thing then

viscid pebble
#

lol

potent jolt
#

Ah

viscid pebble
#

Now.. I have only to fix this messπŸ’€

#

see you in a couple of years

potent jolt
#

That's definitely not ideal

viscid pebble
#

And why they switched sides?like.. the building shines while the windows that are supposed to light up are dark

#

how

viscid pebble
tardy elm
viscid pebble
potent jolt
#

Looks like hes

#

Yes

#

You did swap them

dusky kite
#

hello guys, the scripts use Lua for programming?

potent jolt
#

yes

#

finally, some proper typehinting

#

and documentation

elfin geyser
#

Cool

#

So ? means optional?

potent jolt
#

yes

#

although theres not really an issue with putting [optional] in the text

stoic vector
potent jolt
#

nice

elfin geyser
#

The slider thing and scrollers is the only things i need

dusky kite
potent jolt
#

I don't

dusky kite
#

aah ok

stoic vector
elfin geyser
#

Where's my blue light protection

potent jolt
#

gradients?

stoic vector
gentle canopy
#

I have blue-defence glasses so Im good πŸ‘

torpid spear
#

I want to acquire the gui

stoic vector
#
  1. Turn on debug mode then experimental features, if they are disabled
  2. Turn on "Revamp GUI" in "Plugins" section

May cause lag on some low-end devices

If TheoTown lags or crashes because of this plugin, I need feedback

torpid spear
#

amazing

weak mural
#

unfortunately, drawRect is broken on the latest version.

full topaz
#

Rest in peace for that lua

potent jolt
#

where issue

weak mural
#

background, i use drawRect only for it.

potent jolt
#

thats wack yeah

cerulean crypt
#

Help pls

How can I do this

vale estuary
#

Helpp

What is this bug or just normal

torpid spear
#

you downloaded some kind of a plugin, also not scripting

#

dusko car bottom text

elfin geyser
#

Does it includes custom sliders?

open arch
#

Dusko car

tawny cliff
#

Alright so know one wants to build a national guard so I will. Now I need help cause this is my first time. 1st question, where is the website to make it?

obsidian chasm
#

A national guard

#

Mate

#

Sorry to destroy your dreams

#

But that is too hard

tawny cliff
#

I wanna try xD

#

Whats the site to build?

lost kindle
#

gl coding lua

#

You need lua to do complex stuff

stoic vector
#

Due to how complex lua is

lost kindle
#

Pca only does json

tawny cliff
#

Aw so I can't do it on mobile?

stoic vector
#

Manually

#

Theres no automated silicon sorcery to write it for you

tawny cliff
#

Bruh

#

Who cares I'm desperate gonna try

obsidian chasm
#

LUA hard

tawny cliff
#

I'm not stopping till I do it

#

Tmrw XD

stoic vector
obsidian chasm
#

Or if he is desperate, 420-500mins

#

depends

stoic vector
#

Lets wait and see

obsidian chasm
tawny cliff
potent jolt
#

if you dont have previous programming experience, i doubt you can do it

tawny cliff
#

Could yall maybe just stop saying stuff like that jeez so negative and mean

uncut field
#

I'd recommend looking up a few general programming tutorials before you begin

#

Those will give you a better idea of where to start

tawny cliff
#

Kk

uncut field
#

Then look up some tutorials about Lua specifically

#

Then start trying to make scripts for your plug-in idea

#

Gotta start small

tawny cliff
#

Ok I'll start trying to find some on youtube

potent jolt
#

Jumping straight to making a plugin is skipping too many steps

#

You should follow some tutorials first on making simple lua programs outside tt

gentle canopy
open arch
#

.-.

stoic vector
#

Trailing comma

vernal stratus
#

what trailing

stoic vector
#

This is for discussing plugin lua and functions

full topaz
#

Plugin name?

stoic vector
full topaz
#

XD

stoic vector
stoic vector
stoic vector
lost kindle
#

ohhh

#

What's that

wary pewter
lost kindle
#

aos

stoic vector
lost kindle
#

ok

#

aos

stoic vector
stoic vector
potent jolt
#

why does it utalize drawRect, instead of drawLine?

#

also generateId function can be replaced by Runtime.getUuid

open arch
#

hot fire

elfin geyser
#

Uhh hmm soo sliders are actually drawings?

twilit spindle
low jewel
#

"Plugin name?" moment

tardy elm
twilit spindle
#

What are the best building mods

stoic vector
#

Also why do people say plugins are mods

dapper flicker
stoic vector
#

Y'all play too much Minecraft

dapper flicker
#

no, too much cities skylines

stoic vector
#

is shading good

stoic vector
#

Not so noticable

elfin geyser
#

Not scripting

stoic vector
#

oops wrong chanel

left idol
#

I'm new to discord, any complete plugin tutorial on what to add to the creation?

gentle canopy
#

Also, if you dont know how to install plugins manually, I also recommend you to check the Youtube video by Kamikazi "Installing plugins in the new way (1.9.95+)", the link is also in the "Getting started" page in the TT forum website

gentle canopy
#

Yeah, or that channel too

dapper flicker
#

dont click

#

its in the wrong channel, and also its gibthub instead of github so everytime you see a link like these check carefully

lost kindle
#

gibthub

#

πŸ—Ώ πŸ—Ώ πŸ—Ώ

dapper flicker
#

gib tub

lost kindle
#

@potent jolt

gentle canopy
#

@potent jolt Again

potent jolt
#

god

rare grottoBOT
#
Case #gmGqBS

zxc#0154 was banned for the following reason: nitro scam

potent jolt
tired escarp
#

Theotown has weapon against them now.

fringe mica
#

How do I make a plugin for example a deco, when clicked, will turn into another deco etc. It changes back when it's clicked again and the cycle repeats

#

I know it would be "on click fun"but I don't know what to put next

potent jolt
#

Check section 2

stoic vector
#

[
{
"id":"$ncpc01",
"type":"category",
"title":"new category",
"frames":[{"bmp":"icon_pic.png"}],
"ordinal":10
},
{
"id": "$idpc01",
"type": "commercial",
"level": 2,
"author": "autor",
"width": 1,
"height": 1,
"preview frames":[{"bmp":"pic.png"}],
"frames": [
{"bmp": "pic.png"}
],
"frames winter":[
{"bmp": "winter_pic.png"}
],
"animation":[
{"id":"2x2l", "x":3, "y":-2},
{"id":"2x2l", "x":4, "y":-1},
{"id":"1x3l", "x":6, "y":-1}
]
}
]

#

the building doesn't appear in game

#

the category works tho

#

can someone help?

#

@gentle canopy really sorry for ping, but I think that you might know what's wrong here

#

should I make another file that makes the building in that category?

#

or sth

#

please help

torpid spear
#

everything is fine here

#

send the whole file

#

also not scripting related, move somewhere else

stoic vector
#

can i dm u?

torpid spear
#

sure

stoic vector
#

gimme sec

gentle canopy
#

Im checking the category tutorial in the forum and I dont know what might be wrong, I never used categories, sorry
Also, futures questions about JSON code should go in #plugin-discussion

south garnet
#

RCI buildings won't appear in normal categories, only in the manual build categories @stoic vector

gentle canopy
#

Dont worry, just be sure to use the correct channel next time πŸ‘

south garnet
#

change the type of the building to soemething different

stoic vector
south garnet
#

yep

stoic vector
#

okay lemme try

south garnet
#

check the type tags here

stoic vector
#

uhm it appears in awards

#

my category is still empty

torpid spear
#

use other channels

#

this is for lua or fun

stoic vector
#

oh

frigid sparrow
stoic vector
frigid sparrow
#

okidoki

tardy elm
#

Sad
:Improperuseofpensive:

#

Also seems like the lua and fun only has been being completely ignored for the last week in this channel

rare grottoBOT
#
Case #TzHC1N

Aleevf#3700 was banned for the following reason: scam

potent jolt
#

again with this

steady cedar
#

omg

#

ban me rq

potent jolt
#

be carefull what you wish for

#

because i will do it

#

and i dont have the permissions to unban

steady cedar
#

oof

solid scarab
stoic vector
elfin geyser
#

?

stoic vector
elfin geyser
#

Doesn't a lua programmer know that?

stoic vector
open arch
#

Is it possible to make an anim change over time?

#

Like it changes color based on time of the day

#

Soo you can apply a shadow on a building; at mornings and afternoons shadow will be orange, noon and nights will be zero shadow

#

Somebody should try this

potent jolt
#

By using a gray overlay, and drawing it at various colors

open arch
#

nice

#

imagine that's being implemented to game

#

probably there would be a new code line for extra shadow anim, kinda like night anim we have

torpid spear
#

that would be too complicated but you can indeed do this

potent jolt
#

why would they implement a special thing for it, when you can just do it via lua

#

you could even just modularize it and use the meta table

open arch
#

.-.

open arch
#

Oh yeah that dubai plugin already does that. Probably possible to test some things out with it

#

It probably wont be me the one testing it but

potent jolt
#

just learn lua

#

its "easy"

open arch
#

not yet

#

in 2024 maybe

open arch
#

oπŸ€“

torpid spear
#

is it me or rotation aware animations don't work with the drawing module

elfin geyser
#

Yes

#

X & Y positions are different with rotations

torpid spear
#

sus

#

they keep rotating despite their 0 speed and rotation awareness

potent jolt
#

Lol

#

Maybe draw the frame yourself manually

torpid spear
#

yeah that's just effort and extra two lua functions

#

this will have a significant impact on the computational performance 😭

open arch
#

😭 this emoji have a different meaning

torpid spear
#

cry

void wolf
#

a comet 10x smaller than that will still wipe out humanity

torpid spear
#

nooo not the real estate market

#

anyway, I hate lua

open arch
#

If you hate lue erksmit's solution would be the best here

#

pretty good solution for many things

torpid spear
#

ah yes let's draw frames for every color there is πŸ‘

#
  • rotation frames
potent jolt
#

Well

#

What are you trying to do, first of all

torpid spear
#

basically I want to draw a rotation aware animation on a building using Drawing.drawImage and setTile

#

which so far works fine, but the animation just spins lol

open arch
#

add "rotation aware": true

potent jolt
#

Should be easy enough, just retrieve the rotation of the city, then draw the correct frame

open arch
potent jolt
#

Here we've even got a function

torpid spear
#

yeah that's what I've been speaking about when I said 'two extra lines of code'

potent jolt
#

I'd put the rotation frames in an array with indexes 0 to 3

#

Then grab the correct one according to the current rotation

torpid spear
#

yusuf you don't know lua

#

this is not helpful at all

potent jolt
#

I wasn't aware drawimage drew animations in the first place

potent jolt
torpid spear
#

what else was it supposed to draw

potent jolt
#

Singular frames

#

And not the entire animation

torpid spear
#

aren't those defined with animation type

#

anyway

potent jolt
#

Well yeah

#

But usually you draw just 1 frame

#

At least I do

#

Ah

torpid spear
#

yeah

potent jolt
#

Since it accepts drafts

#

Now I see

#

I always fed it the frames individually

open arch
#

bro I thought I was really helping πŸ˜”

potent jolt
#

With all due respect

#

You were not

torpid spear
#

an attempt was made lol

potent jolt
#

Anyway

#

If you give it the frame number, it won't play the animation

#

You'll need to get the frame for every rotation

torpid spear
#

this looks kinda ugly but works surprisingly well

potent jolt
#

God

#

I uh

#

Man

torpid spear
#

except it changes size when I zoom lol

potent jolt
#

Alright first off

#

Let's buffer those frame numbers

#

Instead of fetching both the draft, and the frames every time

torpid spear
#

no ❀️

potent jolt
#

Fine

torpid spear
#

lol

light plinth
#

disapproved for lack of optimization

potent jolt
#

Anyways I think you need drawTileFrame

torpid spear
light plinth
#

good idea

torpid spear
#

undocumented 😳

potent jolt
#

I mean

#

It's right here

torpid spear
#

image

potent jolt
#

Close enough

#

Details, really

torpid spear
#

but it draws a flat tile

#

like terrain

potent jolt
#

Lol

torpid spear
#

so not gonna work

potent jolt
#

Does it though

#

Have you tried

torpid spear
#

(flat building :sadeline:)

potent jolt
#

I use it for my camera tool

#

Worked fine for me

torpid spear
potent jolt
#

Yeah well

#

Can't rely on the docs half the time

#

If you don't want to do that

#

Use this

#

According to city scale

#

And don't forget to call drawing.reset

#

Or you can try out the method you said wouldn't work first

#

You don't know til you try

#

Also

#

Are you using luawrapper or just restarting the game every time

torpid spear
#

both actually

potent jolt
#

Lol

torpid spear
#

I tried without to see if it changed anything

#

and I have no idea at this point

potent jolt
#

It won't change anything until you're dealing with requires and draft:call

#

So just put it on

torpid spear
#

drawtileimage doesn't work or I'm doing something wrong

#

most probably the latter one

potent jolt
#

What are you attempting

torpid spear
#

to draw the animation

potent jolt
#

Well, yeah but how

torpid spear
#

i replaced drawImage with drawTileImage

potent jolt
#

What's the code

torpid spear
#

tried both with and without getframe

#

it's hooked to script draw and settile

potent jolt
#

Did you set the tile first

#

Okay

#

And nothing appears at all?

torpid spear
#

nope

potent jolt
#

Hm

#

No errors?

torpid spear
#

nothing

#

it's just empty

potent jolt
#

Zamn

#

Well

#

I suppose that won't work then

#

Try toasting the frame

#

So you at least know you've got one

#

And it doesn't error without you knowing

torpid spear
#

interesting

potent jolt
#

Alright

#

That's good

#

So it does retrieve the frame properly

potent jolt
torpid spear
#

I could

potent jolt
#

At least in the lua

torpid spear
#

I really love the lua

#

do I just use city.getView?

#

it doesn't seem to do anything either

#

at least not with this

potent jolt
#

It works fine for me, but I'm in drawcity I'm pretty sure

potent jolt
torpid spear
potent jolt
#

Use _ to discard the value

torpid spear
#

this changed nothing

#

it's all in draw

potent jolt
#

Zamn

#

Hm

#

Can't do much without seeing the entire script at this point

torpid spear
#

sure, will send in dms

#

enjoy the pain

stoic vector
#

Here's the lua source code:

open arch
#

why this channel randomly show as not read while there are no single message

potent jolt
open arch
#

not only that but before too

#

only happens here

potent jolt
#

thats fine too, it's not my code after all

open arch
#

wtf is happening in this server

low jewel
#

?

#

?

potent jolt
#

my mans kulche probably sleeping

open arch
#

why kulche lol

low jewel
#

no context + wrong lyrics

open arch
#

I knew there was some weirdness going on

mild thistle
low jewel
#

how old are you lmfao

#

ain't no way dude

#

we're going off topic btw

open arch
#

why are you pinging me now

low jewel
#

Mate stop

#

Nevermin

#

he left lmfao

rare grottoBOT
#
Case #t1YkBh

||dsv1023||.#9353 was banned for the following reason: spam

stoic vector
wary pewter
livid root
uncut field
#

I think we all know the answer

torpid spear
#

why is getRotation output clockwise and rotation aware counterclockwise, man

potent jolt
#

haha

#

you can just, have them in the other order

open arch
#

Beautiful eyes

civic sequoia
#

I think I'm dyslexic

#

I don't understand the channel lyrics at all

zealous iron
#

Don't worry tomorrow will become normal (i hope)

civic sequoia
#

I hope, because I don't understand anything

zealous iron
#

Is upsidedown and the spelling is also the other way around

#

Confusing right?

#

Well the only i can tell if this is #plugin-lua-and-fun is by looking at the channel description

zealous iron
civic sequoia
#

oh i get it

stoic vector
#

is there a way to check game's language with lua?

light plinth
#

Try checking the TheoTown settings table

obsidian light
#

Any suggestion to improve these?

potent jolt
#

put some noise on the roofs

obsidian light
#

Ok

#

Thanks

stoic vector
potent jolt
#

you ran out of memory

elfin geyser
#

Also massive function calls

stoic vector
#

How make on click fun?

dusky stump
#

A what

potent jolt
#

For all fun documentation

elfin geyser
#

Why icon with h & w values won't render

potent jolt
#

skill issue

#

*probably same reason drawImageRect doesnt work

elfin geyser
#

I add padding to the parent instead

stoic vector
potent jolt
#

should provide error when a negative value is passed

#

also does not call drawing.reset

#

but overall, a good temporary fix

open arch
#

is that the complex industri bug

#

the reason of it or whatever

potent jolt
#

no, just the drawing

#

it doesnt error just nothing actually happens

stoic vector
stoic vector
terse matrix
low jewel
#

oi nice tips for lua scripting
thanks again koukeh

elfin geyser
#

Any other way to draw animated image with Drawing API?

#

Drawing.drawImage(Draft.getDraft(id), ...) -- draw animated image but would be an error cus it return table than number

Drawing.drawImage(draft;getFrame(i), ...) -- draw un-animated image :/

torpid spear
#

can't you theoretically use the second option and increment i manually?

elfin geyser
#

By that i need to use Runtime.postpone() to slower the fps that's massive when you call it onUpdate()

#

Or maybe use Runtime.getTime()

#

Also need help for name argument here

torpid spear
#

no idea

potent jolt
potent jolt
#

Pretty sure you can only earn bus tickets and region coins with it

light plinth
#

nah, region coins have a secret method for that

potent jolt
#

Not even the region coins p_ashes

light plinth
#

but bus tickets tho

#

πŸ”₯

potent jolt
#

Cheat bus tickets to earn diamonds

stoic vector
#

Drawing.drawQuad bypasses Drawing.setClipping and always affects all pixels
I hope devs will fix it in 1.10.49/50/51

stoic vector
potent jolt
#

you can access it with Settings.key

#

youre gonna have to find out yourself what key you need though

#

my blind geuss would be Settings.LANGUAGE

stoic vector
#

thank you, I'll try it

stoic vector
#

well i went through all possible variants

#

and still didn't find the right one

potent jolt
#

you can always just use pairs() to go through all keys

#

and maybe log them then look for the correct one

#

hmm, i could generate documentation that way

stoic vector
#
function script:clickEvent(x, y, _)
    for k, v in pairs(TheoTown.SETTINGS) do
        Debug.log(k, ' - ', v)
    end
end```
#

this doesn't give any output

#

or maybe i'm referring to a completely wrong settings

potent jolt
#

i use TheoTown.SETTINGS.hideUI

#

so, it should be possible

#

unless, the settings table is not actually existing in lua

#

have you ensured clickevent runs?

stoic vector
#

yes

#

i've used Debug.toast(TheoTown.SETTINGS.LANGUAGE) and the output was nil

potent jolt
#

judging from the fact that hideUI is not capitalized

#

try using language without capitals

stoic vector
#

doesn't work either

potent jolt
#

well, geuss youre gonna have to find it elsewhere

weak mural
#

TheoTown.SETTINGS.locale for languange. return nil for default or xx.

potent jolt
#

Why do you want it anyway

#

There are already better ways for handling translation strings

elfin geyser
#

To Add some feature to Russian player only

lost kindle
#

ah

south garnet
#

@light plinth ban this dude for impersonating

rare grottoBOT
#
Case #IWelCb

Lebby#5651 was banned for the following reason: Impersonation.

potent jolt
#

when the lebby is sus

stoic vector
stoic vector
full topaz
elder glacier
#

who is this guy

full topaz
#

Your Clown

#

😳

weak mural
# stoic vector
onInit = function(label)
  if Font.DEFAULT:getHeight() > label:getHeight() then
    label:setAlignment(0.5, 0)
  end
end```
use this on the index label to make the number position same with the first line.
stoic vector
low jewel
stoic vector
winter vapor
#

damn so high

stoic vector
hushed lion
#

You need electric

stoic vector
#

I mean look at the city name (000 is the one, I have 23 fps) and rating

winter vapor
#

23k fps 😱

stoic vector
#

000k

stoic vector
#

23fps is godly

#

What device are you using to have such high frame rate

stoic vector
#

probably

#

Nasa pc

lost kindle
stoic vector
#

feverdream

winter vapor
#

16R GNA GV U U fps 😱

winter vapor
tardy elm
stoic vector
#

sUS

full topaz
#

Fish

hushed lion
#

The fps so good πŸ’€

stoic vector
stoic vector
hushed lion
#

sUS

stoic vector
#

sus

solid scarab
#

sUS

winter vapor
hushed lion
#
  • sUS
  • Fps dead πŸ’€
  • The building hasn't electric
winter vapor
#

i think it has no water too

hushed lion
#

Yeap

stoic vector
#

lol

#

his device would crash with all the needs fulfilled

winter vapor
#

why tho

stoic vector
#

Have you seen his fps with 4 buildings

#

If he adds one more it would die

winter vapor
#

ok

elfin geyser
#

I dunno what's the point of that

crimson oar
#

does anyone know how to code in the Code Editor app? or is there another application that can be used to code?

#

Or is there a script template?

stoic vector
#

very little to code

#

and very easy to use

elfin geyser
stoic vector
#

@potent jolt help

potent jolt
#

smh

rare grottoBOT
#
Case #dnLTng

Rekruter na XV krucjatΔ™#5713 was banned for the following reason: nitro scam

potent jolt
#

dicsord

#

lmao

tired escarp
#

omg i witness that

stoic vector
tired escarp
#

just like live demolition, it's beautiful

lost kindle
# rare grotto

lol πŸ€“ πŸ€“ πŸ€“ πŸ€“ πŸ€“ πŸ€“ πŸ˜‚ 🀣 πŸ€“ 🀣 πŸ€“ 🀣 πŸ˜‚ 🀣 🀣 πŸ˜‚ πŸ€“ 🀣

twilit thorn
#

@open arch

full topaz
#

What the hack

steep barn
#

Dam that's a lot

twilit thorn
weak mural
#

try using a different text editor.

twilit thorn
#

For some reasons the game let me in but the night frame is nonexistent

full topaz
#

I don't know I'm not a scripting expert

torpid spear
#

this is not scripting

#

"animaton"

twilit thorn
#

Oh

#

Gg

twilit thorn
torpid spear
#

epic

open arch
#

Cool

#

Even cooler a beginner pluginer learnt about ians night anim plugin

twilit thorn
open arch
#

I think your back is strong now because you know how to efficiently make night anims and others will come

#

I congrlate you

twilit thorn
#

Thanks

stoic vector
#

β€Ž

full topaz
lost kindle
random hamlet
twilit thorn
#

@south garnet yo get your hammer here

rare grottoBOT
#
Case #vrSHxe

volter#4887 was kicked for the following reason: nitro scam

south garnet
#

Can't ban them

twilit thorn
#

Ah so they put and left

#

Nvm

zealous iron
twilit thorn
#

remember to read the links before clicking in case some of you forget

tired escarp
#

aww i missed this one

lost kindle
#

discord.geft/R3aLL1NkN0SCAM

winter vapor
#

i lost my list of malware types

stoic vector
winter vapor
#

om

#

ok

shadow olive
#

Disgusting

#

Ew

tired escarp
shadow olive
#

I died.

open arch
#

If you think its hard then its not

stoic vector
stoic vector
torpid spear
#

looks impressive

#

I love the lag

misty python
#

i love the fps

smoky glacier
winter vapor
#

1-10 fps 😱 😳

stoic vector
winter vapor
#

cool but the fps is too high dude!!!

elder glacier
#

Everything is nice except the fps

#

Also

#

sUS

stoic vector
#

Help me please

#

I re-read all the tutorials and did not understand how to make a one-way road with only 1 lane

#

I only need the left lane

weak mural
#

if first index is zero then the straight road is on 5 and 10 index. so it would be:

[
  {
    "dirs": [
      ?, ?, ?, ?, //0
      ?, ?, ?, ?, //1
      ?, ?, ?, ?, //2
      ?, ?, ?, ?, //3
      ?, ?, ?, ?, //4
      0, 0, 1, 1, //5
      ?, ?, ?, ?, //6
      ?, ?, ?, ?, //7
      ?, ?, ?, ?, //8
      ?, ?, ?, ?, //9
      2, 0, 2, 0, //10
      ?, ?, ?, ?, //11
      ?, ?, ?, ?, //12
      ?, ?, ?, ?, //13
      ?, ?, ?, ?, //14
      ?, ?, ?, ?, //15
    ]
  }
]```
The 0 rotation (it's a default rotation when you open a city) is the main reference for every rotation. If your code is right on 0 rotation, that will be right on every rotations.
stoic vector
#

Thanks you

elder glacier
#

?????

open arch
#

@elder glacier What

elder glacier
#

2, 0, 2, 0, //10
?, ?, ?, ?, //11
?, ?, ?, ?, //12
?, ?, ?, ?, //13
?, ?, ?, ?, //14
?, ?, ?, ?, //15

open arch
#

dont ever touch to dirs

weak mural
#

???

#

touch it

open arch
#

gotta touch paper and pens instead

weak mural
#

touch it? lol

#

actually i want to share the dirs, but it's still not perfect.

rare grottoBOT
#
Case #0X7AbJ

Tricky#1431 was banned for the following reason: Nitro phishing.

lost kindle
#

Nitro scam + phishing link????

#

didn't see that coming

stoic vector
#

no nitrog giveway