Road decoration

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
S
Shama
Settler
Reactions:
Posts: 7
Joined: 08 May 2018, 09:00
Plugins: Showcase Store

Re: Road decoration

Post by Shama »

Hi everyone! Just started posting and doing plugin stuff, 2nd post ever! I thought I would save others the trouble I just went through trying to figure this out. (for sidewalks for my upcoming roads plugin :)

There is an error of sorts in Lobby's posted code, and zip. Obviously the in game decos are fine, but the problem seems to be spread to others plugins. The same problem was even in Rockforts trees deco json, and i'm sure many others.

The image coordinates are a bit off.. doesnt show with his trees, or really much at all unless you are trying to do sidewalks or anything that hugs the road, or are OCD with ya pixels :D)

Anyway..
{"id":"$anim_roaddeco_sample00_00","type":"animation","frames":[{"bmp":"frames.png","x":0,"w":32,"handle y":8}]},
{"id":"$anim_roaddeco_sample00_01","type":"animation","frames":[{"bmp":"frames.png","x":32,"w":32,"handle y":8}]},
{"id":"$anim_roaddeco_sample00_02","type":"animation","frames":[{"bmp":"frames.png","x":64,"w":32,"handle y":8}]},
{"id":"$anim_roaddeco_sample00_03","type":"animation","frames":[{"bmp":"frames.png","x":92,"w":32,"handle y":8}]}

92 should be 96

...and whalla! Thanks for the great game Lobby and putting the code and what not up for us to use and play with!

before:
20190114_210559[1].png
and after:
20190114_210634[1].png
You do not have the required permissions to view the files attached to this post.
Shaman - Beneficent Monarch of the city-state of Kektaka
Less corrupt than DC, stronger than London, better churches than the Vatican, and more gold than Dubai!!
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Road decoration

Post by Lobby »

Thank you Shama, I didn't notice that :o

Edited the first post accordingly.
User avatar
PenangLion1016
Inhabitant of a Megacity
Reactions:
Posts: 169
Joined: 20 Dec 2017, 12:41
Location: Penang, Malaysia
Plugins: Showcase Store

Plugin Creator

Platform

Re: Road decoration

Post by PenangLion1016 »

what does it mean by "offset"?
Hey its me Pen (or Tan Choon Wei )
mah youtube: https://www.youtube.com/channel/UCTJQOO ... NAdd1hTgig
the other guy who uses bluestacks (the rarest)
im from Penang btw

NEW CHANNEL!
https://www.youtube.com/channel/UCLppp3 ... uuvtDuRmeg
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Road decoration

Post by Lobby »

The world texture is composed from smaller buildings. I use "offset x" and "offset y" to specify from where to pick the frames from. Since you usually bundle your own graphics with your plugin there's usually no need for you to use them.
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Road decoration

Post by Lobby »

It's up to you to specify for which alignment of the road which frames/animations should be drawn. Therefore it's also possible to use exactly two frames :)

:66: contains new attributes; I added them to the first post.
User avatar
22Alpha
Inhabitant of a Conurbation
Reactions:
Posts: 448
Joined: 23 Sep 2017, 12:29

Platform

Re: Road decoration

Post by 22Alpha »

Hello guys, anyone remember the road barrier plugin? Not sure if Lobby or Commander made it. But can it work as a road deco? or it would remain as an on click fun plugin?
:mine
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Road decoration

Post by Lobby »

It is part of the game, it is a road decoration and it uses on click fun.
User avatar
Lakan Haraya
Metropolitan
Reactions:
Posts: 131
Joined: 28 Mar 2019, 07:34
Location: Philippines
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Road decoration

Post by Lakan Haraya »

Hi :)

How can I create a rotation aware road deco for frame 5 and 10 (straight road) of the road, because rotation 0 (default) and 2 build the same road deco :/ and I don't want it into my plugin
Hmm...
"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors

“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Road decoration

Post by CommanderABab »

Have you tried making the animation used for those frames "rotation aware"?
my avatar:
User avatar
star Lee
Villager
Reactions:
Posts: 19
Joined: 06 Jul 2020, 02:57

Plugin Creator

Platform

Re: Road decoration

Post by star Lee »

Excuse me, why road decoration can't be put on the railway?
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3666
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Road decoration

Post by JustAnyone »

Code: Select all    Reset

"required flag train": true
JSON checker
Check
controls it
User avatar
star Lee
Villager
Reactions:
Posts: 19
Joined: 06 Jul 2020, 02:57

Plugin Creator

Platform

Re: Road decoration

Post by star Lee »

JustAnyone wrote: 22 Jul 2020, 09:13

Code: Select all    Reset

"required flag train": true
JSON checker
Check
controls it

thank you! :D
User avatar
Lakan Haraya
Metropolitan
Reactions:
Posts: 131
Joined: 28 Mar 2019, 07:34
Location: Philippines
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Road decoration

Post by Lakan Haraya »

Would it be possible to support road deco in slopes in the near future? 🤔
"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors

“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”
User avatar
CERRERA
Townsman
Reactions:
Posts: 48
Joined: 25 Jan 2020, 04:19
Location: Philippines
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Road decoration

Post by CERRERA »

Is there a code for animation that is active when the car steps in the road decoration
Everything you can imagine is real
User avatar
CERRERA
Townsman
Reactions:
Posts: 48
Joined: 25 Jan 2020, 04:19
Location: Philippines
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Road decoration

Post by CERRERA »

Tutorials for 64 frames of road deco
Everything you can imagine is real
User avatar
Pederont
Small-town resident
Reactions:
Posts: 32
Joined: 10 Aug 2019, 07:01
Location: South Korea
Plugins: Showcase Store

Plugin Creator

Platform

Re: Road decoration

Post by Pederont »

Is it possible to make road deco react when vehicle is on the tile? just like military checkpoint.
If my links doesn't work, turn off your ad blocker
I'm just a furry artist and graphic designer :img
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Road decoration

Post by CommanderABab »

You could try a fun using "road usage" in the condition statement. Keep in mind that it probably includes all levels of road at that tile: road, bridge(s), and tunnel.
my avatar:
User avatar
ian`
Metropolitan
Reactions:
Posts: 117
Joined: 04 Apr 2020, 15:36
Location: 日本
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Road decoration

Post by ian` »

Yes, but it's not easy to make. :?
:bc
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Road decoration

Post by CommanderABab »

That's cool!
my avatar:
i
imajoke
Inhabitant of a Conurbation
Reactions:
Posts: 529
Joined: 27 Oct 2019, 00:39
Plugins: Showcase Store
Version: Beta

Platform

Re: Road decoration

Post by imajoke »

*confused screaming*
Eugh. I remembered this account existed and all I did.
I'm a better person now. Most likely to stay inactive.
Awesome community by the way y'all are peak 🗣️🗣️

The YouTube account isn't mine anymore by the way, a different family member uses it now.