Cannot choose /cycle weapons
#1
Hi and Thanks . This game worked for me on a Leopard Machine MacPro 1.1, I upgraded my Machine to a Macpro3.1 (to get Mavericks). Hard Drive was Cloned from the Leopard Machine-installed in 3.1 and upgraded  to preserve all my apps etc.Everything works fine have been using for months now. But Descent2 does not work correctly. It launches fine , all works except when I try to cycle a weapon with joystick button or pick up a weapon it crashes with this message.  "sorry a Critical error has occurred. Error secondary weapon is not in order list!!! "
  fired up my Leopard Macpro and it still works so I copied it over to new machine with no luck . Tried downloading and reinstalling too with no luck.
Macpro3.1 / Maverick / 20gigs ram / 5770 Radeon.
Reply
#2
The closest string to the reported error message comes from SOrderList, which can print "Secondary Weapon is not in order list!!!" if PlayerCfg.SecondaryOrder does not have the referenced number.  Please compare your pilot profile between the working and non-working systems.  Also check that you used Descent 2 on both, since there are more secondary weapons in Descent 2 than in Descent 1.

[Edit: in the next release, bad weapon orders will automatically be reset at load time.]
Reply
#3
I came across such error once too when using pilot file created with modded version of rebirth while playing vanilla, or other way around - I don't remember.
When it comes to vanilla you should be ok when using old pilot file with never version.
Try to use the same executable in both cases with fresh created pilot file on this version - if that solves the problem - there you go. If not then it is something different.
What your cycle weapon list looks like? does it have additional unspecified weapon? which one is causing the crash?
Check your autoselect list (or write it down on the paper) then fly the level and pick all weapons (or use cheat code) and then cycle weapons one by one to see which one (from the written list) is causing the crash.
Reply
#4
Thanks Guys. Ive never messed with the autoselect options. they just always worked at default . THis is Vanilla D2.no cheats/mods etc.  So I ventured over and I opened the cycle primary and/or secondary option and each screen has only one weapon listed.  Primary Weapon has Laser cannon listed 11 times / and secondary has Concussion missile listed 11 times.  That why the game crashes when I try to pick up anything  So that's my problem. But how can I fix that ?
I generated a new Pilot that works fine , but I'll lose all my saved games. Is there a way to fix the weapon list?
Also I have all my files in one D2 folder , are any stored anywhere else
Any help is greatly appreciated. In the mean time I have to retrieve  my old leopard machine its a different location and and try to see  what files might have changed.
thanks much
Reply
#5
You could try to repair the plr file by hand.  Your problem is that the relevant arrays are all zero, which maps to laser/concussion for primary/secondary.  You need to reset them to have values 0-9, 255.  You could run with a modified build that includes my fix to repair the list automatically, but no one has published a binary with that change yet.  If you were not a Mac user, I could build it for you.  You only need to run it once to have it reset your choices, after which you could return to the regular build.  If you have access to the Apple developer tools, you could build the required version yourself.

If you can live without the weapon cycle functionality, you could remove the key/mouse bindings that trigger cycle and just ignore the problem.  With those bindings removed, you would not accidentally trigger the cycle.
Reply
#6
I wonder what might have caused plr file to be damaged in such a way.
Still, plr file isn't human readable, if KP would be so kind and specify offsets for bytes to be modified it could be fixed by hand I guess (if there is no crc and other fancy stuff involved), and/or you could post it here so someone (me) could fix that file for you.
Reply
#7
I do not know the offsets.  I let the game figure that out for me.  The file is perfectly readable when using xxd as a filter. Smile

There is no CRC involved.  I deliberately corrupted a plr file while testing the referenced fix and the game accepted it without issue.  As a longtime user, you should know that Parallax did not believe in integrity checking or error handling if at all avoidable. Wink
Reply
#8
(08-27-2014, 10:43 PM)Kp link Wrote: There is no CRC involved.  I deliberately corrupted a plr file while testing the referenced fix and the game accepted it without issue.  As a longtime user, you should know that Parallax did not believe in integrity checking or error handling if at all avoidable. Wink
plr file specs - there it is: http://descent2.com/ddn/specs/plr/
It is original descent - I don't know how accurate it is with rebirth though.
Rebirth added few bytes at the end of the file as far as I can see (after guidebot callsign).
I don't give a... much thoughts about Paralax and their beliefs but I do respect them for 1 thing - releasing the code, (and I don't consider myself as long term user either) nevertheless if you look at the specs above there is :
INT lifetimerankings_num_kills;
INT lifetimerankings_num_deaths;
INT lifetimerankings_checksum;

so there is some kind of checksum luckily related to ranking variables only - which means it's safe to modify anything else.
Just above those mentioned:
BYTE weapons_order_list[30]; //primary/secondary weapons order list
so probably this is the section which has to be changed.

OKI:
You could create new pilot file and compare it with damaged one (using hex editor or something like that - I used HxD).
Then copy mentioned section of 30 bytes (or less) from new file and paste/insert/type it into damaged one.
It's easy to use guidebot_callsign variable as a reference point and count down. Hope it helps.

It would be nice to have this file specs updated with rebirth information, maybe one day...
Reply
#9
Everyone Thanks for the help I will try some of this stuff over the weekend. I am not a programmer but I understand some of this stuff and can delve into some of this over the weekend along with comparing my Leopard backup. I used Carbon Copy to clone the Leopard (pretty reliable) So Carbon or Maverick upgrade corrupted it. Maybe Carbon did not know how to handle the file names. thanks again
Reply
#10
(08-29-2014, 12:50 AM)OKI link Wrote: Everyone Thanks for the help I will try some of this stuff over the weekend. I am not a programmer but I understand some of this stuff and can delve into some of this over the weekend along with comparing my Leopard backup. I used Carbon Copy to clone the Leopard (pretty reliable) So Carbon or Maverick upgrade corrupted it. Maybe Carbon did not know how to handle the file names. thanks again
You do not need to be a programmer to build the code that automatically repairs the bad files; you only need a working build environment.  The patch as written does not backport cleanly to 0.58.1, but that would not be hard to work around if someone was willing to build the resulting code.

For historical reasons, the filenames are very simple.  Corruption of a filename would not cause your problem, only corruption of content.  It would be interesting to recopy your plr file from the good system, compute the checksum on the receiving end, then load it in Rebirth and check whether it survived the copy.  Rebirth sometimes writes back to the plr file, so you should compute the checksum before running Rebirth.

aqqman: breaking the checksum resets your lifetime kills/killed ranking.  The Rebirth source is probably the best reference for the file layout, since we have to read all the different variations.  A quick check shows that the exact offset for the cycle data varies by player file.  Different player files here have different locations for the start of the data.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)