drg-editor icon indicating copy to clipboard operation
drg-editor copied to clipboard

Editing dwarf promotion does not properly update player rank

Open nbusseneau opened this issue 1 year ago • 2 comments

Hi! Thanks for your work :) I got interested in the save file structure and having it as a first basis was helpful to me.

I've noted that editing dwarf promotion does not properly update the player rank (blue gem in top right corner). In game, the player rank automatically advances by one tick (1/3 of a rank up):

  • Every time a level is gained by any dwarf.
  • Every time a promotion happens.

However as of right now when changing a dwarf promotion via the tool, nothing happens to the player rank in game.

I think the issue comes from the fact that the tool updates the TimesRetired entry of the save file, but does not correspondingly update the RetiredCharacterLevels entry: image

This entry represents the number of levels tied to a specific promotion for the character (i.e. Bronze 1 = 25, Bronze 3 = 75, Silver 1 = 100, and so forth) and it looks like it is used as basis for calculating player rank in game (in combination with the current level of each dwarf). I've tried updating it manually and I can confirm that when changing the RetiredCharacterLevels value, the global player rank changes accordingly.

nbusseneau avatar Jan 22 '23 00:01 nbusseneau

By the way, unrelated to the issue but related to the topic of TimesRetired / RetiredCharacterLevels: do you know what the 5th structure corresponds to? I know that 1 / 2 / 3 / 4 map to driller / engineer / gunner / scout, but what is the 5th one for? Could it be a 5th class that never saw the light of day?

nbusseneau avatar Jan 22 '23 00:01 nbusseneau

The 5th entry is for a character that was used early in development called the Generic Hero. Now it goes unused presumably because there's a give all weapons console command now.

Cheddar3 avatar Mar 10 '23 21:03 Cheddar3