Friday, July 5, 2013

Inventory Tracker: Character Object

I'm really new to object-oriented programming (OOP) but I'm trying to see how it could be accomplished in a programming language I know and understand a little, namely C. I've worked up a list of all the "objects" I would need for the program to work. The overhead on the memory side is going to be taken up by the graphical needs for all the icons and storage for important data. Ideally I would love to have ALL the info required to run a game attached to this program, but for now inventory is my main concern.

OBJECT 1: CHARACTER
This is the main object of the system, and each user should be able to store multiple instances of other objects on this unique object. All data will be saved with this unique object name (Character Name). This object will have some predefined (drop-box) entries, and some user-input data used to determine what other objects can be equipped in certain slots. Specifically these are:
  • Race: determines size and type of character
  • Height: determines maximum size of weapons that can be wielded.
  • Weight: used in determining maximum weight allowance.
  • Strength: main determinant for weight allowance.

More or less, the D&D game assumes that a character is man-sized (roughly 6'0") and weight (roughly 180 pounds for an average male). Those races shorter than this can only carry a fraction of the maximum allowance. Those whose strength is not typical for their race also have adjustments to what they can carry. All of this eventually affects movement rate so it is important to note.

We have established in our game that the encumbrance of a normal human of average strength is 500 coins of gear (roughly 50 lb) with no penalty to movement. Penalties from armor supersede this amount regardless of what is carried. Therefore, if the fighter is carrying nothing more than a few pounds of gear and his weapons, but is wearing chain mail armor, then his base move is 9" by default, regardless of strength. When the encumbrance penalty exceeds the movement penalty of the armor, then the movement rate decreases. So if the same fighter picks up enough loot to be down to 9", he is still only moving at 9" because his armor only allows him to move so fast.

Encumbrance drops by fourths. Therefore, an average strength adult male human carries up to 500 coins without penalty (12" movement), up to 1000 coins with reduced speed (9" movement), and up to 1500 coins with severely reduced speed (6" movement). Although it is not written in the game anywhere, I max out the load one can carry at their own body weight (3" movement). It seems silly that someone the size of Arnold Schwartzenegger could carry more than his own body weight for any length of time and still fight off attackers! This above value is adjusted for strength, which allows for someone to carry more than they normally could. The problem here is that SIZE of the character was never integrated into this formula. A smaller person (male or female) could not possibly carry the same amount as someone much larger than they are. Similarly, a halfling or gnome has no right carrying as much as a human could, seeing as they weigh less than half the weight to begin with. This is why I tend to limit maximum weight carried as body weight and adjust according. I would say that scaling the carrying capacity to the body weight of the character is the way to go. So an average character may only carry a percentage of his own weight and still move at full movement.

For example, an average human male, weighing 180 pounds and standing 6'0" could carry a maximum of 1800 coin encumbrance. Divide this into fourths, so normal movement (12" base) is up to 450 coins. This is fine so long as the character is of normal strength. At the upper level of strength, say 18/00%, this adds about 3,000 more coins to the weight allowance. Assuming that this stronger person also weighs significantly more (about 250 lbs. or so), their carrying capacity would be 5,500 coins or 550 lbs! WAYYYY too much for any mere mortal to carry. Therefore, perhaps the strength chart needs to be fixed to reflect a more curved increase, topping out at some maximum regardless of strength. Again, I have no definite answers here, but I'm certain that no character can carry 550 pounds of gear and loot and still move! Sure, I've seen the World's Strongest Man competitions but those are held under "near optimal" conditions and the feats of strength require a few minutes at most. We're talking about lugging treasure and gear though dangerous conditions that are less than sub-optimal.

So, do I base encumbrance on body weight alone or modified by strength? It would seem that running around with 50 lbs. on your back and body is encumbering enough for even the mighty men of the military. It can be done, but it backbreaking work. Then again, greed is a great motivator!

I could always go with the formula developed for Villains & Vigilantes which also takes Constitution into consideration. That formula was ((str/10)^3 + (con/10)) * (half body weight). This amount was how much a character could lift and remain standing. Using the above example of 180 lb. man and Str 11 with Con 10, would give us ((1.1)^3 + 1.0) * 90 = 210 lbs. A similar man weighing 250 lbs. with an 18/00% strength and 18 constitution would be able to lift ((1.8)^3 + 1.8) * 125 = 954 lbs! My God, that's a lot of weight, but 1/4 ton is MUCH  heavier than the current world record (580 lb by gold medalist Hossein R. of Iran who weighs 340 lb  at 6'1" himself). SO apparently that formula won't work.

My gut tells me that lifting and carrying on your person that much weight leads to exhaustion quickly. So what should be the maximum weight one can carry and still move relatively freely? My guess is that moving around with only 55% of one's maximum press should be more than sufficient as a maximum. For the 180 lb guy, this means that they can carry about 100 lbs. and move at a crawl (that's 1000 coins). Using the "fourths" rule, unencumbered weight is up to 250 coins, medium load, is up to 500 coins, heavy load is up to 750 coins and overloaded would be up to 1000 coins. Does this work for the upper bounds of human strength? Assuming that each point of Strength above 10 adds roughly 10 pounds to the person's frame (+10 pounds per bracket of percentile strength), a person with 18/00% strength would weigh roughly 300 lbs and could carry about 1650 coins of weight. Breaking this down, that's up to 412 coins at unencumbered, 825 coins at medium, 1237 coins at heavy, and 1650 at maximum. Remember, maximum encumbrance means carry and still move (even at 3" rate). Obviously, such a person should be able to lift their own body weight in bench press.

Does this translate to the smaller races? Well, dwarves are built similarly to humans, and even weigh about the same, so yeah, this could work just fine the same for dwarves. Halflings weigh on average about 60 lbs. This means that an average halfling male standing 3'0" tall can carry only 33 lbs. and is considered overloaded at that point. This breaks down as up to 83 coins for unencumbered, 165 coins for medium, 248 coins for heavy, and up to 330 coins for overloaded. A max strength halfling (17 Str) probably only gain 3 lbs per point over 10, so their body weight would be around 75 lb. and carrying capacity at 41 lb. Breakdown for this would be unencumbered up to 103 coins, medium at up to 205 coins, heavy at up to 307 coins, and overloaded up to 410 coins. The same thing would apply to gnomes. That's not very much, but more in line with the current method of calculating encumbrance!

At the risk of sounding sexist, I will not break this out for women. However, I would assume that Gygax would not have women as equal to men if only because they are less naturally muscular. There are exceptions to be sure, and I'm sure that dwarven or half-orc women are equal in this regard, but women are also smaller in stature so their frames are not as strong. Also, seeing a 18/75% strength  woman weighing close to 300 lbs seems excessive. I would say that women pack on only +5 pounds of muscle per point of Strength over 12 and that once they get to the upper brackets they are simply trading fat deposits for muscle weight so no extra weight gain at percentile strength. Small female gnomes and halflings probably only add in 1 pound per strength point over 12.

This is exhausting just thinking about it! Now I have to revamp my views and maybe talk to the others in the group to see what they think. Having an established chart on each character will likely help me decide if this makes sense or not. It will also help determine if this app is worthwhile. More at a later time!

No comments:

Post a Comment

B2: Of Monsters and Gygaxian Wisdom

I know it's been a while since I've posted anything on this blog, and I apologize. The last six months have been a whirlwind of acti...