Higher level bridges

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Lobby
Developer
Reactions:
Posts: 3341
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Higher level bridges

#1

Post by Lobby » Fri Feb 16, 2018 0:34

See here on how to create a plugin road. In order to support higher level bridges you have to provide separate frames for the ramp so there's a total of 16 frames per bridge.

These frames may look like that (32x48 pixels each) :img
bridge_frames_updated.png
bridge_frames_updated.png (9.25 KiB) Viewed 1863 times
Not that you might have to adjust your piles to be stackable.

You can use it like that :json

Code: Select all

"bridge frames":[{"bmp":"bridge_frames.png","w":32,"h":48,"count":16}],
"bridge height":12,
"frames per bridge":16  // You have to tell the game that there are 16 instead of 12 frames for each bridge type
The game will allow higher level bridges for any roads that provide 16 frames per bridge as shown above.

You can manually set the max bridge level by using

Code: Select all

"max level":3
in your road code. 3 is default for roads that provide 16 frames. Up to level 4 16 is supported right now (version 435 440).
...Have a nice stay

User avatar
CommanderABab
AB
Reactions:
Posts: 7643
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Higher level bridges

#2

Post by CommanderABab » Fri Feb 16, 2018 0:39

That was 20 frames! :) he fixed it!
754!754Currently using beta 754. 754 What's new? :)
harder hard mode!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Lobby
Developer
Reactions:
Posts: 3341
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Higher level bridges

#3

Post by Lobby » Fri Feb 16, 2018 0:44

Thank you :bf
...Have a nice stay

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3102
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Higher level bridges

#4

Post by Mg3094066 » Fri Feb 16, 2018 0:49

Only the other 3 types are missing
I want my diamonds you get the plugins free or not :bd

User avatar
CommanderABab
AB
Reactions:
Posts: 7643
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Higher level bridges

#5

Post by CommanderABab » Fri Feb 16, 2018 0:50

Mg3094066 wrote:
Fri Feb 16, 2018 0:49
Only the other 3 types are missing

That's where you have to make your own :)
754!754Currently using beta 754. 754 What's new? :)
harder hard mode!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3102
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Higher level bridges

#6

Post by Mg3094066 » Fri Feb 16, 2018 0:53

(._.?) wait...
What can i do with this?
Bridge_frames2.png
Bridge_frames2.png (5.98 KiB) Viewed 2268 times
Bridge_frames.png
Bridge_frames.png (4.91 KiB) Viewed 2268 times
PS: U can use it freely just mention me in the credits for know the existense of the plugin
I want my diamonds you get the plugins free or not :bd

User avatar
Lobby
Developer
Reactions:
Posts: 3341
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Higher level bridges

#7

Post by Lobby » Fri Feb 16, 2018 0:59

I updated the frames in World texture
...Have a nice stay

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3102
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Higher level bridges

#8

Post by Mg3094066 » Fri Feb 16, 2018 1:09

Ok we must to introduce this bridge tipe for my road for make it work?

Code: Select all

"frames per bridge":16
I want my diamonds you get the plugins free or not :bd

User avatar
CommanderABab
AB
Reactions:
Posts: 7643
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Higher level bridges

#9

Post by CommanderABab » Fri Feb 16, 2018 1:12

Mg3094066 wrote:
Fri Feb 16, 2018 1:09
Ok we must to introduce this bridge tipe for my road for make it work?

Code: Select all

"frames per bridge":16
Yes!
754!754Currently using beta 754. 754 What's new? :)
harder hard mode!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3102
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Higher level bridges

#10

Post by Mg3094066 » Fri Feb 16, 2018 1:21

Now i will fix this 3 issues: and next go for tunnels
Attachments
IMG_20180215_151741_983.jpg
I want my diamonds you get the plugins free or not :bd

User avatar
CommanderABab
AB
Reactions:
Posts: 7643
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Higher level bridges

#11

Post by CommanderABab » Fri Feb 16, 2018 1:30

754!754Currently using beta 754. 754 What's new? :)
harder hard mode!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3102
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Higher level bridges

#12

Post by Mg3094066 » Fri Feb 16, 2018 2:16

Ok maybe i have a proble with this:
Attachments
IMG_20180215_161243_120.jpg
I want my diamonds you get the plugins free or not :bd

User avatar
Lobby
Developer
Reactions:
Posts: 3341
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Higher level bridges

#13

Post by Lobby » Fri Feb 16, 2018 2:26

