Tunnels

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3761
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Tunnels

Post by Lobby »

See here on how to create road plugins.


To add tunnel support to a road it's sufficient to add the following code to the plugin:

Code: Select all

"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}
]
Tunnels will then use the default tunnel frames (16x19 pixels each) :img
tunnel_frames.png
You may use your own frames. Take care to set the handles of each frame correctly (they are used to position the frame for drawing). This might look like :json

Code: Select all

"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}
]
You do not have the required permissions to view the files attached to this post.
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: Tunnels

Post by Mg3094066 »

Tunnels ready:
You do not have the required permissions to view the files attached to this post.
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
A
AwkwrdPrtMskrt
Metropolitan
Reactions:
Posts: 138
Joined: 08 Nov 2017, 00:31

Platform

Re: Tunnels

Post by AwkwrdPrtMskrt »

Is it possible to make my plugin roads cost no diamonds when making tunnels?
:mine Currently working on New Winchester
User avatar
Quardhine
Small-town resident
Reactions:
Posts: 33
Joined: 08 Feb 2018, 06:13
Location: Philippines
Plugins: Showcase Store
Version: Beta

Platform

Re: Tunnels

Post by Quardhine »

Did someone said diamonds to build that?
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: Tunnels

Post by Mg3094066 »

AwkwrdPrtMskrt wrote: 16 Feb 2018, 04:19 Is it possible to make my plugin roads cost no diamonds when making tunnels?
Nope, that are no implemented
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
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: Tunnels

Post by Mg3094066 »

@actemendes do u have a problem?
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
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: Tunnels

Post by FVI »

I got two questions.
Where can I get the textures of these tunnels please?
Is there a different code to get these tunnels?
IMG_20230114_211032.jpg
I need the codes so I can test the quality of the tunnels
Thanks!
You do not have the required permissions to view the files attached to this post.
My YT channel! https://www.youtube.com/@FVI297

(Changed the location writing, the old one sounded bad)
User avatar
Patchouli Knowledge
Townsman
Reactions:
Posts: 64
Joined: 26 Sep 2020, 07:42

Re: Tunnels

Post by Patchouli Knowledge »

why x is 896 but not smaller number
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3666
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Tunnels

Post by JustAnyone »

x and y refer to the start pixel in the world texture
Previous topicNext topic