Higher level bridges

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3217
Joined: 27 May 2017, 23:50
Location: Venezuelan Republic of Mexico
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Higher level bridges

Post by Mg3094066 »

Lobby wrote: 16 Feb 2018, 15: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.
Hmmmm... He did not talk about turning that white screen into a mistake, only that when he started the game, he could not place a bridge that had a ramp because it stopped
I threw my dignity to trash and downloaded Free Fire... But someway i liked it ":'D

But i think it was too early to celebrate... my internet runs at 8kb...

Just wait another month... :bb
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Higher level bridges

Post by Lobby »

Oh, it looks as if your "tunnel frames" has only 12 instead of 16 frames:

Code: Select all

"bridge frames":[{"bmp":"Bridge_frames.png","count":12,"h":34,"w":32}],
Maybe replace "count":12 by "count":16?
User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3217
Joined: 27 May 2017, 23:50
Location: Venezuelan Republic of Mexico
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Higher level bridges

Post by Mg3094066 »

Lobby wrote: 16 Feb 2018, 16:24 Oh, it looks as if your "tunnel frames" has only 12 instead of 16 frames:

Code: Select all

"bridge frames":[{"bmp":"Bridge_frames.png","count":12,"h":34,"w":32}],
Maybe replace "count":12 by "count":16?
Worked!!!!
But R.I.P ButeoNew, yep
The issues broke that city
I threw my dignity to trash and downloaded Free Fire... But someway i liked it ":'D

But i think it was too early to celebrate... my internet runs at 8kb...

Just wait another month... :bb
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Higher level bridges

Post by Lobby »

You might restore it by renaming the .store files
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Higher level bridges

Post by Lobby »

Updated information regarding max level.
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Higher level bridges

Post by Lobby »

Might crash in pre 440 versions :space
S
Shahrizal
Townsman
Reactions:
Posts: 74
Joined: 14 Sep 2017, 18:44
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Higher level bridges

Post by Shahrizal »

Where I can download higher bridge plugin
User avatar
malsa
Inhabitant of a Multiverse
Reactions:
Posts: 5078
Joined: 10 Feb 2017, 15:40
Location: Malaysia
Plugins: Showcase Store
Version: Beta

Platform

Re: Higher level bridges

Post by malsa »

Are you from Malaysia
User avatar
Wepf
Inhabitant of a Megacity
Reactions:
Posts: 257
Joined: 14 Oct 2021, 08:19
Location: Your lucid dream
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Higher level bridges

Post by Wepf »

Lobby wrote: 15 Feb 2018, 22: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

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).
Can I uses the bridge frames for my road plugin?
I play music and create theotown plugin (rarely)


Btw I'm from 🇹🇭 and I'm 13
User avatar
burgernamn
Inhabitant of a Megacity
Reactions:
Posts: 173
Joined: 15 Apr 2022, 08:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Higher level bridges

Post by burgernamn »

do i have to replace it or just add it to the code
im more active on my discord
S
StarMohsin
Settler
Reactions:
Posts: 2
Joined: 13 Oct 2023, 08:37

Re: Higher level bridges

Post by StarMohsin »

does any one know why my bridges are drawing in the wrong direction
Image

Code: Select all

[
  {
    "id":"$starmohsin.mayo.avenuePack.avene8l",
    "type":"road",
    "level":2,
    "frames":[
      {"silent frames":[
        {"x":512,"y":16,"w":32,"h":16,"count":16},
        {"x":512,"y":640,"w":32,"h":16,"count":4,"offset y":1024}
      ]},

      {"ref":0,"count":5,"silent":true},
      {"ref":16,"silent":true},
      {"ref":6,"count":10,"silent":true},

      {"ref":0,"count":10,"silent":true},
      {"ref":17,"silent":true},
      {"ref":11,"count":5,"silent":true},

      {"ref":0,"count":5,"silent":true},
      {"ref":18,"silent":true},
      {"ref":6,"count":10,"silent":true},

      {"ref":0,"count":10,"silent":true},
      {"ref":19,"silent":true},
      {"ref":11,"count":5,"silent":true}
    ],
    "bridge frames":[
      {"x":512,"y":96,"w":32,"h":48,"count":12},
      {"x":896,"y":214,"w":32,"h":26,"count":4},

      {"x":512,"y":96,"w":32,"h":48,"count":4},
      {"x":896,"y":96,"w":32,"h":48,"count":4},
      {"x":768,"y":96,"w":32,"h":48,"count":4},
      {"x":896,"y":214,"w":32,"h":26,"count":4},

      {"x":512,"y":144,"w":32,"h":48,"count":12},
      {"x":896,"y":214,"w":32,"h":26,"count":4},

      {"x":512,"y":144,"w":32,"h":48,"count":4},
      {"x":896,"y":144,"w":32,"h":48,"count":4},
      {"x":768,"y":144,"w":32,"h":48,"count":4},
      {"x":896,"y":214,"w":32,"h":26,"count":4},

      {"x":512,"y":192,"w":32,"h":48,"count":12},
      {"x":896,"y":214,"w":32,"h":26,"count":4}
    ],
    "tunnel frames":[
      {"x":896,"y":192,"w":16,"h":19,"handle y":7},
      {"x":912,"y":192,"w":16,"h":19,"handle x":-16,"handle y":7},
      {"x":928,"y":192,"w":16,"h":19,"handle y":7},
      {"x":944,"y":192,"w":16,"h":19,"handle x":-16,"handle y":7}
    ],
    "draw ground": true,
    "frames per bridge":16,
    "bridge height":12,
    "traffic lights":[{"x":512,"y":32,"w":32,"h":32,"count":4}],
    "green phase":6000,
    "yellow phase":1000,
    "speed":2.5,
    "price":600,
    "bridge price":4000,
    "monthly price":10,
    "one way":true,
    "width":5,
	"lanes" : 8,
	"height" : 4,
    "decoration buildings":["$decoroad00"],
    "deco": {"draft": "$streetlights02_one"},
    "requirement":{"requirements":[{"type":"RANK", "data":{"lvl":3}}]},
    "title" : "Avenue 8 Lanes"
  }
]
You do not have the required permissions to view the files attached to this post.