How to make train plug-in

You have great tips for other players? Share them here.
User avatar
Kiki012
Inhabitant of a Megacity
Reactions:
Posts: 246
Joined: Mon Jan 06, 2020 9:57
Location: Java-indonesia
Plugins: Show
Version: Beta

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 6 times
Thanks :bp :bd
Last edited by Kiki012 on Mon May 17, 2021 23:48, edited 4 times in total.
Testing plugin on version
My Plug-in
Show
Random Text that i found on Age of Civilization 2 game
For The Mother Russia

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5444
Joined: Fri Feb 10, 2017 14:53
Plugins: Show
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: 862
Joined: Fri Oct 02, 2020 11:18
Location: Saratov
Plugins: Show
Version: Beta
Contact:

Platform

Re: Coding a train Plugin

#3

Post by SenyaBell »

Code: Select all    Reset

your code
JSON checker
Check

User avatar
Kiki012
Inhabitant of a Megacity
Reactions:
Posts: 246
Joined: Mon Jan 06, 2020 9:57
Location: Java-indonesia
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Coding a train Plugin

#4

Post by Kiki012 »

SenyaBell wrote:
Fri Dec 04, 2020 6:30

Code: Select all    Reset

your code
JSON checker
Check
your code?
Ours code
Testing plugin on version
My Plug-in
Show
Random Text that i found on Age of Civilization 2 game
For The Mother Russia

SenyaBell
Bell
Reactions:
Posts: 862
Joined: Fri Oct 02, 2020 11:18
Location: Saratov
Plugins: Show
Version: Beta
Contact:

Platform

Re: Coding a train Plugin

#5

Post by SenyaBell »

Kiki012 wrote:
Fri Dec 04, 2020 10:13
SenyaBell wrote:
Fri Dec 04, 2020 6: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”