Welcome to the Builder Academy

Question Checking Encumberance

More
07 Oct 2017 20:34 #6966 by Papaya Pete
Replied by Papaya Pete on topic Checking Encumberance
I've done some testing with encumbrance; the movement cost increase does indeed work. I had a ranger running around adventuring in some woods, and once he became moderately encumbered it was more slow going. I did catch a small bug.
Code:
int check_encumbrance(struct char_data *ch, int situation) { int maxcarry = CAN_CARRY_W(ch); int current = IS_CARRYING_W(ch); // <---------------- W instead of N, was messing everything up. int condition = 0, penalty = 0; float percent = 0;

Seems to be fixed after that. I noticed it when I took of my goods-laden backpack.

On a side note, I also found another couple bugs and a crash with object durability; I was redoing how item damage is done, making a new function that is called. I added in some code, too, reusing some of the OVALs so that object material is more easily stored. Better than using flags. My plan is to add in fire, steam, electrical, etc. damage that will deal different amounts of damage to gear based on the material of the piece of equipment. Not going to have damage dealt to bags and clothes just to be convenient (and a little kinder) to players. Also, doing item damage this way means I can differentiate between, say, copper and iron other than giving one higher durability than the other.

Please Log in or Create an account to join the conversation.

Time to create page: 0.221 seconds