Page 1 of 1

How to make train plug-in

Posted: 02 Feb 2020, 12:15
by Yakka
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 121 times
Thanks :bp :bd

Re: Coding a train Plugin

Posted: 02 Feb 2020, 13:54
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"

Re: Coding a train Plugin

Posted: 04 Dec 2020, 06:30
by SenyaBell

Code: Select all    Reset

your code
JSON checker
Check

Re: Coding a train Plugin

Posted: 04 Dec 2020, 10:13
by Yakka
SenyaBell wrote:
04 Dec 2020, 06:30

Code: Select all    Reset

your code
JSON checker
Check
your code?
Ours code

Re: Coding a train Plugin

Posted: 04 Dec 2020, 11:37
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