Cataclysm-dda: Check for no-VARSIZE but FIT items (upon savegame load?)

Created on 10 Jan 2017  路  6Comments  路  Source: CleverRaven/Cataclysm-DDA

EDIT: As outlined in PR #20048 that closed this, turns out we do have a mechanism for such changes. They're better fit for making items obsolete (i.e. no longer appearing in new worlds), but can be used for item changes, too.

It'd be a burden on the committer, but would solve the issues mentioned throughout the discussion below.


Brought up as part of #19988 (see for some discussion):

Any items that were fitted before this change will stay that way, further lowering their encumbrance.

The change referenced is switching some items in JSON from having VARSIZE to not having it. That is, from being "fittable" and possibly having the FIT tag (flag?) to being "one size fits all", bu still retaining FIT tag if a previous save is used.

Have taken a cursory look, - grep -R VARSIZE src - and there seems to be no check for this. Such item would result in reduced encumbrance (compared to JSON definition). Haven't checked grep -R FIT src yet.

<Suggestion / Discussion> Good First Issue Info / User Interface

Most helpful comment

Annoying, never use debugmsg for things that aren't broken.

All 6 comments

Added a check when FIT is applied so it doesn't give the encumbrance buff, Someone can clean up the non-matching fit flags on game load if they like, but I don't see the point.

For reference, 7034c4040ba56532e6d450c9ed5ab7a966ab9ef3

Guess OK to close.

Forgot what I saw while reviewing other uses of the flags - reopening.

The "subtle bugs" mentioned by @Coolthulhu in #19988 are, for example: items that still have FIT will have displayed name and description modified (EDIT: I guess?). E.g. seeing in the inventory:

  • pair of hand wraps (fits)
  • pair of hand wraps

Very minor, and goes away upon character death, but still confusing.

The underlying issue is, again as @Coolthulhu mentioned, "flags that need other flags to work".


EDIT: typo

Which is more confusing, the clothing that you specificically remember
modifying no longer saying it is modified, or that clothing continuing to
say it's modified, and (due to adjusting the underlying stats), acting
exactly as if it was in fact still modified? The only time the latter
looks like a bug is if you compare a "fitted" item to an "unfitted" item of
the same type and realize that they have the same stats, but IMO that is
going to happen less often than people noticing that their clothes seem to
have lost some state, so it has lower impact.

Chm, correct.

I imagined the save-loading code to have a debugmsg alerting the player that some properties are being removed from their items, a-la:

Item X that could be previosly fitted is now "one size fits all". This message is safe to ignore.

Would this be reasonable or annoying?

Annoying, never use debugmsg for things that aren't broken.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tsunder picture Tsunder  路  3Comments

ituluwituluwzev picture ituluwituluwzev  路  3Comments

2birdie picture 2birdie  路  3Comments

Coolthulhu picture Coolthulhu  路  3Comments

Coolthulhu picture Coolthulhu  路  3Comments