Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » help with number of items in ...
Forum Rules | Mark all | Recent Posts

help with number of items in inventory?
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Apr 22, 2009, 11:03 pm
Go to the top of the page
Go to the bottom of the page

irbobo
Fledgling
GroupMembers
Posts16
JoinedApr 8, 2009

I've been diggin thru the code like crazy trying to find where to set how much a player can hold at a time? Basically want to jack that number way up. I'm working with smaugfuss 1.9
       
Post is unread #2 Apr 23, 2009, 6:08 am
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Grep would help you find it.

I think it's a function in handler.c but I can't remember the name offhand.
       
Post is unread #3 Apr 23, 2009, 8:02 am
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

You're probably going to want to grep for can_carry, just to expand on Zeno's hint. :wink:
       
Post is unread #4 Apr 26, 2009, 10:14 pm
Go to the top of the page
Go to the bottom of the page

irbobo
Fledgling
GroupMembers
Posts16
JoinedApr 8, 2009

Cool.. Well I made some changes to function can_carry_n( CHAR_DATA * ch ) in file handler.c in SmaugFUSS 1.9

changed to:
/*
 * Retrieve a character's carry capacity.
 * Vastly reduced (finally) due to containers		-Thoric
 */
int can_carry_n( CHAR_DATA * ch )
{
   int penalty = 0;
   int carry_minimum = 5;
   int carry_maximum = 200;

   if( !IS_NPC( ch ) && ch->level >= LEVEL_IMMORTAL )
      return get_trust( ch ) * 200;

   if( IS_NPC( ch ) && xIS_SET( ch->act, ACT_IMMORTAL ) )
      return ch->level * 200;

   if( get_eq_char( ch, WEAR_WIELD ) )
      ++penalty;
   if( get_eq_char( ch, WEAR_DUAL_WIELD ) )
      ++penalty;
   if( get_eq_char( ch, WEAR_MISSILE_WIELD ) )
      ++penalty;
   if( get_eq_char( ch, WEAR_HOLD ) )
      ++penalty;
   if( get_eq_char( ch, WEAR_SHIELD ) )
      ++penalty;
   return URANGE( carry_minimum, ( ch->level + 200 ) / 5 + get_curr_dex( ch ) - 13 - penalty, carry_maximum );
}


seemed to do the trick 8 )
       
Post is unread #5 Apr 27, 2009, 5:23 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

You know, when you have numbers that high, I'm not sure it really makes a difference anymore to have the penalty logic. It adds complexity, and really between 200 items carried and 198, there's not much of a difference.
       
Post is unread #6 Apr 27, 2009, 8:33 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

To each their own, eh?
       
Pages:<< prev 1 next >>