Back when I installed levels (a long time ago, forgot if anything special was done) I ended up with identical(as far as I can quickly tell) levelsets accessible from the choose levelset menu. With one of the identical levelsets pairs there's a levelset that new scores seam to appear to be showing on the high score server*, while on the other one not, even though both show (same?) scores that are on the high score server.**
Specifically, one of these two will add new tapes to high score server while the other one won't.
~/.rocksndiamonds/levels/Earth_Shaker_Collection/Earth Shaker Explosions <- New scores don't show up in either
~/.rocksndiamonds/levels/Earth_Shaker_Explosions <- New score shows up in both
* SETUP > GAME & MENU > SCORES IN HIGHSCORE LIST: SERVER SCORES ONLY
** Yes, I even waited a while for these to show up.
The one in with spaces and in subfolder isn't showing up
Linux, rocksndiamonds-4.4.0.5
p.s. I noticed the the scores shown at end of playback didn't match the one's shown in the menu for Level 17, for N******S 2:09, menu shows a score of 551, playback shows a score of 569 (The levelset in subfolder only)
p.s.2. I remember another duplicate levelset(forgot which one), that upon restarting R'n'D it would start with only one of them no matter which one was the last one played.
Duplicate or Similar Levelsets and High Score Server
Moderators: Flumminator, Zomis
-
- Posts: 262
- Joined: Mon Nov 13, 2017 4:16 pm
Duplicate or Similar Levelsets and High Score Server
Last edited by BryanFRitt on Thu Jul 10, 2025 10:30 pm, edited 2 times in total.
--- Strike a balance between generating new things/ideas, and being good/organized, somewhere between a gibberish mess and nothing said/done. ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---
Re: Duplicate or Similar Levelsets and High Score Server
Yes, this is expected behavior. There are two different cases to distinguish between:
Case 1: Two level sets have the exact same level set identifier.
The "level set identifier" is simply the name of the level set sub-directory. So you can easily duplicate a level set by simply making a copy of the corresponding level set sub-directory, but with a different name. For R'n'D, these two level sets will be two different level sets, even if the name specified in the line "name: <name of the level set>" in file "levelinfo.conf" is still the same.
But if you store these two sub-directories into different parent directories, you can use the same name for the sub-directory again, of course (which would not be allowed in the same parent directory by the file system). As a result, you can have two level sets (which may be totally different) with the same identifier.
R'n'D now builds a tree of level sets upon start, marking each tree node with the identifier taken from the sub-directory. During execution of the game, you can select both level sets just fine, as R'n'D remembers the tree node for both sets. But when quitting and restarting the game, R'n'D stores the level set just by its identifier (which is the same for both sets in our example). After restarting, the game traverses the level set tree and stops at the first tree node where the identifier matches. That is, it will always find the first one found in the level set tree. However, you can still go to the "levelset" menu and select the second (or third, or ...) level set with the same identifier.
When it comes to (local) high scores, the identifier is used to look up local scores in the score directory. So if two level sets share the same identifier, they also share the same score directory. The same is true for the high score server, as it only sees one and the same identifier.
Case 2: Two level sets have different level set identifier, but the same name.
This is the case you described. You have one level set with the level set identifier "Earth_Shaker_Explosions" and another one with the identifier "Earth Shaker Explosions" (which differs from the first one), but which have both the same level set name "Earth Shaker Explosions".
This case does not have any of the problems described above. The level sets can be clearly distinguished in the internal level set tree, and they both have their own local score directory.
And they would also have their own score entries on the high score server.
Unless one of the two level sets is unknown on the high score server!
As people sometimes tend to rename their level set directories to their own liking when installing new level sets (which is perfectly fine), this changes the level set identifiers used to lookup scores (or tapes) locally. This is no problem (unless you rename existing level set directories without also renaming the corresponding score and tape sub-directories).
However, it raises the question of how to find the corresponding score and tape entries on the high score server.
This is done simply as follows: If looking up a given level set identifier fails (like in the case of level set "Earth Shaker Explosions", which is stored as "Earth_Shaker_Explosions" on the high score server), another lookup is made for the level set name (instead of the level set identifier). This will find the level set, even if the locally used level set identifier differs.
But if two different local level sets have the same name, it is possible that you get the wrong results from the high score server (if two sets with different identifiers, but same name exist, or if only one level set exists which has a name that matches both local level set names).
But:
I have tried to reproduce your case with the two level sets "Earth Shaker Explosions" (stored as "Earth_Shaker_Explosions") and "Earth Shaker Explosions V1.2" (stored as "Earth Shaker Explosions", with spaces instead of underscores). Indeed I get wrong scores for the second level set. Apparently the high score server matches the (local) level set identifier with the (server-side) level set name, returning score entries for the wrong level set.
I will have to check this again. This can probably (hopefully) be fixed on the high score server directly, so that you should get the correct score entries in the "hall of fame" after fixing this.
To be able to better test this special case, could you please zip both folders "Earth_Shaker_Collection" (including folder "Earth Shaker Explosions") and "Earth_Shaker_Explosions" and attach them to your reply? Then I should be able to perfectly reproduce the problem here.
Case 1: Two level sets have the exact same level set identifier.
The "level set identifier" is simply the name of the level set sub-directory. So you can easily duplicate a level set by simply making a copy of the corresponding level set sub-directory, but with a different name. For R'n'D, these two level sets will be two different level sets, even if the name specified in the line "name: <name of the level set>" in file "levelinfo.conf" is still the same.
But if you store these two sub-directories into different parent directories, you can use the same name for the sub-directory again, of course (which would not be allowed in the same parent directory by the file system). As a result, you can have two level sets (which may be totally different) with the same identifier.
R'n'D now builds a tree of level sets upon start, marking each tree node with the identifier taken from the sub-directory. During execution of the game, you can select both level sets just fine, as R'n'D remembers the tree node for both sets. But when quitting and restarting the game, R'n'D stores the level set just by its identifier (which is the same for both sets in our example). After restarting, the game traverses the level set tree and stops at the first tree node where the identifier matches. That is, it will always find the first one found in the level set tree. However, you can still go to the "levelset" menu and select the second (or third, or ...) level set with the same identifier.
When it comes to (local) high scores, the identifier is used to look up local scores in the score directory. So if two level sets share the same identifier, they also share the same score directory. The same is true for the high score server, as it only sees one and the same identifier.
Case 2: Two level sets have different level set identifier, but the same name.
This is the case you described. You have one level set with the level set identifier "Earth_Shaker_Explosions" and another one with the identifier "Earth Shaker Explosions" (which differs from the first one), but which have both the same level set name "Earth Shaker Explosions".
This case does not have any of the problems described above. The level sets can be clearly distinguished in the internal level set tree, and they both have their own local score directory.
And they would also have their own score entries on the high score server.
Unless one of the two level sets is unknown on the high score server!
As people sometimes tend to rename their level set directories to their own liking when installing new level sets (which is perfectly fine), this changes the level set identifiers used to lookup scores (or tapes) locally. This is no problem (unless you rename existing level set directories without also renaming the corresponding score and tape sub-directories).
However, it raises the question of how to find the corresponding score and tape entries on the high score server.
This is done simply as follows: If looking up a given level set identifier fails (like in the case of level set "Earth Shaker Explosions", which is stored as "Earth_Shaker_Explosions" on the high score server), another lookup is made for the level set name (instead of the level set identifier). This will find the level set, even if the locally used level set identifier differs.
But if two different local level sets have the same name, it is possible that you get the wrong results from the high score server (if two sets with different identifiers, but same name exist, or if only one level set exists which has a name that matches both local level set names).
But:
I have tried to reproduce your case with the two level sets "Earth Shaker Explosions" (stored as "Earth_Shaker_Explosions") and "Earth Shaker Explosions V1.2" (stored as "Earth Shaker Explosions", with spaces instead of underscores). Indeed I get wrong scores for the second level set. Apparently the high score server matches the (local) level set identifier with the (server-side) level set name, returning score entries for the wrong level set.
I will have to check this again. This can probably (hopefully) be fixed on the high score server directly, so that you should get the correct score entries in the "hall of fame" after fixing this.
To be able to better test this special case, could you please zip both folders "Earth_Shaker_Collection" (including folder "Earth Shaker Explosions") and "Earth_Shaker_Explosions" and attach them to your reply? Then I should be able to perfectly reproduce the problem here.
-
- Posts: 262
- Joined: Mon Nov 13, 2017 4:16 pm
Re: Duplicate or Similar Levelsets and High Score Server
Attached a zip of each of these, and added Earth_Shaker as well.Holger wrote: ↑Thu Jul 10, 2025 12:44 pm To be able to better test this special case, could you please zip both folders "Earth_Shaker_Collection" (including folder "Earth Shaker Explosions") and "Earth_Shaker_Explosions" and attach them to your reply? Then I should be able to perfectly reproduce the problem here.
~/.rocksndiamonds/levels/Earth_Shaker
~/.rocksndiamonds/levels/Earth_Shaker_Explosions
and
~/.rocksndiamonds/levels/Earth_Shaker_Collection
- Attachments
-
- Earth_Shaker.zip
- (284.65 KiB) Downloaded 5 times
-
- Earth_Shaker_Explosions.zip
- (302.83 KiB) Downloaded 2 times
-
- Earth_Shaker_Collection.zip
- (1.19 MiB) Downloaded 5 times
--- Strike a balance between generating new things/ideas, and being good/organized, somewhere between a gibberish mess and nothing said/done. ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---
-
- Posts: 262
- Joined: Mon Nov 13, 2017 4:16 pm
Re: Duplicate or Similar Levelsets and High Score Server
Here's some diff files, replaced home directory in output with ~
diff -q ~/.rocksndiamonds/levels/Earth_Shaker_Collection/Earth\ Shaker\ Explosions/ ~/.rocksndiamonds/levels/Earth_Shaker_Explosions diff -q ~/.rocksndiamonds/levels/Earth_Shaker_Collection/Earth_Shaker_Old_Set_B/ ~/.rocksndiamonds/levels/Earth_Shaker
diff -q ~/.rocksndiamonds/levels/Earth_Shaker_Collection/Earth\ Shaker\ Explosions/ ~/.rocksndiamonds/levels/Earth_Shaker_Explosions diff -q ~/.rocksndiamonds/levels/Earth_Shaker_Collection/Earth_Shaker_Old_Set_B/ ~/.rocksndiamonds/levels/Earth_Shaker
--- Strike a balance between generating new things/ideas, and being good/organized, somewhere between a gibberish mess and nothing said/done. ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---
--- I've completed the built-in R'n'D levelsets, and lots of R'n'D downloaded levelsets; Finished enough? ---