Archived from groups: rec.games.roguelike.nethack (
More info?)
Jukka Lahtinen wrote:
> Adam Borowski <kilobyte@mimuw.edu.pl> writes:
>
>>Could we get the ten lowest bits of version_data->struct_sizes (it stores
>>VERSION_SANITY2) cleared in bone files, please?
> For bones from official binaries to be compatible with a patched game,
> ignoring the data when loading bones should be enough.
Check.
> For bones from a patched version to be compatible with official 3.4.3, you
> could fake the lowest bits of version_data->struct_sizes to be the same as
> in the official version, not cleared.
Check.
It would be nicer to have it cleared to 0 in 3.5.0, to keep people from
faking the data. The bogus value needs to be kept in sync with the
official version, and that makes patches less portable.
> I have a patched version that is bones compatible with the official 3.4.3
> even though I have SCORE_ON_BOTL defined and the official version doesn't.
> I reset the bit when saving bones (because it is not set with the official
> version), and ignore it when loading bones.
I see. Well done.
The problem is, you can hide SCORE_ON_BOTL from both save and bone
files, while sizeof(struct you) _is_ relevant for regular saves, and can
be ignored only for bones. This means, the functions need to be aware
if they are handling a save or a bonefile.
> It probably only takes little changes for these patches to make the game
> fake some bits in struct_sizes in bones files and ignore the same bits
> when loading bones, but I don't have time to test it before next weekend.
> If you do it, I'll gladly update my patces.
A tested and debugged version of a _specific application_ of such a
patch is at
http://nethack.angband.pl/conbon.patch -- it's tailored for
a particular patch it's accompanying, though. Too bad, it's the only
way until we manage to convince the DevTeam to get these bits zeroed --
every time you modify struct you, you need to update the signature length.
To turn it into a generic patch, one would need to delete all chunks
which mention FAKEBONEDIFF. In struct version_info,
VERSION_SANITY2-FAKEBONEDIFF needs to be replaced by
VERSION_SANITY2&(-1<<10).
I'm not uploading a modified version of the patch to not fool anyone
into thinking the generalized version is tested
1KB