Bus stops

Learn here how to create and use plugins.

Moderator: KoalaGuy

Post Reply
User avatar
Matison55557
Inhabitant of a Universe
Reactions:
Posts: 4228
Joined: Mon Jul 04, 2016 18:49
Plugins: Show
Version: Beta
Phone: Huawei P9 lite mini

Bus stops

Post by Matison55557 » Sun Dec 10, 2017 17:43

Hi, in this tutorial I will teach you how to make your own bus stops.

First, let's look at a part of the JSON of the game's bus stop.

Code: Select all

[
  {
    "id": "$busstop00",
    "type": "bus stop",
    "width": 1,
    "height": 1,
    "influence passenger bus": 10,
    "frames": [{"x":512,"y":864,"w":32,"h":32,"count":4},
      {"x":512,"y":896,"w":32,"h":32,"count":4},
      {"x":512,"y":928,"w":32,"h":32,"count":4},
      {"x":512,"y":960,"w":32,"h":32,"count":4},
      {"x":512,"y":992,"w":32,"h":32,"count":4}],
    "capacity": 32
  }
]
type - "bus stop" means it will be, obviously, a bus stop.
width and height need to be 1.
influence passenger bus - the influence. 10 is the default bus stop's influence.
capacity - how much people the bus stop can hold.
frames
Now frames, they need 20 images. 4 rotations, times 5 for different amounts of people.
the "x" and "y" have to be replaced with "bmp":"<filename>" when using a custom texture. I think you have to leave the "w" and "h"
Here's the default frames (by Lobby and Theo). Use them as a reference or a template. Important: This is a graphic from the game's textures, you have to split this into 5 different png's of 32x160 or 20 png's of 32x32
stops.png
stops.png (2.35 KiB) Viewed 214 times
as you can see the one on the top has no people and the bottom one is full of people. This is how you have to do the bus stop graphic.

Remember to add title, text and price! And, of course change the id unless you're doing a plugin that overrides/changes the default bus stop!
This tutorial was not tested, if someone doesn't work I'll help and correct the tutorial
Last edited by Matison55557 on Sun Dec 10, 2017 19:20, edited 1 time in total.
410410
    graph.org/telegraph
🔸5️⃣5️⃣5️⃣5️⃣7️⃣🔸

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 758
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Bus stops

Post by mdk_813 » Sun Dec 10, 2017 17:52

You also have to think about the ID!
If you want to make additional bus stops, use your own ID.
If you want to replace the original bus stops with your own version, use this in your JSON:

Code: Select all

"id":"$busstop00",
"override":true,
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
KoalaGuy
TheoTown Veteran
Reactions:
Posts: 5832
Joined: Mon Mar 06, 2017 21:45
Location: Pitcairn Islands
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2017

Re: Bus stops

Post by KoalaGuy » Sun Dec 10, 2017 17:56

Do you have permissions from Lobby to use bus stop textures? @Matison55557
My plugins will always be free, :bx to :bd
TheoTown Translator (Serbian)
Once Best Plugin Creator
(My plugins)
Contributor
Once top poster
Most reactions
Made some graphics for TheoTown
Made some smilies

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 758
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Bus stops

Post by mdk_813 » Sun Dec 10, 2017 18:01

Regarding the frames:
It is enough to just list your separate images (like with rotation frames for example).
You don't need to define "w" and "h".

Code: Select all

"frames":[{"bmp":"Busstop_A1_1x1.png"},
	{"bmp":"Busstop_B1_1x1.png"},
	{"bmp":"Busstop_C1_1x1.png"},
	{"bmp":"Busstop_D1_1x1.png"},
	{"bmp":"Busstop_A2_1x1.png"},
	{"bmp":"Busstop_B2_1x1.png"},
	{"bmp":"Busstop_C2_1x1.png"},
	{"bmp":"Busstop_D2_1x1.png"},
	{"bmp":"Busstop_A3_1x1.png"},
	{"bmp":"Busstop_B3_1x1.png"},
	{"bmp":"Busstop_C3_1x1.png"},
	{"bmp":"Busstop_D3_1x1.png"},
	{"bmp":"Busstop_A4_1x1.png"},
	{"bmp":"Busstop_B4_1x1.png"},
	{"bmp":"Busstop_C4_1x1.png"},
	{"bmp":"Busstop_D4_1x1.png"},
	{"bmp":"Busstop_A5_1x1.png"},
	{"bmp":"Busstop_B5_1x1.png"},
	{"bmp":"Busstop_C5_1x1.png"},
	{"bmp":"Busstop_D5_1x1.png"}],
Note: A to D are the rotational views, while 1 to 5 refer to the amount of passengers waiting.

Also, I think it would be enough to only provide four frames, you just wouldn't have any distinction for different levels of passenger usage then, though.
Please, correct me if I'm wrong.
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
Matison55557
Inhabitant of a Universe
Reactions:
Posts: 4228
Joined: Mon Jul 04, 2016 18:49
Plugins: Show
Version: Beta
Phone: Huawei P9 lite mini

Re: Bus stops

Post by Matison55557 » Sun Dec 10, 2017 18:11

:bq
Permissions? Lobby said that when using a texture from the game we only need to credit them.
410410
    graph.org/telegraph
🔸5️⃣5️⃣5️⃣5️⃣7️⃣🔸

User avatar
KoalaGuy
TheoTown Veteran
Reactions:
Posts: 5832
Joined: Mon Mar 06, 2017 21:45
Location: Pitcairn Islands
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2017

Re: Bus stops

Post by KoalaGuy » Sun Dec 10, 2017 18:25

Then Commander is doing a pretty bad job :lol:
My plugins will always be free, :bx to :bd
TheoTown Translator (Serbian)
Once Best Plugin Creator
(My plugins)
Contributor
Once top poster
Most reactions
Made some graphics for TheoTown
Made some smilies

Nexus24680
Inhabitant of a Conurbation
Reactions:
Posts: 521
Joined: Sat May 06, 2017 19:12
Plugins: Show
Version: Beta

Re: Bus stops

Post by Nexus24680 » Mon Jan 15, 2018 20:13

Would it be possible to add animations to bus stops?
Like when making a plugin?

User avatar
Matison55557
Inhabitant of a Universe
Reactions:
Posts: 4228
Joined: Mon Jul 04, 2016 18:49
Plugins: Show
Version: Beta
Phone: Huawei P9 lite mini

Re: Bus stops

Post by Matison55557 » Mon Jan 15, 2018 20:31

As far as I know, everything except roads supports animation. Feel free to try
410410
    graph.org/telegraph
🔸5️⃣5️⃣5️⃣5️⃣7️⃣🔸

User avatar
CommanderABab
Inhabitant of a Universe
Reactions:
Posts: 4763
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Bus stops

Post by CommanderABab » Mon Jan 15, 2018 21:14

Roads support animation! You have to do it a special way! But the road has no way of knowing if a bus stop has been placed on it.
410 :bp 410Currently using beta 410. 410 What's new? Your plugin can change weather! :)
ImageTelegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

Nexus24680
Inhabitant of a Conurbation
Reactions:
Posts: 521
Joined: Sat May 06, 2017 19:12
Plugins: Show
Version: Beta

Re: Bus stops

Post by Nexus24680 » Mon Jan 15, 2018 22:11

Matison55557 wrote:
Mon Jan 15, 2018 20:31
As far as I know, everything except roads supports animation. Feel free to try
I tried but it didn't work.
Maybe we can use that in our collab plugin.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest