#plugin-support

1 messages · Page 26 of 1

barren kite
#

This has happened me before

#

But it isn't anywhere

terse void
#

Check your plugin store downloads and your plugin folder

barren kite
#

I only use the plugin folder

cedar stone
#

Remeber to delete the .zip file if you have it in the plugin file with and unziped files

barren kite
#

I directly use zip files

terse void
#

Can you send the zip?

barren kite
#

Just a minute

#

I have a few plugins with "roaddeco" in their names but all them are different

#

Btw the problem is caused by$anim_roaddeco_sample40_00

#

The problem it's that I don't know what file contains the repeated name. There are a lot of "roaddeco_xxxxx"

cedar stone
#

Just send them all

terse void
#

I'll take a look when I can

barren kite
#

No hurry

cedar stone
#

i see the problem

#

the Gelbe Line and Yellow line are the same thing

#

just in a different language

barren kite
#

Lol

cedar stone
#

just delete other of the two and it should be fixed

barren kite
#

Thanks I'll try

#

Yeah

#

That's was the problem

#

That*

flat sonnet
#

In lrt category

copper herald
flat sonnet
#

I have another post in forum

U need to delete that
This was a old version

copper herald
#

Ok. Where do I find the new version?

#

@flat sonnet I checked the forum and found nothing

flat sonnet
#

Lrt in in store r the latest version

copper herald
#

Ok.

flat sonnet
copper herald
#

@flat sonnet thank you I just got it

bright rain
#

Where can I find this table of keys? Or do I need to make that myself?

#

I want to add a hotkey to a button

terse void
#

The table exists but it is not documented

bright rain
#

I'm shocked to hear that

#

lol

terse void
#

You can probably guess the values though

#

Those names are pretty standard

bright rain
#

Not all of them

#

I've been trying to figure out what tilde key is called

#

or if it's even in the table

hollow flax
#

Debug.toast(Runtime.toJson(Keys))

bright rain
#

thx

fading night
#

Hi

grand spruce
#

Regardless of what I try the game keeps throwing out this error
java.lang.IllegalStateException: When loading "$diag.black01": May not find draft parts to steal frames from
I can't seem to get the game find anything to draft from

steel verge
#

Are you sure that plugin is loaded before yours?

grand spruce
#

Well how do I ensure that certain plugin loads first?

steel verge
#

slaps 00000 in front of folder name

grand spruce
#

Will that actually work?

eternal lake
#

it shouldTM

#

or use aaaa

grand spruce
#

Noted

terse void
#

Can't you just slap ordinal tag in it

steel verge
#

ordinal is for categories

grand spruce
#

Yo can I make a road plugin run of 1 frame and not 16?

steel verge
#

use that frame 16 times

grand spruce
#

"frames":[{"steal":"Rail_Parts","frame":1}]
So would I copy this 16 times?

steel verge
#

yes

#

