Page 54 of 56

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 25 Apr 2016 10:55
by Leanden
Pikkawiki is down??

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 16 May 2017 13:27
by NekoMaster
So I dunno if this is the right place to post this but I hope it gets noticed and hopefully gets fixed/patched.

URKS 2 seems to have an issue with rail type grf's like NuTracks and Japan Set Tracks that it should work with properly but theres an issue with the max speed of some trains while on electrified rails.

Its only recently I noticed this issue as I normally play with other sets or with UKRS 2 in the early days between 1900-1950 but while screwing around with Nutracks for the speed limits in modern day I noticed that the high speed trains where being limited to 160 KM\h even on High speed rail.

I'll buy a high speed train like the Hitachi A-Train which should have a max speed of 249 km\h but even on Nutracks Very High Speed Rail (350 km\h) or Japan Set Tracks High Speed Rail (321 KM\h) the Hitachi A-Train ends up being limited to the max speed of 3rd rail which is 160 km\h.

This is an issue with all Dual-mode electric locomotives that can use Electrified Rail or 3rd rail but for some reason the trains are limited to 3rd rail speeds even on the fastest electrified railways from Railtype GRF's. The issue does not effect Electrified Rail only locomotives with no 3rd rail capability, and thus they run at full speed so long as you put them on high speed rail that supports the max speed.

I've provided a picture from both the Japan Set Tracks and NuTracks showing the issue.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 18 May 2017 11:11
by PikkaBird
I feel like we've discussed this before (edit: here).

The problem is the newgrf only recognises a limited set of overhead and 3rd rail labels. The railtype system allows the locomotives to run on all compatible track types, but not to identify them correctly as a "full speed" type.

If you'd like to fix this locally, you can decompile UKRS2 v 1.061 and edit the following sprites (this is all off the top of my head and untested, so modify at your own risk):

JB:
- to make it run at full power on any compatible track type, delete sprites 9441 and 9466.
- Additionally, to make it only run on tracks compatible with 3RDR, edit sprite 9470 and alter the bytes "05 00" to "05 02"

A-Train:
- to make it run at full speed on any compatible track type, delete sprites 13977, 13978, 13979.

Class 92:
- to make it run at full power on any compatible track type, delete sprites 10122 and 10123; and 10130 and 10131.

Eurostar (not in the main grf but the Addon Set - UK Railway Add-on Set (UKRS2+) version Hornblower / 700):
- to make it run at full speed and power on any compatible track type, delete sprites 3070, 3071, 3072, 3073, 3074; and 3118, 3119, 3120; and 3129 and 3130.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 16 Feb 2018 12:59
by CMircea
PikkaBird wrote:
Transportman wrote:NuTracks 2 changed labels to the Standardized Railtype Scheme.
That'd be the problem, then. :) No plans to fix this at the current time, I'm afraid.
In your previous post you told us what to change in order to have the engines run at full speed for all track types.
What would we need to modify in order to replace the track types in the GRF to the standard types, as used by NuTracks and other tracksets?

Thank you :)

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 18 Feb 2018 13:31
by PikkaBird
Here's the rail table from UKRS2

Code: Select all

      // Rail Translation Table

  419 * 86	 00 08 01 14 00 12
            "RAIL" // 00       01
            "ELRL" // 01       02
            "3RDR" // 02       04
            "3RDC" // 03       08

            // bunch of nutracks nonsense for powering JB / dual power speed

            "3LOW" "CLOW" "3MED" "CMED" "MTRO" "MTRC" "MTRS" "MTRU" "MTRT"  // 04-0C

            "ELOW" "EMED" "EHIG" "HSTR" "DBNE" "DBHE" "DBHS" // 0D-13

           // 3rd available =  02 0C
           // OHLE available = 01 01 , 03 03 , 05 05 , 07 07 , 0D 13
I guess all you'd have to do is replace the 16 "nutracks nonsense" labels with the updated equivalents.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 18 Feb 2018 16:11
by NekoMaster
PikkaBird wrote:Here's the rail table from UKRS2

