move former_rank[] out of monst, into mextra#2
Merged
Conversation
I'd like to have save and bones file compatibility between hardfought 3.7 and the upstream NetHack-3.7 work-in-progress. There are two hardfought additions that render things incompatible as they currently stand: 1) the elbereth field addition to u_conduct. That one is easily handled on the NetHack-3.7-side by us and requires no change on the hardfought side. A placeholder field can be added at the same place (For now, it will probably be called hf_reserved1 or something like that on the upsteam NetHack-3.7, since there won't be any code support for it there, at the time it is added anyway. You would just leave it the way it is on the hardfought-side. Adjust to rename the new field on hardfought (not add an additional field) the next time you sync with upsteam NetHack-3.7 after these changes.. 2) This field that hardfought adds to include/monst.h: char former_rank[25]; /* for bones' ghost rank in their former life */ I'd like to propose handling that former_rank in a different way. Instead of housing it in the base monst struct as hardfought has it now (which makes it part of every monst in the game, whether it is needed or not), I'd like to relocate it into a new mextra struct. This pull-request does just that. It adds an additional field called 'former' to the mextra struct, and adds supporting code to deal with it for the specific situation where it is needed. If the pull-request is accepted into hardfought 3.7, I can add similar functionality to upsteam NetHack-3.7 and once both places are changed, the savefiles should be compatible. That will make it simpler when a savefile needs to be loaded while trying to debug and issue or bug report going forward. I have the upsteam NetHack-3.7 change standing by once the fate of this pull request is known. The changes, once incorporated, will not be compatible with existing save and bones files that preceded the changes.
nhcopier
pushed a commit
to NetHack/NetHack
that referenced
this pull request
Feb 2, 2025
There are two hardfought code additions that render save and bones files incompatible
with the upstream NetHack-3.7, and that makes testing with hardfought
save and bones files more challenging than it needs to be, when
investigating and troubleshooting bug reports.
Add some unused fields to advance towards achieving save file parity with
hardfought, which is a significant source of play-testing for NetHack-3.7.
1) the elbereth field addition to u_conduct
This adds an unused placeholder field named 'hf_reserved1', at the appropriate
place in u_conduct to achieve struct field parity with the one in use on
hardfought.
2) hardfought adds a field to struct monst:
char former_rank[25]; /* for bones' ghost rank in their former life */
Instead of adding that to every monst, this adds a new mextra struct
named 'former', which currently contains the equivalent 25-character
field called 'rank' which can hold the content that was in the
former_rank[25] field. That way, the field will only be added when it
is needed.
A pull request k21971/NetHack37#2 has been
done on hardfought to do it the same way (untested there as of yet).
Even though NetHack-3.7 does not utilize that information presently,
this will be a further step toward allowing hardfought-generated save
and bones files to be used for troubleshooting, without modification,
on a similar architecture running stock NetHack-3.7 code.
That savefile parity won't be achieved until the after the
hardfought pull-request mentioned above (or equivalent) is merged.
As this change will not be compatible with existing save and bones
files, it will be accompanied with an EDITLEVEL increment.
use ebones and EBONES, instead of former and FORMER
k21971
pushed a commit
that referenced
this pull request
May 4, 2025
The two options are very similar but probably mutually exclusive except when using look-here and look-into-container (both via ':') with the default setting for 'sortloot', or with inventory when 'sortpack' has been toggled off. This removes 'use_menu_glyphs' and changes 'menu_objsyms' from a boolean to a compound taking six possible values: | 0: no object symbols in menus, | 1: append object class symbol to object header lines (same as old |menu_objsyms boolean), | 2: include object symbol in menu entry lines for objects (same as |recently added use_menu_glyphs), | 3: both 1 and 2, | 4: display as #2 but only if the menu lacks class header lines, | 5: if header lines are present, display as #1; if headers are not |present, then display as #4 (which will implicitly be #2). Default is #4. Effectively replaces the options portion of pull request #1406 and retains the functionality, but not as default for normal menus. Guidebook.tex is only partially updated. Someone else will need to finish that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'd like to have save and bones file compatibility between hardfought 3.7 and the upstream NetHack-3.7 work-in-progress. There are two hardfought additions that render things incompatible as they currently stand:
the elbereth field addition to u_conduct. That one is easily handled on the NetHack-3.7-side by us and requires no change on the hardfought side. A placeholder field can be added at the same place (For now, it will probably be called hf_reserved1 or something like that on the upsteam NetHack-3.7, since there won't be any code support for it there, at the time it is added anyway. You would just leave it the way it is on the hardfought-side. Adjust to rename the new field on hardfought (not add an additional field) the next time you sync with upsteam NetHack-3.7 after these changes..
This field that hardfought adds to include/monst.h: char former_rank[25]; /* for bones' ghost rank in their former life */
I'd like to propose handling that former_rank in a different way. Instead of housing it in the base monst struct as hardfought has it now (which makes it part of every monst in the game, whether it is needed or not), I'd like to relocate it into a new mextra struct.
This pull-request does just that. It adds an additional field called 'former' to the mextra struct, and adds supporting code to deal with it for the specific situation where it is needed. If the pull-request is accepted into hardfought 3.7, I can add similar functionality to upsteam NetHack-3.7 and once both places are changed, the savefiles should be compatible.
That will make it simpler when a savefile needs to be loaded while trying to debug and issue or bug report going forward.
I have the upsteam NetHack-3.7 change standing by once the fate of this pull request is known.
The changes, once incorporated, will not be compatible with existing save and bones files that preceded the changes.