Pjsk py
imagineArray = []
for i in range(16):
imagineArray.append({'steal': 'rail_parts', 'frame": 1})
imagineArray

tulip rockBOT
#
Traceback (most recent call last):
  File "<string>", line 3
    imagineArray.append({'steal': 'rail_parts', 'frame": 1})
                                                           ^
SyntaxError: EOL while scanning string literal

steel verge
#

Pjsk py
imagineArray = []
for i in range(16):
imagineArray.append({'steal': 'rail_parts', 'frame': 1})
imagineArray

tulip rockBOT
#

[{'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}, {'steal': 'rail_parts', 'frame': 1}]

steel verge
#

something like that

grand spruce
#

thank you

steel verge
#

shh

rocky geode
#

What other prog. language does pidroid has?

#

Pjsk vb

tulip rockBOT
#

Specified command can only be used by the bot owner

rocky geode
#

Ow

terse void
#

only python scripts

steel verge
#

unless

#

Jjsk sh java -version

chrome viperBOT
#
$ java -version

[stderr] java version "1.8.0_231"
[stderr] Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
[stderr] Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

[status] Return code 0

Page 1/1

terse void
#

i mean

#

i guess

steel verge
#

I can run everything

rocky geode
#

:D

bright rain
#

Does anyone know how to make a button in a dialog execute lua and close the dialog at the same time? When I do onClick = dialog.close it won't let me add lua

#

When I press the reset button, I want to close the dialog and move the camera view

#

Unfortunately, I couldn't find anything like this in the examples

hollow flax
#

dialog.close()

bright rain
#

Thank you

#

I'm surprised that wasn't used anywhere in the examples

#

I've only been able to find dialog.close

hollow flax
#

this another examples from devtools by Lobby. closeDialog() is same as dialog.close().

terse void
#

Alternatively in the onclick you can do ```
onclick = function (self)
self.close()
end

#

This is what I've used in the textplacer

#

Also note that this stops the rest of the function from executing

uneven marlin
#

For some reason my game seems to crash when i start it, yet there hasn't been any update lately and my plugin space is mostly clear.

#

hmmmm

bright rain
hollow flax
#

yw

flat sonnet
#

Some times this bug appears

#

I cannot scroll down the tab

#

It stuck why?

#

I need to quit and back again

#

I cannot scroll

hollow flax
rocky geode
#

@hollow flax pls make forum tutorial for the movable GUI button🥺

hollow flax
terse void
#

Epic

steep briar
#

Guys i'm going to ask

#

Who is creator of ikea

#

Because i check the T is fine

bright rain
#

Robots are taking their jobs

#

Must be like one of those amazon self serve stores

steel verge
#

If it depends on each other, you can't

trail furnace
#

Dang it

grand sonnet
eternal lake
#

these are mdk's sunken highway walls

bright rain
#

Aka SHW

rancid robin
#

WHATS THE difference between bike lane pack 1 and 2

trail furnace
#

Ok so..

#

I made 60 variants of them

#

But i the limit is 42

#

So i ended up splitting 30 30

#

¯\_(ツ)_/¯

#

I think im gonna make a bike lane pack 3 lol, (maybe)

steel verge
#

what limit?

flat sonnet
trail furnace
#

i use https://pca.theotown.com to make plugin JSON code i made the plugin by using this, and it only can have 42 variants in them and i have 60

#

So i ended up splitting them

#

30 30

steel verge
#

I don't remember hardcoding frame limit

rocky geode
#

Is that byte?

steel verge
#

Pjsk py 1024 * 1024 * 7

tulip rockBOT
#

7340032

steel verge
#

7 megabytes

flat sonnet
#

What is the limitations of pt space

steel verge
#

depends on your device vram

flat sonnet
#

Why 14x14 size of light animation

Turn off when i fully zoom the game?

rustic otter
#

I also have a plugin like that, but it doesn't matter

steel verge
#

Rendering limit to avoid huge lag

bright rain
#

Can we detect when a city is in winter mode?

steel verge
#

there should be a virtual variable for that

flat sonnet
#

Can anyone explain dirs code

#

And how to do half line road

hollow flax
#

1 tile road is divide by 4 sections, 1 tile road need 4 dirs numbers (idk what it's called). dirs number from 1,2,4,8. you can sum the dirs number to make one section have two directions. e.g 3 is sum of 1 and 2, so if the car in that section, the car able to move to east and north.

flat sonnet
#

4 dirs means 4x16?

#

I try it after midterms

hollow flax
#

yes

[
  {
    //...
    "dirs" : [
      1,1,1,1, // frame 0
      1,1,1,1, // frame 1
      1,1,1,1, // frame 2
      ... // frame 3 - 15
    ]
  },
  // same as
  {
    //..
    "dirs": [
      1,1,1,1,1,1,1,1,1,1,1,1,1,...
    ]
  }
]```
earnest pendant
#

Teach me how to plugin im idiot

trail furnace
#

how to plugin

#

It should helps

flat sonnet
trail furnace
#

Whats the color hex for sand

terse void
#

check world texture

#

this one contains the sand textures

sage crescent
flat sonnet
#

Why

cedar stone
#

You can change the number

hollow flax
#

bruh, your codes leaked

flat sonnet
#

Haha

#

Ohhh yeh i lost my 6k

#

But how

#

Automatic claim

cedar stone
#

Just chamge the number to a number you want

urban rune
#

It is a pity there are no norms for the train mods, the path to change, semaphores, etc.

tropic moon
#

Can i make plugins on Mobile

trail furnace
#

Yes u can

tropic moon
#

How?

trail furnace
tropic moon
#

Ok thanks

tawdry schooner
#

Guys i actually quitted making my camp

#

Im too lazy to put trees

earnest pendant
#

Guys

#

I need help

#

I have tried to include multiple images in a single element

#

however when I open the plugin in the game, only the last frame appears

steel verge
#

You're putting them into a single object

#

Separate them into different objects

#

[{one image}, {second image}] instead of [{one image, second image}]

earnest pendant
#

:0

#

Thank you

#

Should I darken the windows and doors of the castle?

steel verge
#

You could make the sand transparent

#

And use "draw ground":true to draw the sand textures below

earnest pendant
#

Thank you

#

However, I'm not sure about making the sand transparent

#

I would like it to look like a beach

steel verge
#

Ah, I see

earnest pendant
#

I think maybe yes

trail furnace
#

@earnest pendant

#

Np

proper sedge
#

i need help to upload my plugins, when i click to upload and put my profile name and my password says the name will be more but i already managed to log into the game, what should i do

#

says being inactive

earnest pendant
#

the color used to draw the shadows is black with 10% transparency?

rocky geode
#

It depends which one looks good

tawdry schooner
#

@trail furnace nice industrial btw

#

How did u make those shadows ??

earnest pendant
trail furnace
#

This is a very late reply lol

tawdry schooner
#

Those roof details

trail furnace
#

I just select black color, and then make transparency to around 10 and then start making texture on the roof

rocky geode
#

What's the function again determining if Ui is hidden or not?

eternal lake
#

GUI:isVisible(), returns bool, module GUI as stated in the api

rocky geode
#

I need help right now im stuck with these i used "script:earlyTap()" to a certain building to open dialog box when it's tapped and used a statement :

if not Script.EVENT_TOOL_ENTER then
If Tile.getBuildingDraft():getId == "x" then
Dialogbox()
end
end

I want to disable that tap sensitive when i enter any tool, 'cause the dialog always appears when i used remove tool and clicked its own tile

hollow flax
rocky geode
#

Why does Script.EVENT_(TYPES) doesn't work outside event script

rocky geode
#

@hollow flax it now can be clicked by remove tool but the dialogbox still poped-up

hollow flax
#

use script:click

rocky geode
hollow flax
#

that's why Tile.getBuildingDraft exists

rocky geode
#

Yes?

#

Oh wait i Haven't try that before

hollow flax
rocky geode
hollow flax
#

code?

rocky geode
# hollow flax code?
function script:click(x,y,level)
local get = Tile.getBuildingDraft(x,y):getId()
 local cv = Tile.isBuildingInConstruction(x,y)
 
 if Tile.isBuilding(x,y) then
 opener(x,y,get,cv)
 return false
 end
 end

Dunno why

hollow flax
#
function script:click(x,y,level)
  local get = Tile.getBuildingDraft(x,y):getId()
  local cv = Tile.isBuildingInConstruction(x,y)
 
  if get == 'theidofthebuilding' and cv then
    opener(x,y,get,cv) -- idk the parameters.
    return false
  end
end
rocky geode
# hollow flax ```lua function script:click(x,y,level) local get = Tile.getBuildingDraft(x,y)...

I did lately these but nothings work

Here's the full :

local function opener(get,cv)
if not cv then
 if get == "$aosMarket09765"then
 showDialog()
 return false
 elseif get == "$aoswarehouse7" then
 WarePanel()
 return false
 elseif get == "$Aostownhall01" then
 GovDialog()
 return false
 elseif get == "$AosSmugDocked" then
pickTrade(index)
 end
 
for i = 1, #max do
 if get == merchlist[i] then
  Scale = max[i]
 MerchantShip()
 end
 end
 return false
 end
 end

function script:click(x,y,level)
local get = Tile.getBuildingDraft(x,y):getId()
 local cv = Tile.isBuildingInConstruction(x,y)
 
 if Tile.isBuilding(x,y) then
 opener(get,cv)
 return false
 end
 end
hollow flax
#

so the building is still in construction?

rocky geode
hollow flax
#

if with the earlyTap works, just prevent with

if not GUI.get'cmdCloseTool':isVisible() then
  local get = ...
  local cv = ...
  opener(get,cv
end
#

use isBuildingWorking

rocky geode
hollow flax
#

if the gui is visible, it's return true

#

how i explain that? lol

rocky geode
#

GUI.get'cmdCloseTool':isVisible() Nice hack thanks

hollow flax
#

if you can see the button, it's return true

rocky geode
earnest pendant
#

How can I use this?

#

As for my sand castles, I am going to make a variant with beach sand and another variant with normal sand

eternal lake
#

try adding "draw ground":true to your json

#

and remove the ground from your png

earnest pendant
#

But, sand?

eternal lake
#

what?

earnest pendant
#

I don't want him to draw grass

eternal lake
#

"draw ground" makes the base of the building transparent

#

so you can add any ground under it

earnest pendant
#

Ahhh

#

I understand

#

Thank you

eternal lake
#

no problem

rocky geode
#

@eternal lake does building "$bank00" Already had night anim?

Im working with it right now and thinking about its functionality by the used of lua, so if it already has night anim can you send me its array if you dont mind 🥺

eternal lake
#

No clue, I'll take a look later

rocky geode
trail furnace
#

Is there a way i can move a png into a zip?

grand spruce
#

unzip it

#

and then move it

#

that's the easiest

trail furnace
#

Ah, ty

grand spruce
#

np

trail furnace
#

Wait.. how do i unzip it?

grand spruce
#

An app like winzip pr a free one

#

I'll try and think of the name

terse void
#

I use RAR on android

grand spruce
#

On PC I use an app call 7zip

steel verge
#

On linux, I use a thing called unrar

#

unzip probably works too

trail furnace
#

Done, i think i unzipped it

#

Ty evan

grand spruce
#

You're welcome

trail furnace
#

(Hopefully i dont screw things up)

grand spruce
#

(Nah that's pretty hard to do)

rocky geode
#

Hello just want to ask if "setVisible" Will work if i attach it to a function that has gui insides e.g lua showDialog():setVisible(false) i tried this but nothings work i just want to clarify if it just a bug in my version

trail furnace
hollow flax
terse void
#

If a gui object is the return value of the function that should work

hollow flax
#

You need to call it first

earnest pendant
graceful geode
#

whats the plugin that installs a day and night cycle?

rustic otter
#

It's not a plugin

graceful geode
#

oh

rustic otter
#

It comes from the game

graceful geode
#

how do I get it?

eternal lake
#

settings

graceful geode
#

ooooh

#

thanks

eternal lake
#

np

graceful geode
#

when I click on settings it doesnt take me anywhere

eternal lake
#

hm?

graceful geode
#

no buttons under the other section work

rustic otter
#

To the game folder

#

There is a choice

graceful geode
#

the game folder?

eternal lake
#

what do you mean they "don't work"?

graceful geode
#

like I click the button and nothing happens

eternal lake
#

the check/cross?

graceful geode
#

the settings button

rustic otter
#

Settings

#

And gameplay

eternal lake
#

try restaring

graceful geode
#

it works now

#

thanks guys

eternal lake
#

np

graceful geode
#

if I turn on winter is it like that forever

eternal lake
#

what?

#

it just changes the graphics, nothing special

graceful geode
#

oh ok

#

so theres no seasons cycle?

eternal lake
#

no

graceful geode
#

oh ok

#

thank you

eternal lake
#

unless you download plugins

terse void
#

You can set seasons to automatic to get winter graphics in winter time

#

It is based on irl date though

graceful geode
#

ahhh nighttime looks so nice

#

ohh ok

#

thank you

eternal lake
#

no problem

rocky geode
#

Function for spend diamonds anyone know? I need it

earnest pendant
rocky geode
earnest pendant
#

Guys

#

What if the game developers want to add a plugin idea to the original game?

ruby vale
#

this happened a few times

earnest pendant
#

What if TheoTown lua version was 5.3 or 5.4?

vernal marsh
vital root
#

It was just there on my end a few minutes ago

earnest pendant
#

rollout are slower than steam
rollouts are based on time and country or state or province

vernal marsh
#

hm

#

thanks

earnest pendant
#

Why even <= 1.9.67 users can still download the plugin above? JustAnyone#0001

graceful geode
rocky geode
graceful geode
#

where would that be

trail furnace
#

Settings

graceful geode
#

oh ok

#

thank you guys

rocky geode
#

The command that you need to run is already stated on its description

graceful geode
#

yup

earnest pendant
#

The vans station plugin has missing textures

#

On the 3x3 station

trail furnace
#

Maybe he made it on porpuse

rich spear
rancid robin
trail furnace
#

I wonder what happend to that building

thin blade
rancid robin
thin blade
#

Yeah that's my plugin

#

Maybe I'll try updating by changing the animation ID to see if that's the problem

rancid robin
#

Maybe

tawdry schooner
#

Can i convert images to pixels ?

#

Nah it'll be too big lol

terse void
#

i dont see why you wouldnt be able to

earnest pendant
#

Guys, is a meter in the game 2 pixels?

terse void
#

sort of

earnest pendant
#

I need to create scale monuments

terse void
#

its slightly less

#

theonians are 3 pixels tall

#

so its more like 3 pixels = 2 metres

#

must be dutch

earnest pendant
#

This is inprecise

#

I prefer

#

1 meter = 2 pixels

earnest pendant
#

but are you sure?

terse void
#

well one of the pinned messages in #plugin-discussion says 7px = 4m so if you really want accuracy thats what you need

#

1m = 2px is probably good enough though

earnest pendant
#

Thank You

grand spruce
#

Erksmit: Tells you how it always has been
Him: Nope that's wrong. I'll do it my way

terse void
#

well its not like theres a canon scale

grand spruce
#

It's not like everyone has used that same scale for years lmao

terse void
#

true that

bright rain
#

The following code always reads nil, does anyone know why? Tile.getBuildingFrame seems to work fine.

  local x, y = City.getView()
  local name = Tile.getBuildingName(x, y)
  Debug.toast(name)
end```
hollow flax
#

i don't recommend that, but the way is you need to declare the local vars outside the function.

local x, y, name

function script:update()
  x, y = City.getView()
  name = Tile.getBuildingName(x,y)
  Debug.toast(name)
end```
bright rain
#

I still have the issue

#

I tried something like this earlier

#

I'm not sure why this function doesn't work while the other one does

hollow flax
#

try to use if name ~= nil then Debug.toast(name) end.

#

logical is important if you using lua. it can be prevented like the toast appearing every frames, ignore return nil, or something like that.

terse void
#

Might have something to do with floating point numbers

#

Getview returns a float

#

Maybe you have to round that before you can use tile.getbuildingname

#

Also you should check if the values are within the city border with tile.isvalid

hollow flax
#

ah, yes. float.

#

i think Tile.isBuilding is enough

terse void
#

Well, as much as those exist in lua

#

Yeah isbuilding is enough too

terse void
#

anyways i reccomend doing ```lua
function script:update()
local x, y = City.getView()
x = math.floor(x)
y = math.floor(y)
if(Tile.isBuilding(x, y)) then
local name = Tile.getBuildingName(x, y)
Debug.toast(name)
end
end

#

i dont know what the building name will be if there is no building on the tile

#

you always want to round down so you get the tile the camera is looking at

hollow flax
#

'then' expected. lol

steel verge
#

Then what?

hollow flax
#

then for if

steel verge
#

What if if is not enough?

hollow flax
#

return false

steel verge
#

Getting mixed signals here, you're returning false, but have bear checkmark emoji beside it

terse void
#

fixed

hollow flax
#

fixed

terse void
#

update 1:
fixed syntax error

bright rain
#

I already tried rounded coords

bright rain
#

The game will recognize buildings correctly, but it won't detect the name

terse void
#

You can always just get the draft and get it's title

hollow flax
#

i think so, but there's something wrong with the getBuildingName function. bear_think

terse void
#

yeah

#

lets bullly @steel verge about it

bright rain
#

Just making sure I wasn't going insane about that function

terse void
#

ill write a quick script to test it out

terse void
#

yep im getting the same thing

#

getting the draft and getting its title works fine though

#

maybe getBuildingName gets some other attribute

bright rain
#
function script:update()
local x, y = City.getView()
local draft = Tile.getBuildingDraft (x, y)
Debug.toast(draft:isPrivileged())
end
#

This code will return true for any vanilla building

#

I expected it to only do this for landmarks and other premium buildings

#

Is there a way I can do that?

steel verge
#

guess you could check their types and if they have diamond prices

bright rain
#

What about premium buildings that don't cost diamonds, like the military?

steel verge
#

check their feature tags

#

otherwise, look into final tag

flint root
#

Кто русс

terse void
#

Ah yes undocumented tags

#

A classic

steel verge
#

what do you mean undocumented?

terse void
#

Well

#

Usually I look at the forum for info about a certain tag

steel verge
#

look inside content json files

terse void
#

There's no mention of either of these

#

Hmm

steel verge
#

If there's example or a trace of them being used, they are documented in my book

terse void
#

Manga's guide to theotown plugins?

steel verge
#

I don't want a 4rd installment

#

5th*

terse void
#

When you need to release a new edition of a book for every tt update

steel verge
#

Now I legit want a tt guide book

terse void
#

You can always just let the player base do all the documentation

#

Now that's self documenting code

#

That would be pretty epic

steel verge
#

my c# code

terse void
#

probably mine too

#

still havent added xml docs everywhere yet

rocky geode
#

I will post here regarding to my plugin "Regional bank" Due to receiving complains about it's problem, i dunno why it is fine on my device but if you and my plugin and experiencing some problems you can ping me here and elaborate the problem tnx :)

hollow flax
#

btw, what is the problem?

rocky geode
bright rain
#

Why do the coordinates change when the map rotates?

#

Rotating can make an object's position go from 18, 15 to 14, 13

bright rain
#

    x, y = City.getView()
    x = math.floor(x+0.5)
    y = math.floor(y+0.5)
    draft = Tile.getBuildingDraft(x, y)
    Debug.toast(draft)
    screenWidth, screenHeight = Drawing.getSize()
    Drawing.drawLine ((screenWidth/2)-4, screenHeight/2, (screenWidth/2)+4, screenHeight/2, 1)
    Drawing.drawLine (screenWidth/2, (screenHeight/2)-4, screenWidth/2, (screenHeight/2)+4, 1)

end```
#

If you use this code, put the crosshair on the building, and rotate, you'll notice that the game wont detect the building anymore

#

When I move the cursor over to the tile it should be on (16, 14), the game will finally detect it

#

Even if there are other buildings there

#

I can confirm that this issue isn't caused by rounding either

hollow flax
#
     0      |    0    |    0
     1      |    0    | Map Height
     2      |Map Width| Map Height
     3      |Map Width|    0```
#

actually, the x and y are changed when the city is rotated, but the building (i though) still in the rotation 0.

bright rain
#

Is this supposed to happen (the building being at rotation 0)?

terse void
#

You should only round X and y down by the way

#

Because if you're over .5 of a tile you're still looking at that same time

bright rain
#

I've found that rounding up works fine

#

I haven't noticed any issue with it yet

terse void
#

Oh

bright rain
#

But I'll take a look at this

terse void
#

Well if works I wouldn't touch it

bright rain
#

For science

terse void
#

For the rotation pretty sure the top left corner will always be 0,0

#

Would be nice if we had a on rotate event for script:event

bright rain
#

I'm surprised that's not a thing already

terse void
#

Guess they haven't thought of it yet

#

We got event tool exit now at least

bright rain
#

Maybe you could read the rotation and see if it's changed the next frame

terse void
#

Yeah that would be the only way

#

Then doing whatever rotation logic when you detect the change

#

Probably not a great idea to get rotation every frame

#

*getview

#

But if that's the only way

bright rain
#

I think there's a dedicated rotation function

terse void
#

Oh

#

That would probably be better

bright rain
#

City.getRotation()

terse void
#

Nice

#

I don't have any rotation support in my plugins

#

God knows what happens when you rotate while using my tools

bright rain
#

What tools have you made?

terse void
#

Text placing tool and cinematic camera tool

bright rain
#

Oh yeah

#

I was thinking about your camera plug-in when I found this issue actually

terse void
#

The camera goes into a random direction for a bit but when it generates new endpoints it ends up just fine

bright rain
#

I did t have it installed to test it though

terse void
#

Pretty sure it works out for it

#

Cuz it'll keep going like nothing happened

#

Except rotated ofc

#

Idk about the text placer

#

Haven't tested that one

bright rain
#

About a month ago I was trying to make a camera tool that would go between two player-set points, but I just couldn't figure out how to get it working

terse void
#

Pretty sure that'll bug out when you're in placing mode

bright rain
#

And for some reason it broke on larger maps

terse void
#

Ah yeah

#

I was thinking of adding an option for that

#

Instead of random points

#

I should be able to add it in fairly easily

bright rain
#

Are your endpoints always generated the same distance away?

terse void
#

Nah

#

Just a min of 10 tiles away from the current endpoint

#

From there it can be anywhere

#

It has a 50/50 chance to pick lower or higher X value

#

Same for y

#

Then it generates a number between X+10 and city width for example

bright rain
#

I was pretty close to getting mine to work, but I just gave up and worked on other stuff

terse void
#

You could always just grab some of my code

#

I got it up on the forum

bright rain
#

Still waiting Android to update so I can release my mining pit plug-in...

#

I've looked at your code a little bit. I should take a deeper look sometime

terse void
#

It's definitely not perfect but it gets the job done

terse void
bright rain
#

Supports shorelines

#

I need to disable that

#

But that feature hasn't come to Android yet

#

It's been nearly two months now that I think about it

terse void
#

Ah right

#

I thought you meant Android itself

#

You could release it anyways but you wouldn't show up in new plugins by the time Android gets that update

rocky geode
#

I'd encounter bugs with path finding fun, I'd add frame for it to set frames per move e.g ```
"build":"draft",
"x":1,
"frame":0

terse void
#

Idk anything about fun

hollow flax
#

isn't the frame start from 1?

rocky geode
hollow flax
#

fun is hard to debug

flat sonnet
#

Can i change the sound of my cars?

rocky geode
terse void
#

you could by doing some lua stuff

#

not really a good way though

round sail
#

Anyone could have got an idea why in sandbox mode I've got these roads blocked?

wicked frigate
#

You probably playing on sandbox mode not free mode

round sail
#

It's free mode, just made mistake with first message

#

May it be any plugin which is blocking them?

earnest pendant
thin blade
#

I'm pretty sure they are private plugin /only released on Korean forum

trail furnace
#

Theres another forum!?

thin blade
#

It's not official forum

trail furnace
#

Oh

thin blade
#

Or that plugin can be part of Korean building package we are working on

trail furnace
#

How do i update a plugin without replacing the zip

thin blade
#

why not?

trail furnace
#

I think if i replace the zip, people who placed the buildings from the plugin the building will dissapear

#

(I think)

eternal lake
#

it will if they have different ids

thin blade
#

I don't think so. if you keep the same ID it doesnt make it disappear

trail furnace
#

Ohh

flat sonnet
#

Its possible to change the sound car

#

Where i can get the ingame
Resource code?

I want to use ingame rails00

earnest pendant
thin blade
#

Author is Choggoba

rocky geode
rocky geode
terse void
#

They probably just loaned the Max amount and are now in debt when paying it back

#

A button to insta pay back loans would be neat though

hollow flax
#

You have to ask why and how they lost the money, then you look the problem at your codes.

#

If they have pressed the loan button, then you look at all functions that related with loan.

terse void
#

Budgetitem would be nice too

#

So its shown on the expenses screen

hollow flax
#

unfortunately, the x and y are bassed on tiles, not screen coordinates.

#

How about earnMoney with negative value? bear_think

terse void
#

Can't just use the location of the building?

#

That's what I've used for the decoletter tool

steel verge
#

It's passed thru abs()

terse void
#

But like that way the users know the money is being spent by the bank

hollow flax
#

With active dialog on the screen, idk if red price will visible.

steel verge
#

I bet 40% it's not even the problem with the coding, people just don't get it

terse void
#

Ye

#

That's what I'm guessing

#

They probably just borrowed the Max amount

#

Maybe lock big loans behind city rank?

hollow flax
#

Because your money only 105k, not 150k. bear_lol

terse void
#

No I meant the help button

#

The i

#

I've had no issues in using it so far

bright rain
#

Is that issue with building coordinates a problem with the game, or should I try to fix this issue myself?

terse void
#

The rotation?

#

Ask ja

#

He probably knows if that's intended behaviour or not

#

Or lobby

hollow flax
#

Ah, help button. Idk if that button is out of dialog.

bright rain
#

@steel verge

terse void
#

Yeah I got the character wrong

bright rain
#

Nice bot

terse void
#

Angery pidroid

steel verge
#

What coordinate issue?

steel verge
#

It's the way perspective is shown

bright rain
terse void
#

huh

#

guess i got it wrong

#

so only rounding up?

bright rain
#

I guess so

#

Oof

#

I just found out that City.getView() does not work well with elevated terrain

#

It detects to tile at level 0 instead of the one you're actually looking at

terse void
#

thats the behavior i would want with my camera tool

bright rain
#

Yeah

#

But this is bad for my tool

#

Too bad there isn't an option for it

#

I'm not even sure how I could fix this

#

Time for some experimentation

terse void
#

yeah idk

#

maybe theres a way to get elevation level?

bright rain
#

I haven't found out how to do that yet

terse void
#

why do you need the tile the user is looking at anyways

bright rain
terse void
#

oh is it a filter

bright rain
#

No. Its like WAILA from modded minecraft. It gives you info about the item you are looking at

terse void
#

ah right

#

you could make it on tap maybe

#

pretty sure that one accounts for elevation

bright rain
#

That kind of defeats the point

terse void
#

true that

bright rain
#

If you tap the building, that pulls up its info

terse void
#

not if you make it a tool

bright rain
#

On a side note, TIL that RCI decos can have untouchable on them

terse void
#

now that you mention it

bright rain
terse void
#

did not know that

#

if youre in a tool tapping on buildings wont open their popup

#

if you make your plugin draft a tool you can do that

#

then with the sidebutton you enter the tool

bright rain
#

I think having to open the tool would defeat the purpose. This is just meant to give players quick info about a building

terse void
#

Fair enough

bright rain
#

But i think I get what youre saying

terse void
#

I discovered that when trying to make a pin to sidebar function for my tool

#

Not quite sure how to actually enter a draft from a lua function but I've seen it done before

#

Has something to do with createdraftdrawer

#

But yknow

#

It's not documented

#

I think ian figured it out

bright rain
#

Yeah

#

I think thats what I did with the area tool

terse void
#

Yeah I think there's some code floating around somewhere where it's used

#

It's also used in the tree tool but there its used to display a set of drafts

bright rain
#

Im so glad I got that area tool working. It makes my testing a lot easier

#

Its too bad the game doesn't support RCI buildings with the builder functions

terse void
#

It doesn't?

#

Damn

bright rain
#

As far as I can tell it doesn't

terse void
#

Also not with privilege code?

bright rain
#

I tried for a while to get that working

bright rain
terse void
#

Damn

bright rain
#

Even on PC

terse void
#

I got a neat preview feature coming up for the text placing tool on pc

#

Will preview the text you're about to place at your cursor position

#

Doesn't quite work yet though

bright rain
#

I haven't quite figured out how that sort of thing works yet either

#

I cheated with my area tool so I wouldn't have to add a preview myself

terse void
#

Lobby told me to draw it in script:draw city instead to get it right

#

But I gotta do a bunch of stuff to be able to draw it there

bright rain
#

Thats rough

terse void
#

The feature only exists on pc anyways so I'm not in a hurry to get it out

#

Although I could preview it in the middle of the screen for mobile maybe

#

Like it does when placing a building

bright rain
#

Maybe privileged building do work with lua

terse void
#

I needed privilege to place decoletters

bright rain
#

It seems to work for me now

terse void
#

But they're iaps

bright rain
#

I swear I tried adding my code before

terse void
#

Wack

#

Maybe it's because vanilla buildings are privileged by default

bright rain
#

Maybe

#

I remember trying to find if a building was privileged with its draft, but it always returned true

#

Regardless of the building

terse void
#

Ah right for finding dlc buildings right?

bright rain
#

Yeah

terse void
#

I remember that one

#

Now I'm curious what builder.getbuildingprice will return for diamond buildings

hollow flax
# terse void This was the issue I had

try to invert it. ex the text are 'TheoTown', create from 'n' to 'T', then place 'T' in the cursor.

for i=TextLen-1, 0, -1 do
  Builder.buildBuilding(draft,x-i,y)
end```
rocky geode
rocky geode
#

Btw @terse void i had problems with active loans its own array always passed its value to other city even it was declared in City.getStorage() for its save and load state :/

hollow flax
#

are you load it when you enter city?

earnest pendant
rocky geode
rocky geode
#

What's the difference between: ```lua
local table = {}
table:add(element)

--AND

table.insert(table,element)

??
hollow flax
#

"add" only for array. table = Array() table:add('foo')

rocky geode
#

I forgot to empty the table that's why it has loop hole for every item

rocky geode
#

@hollow flax does "stg" Variable from loading city/theo storage are constant or user define? E.g

local function TheoTown()
--return storage
end

local function saveState()
local stg = TheoTown()
stg.var = 1
end
hollow flax
#

the basic things :

  • if variable is function, the value is always update everytimes it called.
  • if variable is defined value, the value is constant until you change it.
rocky geode
#

what i mean is if it can be change into something

--from
local stg = TheoTown() 

--to
local stg1 = TheoTown()
hollow flax
#

i don't understand, what you want to do?

rocky geode
#

Ah you know change naming variable to avoid confusion

hollow flax
#

ah, variable name. it's can't be changed.

terse void
#

If you assign it's value in the same way you should be able to rename it no problem

tawdry schooner
#

Whelp i have no idea for a plugin

trail furnace
#

Can someone send a link to forum for how to make a fence plugin?

terse void
#

cant find it?

#

or too lazy to look?

trail furnace
#

I dont know how to find stuff on forum ;-;

terse void
#

well step 1 is

#

you dont

#

the seach button wont get you anywhere

steel verge
#

You sure?

terse void
#

anyways

#

i found this one

#

it has example code for fence plugin

vernal marsh
#

Does anyone know the name of this plugin?

vale minnow
#

mexican highways

#

the one mg306 made

vernal marsh
#

@vale minnow do you have the link pls?

vale minnow
#

my road set called road pack is also inspired on mexican highways with permissions

frozen sand
#

How do I change the build time of something?
And also I am making a park, how do I let it give that green sphere of "park-happiness"

trail furnace
#

Maybe
"build time":

terse void
#

thats marked as rci only on the forum but you can try

trail furnace
#

Hmm, now that i can code a basic plugin, maybe ill try to learn night anim next, and maybe learn how to add influences

terse void
#

its quite simple

#

just a lot of fiddling

trail furnace
#

I agree with you

frozen sand
#

And do you guys now how to make that sphere?

trail furnace
#

Wdym?

#

My brain is having a bad time lol, i want to ask a question but dont know how to say it

frozen sand
frozen sand
trail furnace
#

Maybe

frozen sand
#

Oh lol

trail furnace
#

Testing a plugin is pain for me, my TT need to load 7000

#

How do i add multiple frames

#

It took me 10 min just for my brain to think of that..

terse void
#

you do json [ {"bmp": "frame1.png"}, {"bmp": "frame2.png"} ]

trail furnace
#

Ohhhhh

terse void
#

alternatively you can use 1 image and get multiple frames out of that

#

slightly more complicated though

trail furnace
#

Ty, i was thinking to do that but im afraid if it will crash

terse void
#

how the frames are used depends on plugin type

trail furnace
#

Will this work?

terse void
#

light and light switching should be true

trail furnace
#

Bruh

#

Ty tho

terse void
#

also

#

light and light switching should be in your animation draft

#

not your building draft

#

night frames should point to an animation draft

trail furnace
#

Animation draft?

#

How do i put it in the animation draft

thin blade
#

What is "night frames"? I've never used that before

trail furnace
#

I think im not ready for night animation.. ;-;

thin blade
#

Normally you need to define animation to make night frame

trail furnace
steel verge
#

terribly inefficient

trail furnace
#

¯\_(ツ)_/¯

thin blade
trail furnace
#

Reeeee

terse void
#

Yes

#

Also

#

I'd be nice if you cropped your night anim as much as possible

wraith talon
#

How to make plugin

trail furnace
wraith talon
#

How do you guys do the pixel art

#

Which app

terse void
#

most poeple use pixly

tawdry schooner
#

Warning dont get lazy making graphics

trail furnace
#

My fence keep drowning, it suppose to be taller but instead half of the fence went underground (being below the terrain) what should i do?

tawdry schooner
#

Your y is wrong maybe ??

trail furnace
#

Dont know..

tawdry schooner
#

Try change it

trail furnace
#

It works on my shorter fence

tawdry schooner
#

Well this one is higher so..

#

Ye

trail furnace
#

Uhhh, imma look at forum first

tawdry schooner
#

Ok

trail furnace
#

I dont know tho, i looked at forum, the Y is always 4 (im not so sure)

tawdry schooner
#

Make it higher

trail furnace
#

To?

tawdry schooner
#

Experiment

trail furnace
#

👀

tawdry schooner
#

6 maybe

trail furnace
#

My TT loads for a long time... crashing making my life hard lol

tawdry schooner
#

Oh

#

Well 6

#

Then 8

trail furnace
#

How many plugin u have?

#

Well i guess ill try y:6

tawdry schooner
#

I only have 1

#

Smol one

trail furnace
#

1 plugin?

tawdry schooner
#

Yes

#

Ice cream truck

trail furnace
#

Uhhh

tawdry schooner
trail furnace
#

Yeah, i need someone to be a tester lol, my TT loads so slow

tawdry schooner
#

OH

#

Wait

#

I thought u meant the plugins that i created

#

I have

#

Uhh

trail furnace
#

Oof

tawdry schooner
#

15

trail furnace
#

Oh, thats low

tawdry schooner
#

Loo

#

Lol

#

I can test later

trail furnace
#

Sure, dm

trail furnace
#

How do i release multiple plugin in 1 zip

tawdry schooner
#

Extracting ?

trail furnace
#

Welp, i messed up badly

tawdry schooner
#

Messed what

trail furnace
#

Oh my god.. im so stressed rn

tawdry schooner
#

U deleted something ?

trail furnace
#

I fixed it

tawdry schooner
#

Nice

thin blade
#

Just put all of them in 1 zip

trail furnace
#

Ohh, that works? I tought it will breaks

thin blade
#

Yeah just like I have tons of folders in my slow traffic package zip

#

You can also simplify by writing all plugins in 1 json file

trail furnace
#

Does it means i need 3 plugin.manifest?

thin blade
#

Only 1 because it's 1 plugin package

#

I don't make plugin.manifest but I'm pretty sure

trail furnace
#

The zip worked but i cant uplaod it

#

It says, plugin creation failed

tawdry schooner
#

Hm

#

Wait

#

That means

#

Put each file on a zip

#

And then put all of those file zips in another zip

#

Idk tbh

thin blade
#

Eh if you're uploading to plugin store you don't need manifest file

wraith talon
#

should I use 32x32 or 64x64

trail furnace
#

I dont know why but it still dont work tho

trail furnace
#

Why did it keep failing

tawdry schooner
#

You didnt put one of the code files or graphics

trail furnace
#

I did -_-

terse void
#

It might have been formatted wrong

trail furnace
thin blade
#

idk, try putting them in a folder

terse void
#

Try exporting as .plugin and upload that

terse void
#

how do i enter a draft from lua?

#

nvm

#

i found lua City.createDraftDrawer(draft).select()

#

also

#

im trying to create a button that looks the same as if it was created by Theotown.RegisterToolaction

#

but that function doesnt work outside of tools

#

also

#

can i invoke a function in another script?

hollow flax
#

unfortunately, Script.EVENT_TOOL_ENTER is only for generic tool.

terse void
#

i guess i could register a console command and call that using city.execute

flat sonnet
#

Why this is not work
Question by @rjroldan1#3808

terse void
#

I can't see anything wrong in the screenshot

#

Although you could simplify it a bit since youre doing lua theme:setVisible() theme:delete() theme = nil in every if case

steel verge
#

How did you get that code?

flat sonnet
# terse void I can't see anything wrong in the screenshot

How can i delete GUI that stored inside a variable to set new arguments for it.

Here's my code but it doesn't make the var. theme nil again

local function newTheme(theme,dialog)
theme:setVisible(false)
theme:delete()
theme = nil
theme = dialog.content:addCanvas{--args}
end

local function gui()
--create gui
--stuff
theme = dialog.content:addCanvas{--args}
--other stuff
newTheme(theme,dialog)
end

#

By @rocky geode

terse void
#

That first function should delete the canvas properly

#

But the last line is useless

#

Because theme is discarded after the function is done

#

Tables are a reference type in lua

#

It's kind of hard to explain

hollow flax
#

are the contents same in each themes? why you don't seperate the content and the theme?

local gui
local function content(parent)
  -- content
end

local function theme1(name)
  -- theme
  content(parent)
end

local function theme2(name)
  -- theme
  content(parent)
end

-- call the main theme
theme1(gui)

-- to change the theme
gui:delete()
theme2(gui)```
terse void
#

good idea

tawdry schooner
#

I don't even know any lua functions

#

Im garbage at remembering stuff

terse void
#

Having the API docs page open is a must

tawdry schooner
#

Ohk

#

It lists all of the functions ?

terse void
#

yes

#

well

#

most anyways

earnest pendant
hollow flax
terse void
#

now that looks like a spicy memory leak

#

you really shouldnt append that much stuff

steel verge
#

Probably JSON error

terse void
#

you can also just specify a min version for your draft instead of all that script

steel verge
#

Dynamically defining drafts is a horrible idea

#

Trust my word, I use dynamically typed programming language

#

It's pain

hollow flax
#

i wonder why the draft is hidden using version?

#

i use Draft.append to make drafts easier with loops.

terse void
#

oh boy

#

why not just run that script once and write that to a file

steel verge
#

inb4 Draft.append bypasses DraftLoader's comment remover method

hollow flax
#

actually, draft append only run while init.

steel verge
#

Still

#

performance loss

terse void
#

i guess thats not the worst

steel verge
#

erksmit

#

remember that nice plugin?

terse void
#

epic plugin?

steel verge
#

yes

terse void
#

yeye

steel verge
#

30 fps

terse void
#

got it installed

steel verge
#

or lower

terse void
#

oh that one

steel verge
#

that was amazing

terse void
#

yes

steel verge
#

oh

#

that one

#

lol

#

that epic plugin is bound to become first of upcoming new mode to the game

terse void
#

trust me making a busy loop in script:update is essential for plugin development

steel verge
#

Remember DSA pull request?

terse void
#

yeah

steel verge
#

Yeah

#

That was me calling Draft.getDraft every frame

terse void
#

Lol

tawdry schooner
#

@trail furnace you mean the boat is off center ?

#

If you wanna fix that make the boat go in the middle

trail furnace
#

frames

tawdry schooner
#

Oh wait

#

Im so dumb

#

Well its a bug I think

rocky geode
#

May i ask why Tile.getBuildingDraft(x,y):getId() to check nearby tile drafts is not working on if statement in a building owning the script

local function main(x,y)
for i = x,20 do
local draft = Tile.getBuildingDraft(i,y):getId()
 if draft == "$deco" then
  Builder.remove(i,y)
 end
end
end

function script:daily(x,y)
main(x,y)
end
hollow flax
#

because the tile is not building, occur an error, and break the script.

trail furnace
#

Is there a way to fix this?

hollow flax
trail furnace
#

Ohhh

rocky geode
trail furnace
rocky geode
#

What delay ms should i put in Runtime.postpone(function()end,ms) is this should be integer or a decimal, what is the max delay ms?

steel verge
#

it's an integer of miliseconds

#

It can be as long as you want

terse void
#

Wait this exists?

#

Pog

steel verge
#

Always had been

tawdry schooner
#

@terse void how about a planck second ?

terse void
#

If I wanted a delay of a Planck second I'd just do _ = nil

vivid totem
#

What would a tree plugin look like?

terse void
#

a little something like this

vivid totem
#

I was thinking about the code

terse void
#

i know

#

something like ```json
[{
"id":"$flowers00",
"type":"tree",
"frames":[{"x":704,"y":480,"w":32,"h":16,"count":6}],
"influence nature":1,
"price":10,
"spawn":{
"p":0.01,
"height":-600,
"radius":600
},
"burnable": false
}]

#

except with your own frames and id ofc

pseudo nymph
#

what happens if I use .manifest plug-in in online mode and someone visits me?

rocky geode
#

A missing plugin dialog will appears with a download button

pseudo nymph
#

can they download it?

hollow flax
#

If you use plugin with manifest in online mode, it's normal. But, if you use plugin without manifest, it's a bug.

#

Afaik, you can't use plugin without manifest file in online mode.

#

Also the plugin will not appears on local tab in plugin store.

terse void
#

imo they should become required

hollow flax
#

Nah, why do you need it when you build a bug plugin?

steel verge
#

Good idea

#

For update 2.0.00 to disable plugins without manifest

terse void
#

well without the disabling old plugins ofc

steel verge
#

Nah

molten sand
#

Interesting Facts: Besides flat 🌏, DSA Moon/Planet has Day-night cycle bear_teach bear_idk

tawdry schooner
#

Its normal

#

The moon also rotates

rocky geode
#

How does budget item works or whats the sequence structure for it

#

I thought it only display your total expenses and doesn't affect monthy spend

terse void
molten sand
#

Tidally locked or in other words the speed of its rotation is the same as it revolves around the Earth. In simplest word, the moon is facing to us on its same surface.

Theonia Moon is awesome, it has rebel behavior than our real moon.

pseudo nymph
#

Anyone know how to not make despawn the cable car plugin by montemarino?

#

it always despawns inside the station

molten sand
pseudo nymph
#

I don't think I can do it

rocky geode
pseudo nymph
#

Bruh, I just saw the reply ping and didn't looked at the text ping, thought you were saying it to me lol

rocky geode
#

My bad wait lemme think

rocky geode
#

Or maybe a oneway cable tracks

#

As for now i guess avoid placing its own spawner next to the previous spawner 🤷‍♂️