Code: Select all

      // Rail Translation Table

  419 * 86	 00 08 01 14 00 12
            "RAIL" // 00       01
            "ELRL" // 01       02
            "3RDR" // 02       04
            "3RDC" // 03       08

            // bunch of nutracks nonsense for powering JB / dual power speed

            "3LOW" "CLOW" "3MED" "CMED" "MTRO" "MTRC" "MTRS" "MTRU" "MTRT"  // 04-0C

            "ELOW" "EMED" "EHIG" "HSTR" "DBNE" "DBHE" "DBHS" // 0D-13

           // 3rd available =  02 0C
           // OHLE available = 01 01 , 03 03 , 05 05 , 07 07 , 0D 13
I guess all you'd have to do is replace the 16 "nutracks nonsense" labels with the updated equivalents.
Instead of mucking about with NFO code, wouldn't it maybe be possible to modify the problem locomotives with an NML patch? Like how theres the NARS 2.5 Passenger mod that increases the capacity of passenger cars. Would it be possible to make an NML GRF that changes the dual power stuff to use the updated railtype scheme used by Nutracks (and I suppose pretty much every other railtype grf now)

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 19 Feb 2018 10:14
by CMircea
PikkaBird wrote:I guess all you'd have to do is replace the 16 "nutracks nonsense" labels with the updated equivalents.
Thanks, I'll see if I can manage to butcher it into a working mod :mrgreen:

Thing is, I believe in the decompiled NFO (using grfcodec) it appears as just decimals, not the actual letters. That would make it a bit more difficult to change. Haven't fiddled with bytes or ASCII codes too much, gotta read the NFO spec on this. :?
NekoMaster wrote:Instead of mucking about with NFO code, wouldn't it maybe be possible to modify the problem locomotives with an NML patch? Like how theres the NARS 2.5 Passenger mod that increases the capacity of passenger cars. Would it be possible to make an NML GRF that changes the dual power stuff to use the updated railtype scheme used by Nutracks (and I suppose pretty much every other railtype grf now)
That would probably be easier :wink: Would it be possible to edit just the locomotive stats without including the sprites in the mod?

PikkaBird, if you don't mind, what would it take to remove the restrictions on brake wagons? I would like to not be required to use them at all, just for eye candy (or even remove them completely, if that's easier).
Or, alternatively, change the year limit from 1975 to 1950 or 1960, when the first diesels appear - I suppose this is a lot easier and would also be fine.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 19 Feb 2018 18:26
by PikkaBird
cmircea wrote:Thing is, I believe in the decompiled NFO (using grfcodec) it appears as just decimals, not the actual letters. That would make it a bit more difficult to change. Haven't fiddled with bytes or ASCII codes too much, gotta read the NFO spec on this. :?
grfcodec tries to make strings where it makes sense, iirc. In any case, if you can just replace sprite 419 with the commented version and edit it.
NekoMaster wrote:Instead of mucking about with NFO code, wouldn't it maybe be possible to modify the problem locomotives with an NML patch?
There's no such thing as an "NML patch" - NewGRFs cannot modify each other, and an additional NewGRF can only override vehicle properties, not alter or insert code.
PikkaBird, if you don't mind, what would it take to remove the restrictions on brake wagons?
In sprite 494, change "94 00" to "00 84",

Code: Select all

//                                     vv vv
494 * 15	 02 00 94 81 7F 06 00 0F 01 00 84 02 03 00 84
and the same change in sprite 278 of the addon grf. This should disable the brakevan check completely. Alternatively, use the "Transport Tycoon Style" wagon selection, or a less silly NewGRF.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 19 Feb 2018 19:28
by CMircea
PikkaBird wrote:grfcodec tries to make strings where it makes sense, iirc. In any case, if you can just replace sprite 419 with the commented version and edit it.
Thank you! Looks like grfcodec converts the track types to strings, so that's easier :)

This is the old rail types -> standard rail types transaltion table I've come up with:

Code: Select all

