
Pages:<< prev 1 next >>



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
Good Luck, The_Grumpy_1


Off the Edge of the Map

GroupAdministrators
Posts1,199
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?
What command are you using to assign the vnums? What output is it giving you?


Magician

GroupMembers
Posts239
JoinedJun 13, 2008
Max vnums are defined in mud.h
Somewhere around line 236 or so, you should see a define:
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:
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
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



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



Geomancer

GroupAdministrators
Posts1,992
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.



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
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



Geomancer

GroupAdministrators
Posts1,992
JoinedJul 26, 2005
No worries
what you posted is of course is a good way to set it up.

Pages:<< prev 1 next >>