How to make train plug-in

You have great tips for other players? Share them here.
Online
User avatar
Kiki012
Inhabitant of a Conurbation
Reactions:
Posts: 389
Joined: 06 Jan 2020, 09:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

How to make train plug-in

#1

Post by Kiki012 »

Hello there, you want to make train plug-in that's looks like mine <... Indonesia Renewal Pack> ?
Here's how

Firstly you need to know about template click here to see how
It useful if you want to make a huge train pack Plugin,so the code don't repeat!
This one for the train

Code: Select all

  {
    "id": "$K012_TR_WAGT",//unique id
    "type": "template",
    "flag normal": false,//makes train didn't go to normal road
    "flag train": true,// make train go to on its railway
    "speed": 1.5,// train speed in tile/day
    "v2": true //the second generation of car loading.
  },
Next up, still using same type,this time for the spawner one

Code: Select all

  {
    "id": "$K012_SPW00T",//unique id
    "type": "template",
    "price": 123,//price of building when build
    "monthly price": 10,//monthly cost of building
    "draw ground": true,// (necessary) to make groun texture shown instead of water one
    "ordinal": 307,//place where on category (-1 to +1000)
    "build time": 0,//how long it takes to build
    "needs road": false,//need road? No
    "influence passenger train": 30,//special code!
    "capacity": 2,//capacity of building
    "water": 0,//water? No
    "power": 0//power? No
  },
And finally the train!
... not yet,im bit to busy download the attachment
The spawner, station,or platform!
... not yet,im bit to busy download the attachment

#IRP Sample.zip
(7.26 KiB) Downloaded 60 times
Thanks :bp :bd
Last edited by Kiki012 on 17 May 2021, 23:48, edited 4 times in total.
꧋ꦱꦼꦭꦩꦠ꧀ꦝꦠꦁꦥꦼꦁꦒꦸꦤ꧉
🇮🇩 Situs saya
🇬🇧 My Website


User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5439
Joined: 10 Feb 2017, 14:53
Plugins: Showcase Store
Version: Beta

Platform

Plugin Creator

Re: Coding a train Plugin

#2

Post by Bearbear76 »

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"
Just my opinion
I'm probably recompiling my kernel... :o

SenyaBell
Bell
Reactions:
Posts: 859
Joined: 02 Oct 2020, 11:18
Location: Saratov
Plugins: Showcase Store
Version: Beta
Contact:

Platform

Re: Coding a train Plugin

#3

Post by SenyaBell »

Code: Select all    Reset

your code
JSON checker
Check

Online
User avatar
Kiki012
Inhabitant of a Conurbation
Reactions:
Posts: 389
Joined: 06 Jan 2020, 09:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Coding a train Plugin

#4

Post by Kiki012 »

SenyaBell wrote:
04 Dec 2020, 06:30

Code: Select all    Reset

your code
JSON checker
Check
your code?
Ours code
꧋ꦱꦼꦭꦩꦠ꧀ꦝꦠꦁꦥꦼꦁꦒꦸꦤ꧉
🇮🇩 Situs saya
🇬🇧 My Website


SenyaBell
Bell
Reactions:
Posts: 859
Joined: 02 Oct 2020, 11:18
Location: Saratov
Plugins: Showcase Store
Version: Beta
Contact:

Platform

Re: Coding a train Plugin

#5

Post by SenyaBell »

Kiki012 wrote:
04 Dec 2020, 10:13
SenyaBell wrote:
04 Dec 2020, 06:30

Code: Select all    Reset

your code
JSON checker
Check
your code?
Ours code
LMFAO

Post Reply Previous topicNext topic

Return to “Tips and Tricks”