Railroad with transparent base plugin

Plug-in related stuff can be discussed here.

Moderators: Scenario Moderators, Plugin Moderators

User avatar
KINGTUT10101
1,000,000 inhabitants
Posts: 2228
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#21

Post by KINGTUT10101 »

wetguy wrote:
26 Feb 2018, 02:41
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?
Make sure the ids are different for each and make sure each is using the right PNG file.

User avatar
wetguy
Inhabitant of a Megalopolis
Posts: 738
Joined: 25 Nov 2017, 06:10
Location: United States of America
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#22

Post by wetguy »

KINGTUT10101 wrote:
26 Feb 2018, 04:09
I couldn't read your json. I tried loading it into json Genie and it was invalid
Read it using a computer.

User avatar
KINGTUT10101
1,000,000 inhabitants
Posts: 2228
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#23

Post by KINGTUT10101 »

I don't have one

User avatar
wetguy
Inhabitant of a Megalopolis
Posts: 738
Joined: 25 Nov 2017, 06:10
Location: United States of America
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#24

Post by wetguy »

@KINGTUT10101

Code: Select all

[{
	"allowbus": false,
	"allowtransfer": true,
	"author": "mdk_813;22Alpha;Kingtut101;wetguy",
	"autojoin": false,
	
	}],
	"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": "Used to guide your trains.",
	"title": "Railway with transperant base",
	"type": "road",
	"xflags": {
		"flagnormal": false,
		"flagtram": true
	}
}]
[{
	"allowbus": false,
	"allowtransfer": true,
	"author": "mdk_813;22Alpha;Kingtut101;wetguy",
	"autojoin": false,
	
	}],
	"category": "traincategory.kt101",
	"connectable": true,
	"drawground": true,
	"flagnormal": false,
	"flagtram": true,
	"frames": [{
		"bmp": "raildecal.png",
		"count": 16,
		"h": 17,
		"w": 32
	}],
	"id": "railway_road.mdk",
	"level": 5,
	"monthlyprice": 1,
	"ordinal": 500,
	"price": 50,
	"requirement": {
		"requirements": [{
			"data": {
				"lvl": 5
			},
			"type": "RANK"
		}]
	},
	"speed": 1.5,
	"text": "Used to guide your trains on top of roads.",
	"title": "Roadtop Tramway",
	"type": "road",
	"xflags": {
		"flagnormal": true,
		"flagtram": true
	}
}]
[{
	"allowbus": false,
	"allowtransfer": true,
	"author": "mdk_813;22Alpha;Kingtut101;wetguy",
	"autojoin": false,
	
	}],
	"category": "traincategory.kt101",
	"connectable": true,
	"drawground": true,
	"flagnormal": false,
	"flagtram": true,
	"frames": [{
		"bmp": "railcrossing1.png",
		"count": 16,
		"h": 17,
		"w": 32
	}],
	"id": "railway_crossing1.mdk",
	"level": 5,
	"monthlyprice": 1,
	"ordinal": 500,
	"price": 50,
	"requirement": {
		"requirements": [{
			"data": {
				"lvl": 5
			},
			"type": "RANK"
		}]
	},
	"speed": 1.5,
	"text": "Used for railway crossings.",
	"title": "Railroad crossing NS",
	"type": "road",
	"xflags": {
		"flagnormal": true,
		"flagtram": true
	}
}]
[{
	"allowbus": false,
	"allowtransfer": true,
	"author": "mdk_813;22Alpha;Kingtut101;wetguy",
	"autojoin": false,
	
	}],
	"category": "traincategory.kt101",
	"connectable": true,
	"drawground": true,
	"flagnormal": false,
	"flagtram": true,
	"frames": [{
		"bmp": "railcrossing1.png",
		"count": 16,
		"h": 17,
		"w": 32
	}],
	"id": "railway_crossing2.mdk",
	"level": 5,
	"monthlyprice": 1,
	"ordinal": 500,
	"price": 50,
	"requirement": {
		"requirements": [{
			"data": {
				"lvl": 5
			},
			"type": "RANK"
		}]
	},
	"speed": 1.5,
	"text": "Used for railway crossings.",
	"title": "Railroad crossing WE",
	"type": "road",
	"xflags": {
		"flagnormal": true,
		"flagtram": true
	}
}]

User avatar
KINGTUT10101
1,000,000 inhabitants
Posts: 2228
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#25

Post by KINGTUT10101 »

I think it looks good. If that code doesn't work then you should check it in Json Lint (it's a website)

User avatar
wetguy
Inhabitant of a Megalopolis
Posts: 738
Joined: 25 Nov 2017, 06:10
Location: United States of America
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#26

Post by wetguy »

KINGTUT10101 wrote:
26 Feb 2018, 17:06
I think it looks good. If that code doesn't work then you should check it in Json Lint (it's a website)
I checked it, and it is invalid.

User avatar
KINGTUT10101
1,000,000 inhabitants
Posts: 2228
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#27

Post by KINGTUT10101 »

Just use four different json files instead.

User avatar
JustAnyone
Developer
Posts: 3595
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Railroad with transparent base plugin

#28

Post by JustAnyone »

Try this

Code: Select all

