Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
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
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Yandex, Sogou, Bing, DotBot

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » 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, 3: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, 4:59 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
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, 2:57 pm   Last edited Dec 13, 2011, 2: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, 8: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, 4:46 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
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, 7: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, 2:47 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

No worries :) what you posted is of course is a good way to set it up.
       
Pages:<< prev 1 next >>