Page 1 of 3

Railroad with transparent base plugin

Posted: 25 Feb 2018, 06:03
by wetguy
@KINGTUT10101 Can you help me make a plugin similar to an addon to your tram plugin with rails with a transparent base?
@mdk_813 Am I allowed to use a modified version of your rails for a plugin?

Re: Railroad with transparent base.

Posted: 25 Feb 2018, 06:04
by Kazu_04
I think it would be better to send them a private message

Re: Railroad with transparent base plugin

Posted: 25 Feb 2018, 06:48
by KINGTUT10101
I'll do the code if you get mdk's permission

Re: Railroad with transparent base plugin

Posted: 25 Feb 2018, 16:00
by mdk_813
Yes, go ahead.

Re: Railroad with transparent base plugin

Posted: 25 Feb 2018, 16:56
by KINGTUT10101

Code: Select all

[{
	"allowbus": false,
	"allowtransfer": true,
	"author": "mdk_813;22Alpha;bridgeframesbasedontexturesbyLobbyandTheo",
	"autojoin": false,
	"bridgeframes": [{
		"bmp": "My_rails_bridge_mdk_813.png",
		"count": 12,
		"h": 48,
		"w": 32
	}],
	"bridgeheight": 11,
	"bridgeprice": 120,
	"category": "traincategory.kt101",
	"connectable": true,
	"drawground": true,
	"flagnormal": false,
	"flagtram": true,
	"frames": [{
		"bmp": "raildecal.png",
		"count": 16,
		"h": 17,
		"w": 32
	}],
	"id": "S_Bahn_railway_decal.mdk",
	"level": 5,
	"monthlyprice": 1,
	"ordinal": 500,
	"price": 50,
	"requirement": {
		"requirements": [{
			"data": {
				"lvl": 5
			},
			"type": "RANK"
		}]
	},
	"speed": 1.5,
	"text": "Usedtoguideyourtrains.",
	"title": "S-BahnRailwayDecal",
	"type": "road",
	"xflags": {
		"flagnormal": true,
		"flagtram": true
	}
}]
Just name the png "raildecal.png"

Re: Railroad with transparent base plugin

Posted: 25 Feb 2018, 20:41
by wetguy
@KINGTUT10101 I think there should be multiple versions of the railway. Some versions that can be used by both trains and road vehicles, making tram/trolleyways on top of roads and nice-looking railroad crossings possible (although missing barriers), another version that can only be used by trains, and maybe a slower version for stations.

Re: Railroad with transparent base plugin

Posted: 25 Feb 2018, 21:11
by wetguy
@KINGTUT10101 These graphics can be used for the rails that will be used for railroad crossings. Each only looks good from certain angles, but it's the best way possible.

Re: Railroad with transparent base plugin

Posted: 25 Feb 2018, 22:10
by KINGTUT10101
Just reuse the code and change the png and id names

Re: Railroad with transparent base plugin

Posted: 25 Feb 2018, 22:12
by KINGTUT10101
I also don't plan on making custom x-crossing frames just for pretty intersections, but the tram/road duo does sound interesting.

Re: Railroad with transparent base plugin

Posted: 25 Feb 2018, 22:16
by wetguy
@KINGTUT10101 I don't want these to have bridges, can you change the json accordingly?

Re: Railroad with transparent base plugin

Posted: 25 Feb 2018, 23:06
by KINGTUT10101
Just remove:

Code: Select all

"bridgeframes": [{
		"bmp": "My_rails_bridge_mdk_813.png",
		"count": 12,
		"h": 48,
		"w": 32
	}],
from the json

Re: Railroad with transparent base plugin

Posted: 25 Feb 2018, 23:35
by wetguy
@KINGTUT10101,Is this a correct JSON?

Re: Railroad with transparent base plugin

Posted: 26 Feb 2018, 00:46
by KINGTUT10101
I tried it and it didn't work. I guess I'll just remove it myself then.

Re: Railroad with transparent base plugin

Posted: 26 Feb 2018, 00:49
by KINGTUT10101

Code: Select all

[{
	"allowbus": false,
	"allowtransfer": true,
	"author": "mdk_813;22Alpha;bridgeframesbasedontexturesbyLobbyandTheo",
	"autojoin": false,
	"bridgeheight": 11,
	"bridgeprice": 120,
	"category": "traincategory.kt101",
	"connectable": true,
	"drawground": true,
	"flagnormal": false,
	"flagtram": true,
	"frames": [{
		"bmp": "raildecal.png",
		"count": 16,
		"h": 17,
		"w": 32
	}],
	"id": "S_Bahn_railway_decal.mdk",
	"level": 5,
	"monthlyprice": 1,
	"ordinal": 500,
	"price": 50,
	"requirement": {
		"requirements": [{
			"data": {
				"lvl": 5
			},
			"type": "RANK"
		}]
	},
	"speed": 1.5,
	"text": "Usedtoguideyourtrains.",
	"title": "S-BahnRailwayDecal",
	"type": "road",
	"xflags": {
		"flagnormal": true,
		"flagtram": true
	}
}]
Try this

Re: Railroad with transparent base plugin

Posted: 26 Feb 2018, 00:55
by wetguy
@KINGTUT10101 Can you make 4 versions of the rail in one json (Trains only, roads vehicles and trains, road vehicles and trains with North to South railroad crossing, road vehicles and trains with East to West railroad crossing.)

Re: Railroad with transparent base plugin

Posted: 26 Feb 2018, 00:56
by wetguy
Also, why did you revert some of the names and descriptions and similar things?

Re: Railroad with transparent base plugin

Posted: 26 Feb 2018, 01:19
by KINGTUT10101
You don't need to mention me everytime you know

Re: Railroad with transparent base plugin

Posted: 26 Feb 2018, 01:51
by KINGTUT10101
Why don't you just reuse the same code four times?

Re: Railroad with transparent base plugin

Posted: 26 Feb 2018, 02:41
by wetguy
KINGTUT10101 wrote:
26 Feb 2018, 01:51
Why don't you just reuse the same code four times?
I tried that, and it did not work. How do you properly do it? By the way, did you even read my JSON?

Re: Railroad with transparent base plugin

Posted: 26 Feb 2018, 04:09
by KINGTUT10101
I couldn't read your json. I tried loading it into json Genie and it was invalid