Welcome to the Builder Academy

Question Increasing Max Vnums.

More
08 Jul 2016 04:13 #6090 by Liko
Increasing Max Vnums. was created by Liko
Hello,
Are we able to increase the max vnums available? What files would I need to change to convert it from int to long long?

Randian(0.0.0)
Owner/Developer

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

More
08 Jul 2016 04:16 #6091 by Liko
Replied by Liko on topic Increasing Max Vnums.
In structs.h
Code:
/* Various virtual (human-reference) number types. */ typedef IDXTYPE room_vnum; /**< vnum specifically for room */ typedef IDXTYPE obj_vnum; /**< vnum specifically for object */ typedef IDXTYPE mob_vnum; /**< vnum specifically for mob (NPC) */ typedef IDXTYPE zone_vnum; /**< vnum specifically for zone */ typedef IDXTYPE shop_vnum; /**< vnum specifically for shop */ typedef IDXTYPE trig_vnum; /**< vnum specifically for triggers */ typedef IDXTYPE qst_vnum; /**< vnum specifically for quests */ /* Various real (array-reference) number types. */ typedef IDXTYPE room_rnum; /**< references an instance of a room */ typedef IDXTYPE obj_rnum; /**< references an instance of a obj */ typedef IDXTYPE mob_rnum; /**< references an instance of a mob (NPC) */ typedef IDXTYPE zone_rnum; /**< references an instance of a zone */ typedef IDXTYPE shop_rnum; /**< references an instance of a shop */ typedef IDXTYPE trig_rnum; /**< references an instance of a trigger */

I am wondering if these are what contain the def for vnums?

Randian(0.0.0)
Owner/Developer

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

More
08 Jul 2016 15:00 #6092 by thomas
Replied by thomas on topic Increasing Max Vnums.
At the top of structs.h ( github.com/tbamud/tbamud/blob/master/src/structs.h#L40 ), this bit allows you to alter them all in one place:
Code:
#if CIRCLE_UNSIGNED_INDEX # define IDXTYPE ush_int /**< Index types are unsigned short ints */ # define IDXTYPE_MAX USHRT_MAX /**< Used for compatibility checks. */ # define IDXTYPE_MIN 0 /**< Used for compatibility checks. */ # define NOWHERE ((IDXTYPE)~0) /**< Sets to ush_int_MAX, or 65,535 */ # define NOTHING ((IDXTYPE)~0) /**< Sets to ush_int_MAX, or 65,535 */ # define NOBODY ((IDXTYPE)~0) /**< Sets to ush_int_MAX, or 65,535 */ # define NOFLAG ((IDXTYPE)~0) /**< Sets to ush_int_MAX, or 65,535 */ #else # define IDXTYPE sh_int /**< Index types are unsigned short ints */ # define IDXTYPE_MAX SHRT_MAX /**< Used for compatibility checks. */ # define IDXTYPE_MIN SHRT_MIN /**< Used for compatibility checks. */ # define NOWHERE ((IDXTYPE)-1) /**< nil reference for rooms */ # define NOTHING ((IDXTYPE)-1) /**< nil reference for objects */ # define NOBODY ((IDXTYPE)-1) /**< nil reference for mobiles */ # define NOFLAG ((IDXTYPE)-1) /**< nil reference for flags */ #endif
Change the first line to something that fits your scheme
Code:
# define IDXTYPE u_int /**< Index types are unsigned ints */
Or similar.

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

Time to create page: 0.206 seconds