Login
User Name:

Password:



Register

Forgot your password?
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
Users Online
AhrefsBot, DotBot

Members: 0
Guests: 28
Stats
Files
Topics
Posts
Members
Newest Member
489
3,791
19,644
596
Elwood

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » General » Building » Increasing Swrfote 1.4 aviala...
Forum Rules | Mark all | Recent Posts

Increasing Swrfote 1.4 avialable vnumbers
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Dec 11, 2011 5:55 pm   
Go to the top of the page
Go to the bottom of the page

The_Grumpy_1
Fledgling
GroupMembers
Posts2
JoinedDec 11, 2011

 
Hello Hope I am doing this right. I am not a c or c++ programer but would like to increase the avialable vnumbers in swrfote 1.4 from 32k to 1000k. So far I have not been able to find where (the file) the number of vnums are set. Hope someone can help me out and thanks.
Good Luck, The_Grumpy_1

Post is unread #2 Dec 12, 2011 6:59 pm   
Go to the top of the page
Go to the bottom of the page

InfiniteAxis
Off the Edge of the Map
GroupAdministrators
Posts1,200
JoinedMar 21, 2006

 
Can you give me a little more info?

What command are you using to assign the vnums? What output is it giving you?

Post is unread #3 Dec 13, 2011 4:57 pm   Last edited Dec 13, 2011 4:58 pm by ayuri
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

 
Max vnums are defined in mud.h
Somewhere around line 236 or so, you should see a define:
#define MAX_VNUMS

Change it to whatever size you want it to be.

There are other places you'll need to change as well. build.c has a lot of refrences to the old 32000 hard coded value. You'll need to change those to match what you have in mud.h. I suggest you grep though build.c and look for something like this:
if( evnum < 1 || evnum > 32000 )

Note, that that may or not not be exact in every case. There were quite a lot of places that had to be changed. I can't remember if I had to modify db.c or any other file. I honestly recommend searching for the value 32000, and taking it on a line by line basis.

I think the max vnums you can have is the size of an int -1.

What I did in most cases was change the hard coded value to the define of MAX_VNUMS. That way if I ever changed mud.h's define, they all get changed and I don't have to worry about editing each and every file.

Hope it helps,
ayuri

Post is unread #4 Dec 18, 2011 10:40 pm   
Go to the top of the page
Go to the bottom of the page

The_Grumpy_1
Fledgling
GroupMembers
Posts2
JoinedDec 11, 2011

 
I am going for a increase of mob, objects, and rooms. I can not aassign or use any number over 32400. I did look for a #define MAX_VNUM did not find one I also tried the grep 32000 and found nothing. Thanks and Merry Xmas, The_Grumpy_1

Post is unread #5 Dec 20, 2011 6:46 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,917
JoinedJul 26, 2005

 
$ grep 32767 *
act_move.c:   if( in_room->vnum > 32767 )   /* room is virtual */
act_wiz.c:   if( Start < 1 || End < Start || Start > End || Start == End || End > 32767 )
act_wiz.c:   if( argi < 1 || argi > 32767 )
build.c:   if( Start < 1 || End < Start || Start > End || Start == End || End > 32767 )
build.c:      if( value < 0 || value > 32767 )
build.c:      if( value < 0 || value > 32767 )
build.c:      if( value < 0 || value > 32767 )
build.c:   if( vnum < 1 || vnum > 32767 )
build.c:   if( vnum < 1 || vnum > 32767 )
db.c:   if( low_range < 1 || low_range > 32767 )
db.c:   if( high_range < 1 || high_range > 32767 )
mud_prog.c:      if( vnum < 1 || vnum > 32767 )
mud_prog.c:      if( vnum < 1 || vnum > 32767 )
mud_prog.c:      if( vnum < 1 || vnum > 32767 )
mud_prog.c:      if( vnum < 1 || vnum > 32767 )
mud_prog.c:      if( vnum < 1 || vnum > 32767 )
mud_prog.c:      if( vnum < 1 || vnum > 32767 )

So it is used quite a bit to limit you. There is no MAX_VNUM which I would advise adding a #define MAX_VNUM 2000000000 in mud.h and then change all those 32767 to MAX_VNUM for ease later.

Post is unread #6 Dec 21, 2011 9:37 pm   
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

 
Ahh Remcon, you are correct!
I'm sorry, I completely blanked that I added all that fun stuff in. Thought I was in a stock directory when I was digging about. Blah, see what I get for trying to be helpful.

ayuri

Post is unread #7 Dec 22, 2011 4:47 am   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,917
JoinedJul 26, 2005

 
No worries :) what you posted is of course is a good way to set it up.

Pages:<< prev 1 next >>