How to make train plug-in

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

Plugin Creator

Platform

How to make train plug-in

#1

Post 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 127 times
Thanks :bp :bd
Last edited by Yakka on 17 May 2021, 23:48, edited 4 times in total.
User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

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"
User avatar
SenyaBell
Bell
Reactions:
Posts: 867
Joined: 02 Oct 2020, 11:18
Location: Saratov
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Coding a train Plugin

#3

Post by SenyaBell »

Code: Select all    Reset

your code
JSON checker
Check
User avatar
Yakka
Inhabitant of a Conurbation
Reactions:
Posts: 415
Joined: 06 Jan 2020, 09:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Coding a train Plugin

#4

Post by Yakka »

SenyaBell wrote: 04 Dec 2020, 06:30

Code: Select all    Reset

your code
JSON checker
Check
your code?
Ours code
User avatar
SenyaBell
Bell
Reactions:
Posts: 867
Joined: 02 Oct 2020, 11:18
Location: Saratov
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

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”