Local tsection.dat entries limitation?
#11
Posted 09 August 2024 - 09:26 PM
What I have observed well-matches with situation, Derek have described. I have found analogy with data organization on disks too.
2. To Derek.
Thanks for explanation: it have answered and confirmed many of my guesses.
3. To Dave.
I didn't understand all, what I've read, but I doubt, they are hex: sequence looks like decimal, no a to f symbols for 10 to 15 numbers.
I think, I actually have used much less, than 65535 sections, but doubled number of every section's editings is being kept in file: again, when I just move already existing dynamic section, or, maybe, change it's elevation(grade), the list (count) still increases - that's why I guess, no deletion after actual sections were deleted; plus, I have to move a big part of already built route towards right coordinates (after topography distortions correction), plus, I have tried auto-placement of dynamic track (I suspect, 10m straight was placed), along existing track twice, however have removed "last placement" both times then.
#12
Posted 09 August 2024 - 09:37 PM
39991 to 39998 are entries umber in world files?
36206 to 36220 are section idx numbers from the first part of the tsection file?
#13
Posted 10 August 2024 - 12:48 AM
The misinterpretation of the tsection comes from me.
Weter is correct that the numbers in tsection are in decimal.
So Dave the new calculation for number of slots left has changed.
40,000 in total, 2/3 full so leaving 26,667 slots left.
Within the slots left, half is sections, half is shapes, therefore 13,000 tracks/roads can be had.
Given the rate of new routes, we still have many years left.
#14
Posted 10 August 2024 - 10:05 AM
#15
Posted 10 August 2024 - 10:54 AM
1. TrackSections The dimensions are listed here.
2. TrackShapes The different shape files are listed here.
I wonder which one the question refers to, because it really doesn't matter?
#16
Posted 10 August 2024 - 11:37 AM
#17
Posted 10 August 2024 - 12:05 PM
So, both: straight and curved pieces are being listed in the second part...
#18
Posted 10 August 2024 - 12:06 PM
copperpen, on 10 August 2024 - 11:37 AM, said:
I think the post refers to the TSection.dat file in the Global folder. There is only a limit of 40,000, which has now been raised to one and a half times.
#19
Posted 10 August 2024 - 12:28 PM
#20
Posted 10 August 2024 - 12:57 PM
engmod, on 10 August 2024 - 12:48 AM, said:
So Dave the new calculation for number of slots left has changed.
40,000 in total, 2/3 full so leaving 26,667 slots left.
Within the slots left, half is sections, half is shapes, therefore 13,000 tracks/roads can be had.
Given the rate of new routes, we still have many years left.
Derek, I think you mis-wrote that sentence. In V60 there are 14949 occurrences of the string TrackShape. The number is larger than what you see because I have a few more than 1000 I have not submitted -- about 25% of the total are unused..
So IMO we have a looming problem on the horizon.
Is there some fundamental reason why the limit is 40,000 instead of, say, 128,000?
#21
Posted 10 August 2024 - 01:14 PM
The 40,000 was judged at the time to be enough for the future.
The 5 digits allowed for the numbers gives our (decimal) 65535 or (hex) ffff.
To get more in the tsection, we would need to go to 6 digits for the numbers.
Going to 6 numbers takes the hex from 32 bit to 64 bit, which will require programmatic changes.
The local tsection would need to be moved from 40,000 to a higher number or use the same number range as the global.
All programs using G_tsection would need to be rewritten to enable the 6 digit numbers.
At the moment we have control over Open Rails and TSRE.
There are a number of utility programs that will need to be updated as well.
#24
Posted 10 August 2024 - 10:51 PM
engmod, on 10 August 2024 - 01:14 PM, said:
To get more in the tsection, we would need to go to 6 digits for the numbers.
Going to 6 numbers takes the hex from 32 bit to 64 bit, which will require programmatic changes.
65535 is the highest 16-bit integer number.
4294967295 is the highest 32-bit integer number.
18446744073709551615 is the highest 64-bit integer number.
If track indexes are currently limited to 16-bit numbers in OR and TSRE, that's not very forward thinking. It's understandable for MSTS 20 years ago, but....
#25
Posted 10 August 2024 - 10:53 PM
What about an alternative TSection.dat file that can be written to the route's Openrails folder?
As a test, I started writing one based on Peter Nevell's guidelines.
I copied 10 notes into the TrackSections block.
30 entries have been added to the TrackShape block so far. So you don't need a TrackSections entry for every TrackShape shape file. Starting from this, copying the current TrackSections to the alternative TSection.dat file should be enough, I think, maybe you need to find a place for two special elements.
Since I will use four types of DB elements, I created a grouping of thousands. Thus, only the shape walls of type DB1 need to be added to the TrackShape block, and then copied to the DB2 and DB 3 blocks. You only need to rewrite the first value of the serial number, and Notepad solves it with two clicks. Although this is also true for the name of the shape file.
That's 4,000 entries, if I buy double it's still only 8,000 thousand. Which is exactly one fifth of 40,000. Someone wrote that 1,600-1,700 entries are enough. This is a realistic number if someone only uses a certain type of shape file.
The DB1 spring clamp is a new track element, the DB2 spring clamp is a used track element, and the DB3 GEO clamp is a wooden cross-bottom track element. The DB4 is like the DB3, only it is a concrete cross-bottom track element.
There is a saying: Sometimes less is more.
https://kephost.net/p/MTMyMDc4NA.png
The TrackSections block of the TSection.dat file. For now, I will not copy the whole thing, rather just select what is needed.
https://kephost.net/p/MTMyMDc4NQ.png
The list of DB2 track elements in the TrackShape block, notice that the numbering starts from absolute zero. The DB2 element runs from 1000 to 1999.
https://kephost.net/p/MTMyMDc4Ng.png
List of DB3 track elements in the TrackShape block. The DB3 element lasts from 2000 to 2999.
The rails of the unique MÁV48.5kg system will go to the next stage, as the switches are very unique. They have a radius of 190 meters but are 6.32 degrees. Here, you have to find a place in the TrackSections block or come up with an alternative solution.
What is not expressly forbidden must be done, but at least it is worth a try.
Sincerely, Laci1959