RAIL
ELRL
3RDR
3RDC
3LOW = SAA3 // standard gauge, low speed, low axle load, 3rd rail power
CLOW = SAAZ // standard gauge, low speed, low axle load, catenary & 3rd rail power
3MED = SBA3 // standard gauge, medium speed, low axle load, 3rd rail power
CMED = SBAZ // standard gauge, medium speed, low axle load, catenary & 3rd rail power
MTRO = SSA3 // standard gauge, subterranean, low axle load, 3rd rail power
MTRC = SSA3 // standard gauge, subterranean, low axle load, 3rd rail power
MTRS = SSA3 // standard gauge, subterranean, low axle load, 3rd rail power
MTRU = SSA3 // standard gauge, subterranean, low axle load, 3rd rail power
MTRT = SSA3 // standard gauge, subterranean, low axle load, 3rd rail power
ELOW = SAAE // standard gauge, low speed, low axle load, catenary power
EMED = SBAE // standard gauge, medium speed, low axle load, catenary power
EHIG = SCAE // standard gauge, high speed, low axle load, catenary power
HSTR = SDAE // standard gauge, high speed, low axle load, catenary power
DBNE
DBHE
DBHS
I've left the DBNE/DBHE/DBHS ones as they are, they appear to have been used by DBRails only. There are three open points though:
  1. What do we map the RAIL, ELRL, 3RDR, 3RDC to? Specifically, what speed limits?
  2. What do we map to the speed classes: E, F, G, H, I?
  3. Do we care about axle loads? I used low everywhere.
For 2, I am not sure what rail types NuTracks/FRISS/others use for their rails, especially since they have very low, low, medium, medium-high, high & very high types? A-F?. In addition, what do they consider the hardcoded ELRL as? This is a bit tricky; I'll do some tests myself, but I probably cannot come up with a definitive answer. :?

For 3, are there any rail type GRFs which define axle loads? I know that FRISS has branch lines with very low speeds, but I do not know if they have axle load restrictions on them (or the other way around, very high speed rails not accepting high axle loads, i.e. freight).

One more question, if I find the replacement rail type codes, would you be willing to release an official update with the fix? Looks like quite a few players have stumbled into this issue and I suppose it would be greatly appreciated.
I assume you still have the source code, just not the time to research and make the changes yourself, which is fair enough :)
PikkaBird wrote:Alternatively, use the "Transport Tycoon Style" wagon selection, or a less silly NewGRF.
The "Transport Tycoon Style" parameter only provides one wagon / cargo. That's not very realistic.
As for silly, I am quite fond of UKRS, I have played with it since the first versions, I don't really like any other train set. I suppose that says something about how well it's made, even with silly stuff like brake wagons :P

EDIT:

I found references to the rail type codes in several other places in the GRF:
Old rail types
Standard rail types

Code: Select all

 9491 * 9	 07 00 04 0E "3RDRU"
 9492 * 9	 07 00 04 0E "3RDCU"
 9493 * 9	 07 00 04 0E "3LOWU"
 9494 * 9	 07 00 04 0E "CLOWU"
 9495 * 9	 07 00 04 0E "3MEDU"
 9496 * 9	 07 00 04 0E "CMEDU"
 9497 * 9	 07 00 04 0E "MTROU"
 9498 * 9	 07 00 04 0E "MTRCU"
 9499 * 9	 07 00 04 0E "MTRSU"
 9500 * 9	 07 00 04 0E "MTRUU"
 9501 * 9	 07 00 04 0E "MTRTU"

Code: Select all

10136 * 31	 04 00 7F 01 "bBrush Class 92 (Electric)" 00
...
10142 * 9	 07 00 04 0E "3RDC" 01

Code: Select all

10216 * 35	 04 00 7F 01 85 "Bidwell Tripworker (Electric)" 00
...
10222 * 9	 07 00 04 0E "3RDC" 01

Code: Select all

13591 * 30	 04 00 7F 01 "hABB Class 325 (Electric)" 00
...
13596 * 9	 07 00 04 0E "3RDC" 01

Code: Select all

13794 * 28	 04 00 7F 01 80 "Electrostar (Electric)" 00
...
13799 * 9	 07 00 04 0E "3RDC" 01

Code: Select all

14033 * 32	 04 00 7F 01 "iHitachi A-Train (Electric)" 00
...
14038 * 9	 07 00 04 0E "3RDC" 01
Would these need to be changed as well? Or just the list on sprite 419?

Seeing the Electrostar there I rembered that there is an "extended" set of vehicles in the main GRF, activated using a parameter. What is the difference between the extended set and the add-on GRF? Does the add-on set include more engines/wagons? It's not specified on your wiki, it just lists the vehicles that are part of one of them, it doesn't say which one.

