In Maglev Track Set v1 the tracks of the set could properly replace the base-game maglev "MGLV" when you set the proper parameters, so it doesn't contribute to the cap.
In Maglev Track Set v2 I reused most of the code from v1 in such a way that it should work in the same way. However in v2, it doesn't replace MGLV if you set the proper parameters. It just seems to hide MGLV and put something else there, so it contriutes to the cap.
Because of this you can only have 1 extra maglev tracktype added to the JapanSet, instead of the 2 extra ones you can get with Maglev Track Set v1.
I have not been able to see what could have caused this difference.
EDIT: With the help of Andrew I managed to determine that the problem seems to be the Urban Maglev Tracks. And it has nothing to do with MTS v1 vs v2
This works:
This does not work:
The full source is attached below. Would anyone know what the problem could be? I don't seem to be able to see the relevant difference.
I cannot reproduce the replacement of the maglev tracks in maglev track set v1 [FIXED]
Moderator: Graphics Moderators
I cannot reproduce the replacement of the maglev tracks in maglev track set v1 [FIXED]
- Attachments
-
- Maglev_Track_Set_2.0_Source.rar
- Source of the newgrf where it does NOT work.
- (179.43 KiB) Downloaded 91 times
-
- Source_Maglev_Track_Set_1.1.rar
- Source of the newgrf where it does work.
- (390.59 KiB) Downloaded 85 times
Last edited by Erato on 27 Jul 2018 15:38, edited 2 times in total.
Re: I cannot reproduce the replacement of the maglev tracks in maglev track set v1
Soo, two things:
1: The source you posted isn't really a source, it's just the .grf in a .tar in a .rar. Not really much we can do with that
2: Maybe I'm missing something because of point 1 above, but in the code snippet you posted, v2 is clearly using a different railtype label than MGLV (which v1 is using).
Oops, it unpacked into 3 other folders I didn't see
EDIT: Even after looking through the files several times I can't seem to figure out where the decision is made on which railtype gets used. I see the parameters defined in the header, and I see the different railtypes defined both normally and as MGLV replacement, but I don't see the link between them? I could swear I've looked through all the files, did I just miss one somewhere or am I being thick?
EDIT 2: Aha, found it! It was irritating me that I couldn't figure it out Version 2.0 appears to be missing the 'metro_track_set.pnml' file found in version 1. This is where the logic happens to decide which tracktype to replace MGLV with; it appears you've simply left it out
1: The source you posted isn't really a source, it's just the .grf in a .tar in a .rar. Not really much we can do with that
2: Maybe I'm missing something because of point 1 above, but in the code snippet you posted, v2 is clearly using a different railtype label than MGLV (which v1 is using).
Oops, it unpacked into 3 other folders I didn't see
EDIT: Even after looking through the files several times I can't seem to figure out where the decision is made on which railtype gets used. I see the parameters defined in the header, and I see the different railtypes defined both normally and as MGLV replacement, but I don't see the link between them? I could swear I've looked through all the files, did I just miss one somewhere or am I being thick?
EDIT 2: Aha, found it! It was irritating me that I couldn't figure it out Version 2.0 appears to be missing the 'metro_track_set.pnml' file found in version 1. This is where the logic happens to decide which tracktype to replace MGLV with; it appears you've simply left it out
Re: I cannot reproduce the replacement of the maglev tracks in maglev track set v1
So sorry. Of course I can't leave that file out, because it needs that file to compile the newgrf. I accidentally sent an incorrect source. Attached is the missing file, which is the same as the one in version 1, and has been tried and tested and seems to work without any problems.Andrew350 wrote:Aha, found it! It was irritating me that I couldn't figure it out Version 2.0 appears to be missing the 'metro_track_set.pnml' file found in version 1. This is where the logic happens to decide which tracktype to replace MGLV with; it appears you've simply left it out
Edit: and of course I added the thing I uploaded to BaNaNaS instead of the main file... I should check these files before posting
- Attachments
-
- Maglev_Track_Set.pnml
- The main .pnml file of Maglev Track Set v2.
- (1.08 KiB) Downloaded 79 times
Re: I cannot reproduce the replacement of the maglev tracks in maglev track set v1
So I fired up OTTD to do some more testing of your parameters using the latest versions of RIMS, Japanese Tracks, Japanese Trains, and of course Maglev Track Set. Using version 1 of MTS, I could never activate more than two types without an error (i.e. the selected override tracktype + one other); I get the same limitation using version 2, with the minor exception of the SUMA tracktype, which can be selected as a third one (It never seems to appear in-game though).Erato wrote:Because of this you can only have 1 extra maglev tracktype added to the JapanSet, instead of the 2 extra ones you can get with Maglev Track Set v1.
The one big issue I found in version 2 however is that it seems the Urban Maglev tracks don't play well with any other type, whereas I can happily activate e.g. Transrapid and SC-Maglev or M-Bahn together. I could even do Transrapid, SC-Maglev, and SUMA (as noted above), but any combo using Urban Maglev fails miserably (unless used alone).
Since I can activate the same amount of tracktypes in both versions EXCEPT when using Urban Maglev, I'm guessing that's where the issue is. Maybe a conflict with the IDs or something?
Re: I cannot reproduce the replacement of the maglev tracks in maglev track set v1
Thank you so much for this. Thanks to this I was able to find and fix the problem.Andrew350 wrote:So I fired up OTTD to do some more testing of your parameters using the latest versions of RIMS, Japanese Tracks, Japanese Trains, and of course Maglev Track Set. Using version 1 of MTS, I could never activate more than two types without an error (i.e. the selected override tracktype + one other); I get the same limitation using version 2, with the minor exception of the SUMA tracktype, which can be selected as a third one (It never seems to appear in-game though).Erato wrote:Because of this you can only have 1 extra maglev tracktype added to the JapanSet, instead of the 2 extra ones you can get with Maglev Track Set v1.
The one big issue I found in version 2 however is that it seems the Urban Maglev tracks don't play well with any other type, whereas I can happily activate e.g. Transrapid and SC-Maglev or M-Bahn together. I could even do Transrapid, SC-Maglev, and SUMA (as noted above), but any combo using Urban Maglev fails miserably (unless used alone).
Since I can activate the same amount of tracktypes in both versions EXCEPT when using Urban Maglev, I'm guessing that's where the issue is. Maybe a conflict with the IDs or something?
Turns out, I had this code to load the SUMA tracks:
Code: Select all
if (PARAM_MGLV == 3 && PARAM_TCAI == 1) {
#include "src/Tracktypes/MGLV/TCAI.pnml"
} else if (PARAM_TBAI == 1) {
#include "src/Tracktypes/TCAI.pnml"
}
Code: Select all
if (PARAM_MGLV == 3 && PARAM_TCAI == 1) {
#include "src/Tracktypes/MGLV/TCAI.pnml"
} else if (PARAM_TCAI == 1) {
#include "src/Tracktypes/TCAI.pnml"
}
PARAM_TBAI being the parameter that loads up Urban maglevs, so when it checks what to load, and it sees that SUMA is turned off, it checks to see if Urban maglevs are on, and if they are, it loads the SUMA tracks before checking to see if it should load the Urban maglevs. JapanSet only allows 1 extra tracktype, so after it loads the SUMA tracks, it gives up and returns an error.
The only newgrf that has trains that use SUMA tracks are in MMT and a newgrf I'm currently working on, so when used with RIMS, it's invisible and doesn't show up, yet counts to the total nonetheless.
Who is online
Users browsing this forum: No registered users and 4 guests