Do you have any json / lua that can show me how this is done ? cause it could be really interesting for me since i am working on a train expansion plugin.
Road decoration
-
THEMAX
- Inhabitant of a Universe
- Reactions:
- Posts: 4313
- Joined: 14 Sep 2017, 15:30
- Location: Astrellia, UHAE
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Emperor of Atlantean federated empire

Founder state of Internationxal council
Leader of AEOY and steel pact

Founder state of Internationxal council
Leader of AEOY and steel pact
-
ian`
- Metropolitan
- Reactions:
- Posts: 117
- Joined: 04 Apr 2020, 15:36
- Location: 日本
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
The code looks like this :
Code: Select all Reset
local lastCounterRight = Array{0, 0, 0} local lastCounterLeft = Array{0, 0, 0} local timer = 0 local x,y,level local isTrainOnTheTrack = false function script:update() if City.countRoads(Draft.getDraft'$road_barrier_open00') > 0 then x,y,level = City.getRoad(1, Draft.getDraft'$road_barrier_open00') elseif City.countRoads(Draft.getDraft'$road_barrier_closed00') > 0 then x,y,level = City.getRoad(1, Draft.getDraft'$road_barrier_closed00') end if timer == 0 then lastCounterRight[1] = Tile.getRoadCarCount(x+4, y+1, level) lastCounterRight[2] = Tile.getRoadCarCount(x+3, y+1, level) lastCounterRight[3] = Tile.getRoadCarCount(x+5, y+1, level) lastCounterLeft[1] = Tile.getRoadCarCount(x-4, y+1, level) lastCounterLeft[2] = Tile.getRoadCarCount(x-3, y+1, level) lastCounterLeft[3] = Tile.getRoadCarCount(x-5, y+1, level) Builder.buildRoad(Draft.getDraft'$road_barrier_open00',x,y,x,y) isTrainOnTheTrack = false timer = 1 elseif timer > 250 then lastCounterRight[1] = Tile.getRoadCarCount(x+4, y+1, level) lastCounterRight[2] = Tile.getRoadCarCount(x+3, y+1, level) lastCounterRight[3] = Tile.getRoadCarCount(x+5, y+1, level) lastCounterLeft[1] = Tile.getRoadCarCount(x-4, y+1, level) lastCounterLeft[2] = Tile.getRoadCarCount(x-3, y+1, level) lastCounterLeft[3] = Tile.getRoadCarCount(x-5, y+1, level) Builder.buildRoad(Draft.getDraft'$road_barrier_open00',x,y,x,y) isTrainOnTheTrack = false timer = 0 elseif timer > 1 then Builder.buildRoad(Draft.getDraft'$road_barrier_closed00',x,y,x,y) end if Tile.getRoadCarCount(x+4, y+1, level) ~= lastCounterRight[1] then if isTrainOnTheTrack then isTrainOnTheTrack = false end if not isTrainOnTheTrack and Tile.getRoadCarCount(x+3, y+1, level) ~= lastCounterRight[2] then timer = timer + 1 isTrainOnTheTrack = true if isTrainOnTheTrack then if Tile.getRoadCarCount(x-3, y+1, level) ~= lastCounterLeft[2] then if Tile.getRoadCarCount(x-4, y+1, level) ~= lastCounterLeft[1] then timer = 0 end end end elseif isTrainOnTheTrack and Tile.getRoadCarCount(x+5, y+1, level) ~= lastCounterRight[3] then isTrainOnTheTrack = false timer = 0 end elseif Tile.getRoadCarCount(x-4, y+1, level) ~= lastCounterLeft[1] then if isTrainOnTheTrack then isTrainOnTheTrack = false end if not isTrainOnTheTrack and Tile.getRoadCarCount(x-3, y+1, level) ~= lastCounterLeft[2] then timer = timer + 1 isTrainOnTheTrack = true if isTrainOnTheTrack then if Tile.getRoadCarCount(x+3, y+1, level) ~= lastCounterRight[2] then if Tile.getRoadCarCount(x+4, y+1, level) ~= lastCounterRight[1] then timer = 0 end end end elseif isTrainOnTheTrack and Tile.getRoadCarCount(x-5, y+1, level) ~= lastCounterLeft[3] then isTrainOnTheTrack = false timer = 0 end end end
Lua editor
-
THEMAX
- Inhabitant of a Universe
- Reactions:
- Posts: 4313
- Joined: 14 Sep 2017, 15:30
- Location: Astrellia, UHAE
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
How can i add night animations to a road animation (for example, to a lamp post)
Emperor of Atlantean federated empire

Founder state of Internationxal council
Leader of AEOY and steel pact

Founder state of Internationxal council
Leader of AEOY and steel pact
-
CommanderABab
- AB
- Reactions:
- Posts: 11270
- Joined: 07 Jun 2016, 19:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Add to the lit at night part.
Code: Select all
"light": true,
"light switching":truemy avatar:
-
THEMAX
- Inhabitant of a Universe
- Reactions:
- Posts: 4313
- Joined: 14 Sep 2017, 15:30
- Location: Astrellia, UHAE
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Does someone have the json + the textures of the lamp post & the night animation of the lamp post so i can see how those are made ?
Emperor of Atlantean federated empire

Founder state of Internationxal council
Leader of AEOY and steel pact

Founder state of Internationxal council
Leader of AEOY and steel pact
-
THEMAX
- Inhabitant of a Universe
- Reactions:
- Posts: 4313
- Joined: 14 Sep 2017, 15:30
- Location: Astrellia, UHAE
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
With the diagonal road update, have diagonal road decorations become possible or will it be something for later ? @Lobby @JustAnyone
Emperor of Atlantean federated empire

Founder state of Internationxal council
Leader of AEOY and steel pact

Founder state of Internationxal council
Leader of AEOY and steel pact
-
Yakka Works
- Inhabitant of a Conurbation
- Reactions:
- Posts: 412
- Joined: 06 Jan 2020, 07:57
- Location: Java-indonesia
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Is value true enabled and value false is disabled?
Re: Road decoration
How to add lights to road decorations?
-
Yakka Works
- Inhabitant of a Conurbation
- Reactions:
- Posts: 412
- Joined: 06 Jan 2020, 07:57
- Location: Java-indonesia
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Ask @Pederont for that.
-
Lakan Haraya
- Metropolitan
- Reactions:
- Posts: 131
- Joined: 28 Mar 2019, 07:34
- Location: Philippines
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: 关于:道路装饰
Use 64 arrays
Code: Select all
"animation":[
{"id":"$animation_A"}, //this will be your 0
{"id":"$animation_B"}, //and this is 1
{"id":"$animation_C"} //2
// 3, 4, 5, ... if you add more
],
"frame animation indices":[
[],[],[],[], //here's for rotation 0
[],[0,1],[],[],
[],[],[0,2],[],
[],[],[],[],
[],[],[],[], //for rotation 1
[],[0,3],[],[],
[],[],[0,4],[],
[],[],[],[],
[],[],[],[], //rotation 2
[],[0,5],[],[],
[],[],[0,6],[],
[],[],[],[],
[],[],[],[], //rotation 3
[],[0,7],[],[],
[],[],[0,8],[],
[],[],[],[]
]
As you can see, four 16 arrays are grouped together, each 16-group is for each rotations
"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors
“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”
CEO of Haráya Motors
“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”
Re: Road decoration
thank you!Lakan Haraya wrote: 04 Jun 2023, 18:59Use 64 arraysThe placement of zeros are for frame 5 and frame 10 of road. You can also add more animations like how 1, 2, 3, ... are added in this example.Code: Select all
"animation":[ {"id":"$animation_A"}, //this will be your 0 {"id":"$animation_B"}, //and this is 1 {"id":"$animation_C"} //2 // 3, 4, 5, ... if you add more ], "frame animation indices":[ [],[],[],[], //here's for rotation 0 [],[0,1],[],[], [],[],[0,2],[], [],[],[],[], [],[],[],[], //for rotation 1 [],[0,3],[],[], [],[],[0,4],[], [],[],[],[], [],[],[],[], //rotation 2 [],[0,5],[],[], [],[],[0,6],[], [],[],[],[], [],[],[],[], //rotation 3 [],[0,7],[],[], [],[],[0,8],[], [],[],[],[] ]
As you can see, four 16 arrays are grouped together, each 16-group is for each rotations
Take note that rotationally aware road decos are only applicable for one-way roads
Re: Road decoration
Does anyone know where I might be able to get a guild on creating simple decorations for cities. Stuff like phonebooths, padestrian seats, etc. I know I can make building but I don't really have any place for that or road decorations right now.
-
FVI
- Inhabitant of a Galaxy Cluster
- Reactions:
- Posts: 2442
- Joined: 22 Feb 2022, 16:00
- Location: The largest island in Europe
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: Road decoration
You might try asking someone if he's interested in collaborating with you, but it's probably generally more practical doing the textures yourself.Jtrendz wrote: 16 Nov 2024, 23:30 Does anyone know where I might be able to get a guild on creating simple decorations for cities. Stuff like phonebooths, padestrian seats, etc. I know I can make building but I don't really have any place for that or road decorations right now.
-
Ross The Mayor
- Small-town resident
- Reactions:
- Posts: 33
- Joined: 20 Dec 2023, 21:30
- Location: Jamaica
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Re: Road decoration
Does anyone know the code for the cross walk road deco? How do you allow pedestrians to use it and cross the road?
-
dnswodn
- Inhabitant of a Conurbation
- Reactions:
- Posts: 387
- Joined: 08 Feb 2022, 06:14
- Location: Guangdong, China
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Add this:Ross The Mayor wrote: 26 Apr 2025, 17:13 Does anyone know the code for the cross walk road deco? How do you allow pedestrians to use it and cross the road?
Code: Select all
"allow road crossing": true-
Playerc445GDReal
- Inhabitant of a Megalopolis
- Reactions:
- Posts: 657
- Joined: 09 Feb 2025, 11:41
- Location:
the edge of the milky way galaxy
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
im gonna make a book outta this
Re: Road decoration
How do one create a street light
-
Vinzzxprikitiwww
- Villager
- Reactions:
- Posts: 9
- Joined: 04 Sep 2025, 06:24
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: Road decoration
Is there a code for street decoration that lights up at night? Because I want to make lights.