Coding a train Plugin

You have great tips for other players? Share them here.
User avatar
Kiki012
Small-town resident
Reactions:
Posts: 29
Joined: Mon Jan 06, 2020 9:57
Location: Indonesia,East Java, Banyuwangi, Glenmore
Plugins: Show
Phone model: Lenovo TB3-730X, v:
Contact:

Plugin Creator

Platform

Coding a train Plugin

#1

Post by Kiki012 » Sun Feb 02, 2020 12:15

Do you Don't Know How coding of train Plugin :?:

Here the coding ;)
Train Wagon

{
"id":"$Cargo_2019",. // please Use Other id
"type":"car",
"author":"kiki012",
"flag normal":false,
"flag train":true,
"frames":[{"bmp":"Car2.png","count":4,"h":19,"w":20}],
"speed":1.5,
"v2":true
},

Train Head


{
"id":"$CC206",
"type":"car",
"author":"Kiki012",
"flag normal":false,
"flag train":true,
"frames":[{"bmp":"CC206.png","count":4,"h":19,"w":20}],
"tail":["Train_Link",
"$White_2016","Train_Link",. // the Train Link ke For Train Make Not Like' Connect Each Other
"$White_2016","Train_Link",
"$White_2016","Train_Link",
"$White_2016","Train_Link",
"$White_2016","Train_Link",
"$White_2016","Train_Link",
"$Cargo_2019"],
"speed":1.5,
"v2":true
},
(SORRY KINGTUT 101 BECAUSE SAME ID USING :lol: )

If You Want Custom Railway


{
"id":"IDN_Narrow_Gauge",
"type":"road",
"title":"Narrow gauge Railway",
"text":"Used to guide your trains.",
"author":"Kiki012",
"frames":[{"bmp":"NG.png","count":16,"h":17,"w":32}], //the Frames
"bridge frames":[{"bmp":"NGBR.png","count":12,"h":48,"w":32}],. //bridge Frames
"tunnel frames":[{"bmp":"TNGF.png","h":19,"handle y":7,"w":16,"x":0}], //Tunnel Frames
"draw ground":true,
"price":50,
"monthly price":1,
"bridge height":11,
"bridge price":120,
"flag normal":false,
"flag train":true,
"ordinal":304,
"allow transfer":true,
"allow bus":false,
"connectable":true,
"auto join":false,
"level":5,
"speed":1.5,
"x flags":{"flag normal":true,"flag train":true}
},

Train Spawner


{
"id":"IDN_PL4",
"type":"railway Station",
"author":"Kiki012",
"width":1,
"height":1,
"frames":[{"bmp":"PL5.png"},{"bmp":"PL6.png"},{"bmp":"PL7.png"},{"bmp":"PL8.png"}],
"price":100,
"monthly price":0,
"rotation aware":true,
"draw ground":true,
"water":"0",
"power":"0",
"car spawner":[{"targets":["IDN_PL4"],"cars":["$CC206PR"],"count":1,"radius":1000}], // This Important
"ordinal":307,
"build time":0,
"needs road":false,
"text":"Platforms ",
"title":"Deco Platform"
},

This all Code From My Indonesian Train Plugin


Thanks :bp :bd
Last edited by Kiki012 on Sat Feb 08, 2020 13:08, edited 2 times in total.
My Website (Discord) https://discord.gg/7DcYHC
Just Click The Link! :x
My YouTube Channelhttps://youtu.be/XmVhwFaZLVo
Enjoy My Plugin

User avatar
Ølsken
Former Bearbear65
Reactions:
Posts: 4950
Joined: Fri Feb 10, 2017 14:53
Plugins: Show
Version: Beta
Phone model: Samsung S10

Platform

Plugin Creator

Re: Coding a train Plugin

#2

Post by Ølsken » Sun Feb 02, 2020 13:54

putting some comments would make it easier for people to understand what you did. ;)

Such as:

Code: Select all

"category":"$foobar", //puts train platform into the category with the id "$foobar"
ImageJust my opinion

Post Reply Previous topicNext topic

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 2 guests