[{
		"allowbus": false,
		"allowtransfer": true,
		"author": "mdk_813;22Alpha;Kingtut101;wetguy",
		"autojoin": false,
		"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": "Used to guide your trains.",
		"title": "Railway with transperant base",
		"type": "road",
		"xflags": {
			"flagnormal": false,
			"flagtram": true
		}
	},
	{
		"allowbus": false,
		"allowtransfer": true,
		"author": "mdk_813;22Alpha;Kingtut101;wetguy",
		"autojoin": false,
		"category": "traincategory.kt101",
		"connectable": true,
		"drawground": true,
		"flagnormal": false,
		"flagtram": true,
		"frames": [{
			"bmp": "raildecal.png",
			"count": 16,
			"h": 17,
			"w": 32
		}],
		"id": "railway_road.mdk",
		"level": 5,
		"monthlyprice": 1,
		"ordinal": 500,
		"price": 50,
		"requirement": {
			"requirements": [{
				"data": {
					"lvl": 5
				},
				"type": "RANK"
			}]
		},
		"speed": 1.5,
		"text": "Used to guide your trains on top of roads.",
		"title": "Roadtop Tramway",
		"type": "road",
		"xflags": {
			"flagnormal": true,
			"flagtram": true
		}
	},
	{
		"allowbus": false,
		"allowtransfer": true,
		"author": "mdk_813;22Alpha;Kingtut101;wetguy",
		"autojoin": false,

		"category": "traincategory.kt101",
		"connectable": true,
		"drawground": true,
		"flagnormal": false,
		"flagtram": true,
		"frames": [{
			"bmp": "railcrossing1.png",
			"count": 16,
			"h": 17,
			"w": 32
		}],
		"id": "railway_crossing1.mdk",
		"level": 5,
		"monthlyprice": 1,
		"ordinal": 500,
		"price": 50,
		"requirement": {
			"requirements": [{
				"data": {
					"lvl": 5
				},
				"type": "RANK"
			}]
		},
		"speed": 1.5,
		"text": "Used for railway crossings.",
		"title": "Railroad crossing NS",
		"type": "road",
		"xflags": {
			"flagnormal": true,
			"flagtram": true
		}
	},

	{
		"allowbus": false,
		"allowtransfer": true,
		"author": "mdk_813;22Alpha;Kingtut101;wetguy",
		"autojoin": false,
		"category": "traincategory.kt101",
		"connectable": true,
		"drawground": true,
		"flagnormal": false,
		"flagtram": true,
		"frames": [{
			"bmp": "railcrossing1.png",
			"count": 16,
			"h": 17,
			"w": 32
		}],
		"id": "railway_crossing2.mdk",
		"level": 5,
		"monthlyprice": 1,
		"ordinal": 500,
		"price": 50,
		"requirement": {
			"requirements": [{
				"data": {
					"lvl": 5
				},
				"type": "RANK"
			}]
		},
		"speed": 1.5,
		"text": "Used for railway crossings.",
		"title": "Railroad crossing WE",
		"type": "road",
		"xflags": {
			"flagnormal": true,
			"flagtram": true
		}
	}
]

User avatar
wetguy
Inhabitant of a Megalopolis
Posts: 738
Joined: 25 Nov 2017, 06:10
Location: United States of America
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#29

Post by wetguy »

Let's see if it works.
Attachments
transperantrails.zip
(4.31 KiB) Downloaded 778 times

User avatar
wetguy
Inhabitant of a Megalopolis
Posts: 738
Joined: 25 Nov 2017, 06:10
Location: United States of America
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#30

Post by wetguy »

It does not look right, there is water under it.

User avatar
JustAnyone
Developer
Posts: 3595
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Railroad with transparent base plugin

#31

Post by JustAnyone »

Code: Select all

"draw ground": true

User avatar
wetguy
Inhabitant of a Megalopolis
Posts: 738
Joined: 25 Nov 2017, 06:10
Location: United States of America
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#32

Post by wetguy »

JustAnyone wrote:
05 Mar 2018, 15:48

Code: Select all

"draw ground": true
"draw ground" is already true.

User avatar
CommanderABab
AB
Posts: 11264
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#33

Post by CommanderABab »

Screenshot_20180305-232800.png
I surrounded your rails with my invisible road and the same but with bridge. :)

You might have to use null frames for the road with

Code: Select all

"draw ground":true
and draw the rails using the animation code available for roads in tutorials and documentation.

User avatar
wetguy
Inhabitant of a Megalopolis
Posts: 738
Joined: 25 Nov 2017, 06:10
Location: United States of America
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#34

Post by wetguy »

Can someone make a json with this problem fixed?

User avatar
CommanderABab
AB
Posts: 11264
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#35

Post by CommanderABab »

It's "draw ground" with a space. Not one word. Not "draw[tab]ground".

User avatar
CommanderABab
AB
Posts: 11264
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#36

Post by CommanderABab »

With &quot;draw ground&quot;:true with a space.  <br /><br />In the road I was working on.
With "draw ground":true with a space.

In the road I was working on.

User avatar
CommanderABab
AB
Posts: 11264
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#37

Post by CommanderABab »

KINGTUT10101 wrote:
26 Feb 2018, 17:06
I think it looks good. If that code doesn't work then you should check it in Json Lint (it's a website)
This would get through jsonlint but still not work. "draw ground":true has a space!

User avatar
CommanderABab
AB
Posts: 11264
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#38

Post by CommanderABab »

wetguy wrote:
06 Mar 2018, 02:52
JustAnyone wrote:
05 Mar 2018, 15:48

Code: Select all

"draw ground": true
"draw ground" is already true.
You had

Code: Select all

"draw[tab character]ground":true

User avatar
wetguy
Inhabitant of a Megalopolis
Posts: 738
Joined: 25 Nov 2017, 06:10
Location: United States of America
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#39

Post by wetguy »

@CommanderABab For some reason, according to your picture, it still looks wrong. There are spaces between the rails.

User avatar
CommanderABab
AB
Posts: 11264
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Railroad with transparent base plugin

#40

Post by CommanderABab »

It's modified. I was experimenting until I discovered the tab issue.

That's actually drawn with foreground animation indices.

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”