EDIT 2:

OK, so using the GRF specs and a wiki page by Peter1138 I managed to figure out that those are all jump conditions, specifically jump if the rail type is <whatever>. What I don't understand are the sprites 9931 through 9941 - they are missing the # of sprites to jump over, as well as having a "U" at the end of the rail type. Why?

I suppose all of these must also be changed to the new ones. Am I correct?

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 20 Feb 2018 05:27
by PikkaBird
CMircea wrote:What do we map the RAIL, ELRL, 3RDR, 3RDC to? Specifically, what speed limits?
Those are the basic railtypes and should be left alone. The first two are defaults and the second two should be defined by any worthwhile rail set.*
What do we map to the speed classes: E, F, G, H, I? Do we care about axle loads?
Map the railtypes to whichever ones you tend to build when you're playing. For all the BAD FEATURES my newgrfs have had over the years, I have to doff my hat to anyone who ever thought rail weights and speed limits were a worthwhile idea.
One more question, if I find the replacement rail type codes, would you be willing to release an official update with the fix? Looks like quite a few players have stumbled into this issue and I suppose it would be greatly appreciated. I assume you still have the source code, just not the time to research and make the changes yourself, which is fair enough :)
Nope, the last official version is done with. As I've said to others in this thread, you can release your changes if you want to; just make sure you change both the GRF name and GRFID.
I found references to the rail type codes in several other places in the GRF
*These sprites default locomotives back to ELRL if your track set doesn't define 3RDR and 3RDC (or if you're not using a track set). You don't need to change them.
What I don't understand are the sprites 9931 through 9941 - they are missing the # of sprites to jump over, as well as having a "U" at the end of the rail type. Why?
9491-9503 disable the Type JB if no 3rd rail railtypes are defined. If the locomotive appears with your chosen rail set, you don't need to do anything here. If it doesn't, deleting sprite 9502 will remove the effect of the check.

Code: Select all

// == no Type JB if no 3rd rail ==
 9491 * 9	 07 00 04 0E "3RDR" 55    // skip if 3rd is defined
 9492 * 9	 07 00 04 0E "3RDC" 55    // skip if 3rd is defined
 9493 * 9	 07 00 04 0E "3LOW" 55    // skip if 3rd is defined
 9494 * 9	 07 00 04 0E "CLOW" 55    // skip if 3rd is defined
 9495 * 9	 07 00 04 0E "3MED" 55    // skip if 3rd is defined
 9496 * 9	 07 00 04 0E "CMED" 55    // skip if 3rd is defined
 9497 * 9	 07 00 04 0E "MTRO" 55    // skip if 3rd is defined
 9498 * 9	 07 00 04 0E "MTRC" 55    // skip if 3rd is defined
 9499 * 9	 07 00 04 0E "MTRS" 55    // skip if 3rd is defined
 9500 * 9	 07 00 04 0E "MTRU" 55    // skip if 3rd is defined
 9501 * 9	 07 00 04 0E "MTRT" 55    // skip if 3rd is defined

 // -----------------------
 9502 * 7	 00 00 01 01 79
                 06 00 // no climate availability
 // -----------------------

 9503 * 2	 10 55
The "U" is the byte label 55, which grfcodec has inappropriately converted to an ASCII character.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 20 Feb 2018 06:45
by CMircea
PikkaBird wrote:For all the BAD FEATURES my newgrfs have had over the years, I have to doff my hat to anyone who ever thought rail weights and speed limits were a worthwhile idea.
Oh yeah, I remember the BAD FEATURES thread. :lol:

To be completely fair, your set does use speed limits - the wagons are limited in speed, as well as some trains depending on the rail type under them.
Having track-specific speed limits makes sense. You wouldn't see an Eurostar or TGV going at 300 km/h on rusty rails with cracked wood sleepers ;)
PikkaBird wrote:Nope, the last official version is done with. As I've said to others in this thread, you can release your changes if you want to; just make sure you change both the GRF name and GRFID.
OK then, if that is your decision. I will make sure to change the GRF ID and make the name clear that it is a mod, not the official UKRS (as well as in the description). The credits and everything else will remain, of course. I'll post the GRF here if/when I manage to make a working version with these changes.