You might have to redo this part. The easiest way is probably to recolor the matching frames from the world texture.

The old ramps used a visual trick to mimic 12 pixel height bridges. The problem is that this technique isn't stackable, so these frames changed a bit to be actually 12 pixels height.
...Have a nice stay

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3102
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Higher level bridges

#14

Post by Mg3094066 » Fri Feb 16, 2018 3:34

Lobby wrote:
Fri Feb 16, 2018 2:26
You might have to redo this part. The easiest way is probably to recolor the matching frames from the world texture.

The old ramps used a visual trick to mimic 12 pixel height bridges. The problem is that this technique isn't stackable, so these frames changed a bit to be actually 12 pixels height.
This is a little complicated, the game stops when i build a bridge that have the ramps.
There are an error?:
Attachments
Bridge_frames.png
I deleted the other bridge frames, now there are the only one bridge
Bridge_frames.png (7.34 KiB) Viewed 2202 times
I want my diamonds you get the plugins free or not :bd

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3102
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Higher level bridges

#15

Post by Mg3094066 » Fri Feb 16, 2018 3:35

*Beta Edition*
I want my diamonds you get the plugins free or not :bd

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1895
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone model: Moto Z Force Droid

Platform

Plugin Creator

Re: Higher level bridges

#16

Post by KINGTUT10101 » Fri Feb 16, 2018 4:08

Do these frame replace the normal bridge frames?

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3102
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Higher level bridges

#17

Post by Mg3094066 » Fri Feb 16, 2018 5:12

[mention]Lobby[/mention] there are the redrew image
Attachments
Bridge_frames.png
Bridge_frames.png (5.76 KiB) Viewed 2189 times
I want my diamonds you get the plugins free or not :bd

User avatar
Lobby
Developer
Reactions:
Posts: 3341
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Higher level bridges

#18

Post by Lobby » Fri Feb 16, 2018 12:36

[mention]KINGTUT10101[/mention] yes
[mention]Mg3094066[/mention] may you show your code, please? The game won't crash because of pixel issues.
...Have a nice stay

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3102
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Higher level bridges

#19

Post by Mg3094066 » Fri Feb 16, 2018 17:16

Lobby wrote:
Fri Feb 16, 2018 12:36
@KINGTUT10101 yes
@Mg3094066 may you show your code, please? The game won't crash because of pixel issues.

Code: Select all

[
   {
      "id":"$4laneRoadMg3094066$",
	  "type":"road",
     "connectable": true,
	  "level":3,
     "width":2,
	  "frames":[
{"bmp":"roadL3.png","w":32,"h":15,"count":16},
{"bmp":"roadR2.png","w":32,"h":15,"count":16},
{"bmp":"roadR1.png","w":32,"h":15,"count":16},
{"bmp":"roadL4.png","w":32,"h":15,"count":16},
],
	  "speed":3.0,
      "traffic lights":
      [{"bmp":"tf.png","w":32,"h":32,"count":4}],
      "green phase":10000,
      "yellow phase":1000, 
	  "price":210,
	  "monthly price":3,
      "title":"Mexican Highway",
      "text":"if German highways you seem a little rare here we have a Highway made and drawn in Mexico. ;)",
       "auto join":true,
       "one way":true,
       "frames per bridge":16,
       "bridge frames":[{"bmp":"Bridge_frames.png","count":12,"h":34,"w":32}],
"bridge height":12,
"bridge price":370,
"tunnel frames":[{"bmp":"tunnel_frames.png","x":0,"w":16,"h":19,"handle y":7}, 
{"bmp":"tunnel_frames.png","x":16,"w":16,"h":19,"handle x":-16,"handle y":7}, 
{"bmp":"tunnel_frames.png","x":32,"w":16,"h":19,"handle y":7}, 
{"bmp":"tunnel_frames.png","x":48,"w":16,"h":19,"handle x":-16,"handle y":7}]
}
]
I want my diamonds you get the plugins free or not :bd

User avatar
Lobby
Developer
Reactions:
Posts: 3341
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Higher level bridges

#20

Post by Lobby » Fri Feb 16, 2018 17:29

I found a syntax mistake using JSONLint:

Code: Select all

			"count": 16
		},
		{
			"bmp": "roadL4.png",
			"w": 32,
			"h": 15,
			"count": 16
		},
	],
Remove the , before the last } of this excerpt.
...Have a nice stay

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: No registered users and 0 guests