Hey
Recently I've been working on a monorail track replacement newgrf. All I want to do is replace monorail. I don't want to add anything new. However when working on the tunnel portal, I came across this problem where it shows the grass tunnel portal that is used for the basegame standard rail portal, sticking through my tunnel portal.
Would anyone know of a way to remove this grass tunnel portal in nml?
See the code for the railtype here:
[NML] How to remove grass tunnel portal?
Moderator: Graphics Moderators
Re: [NML] How to remove grass tunnel portal?
I had similar problems when making my track set.
Quast65 came up with a solution with some sprites he did for the tracks and tunnels.
Can find his information at Railtype Templates in NML over on the Simuscape Website at
http://www.simuscape.net/simutalk/viewt ... 4df68fb9d6
Hope it might help you.
Cheers
Quast65 came up with a solution with some sprites he did for the tracks and tunnels.
Can find his information at Railtype Templates in NML over on the Simuscape Website at
http://www.simuscape.net/simutalk/viewt ... 4df68fb9d6
Hope it might help you.
Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Re: [NML] How to remove grass tunnel portal?
The solution is indeed very simple, you need to replace the graphics from the OpenGFX-extra base set.
So you need to use:
To completely remove them use this code (change the path to the graphicsfile ofcourse to where your graphicsfile will be placed):
And this graphic (difficult to see, but its a single transparent blue pixel):
You only have to do this once in your GRF, so not for each railtype you add.
Do keep in mind that you then have to provide full-tile graphics for your custom tunnels, otherwise you get some strange glitches
And keep in mind that this will remove all of the tunnel base-graphics for all tracksets you will load into your game (also vanilla tracks by the way)!!
In most cases that will not be an issue, as almost all tracksets (and also vanilla tracks) provide full-tile custom tunnels, but there is at least one exception and that is WIRED.
This is what happens with WIRED: As you can see, WIRED has no custom tunnel graphics, so you get some weird glitches.
I was already planning to contact McZapkie when I am ready to release my trackset to ask him to provide custom tunnels for his GRF so that removing the tunnel base graphics wont be an issue anymore with his GRF, but maybe he will read this post in the meantime
AFAIK I dont think there are any other current tracksets that have no custom tunnels...
But maybe you do want to use some sort of tunnel base graphics (and then design custom tunnels for your railtypes around those) and want them to be climate aware...
This is the code I used for the trackset I am currently working on:
And these are the graphics I replaced them with:
So in my case I replace the tunnelgraphics with walls with (climate aware) grass on them, I can then design my custom tunnels using those as a base.
I also wanted them to be able to adapt to Alpine climate (so Temperate grass in Arctic), but a player has to do that manually, so thats why there is a parameter.
Hope this helps!
So you need to use:
Code: Select all
replacenew(RAILTYPE_TUNNELS
Code: Select all
//Remove trackless tunnelgraphics from OpenGFX-extra
replacenew (RAILTYPE_TUNNELS, "FARTStest/gfx/notracklesstunnels.png") {
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
[ 0,0,1,1,0,0]
}
Do keep in mind that you then have to provide full-tile graphics for your custom tunnels, otherwise you get some strange glitches
And keep in mind that this will remove all of the tunnel base-graphics for all tracksets you will load into your game (also vanilla tracks by the way)!!
In most cases that will not be an issue, as almost all tracksets (and also vanilla tracks) provide full-tile custom tunnels, but there is at least one exception and that is WIRED.
This is what happens with WIRED: As you can see, WIRED has no custom tunnel graphics, so you get some weird glitches.
I was already planning to contact McZapkie when I am ready to release my trackset to ask him to provide custom tunnels for his GRF so that removing the tunnel base graphics wont be an issue anymore with his GRF, but maybe he will read this post in the meantime
AFAIK I dont think there are any other current tracksets that have no custom tunnels...
But maybe you do want to use some sort of tunnel base graphics (and then design custom tunnels for your railtypes around those) and want them to be climate aware...
This is the code I used for the trackset I am currently working on:
Code: Select all
//Parameter to manually set Alpine climate
param 7 {
param_alpine {
name: string(STR_PARAM_NAME_ALPINE);
desc: string(STR_PARAM_DESC_ALPINE);
min_value: 0;
max_value: 1;
def_value: 0;
names: {
0: string(STR_PARAM_ALPINE_NONE);
1: string(STR_PARAM_ALPINE_CUSTOM);
};
}
}
}
//Replace trackless tunnelgraphics from OpenGFX-extra
template tmpl_trackless_tunnel(y) {
[ 10, y, 64, 39, -31, -8]
[ 84, y, 64, 39, -31, -38]
[158, y, 64, 23, -31, 0]
[232, y, 64, 23, -31, -30]
[306, y, 64, 23, -31, 0]
[380, y, 64, 23, -31, -30]
[454, y, 64, 39, -31, -8]
[528, y, 64, 39, -31, -38]
}
if (param[7] == 1) {
replacenew(RAILTYPE_TUNNELS, "FARTS/gfx/tracklesstunnel-overlay-sprites.png") { tmpl_trackless_tunnel(10)
tmpl_trackless_tunnel(265)
}
} else {
if (climate == CLIMATE_TROPICAL) {
replacenew(RAILTYPE_TUNNELS, "FARTS/gfx/tracklesstunnel-overlay-sprites.png") { tmpl_trackless_tunnel(180)
tmpl_trackless_tunnel(350)
}
}
else {
replacenew(RAILTYPE_TUNNELS, "FARTS/gfx/tracklesstunnel-overlay-sprites.png") { tmpl_trackless_tunnel(10)
tmpl_trackless_tunnel(265)
}
if (climate == CLIMATE_ARCTIC) {
replacenew(RAILTYPE_TUNNELS, "FARTS/gfx/tracklesstunnel-overlay-sprites.png") { tmpl_trackless_tunnel(95)
}
}
if (climate == CLIMATE_TOYLAND) {
replacenew(RAILTYPE_TUNNELS, "FARTS/gfx/tracklesstunnel-overlay-sprites.png") { tmpl_trackless_tunnel(435)
}
}
}
}
I also wanted them to be able to adapt to Alpine climate (so Temperate grass in Arctic), but a player has to do that manually, so thats why there is a parameter.
Hope this helps!
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Re: [NML] How to remove grass tunnel portal?
Thanks! This worked!Quast65 wrote:The solution is indeed very simple, you need to replace the graphics from the OpenGFX-extra base set.
So you need to use:To completely remove them use this code (change the path to the graphicsfile ofcourse to where your graphicsfile will be placed):Code: Select all
replacenew(RAILTYPE_TUNNELS
<snip>Code: Select all
//Remove trackless tunnelgraphics from OpenGFX-extra replacenew (RAILTYPE_TUNNELS, "FARTStest/gfx/notracklesstunnels.png") { [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] [ 0,0,1,1,0,0] }
Who is online
Users browsing this forum: No registered users and 16 guests