I suppose I will make a separate one without the brake wagon restrictions, unless I can figure out how to add a parameter and check it.


Thank you for the hints, I'll keep you updated of any progress. :bow:

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 20 Feb 2018 07:18
by NekoMaster
it would maybe help if someone could port URKS2 to NML so that people like me can help out and provide fixes, tweaks, and possibly additional stuff to the set.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 20 Feb 2018 07:20
by CMircea
NekoMaster wrote:it would maybe help if someone could port URKS2 to NML so that people like me can help out and provide fixes, tweaks, and possibly additional stuff to the set.
Sure, but that only if Pikka wanted to release his sources. Or even without the sources, you can still do it (though it takes a lot longer to understand the code), but Pikka's permission would still be required.

I'm not sure if there's much point in porting to NML, the main thing missing is the support for standardized rail types - that can easily be fixed in GRF.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 20 Feb 2018 07:29
by Gwyd
Well I'd be happy to do it with permission. All that's really needed is permission to use the graphics: everything else can just be worked out from what you see in game.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 20 Feb 2018 08:02
by michael blunck
CMircea wrote:
PikkaBird wrote: For all the BAD FEATURES my newgrfs have had over the years, I have to doff my hat to anyone who ever thought rail weights and speed limits were a worthwhile idea.
Having track-specific speed limits makes sense. You wouldn't see an Eurostar or TGV going at 300 km/h on rusty rails with cracked wood sleepers
Same for "axle weight". Both features allow to provide cheap light rail for the early years and/or branch lines, thus improving variety.

IMO, the real questionable features are "heating" and "braking".

regards
Michael

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 20 Feb 2018 17:54
by CMircea
I tested three track sets and the results are a little bit strange.

FRISS 1.0.1
The Eurostar and A-Train do not run at full speed, they run at 160 km/h.
None of the overhead and 3rd rail dual-power engines run on metro (3rd rail) tracks. However, the dedicated 3rd rail engines (main + add-on), as well as the BR Type JB run on metro tracks just fine.

NuTracks 2 r247 & Japanese Tracks 3.2
On electrified rails, the Eurostar and A-Train do not run at full speed/power, they run at 160 km/h.
All 3rd rail compatible engines run on 3rd rail tracks. Wait, did I say all? Yeah, our friend the JB doesn't - it thinks it's diesel :lol:
As for dual-power track, all 3rd rail compatible engines run; the dual overhead/3rd rail ones don't run at full speed/power (they ignore the catenary). Oh, and, the JB also runs as diesel.

A class 92 with the same load runs at the same speed on all three track types. Basically, all overhead/3rd rail locomotives run as if on 3rd rail, and the JB runs as if on diesel.

EDIT: I messed up by having loaded the butchered add-on set (with 3rd rail restrictions removed), but the original main set. I retested and updated the results.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 20 Feb 2018 18:35
by Gwyd
The max of 160kph on 3rd rail is to be expected: in real life third rail is unreliable* at speeds much higher than that. Personally, I think it could be filed under a
"BAD FEATURE", rather than a bug.

*As in, the 3rd rail equipment can start to disintegrate.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 20 Feb 2018 18:37
by CMircea
Oh yeah, the speed limit of 160 km/h on 3rd rail is to be expected. Not sure if that should be a limitation of the track type, of the train set or both - NuTracks has 3rd rail tracks at 180 km/h, but all 3rd rail UKRS engines are limited to 160 km/h.

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 21 Feb 2018 05:35
by CMircea
It looks like if I change the GRF ID the A-Train breaks - it doesn't accept High-Speed Carriages anymore :(

I just changed the first line to the second:

Code: Select all

32 * 253	 08 08 "CM" 10 00 "UK Railway Set (UKRS2)" 00 94 "Version "
32 * 253	 08 08 "DD" 10 00 "UK Railway Set (UKRS2)" 00 94 "Version "
It took a while to narrow it down. Why does this happen?

Re: [OTTD] UKRS2 - Latest version 1.05 (02/01/2013)

Posted: 21 Feb 2018 06:24
by Gwyd
I don't understand NFO, but if I knew the vehicle ID of the high speed coach I could work it out in NML