Raised Railroad texture

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 2:13

Hi,
I would like to change the texture of the raised railway tracks.
Could you give me the texture of that railway (and the railway station) so that I have a basis for that rework?
Also: What would I have to put into the jsons of the tracks and the station in order to replace the normal railroad with my version, while maintaing the original functionality?

Thank you!
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
22Alpha
Inhabitant of a Conurbation
Reactions:
Posts: 432
Joined: Sat Sep 23, 2017 14:29

Re: Raised Railroad texture

Post by 22Alpha » Sat Oct 14, 2017 5:40

Mind if I also request if you could do a slightly hill-elevated rail road tracks. I mean:

/+-+\ - front view
____
///// - side view


where:

/\ --> the slight elevation

+ --> wheel track

- --> space between the wheel track


Thank you.
United we stand
Divided we fall
β˜†

User avatar
Josh
Graphic designer
Reactions:
Posts: 2199
Joined: Sat Mar 11, 2017 19:20
Location: The Netherlands
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by Josh » Sat Oct 14, 2017 12:07

Here you have it
trains.png
trains.png (47.54 KiB) Viewed 868 times
I don't know how the code works of it, but it looks difficult for sure! And don't forget to credit Lobby & theo
Proud TheoTown player sinds update 1.1.50

Creator of Aldorria, Covinton Empire, West Country, Sunnydale

Save nature, before it kills you🌲

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 12:56

That's not complete, as the piles aren't provided.

The rail station is rotation aware and not pluginable currently I believe.
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 14:09

Thanks guys.
So the piles are build into the game and placed with coordinates, therefore I can't change their texture, right?
But at least I could change the texture of the rails themselves with the image above. Is that correct?
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 14:28

The piles frames can be replaced too, they're just not in the above image.
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 14:48

Okay, but I'm still not sure how to do it.
Let's say I rework the rails in the image provided by Josh, wouldn't I have to somehow define that image in the json, too?
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 15:57

Yes, you would provide the frames via "bmp" files like for roads but following the plan above. 16 bed frames, 16 side frames.
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 16:25

Alright, and then I would use the id from the json that you've sent me, and set "override" true?
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 16:31

You can use any id you choose.
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 17:04

Thank you. I will try it.
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 18:41

Hm, so I tried it like this:

Code: Select all

[ 
  { 
    "id":"railtracks_grey_mdk_813", 
    "type":"rail",
    "author":"mdk_813, Lobby and Theo", 
    "frames":
[{"bmp":"tracks_Grey.png","x":512,"y":822,"w":32,"h":21,"move y":-16,"count":16},{"bmp":"tracks_Grey.png","x":512,"y":843,"w":32,"h":21,"move y":-16,"count":16}], 
    "on ground":false, 
    "pile frames":[{"x":512,"y":1312,"w":32,"h":42}], 
    "pile height":21, 
    "pile distance":4, 
    "price":100, 
    "monthly price":1 
  }
]
And I provided the image below.
tracks_Grey.png
tracks_Grey.png (99.09 KiB) Viewed 809 times

But for some reason, it doesn't work in the game. It just builds the poles and nothing else :(
Any ideas?
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 19:34

mdk_813 wrote: ↑
Sat Oct 14, 2017 18:41
Hm, so I tried it like this:

Code: Select all

[ 
  { 
    "id":"railtracks_grey_mdk_813", 
    "type":"rail",
    "author":"mdk_813, Lobby and Theo", 
    "frames":
[{"bmp":"tracks_Grey.png","w":32,"h":21,"handle y":-16,"count":16},{"bmp":"sides_Grey.png","w":32,"h":21,"handle y":-16,"count":16}], 
    "on ground":false, 
    "pile frames":[{"x":512,"y":1312,"w":32,"h":42}], 
    "pile height":21, 
    "pile distance":4, 
    "price":100, 
    "monthly price":1 
  }
]
And I provided the image below.
tracks_Grey.png


But for some reason, it doesn't work in the game. It just builds the poles and nothing else :(
Any ideas?
Try the code above as I edited it.
Screenshot_20171014-125731.jpg
Tracksgrey1.png not red.
Screenshot_20171014-130512.jpg
Sidesgrey1.png not red.
Last edited by CommanderABab on Sat Oct 14, 2017 19:40, edited 1 time in total.
Reason: Change
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 19:41

547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 20:07

