If something other than the doodad is carried by the player

Hey all–

I want to limit the player’s carrying capacity to one other item when the player carries a large, unwieldy object. This means they’ll have to drop or pocket things they’re carrying if they’re carrying the doodad and they try to pick something else up.

How do I get this to work? I’ve tried “if something other than the doodad is carried by the player” and “if the player carries something other than the doodad.” I can’t see how to modify “The carrying capacity of the player is X” to trigger only when the player is carrying the doodad. All the examples I can find in the docs limit generic carried items, and I want to limit inventory only when a specific thing is carried. I suspect I have to assign weights to items and a weight limit to the player, but I’m hoping there’s an easier way to make this syntax work.


1 Like

You might try Bulk Limiter by Eric Eve.

You might also just want to look at the source for the extension (which is really short), and adapt that.

1 Like

Does this mean you’ve already implemented a pocket as some sort of container which is part of a worn thing or some other type of worn / carried holdall?

If so, the answer to your question will depend upon those details.

1 Like

What should happen if the player is already carrying two other things when they pick up the doodad? Should that be forbidden?

Inform redirects practically all actions that would move something into your inventory to go through “taking”. In other words, if you want to put restrictions on the player adding something to their inventory, you can put those restrictions on the “taking” action and they’ll also apply to implicit taking, removing it from, etc.

Definition: a thing is small if it is not the doodad.
Instead of taking the doodad when the player carries at least two things:
    say "You don't have a hand free. You'll need to drop something first."
Instead of taking anything when the player carries the doodad and the player carries a small thing (called the item):
    say "The doodad is so heavy that you can barely carry [the item], let alone anything else. You need to set something down first."

Ah, thanks. Defining everything else as small is the ticket here. I’m good to go!

Is pocketing intended to be manual with a pocket command? If the pocket were a player’s holdall, you’d get the transfer-stuff-to-pocket behavior automatically but there would be different considerations in making the lamp restriction work.

If it is manual, I’d be inclined to smoosh it into one rule, but that’s just a style preference.

check taking something when the number of things carried by the player > 1:
  if the noun is the lamp or the player holds the lamp, instead say "The lamp is so bulky you'd have to drop something to do that."