Lamenting Usurper's messed up Score file reddit / bbs ---------------------------------------------------------------------- codefenix · 2020-02-08 14:51 Hi all. First post. Every version of Usurper seems to have this problem where, sooner or later, the score file lists computer players multiple times in place of some human players. It seems to happen randomly a few days into a game. Resetting the game temporarily fixes it, but the problem always comes back. The current dev on Github apparently knows about the issue, but has been silent for the last few years. This URL points to BBSlink's current score file for its long-running installation of the game. As you can see, at this moment, Llwellyn is listed multiple times, overwriting some higher-level human players. http://games.bbslink.net/score.php?door=usrpuscr&type=image My board's local installation just started doing the same thing with De Mandeville. Just curious if anyone has ever found a solution or even a workaround to this. ---------------------------------------------------------------------- nevarro · 2020-02-08 20:10 I feel your pain. The behavior seems to be that as soon as a player's level passes the top NPC (Llwellyn), the player disappears from the score list. I have reported this bug on Usurper's github. The codebase appears to have stagnated for a couple years, so I suppose wait and see if it's fixed. Usurper was picked up by Rick Parrish a while back after it became apparent that the original developer/author, Jakob, had abandoned the game. Rick has generously worked towards fixing many bugs in the game, but the scores bug looks to have appeared in a version after it was picked up. So, my recommendation is to download the oldest version from here: [ht tps://www.usurper.info/downloads/](https://www.usurper.info/downloads/ ) 0.20e is the last release by Jakob. My testing has shown that the scores file works in this version. ---------------------------------------------------------------------- codefenix · 2020-02-08 20:54 Thanks for the tip. I'll consider changing to 0.20e the next time I reset the game. ---------------------------------------------------------------------- jdavidramsey · 2020-02-08 23:01 If you can understand code and can compile, you can swipe out just the section with the messed-up sorting with an old version of that bit of code. That way, you can get Rick Parrish's fixes in other areas while avoiding his score-sorting bug. It's been a few years, but just look for the changelog entry concerning his "fix" and go to the version previous. The sorting algorithm was in its own file, so there wasn't even a need to cut-and-paste. You won't even have to reset. The structure of the data records isn't affected. ---------------------------------------------------------------------- codefenix · 2020-02-09 15:58 I did briefly entertain such an idea, and browsed through the Pascal code. I think it's the SORTPL.PAS that contains the logic that generates the the score file. Time to tinker, I suppose. ---------------------------------------------------------------------- mro_1337 · 2020-02-10 17:07 if you contact rick parrish, i'm sure he'll fix the issue. maybe github isnt the way to go about it. rick's website is [http://www.randm.ca/](http://www.randm.ca/) I'm the guy that got *Jakob Dangarden* to give up the source. anyways, i would NOT recommend downgrading to an older version by jakob. it would be stupid to do so because there' s just so many issues, some of them serious. ---------------------------------------------------------------------- codefenix · 2020-02-10 19:11 Rick is already aware of the problem, or at least he was. He posted the issue himself on the Github page. https://github.com/rickparrish/Usurper/issues/6 That was nearly 4 years ago, sadly. ---------------------------------------------------------------------- nevarro · 2020-02-11 17:27 I suppose we could try walking the versions backwards to find out exactly where scores broke, though that will take time that I may not have. If it ends up being that only 0.20e has working scores, then that's what I'll run, because it's that important to have functioning scores in a multiplayer door game. ---------------------------------------------------------------------- mro_1337 · 2020-02-17 03:51 he probably forgot about it. i would just email him about it. ---------------------------------------------------------------------- mro_1337 · 2020-02-17 03:57 after seeing all the horrible issues they fixed, i wouldnt downgrade just for scores. apparently usurper is very hard to work on due to jakob's style of duplicating code everywhere. perhaps a total rewrite is necessary. ---------------------------------------------------------------------- [deleted] · 2020-02-17 06:04 [deleted] ---------------------------------------------------------------------- nevarro · 2020-02-17 06:09 So our opinions are different. I can either have working scores or no usurper. If you want to run a game where no one can check their scores, but have other game breaking bugs fixed, then fine. ---------------------------------------------------------------------- codefenix · 2020-02-18 11:59 I did send a couple polite emails through his website asking if any progress has been made, and have not received a reply. ---------------------------------------------------------------------- codefenix · 2020-03-11 23:43 For anyone who may have been following this, I've made a promising discovery. I took u/jdavidramsey's advice and re-compiled the Usurper .24 source code in Lazarus, making sure to use an earlier version of the SORTPL.PAS file. I went all the way back to the one from version .20e. I've been playing this build locally for 10 days. My character's level has exceeded level 20, and has not yet been overwritten by duplicated computer players. This is the USCORES.ASC file from the current game in progress (the test character's name is simply "test"): Characters of Usurper ### Name Level Race Class Experience Status ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄ 1. test.....................21 Human Warrior 1,091,967 Alive 2. Llwellyn.................16 Human Paladin 374,800 Alive* 3. De Mandeville............14 Half-Elf Warrior 253,843 Alive* 4. Ugluk....................11 Orc Sage 135,547 Alive* 5. Sony.....................10 Mutant Assassin 119,397 Alive* 6. Zara......................9 Elf Ranger 61,652 Alive* (* indicates computer player) (arried, ing, ueen) So for anyone interested, my initial impression is this does indeed seem to correct the problem. You may be wondering, "so what changed in the SORTPL.PAS file that broke the score file in the first place?" Well, comparing the one in .24 to the one in .20e, there are definitely changes, most of them stylistic (indenting, spacing, etc). The most obvious logic change is a while-loop within the Sort\_Players procedure. The code lacks sufficient documentation and comments to know the reason for the change, so I'm left to assume that the programmer tried to make some minor optimizations while "beautifying" the file in the process, and in doing so, broke the sort logic altogether. So what now? I'm just going to continue testing this build locally for now, maybe bring in one or two additional test characters for good measure, and make sure the problem does not resurface. Once I feel confident that the game is working properly, I'll replace the current Usurper on my BBS with this build. I will also reply to the issue on the GitHub page to let them know about this workaround. If there are signs of life there, and no one sees a reason why not to revert the SORTPL.PAS file, then perhaps they will take the project back over and make another release. We'll see what happens next. ---------------------------------------------------------------------- codefenix · 2020-03-12 01:29 Well that was fast. Less than an hour after I brought this up on GitHub, dan1982code jumped on it and upon review confirmed that the while-loop I mentioned is indeed the culprit. He agrees that going back to the SORTPL.PAS file from version .20e is the solution. Hopefully, if Rick Parrish is still monitoring the project, then this fix will work its way into an official new version. ---------------------------------------------------------------------- mro_1337 · 2020-03-28 21:54 check your spam folder. he usually replies ---------------------------------------------------------------------- codefenix · 2020-03-28 22:09 Nope. Nothing in spam. We're actually way past this now though. Read my latest comment on this thread to get caught up. ---------------------------------------------------------------------- mro_1337 · 2020-03-29 00:18 oh i dont check this sub much because it's lame.