@CommanderABab

My latest try is this with the image below:

Code: Select all

[ 
  { 
    "id":"railtracks_grey_mdk_813", 
    "type":"rail",
    "author":"mdk_813, Lobby and Theo", 
    "frames":
[{"bmp":"tracks_Grey.png","count":16,"w":32}],
    "on ground":false, 
    "pile frames":[{"x":512,"y":1312,"w":32,"h":42}], 
    "pile height":21, 
    "pile distance":4, 
    "price":100, 
    "monthly price":1 
  }
]
The game crashes as soon as I try to draw the rails

Before I tried a version with "width" and "height" each set to 1 (same negative result) and a version without "count" and "w", i.e. only with the "bmp", this version crashes the game as soon as you try to scroll to it in the menu.
Attachments
tracks_Grey.png
tracks_Grey.png (23.74 KiB) Viewed 795 times
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 21:24

mdk_813 wrote: ↑
Sat Oct 14, 2017 20:07
@CommanderABab

My latest try is this with the image below:

Code: Select all

[ 
  { 
    "id":"railtracks_grey_mdk_813", 
    "type":"rail",
    "author":"mdk_813, Lobby and Theo", 
    "frames":
[{"bmp":"tracks_Grey.png","count":16,"w":32}],
    "on ground":false, 
    "pile frames":[{"x":512,"y":1312,"w":32,"h":42}], 
    "pile height":21, 
    "pile distance":4, 
    "price":100, 
    "monthly price":1 
  }
]
The game crashes as soon as I try to draw the rails

Before I tried a version with "width" and "height" each set to 1 (same negative result) and a version without "count" and "w", i.e. only with the "bmp", this version crashes the game as soon as you try to scroll to it in the menu.

The rail drawer is expecting 32 frames! Don't leave the other 16 out. :)

Code: Select all

[ 
  { 
    "id":"railtracks_grey_mdk_813", 
    "type":"rail",
    "author":"mdk_813, Lobby and Theo", 
    "frames":
    [
{"bmp":"tracks_Grey.png","count":16,"w":32},
{"bmp":"sides_Grey.png",,"count":16,"w":32}
    ],
    "on ground":false, 
    "pile frames":[{"x":512,"y":1312,"w":32,"h":42}], 
    "pile height":21, 
    "pile distance":4, 
    "price":100, 
    "monthly price":1 
  }
]
And if you don't want to color the sides:

Code: Select all

[ 
  { 
    "id":"railtracks_grey_mdk_813", 
    "type":"rail",
    "author":"mdk_813, Lobby and Theo", 
    "frames":
    [
{"bmp":"tracks_Grey.png","handle y":-16,"count":16,"w":32},
{"x":512,"y":843,"w":32,"h":21,"move y":-16,"count":16} 
    ],
    "on ground":false, 
    "pile frames":[{"x":512,"y":1312,"w":32,"h":42}], 
    "pile height":21, 
    "pile distance":4, 
    "price":100, 
    "monthly price":1 
  }
]
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 21:47

@CommanderABab
Thanks, but the last code you posted still won't work as intended.
It doesn't crash anymore and the poles and sides are displayed correctly, but the grey railtracks are on groundlevel now.
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 22:08

Hey, try changing the handle y:-16 to :16 then. :) or -37.
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 22:22

@CommanderABab
Cool, thank you for your help. It works now as intended with "y"=13 :)
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 22:22

Great!
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 22:23

Put a screenshot up! :)
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 22:36

CommanderABab wrote: ↑
Sat Oct 14, 2017 22:23
Put a screenshot up! :)

Sure thing ;)
Tracks_Grey_EXAMPLE.png
The only thing left to do would be to change the station texture as well. But, when drawing the tracks first and then placing the stations over it, the result looks acceptable I think.
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Raised Railroad texture

Post by CommanderABab » Sat Oct 14, 2017 22:50

Looks great!
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
πŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈπŸ†ŽοΈCommanderπŸ†ŽοΈπŸ†ŽοΈ

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 850
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

Re: Raised Railroad texture

Post by mdk_813 » Sat Oct 14, 2017 23:08

Thanks :D
My Plugins: Link

PLEASE NOTE: My plugins are not open source! So, ask me first before altering and republishing any of my plugins!

Post Reply Previous topicNext topic

Return to β€œPlug-In Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests

ο»Ώ