@Nathan: RE: having an extra check. This is just my opinion, but I don't see the need to check if a thing is "an item" or not. Just treat everything as a thing. Pretty much any scenario you can come up with where you'd think you'd need to check if a thing is an item, I'd make the argument that there's not really a need to do so. Check properties of a thing, not whether a thing is some arbitrary and confusing concept like "an item." Size, weight, material(s), etc. are much more flexible anyway.
@Nathan: RE: having an extra check. This is just my opinion, but I don't see the need to check if a thing is "an item" or not. Just treat everything as a thing. Pretty much any scenario you can come up with where you'd think you'd need to check if a thing is an item, I'd make the argument that there's not really a need to do so. Check properties of a thing, not whether a thing is some arbitrary and confusing concept like "an item." Size, weight, material(s), etc. are much more flexible anyway.
Well, I wanted to make a thing like a table not fit in the inventory, period. Having two types meant I didn't need to check. Properties are a nice idea, but it makes it harder to think about in one's head to some extent. They also afford the possibility of bugs that could cause say, a dead troll be small enough and/or light enough to fit in your pocket when that's not true. I know it's more flexible and less code heavy to use properties, but for whatever reason I'm a bit anti properties style stuff.
I don't know, a dead halfling corpse would probably be a thing and not a player, of course then it might make it tricky to resurrect them. I suppose it's easier in that case to have a player with a DEAD marker of some kind. It's easier to work with objects when you clearly spell out what can be done with or to the objects, respectively.
If you, like others, use the concept of a "brain" or "soul" for players, then it becomes trivial. A dead player is separated from his body (corpse). You can then either allow the player to wander around as a soul (ghost) and make it back to his body (corpse), at which point he is resurrected, or you can send the player to hell/purgatory/whatever and leave his corpse behind. The body is always just a thing. With or without its controlling brain.
At least, that's the route I took, anyway. Whether or not an ogre can stuff a dead halfling in its pocket then just becomes a matter of checking properties:
* Is the ogre strong enough to lift the halfling (check halfling weight vs. ogre strength)? * Is the ogre's pocket big enough to fit the halfling into it (check halfling size vs. pocket size limit)?
If you, like others, use the concept of a "brain" or "soul" for players, then it becomes trivial. A dead player is separated from his body (corpse). You can then either allow the player to wander around as a soul (ghost) and make it back to his body (corpse), at which point he is resurrected, or you can send the player to hell/purgatory/whatever and leave his corpse behind. The body is always just a thing. With or without its controlling brain.
At least, that's the route I took, anyway. Whether or not an ogre can stuff a dead halfling in its pocket then just becomes a matter of checking properties:
* Is the ogre strong enough to lift the halfling (check halfling weight vs. ogre strength)? * Is the ogre's pocket big enough to fit the halfling into it (check halfling size vs. pocket size limit)?
And so on…
The distinction is that my system is pretty limited right now, and a player is just a player object. It represents a player but has limited, if any, tangibility. You can't pick up a player at all, which probably calls for some kind of fix, but that's how it is. I haven't got it implemented, but I was planning to have a sort of notion of "carrying" something, but not being able to put it in your pocket. So, if you had weapons out, you wouldn't be able to carry anything in your hands, but maybe on a shoulder. One problem is that having "slots" is a limiting factor, so I guess it'd have to be treated like virtual inventory where I keep some data about what's being held where and whether or not it breaks some limit.
To be honest, the only way a player could be even be DEAD in my system would be if I assumed that 0 or -X hp meant being dead. Right now, that would not prevent a player from walking around or doing things – it'd be no limitation at all. Frankly, that needs fixing. Thanks for helping me to think about that.
Some kind of notion of soul would be good, but I don't have one. I'll remember to put that on the list of priorities. :)
**I have at least a few (probably more) design problems that hail from trying early on in writing the code to transition from a MU*-esque system where combat and many things are not important (or implemented for that matter), but may be RPed as desired (something I'm a bit more familiar with) – not much facility for that either I'm afraid :(, over to a MUD style system. That obviously introduced new problems I hadn't thought about yet.