Search found 3029 matches

by Lobby
Mon Jul 06, 2020 17:38
Forum: Game Discussion
Topic: New UI and UX feedback
Replies: 14
Views: 253

Re: New UI and UX feedback

image.png
image.png
image.png
by Lobby
Mon Jul 06, 2020 11:57
Forum: Tutorials and Documentation
Topic: Car chains
Replies: 11
Views: 2434

Re: Car chains

Basically yes, adding

Code: Select all

"flag normal": false,
"flag train": true
to your car chain would allow it to drive on rails. However, you need a building (e.g. a station) that spawns it because it won't be spawned automatically.
by Lobby
Sat Jul 04, 2020 19:56
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Thx, try it with

Code: Select all    Reset

City.countBuldingsOfType()
Interactive Lua editor
Run
instead. Will be fixed in 1.8.91.
by Lobby
Thu Jul 02, 2020 22:41
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

distian wrote:
Wed Jul 01, 2020 19:16
Anyway, that is sometime give you an answer not from the array. :bt
Are you sure?

Regarding your issues with road decorations, how does your exact code look like? Also, overlay is not meant to be used to build stuff, although you can do that :mine
by Lobby
Thu Jul 02, 2020 11:29
Forum: Forum
Topic: Broken directory thingy in the forums
Replies: 4
Views: 52

Re: Broken directory thingy in the forums

How do you get that issue?
by Lobby
Thu Jul 02, 2020 10:29
Forum: Screenshots
Topic: small german village
Replies: 2
Views: 127

Re: small german village

It looks relaxing, indeed :bc
by Lobby
Wed Jul 01, 2020 14:12
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Did you use Builder.isRoadDecoBuildable to check if it is buildable in the first place? Road decorations can define requirements like flags and alignment for the road they can be placed on.
by Lobby
Wed Jul 01, 2020 10:00
Forum: News
Topic: Plugin Store Activity in June 2020
Replies: 0
Views: 102

Plugin Store Activity in June 2020

<r>Hello everyone, it's time for some Plugin Store statistics!<br/> <br/> <SIZE size="200"><s>[size=200]</s>New Plugins<e>[/size]</e></SIZE><br/> In total <B><s>[b]</s>113 new plugins<e>[/b]</e></B> have been submitted in June 2020. Most of them were contributed by:<br/> <SIZE size="120"><s>[size=12...
by Lobby
Mon Jun 29, 2020 22:06
Forum: Plug-In Discussion
Topic: Sneak peak for my space plugin!
Replies: 112
Views: 10841

Re: Sneak peak for my space plugin!

It looks kind of dark, but also really modern :)
by Lobby
Mon Jun 29, 2020 20:16
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

-- Bearbear local function seperate(value) local result = "" value = tostring(value):reverse() for set in value:gmatch("..?.?") do result = result..set.."," end result = result:sub(1, -2):reverse() return result end -- Internet function comma_value(amount) local formatted = amount while true do for...
by Lobby
Mon Jun 29, 2020 16:35
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Found another solution that also uses gsub here : function comma_value(amount) local formatted = amount while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if (k==0) then break end end return formatted end print(comma_value(1234567)) In other languages you'd be able to u...
by Lobby
Mon Jun 29, 2020 15:56
Forum: Problems and Errors (bugs)
Topic: Wrong night animation
Replies: 3
Views: 242

Re: Wrong night animation

@Kulche nothing to see here, I fixed it :)
    |\__/,|   (`\
  _.|o o  |_   ) )
-(((---(((--------
by Lobby
Mon Jun 29, 2020 10:45
Forum: Jailhouse Rock
Topic: yes
Replies: 14
Views: 1909

Re: yes

Yo
by Lobby
Sun Jun 28, 2020 15:26
Forum: Tutorials and Documentation
Topic: Night Animations
Replies: 30
Views: 4853

Re: Night Animations

That upcoming version will also support color within animation spot definitions instead of only within the animation draft definitions. Could look like that: image.png You can either specify a color directly within a color object (like "color":{r:...}) or provide an id of a color that was defined be...
by Lobby
Sat Jun 27, 2020 16:17
Forum: Game Discussion
Topic: Changing the numbers in seeds
Replies: 1
Views: 142

Re: Changing the numbers in seeds

No, the numeric seed value is only used for construction of the random number generator that is used for map generation: Random(long seed) Pseudo number generators aim to produce some sort of random numbers based on a seed value. The generated numbers are supposed to show no similarities for similar...
by Lobby
Sat Jun 27, 2020 13:58
Forum: Plug-In Discussion
Topic: How can I detect when "Hide UI" mode is used?
Replies: 1
Views: 175

Re: How can I detect when "Hide UI" mode is used?

You can use this :teach

Code: Select all

if not TheoTown.SETTINGS.hideUI then
  -- Draw your stuff
end
by Lobby
Thu Jun 25, 2020 23:00
Forum: Problems and Errors (bugs)
Topic: You can't build underground one-way railway
Replies: 5
Views: 344

Re: You can't build underground one-way railway

Sorry, this one was my mistake, will be fixed :bf
by Lobby
Wed Jun 24, 2020 15:12
Forum: Plug-In Discussion
Topic: How can I make a notification recommend a building to a player in Lua?
Replies: 12
Views: 586

Re: How can I make a notification recommend a building to a player in Lua?

Simply use

Code: Select all

closeable = false
in the call to showNotification to get red of the close button. Just add your own buttons to replace it :)

There's no technical limit on the amount of buttons that it supports, but on smaller screens you will run into displaying issues.
by Lobby
Wed Jun 24, 2020 11:13
Forum: Resources
Topic: JSON
Replies: 71
Views: 9443

Re: JSON

It's not included because it also contains a premium building, however, here's the rest of it: { "id":"$firedepartment01", "type":"fire brigade", "width":1, "height":1, "frames":[{"x":1888,"y":1296,"w":32,"h":35}], "animation":[ {"id":"1x3l", "x":7, "y":-7}, {"id":"1x3l", "x":19, "y":-6}, {"id":"$an...
by Lobby
Tue Jun 23, 2020 17:24
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Yes, there are tables that will be saved and restored when the player comes back. Saving Lua data persistently So called storage tables can be used to to store data in a persistent way. City.getStorage() Is saved within the city file, so it's useful to save city dependent stuff in it. TheoTown.getSt...

Go to advanced search