Ok everyone... i added a mob to an existing area and removed the proto flag... buuut when i reboot the mud its gone.. as is all the changes i made to my area. I am knew to building and this is annoyng me to no end... please help.
i feel dumb...... mset question
Posted by QTipOfDeth on Fri 02 Nov 2001 12:28 AM — 8 posts, 30,084 views.
Well,
There could be several reasons why your mob did not save. First of all if you are referring to a mob spawning in a particular location, you may not have a reset created for it. If you are refering to a newly created mob not saving at all, try aassigning the area to yerself, then make sure your hi_mob value at least matches the new vnumb. Do that with aset. If for example you set an areas low_mob to 1000 and the hi_mob value to 2000. And you only have mobs 1000, 1001, 1002, and 1003. The code will automatically change your hi_mob value to 1003. If you created a new mob (lets just say 1004) and you didnt manually change the hi_mob value for your area to at least 1004, when you fold the area your changes will not save.
Hope this helps,
Kelsid
P.S. No such thing as a dumb question, we all ask them, it's called learning.
There could be several reasons why your mob did not save. First of all if you are referring to a mob spawning in a particular location, you may not have a reset created for it. If you are refering to a newly created mob not saving at all, try aassigning the area to yerself, then make sure your hi_mob value at least matches the new vnumb. Do that with aset. If for example you set an areas low_mob to 1000 and the hi_mob value to 2000. And you only have mobs 1000, 1001, 1002, and 1003. The code will automatically change your hi_mob value to 1003. If you created a new mob (lets just say 1004) and you didnt manually change the hi_mob value for your area to at least 1004, when you fold the area your changes will not save.
Hope this helps,
Kelsid
P.S. No such thing as a dumb question, we all ask them, it's called learning.
Well that solved that problem..... the new poroblem is though. i cant edit anything in darkhaven. i edit it.. save it and fold it.. but its gone after reboot. whats up with the area? or am i just flat doing something wrong
Read My posting about the strange bug with online building... The same thing applies to mobs as well as objects. I know exactly what you are saying, as I had that problem (before I ripped apart the code). The problem is in the fold_area function in build.c
Take a look at it closely, and you'll see that it saves the Index Pointers (the ones it got from your save files) rather than the Mob/Obj pointers (The Ones that you change when you are manually using mset/oset). In short it saves the same thing to the disk that it loaded. The easiest way to change that, is to alter the mset and oset commands to write the changed data to both the mob/obj pointer and the mob/obj Index pointer (Thus saving the data altered to the file). If you need the exact code, just let me know.
-Kelsid
Take a look at it closely, and you'll see that it saves the Index Pointers (the ones it got from your save files) rather than the Mob/Obj pointers (The Ones that you change when you are manually using mset/oset). In short it saves the same thing to the disk that it loaded. The easiest way to change that, is to alter the mset and oset commands to write the changed data to both the mob/obj pointer and the mob/obj Index pointer (Thus saving the data altered to the file). If you need the exact code, just let me know.
-Kelsid
yeah i will need that code.. thanks for all your help!
Ok,
You got alot of little changes to make, all of them are in build.c. Im not gonna list the entire code, but you should get the general idea.
if function do_mset search for all the strings simmilar to this example:
The bolded areas are what need changing. Just simply remove the ACT_PROTOTYPE portion.
Ex. change the bolded line to:
-Continued on Next Posting
You got alot of little changes to make, all of them are in build.c. Im not gonna list the entire code, but you should get the general idea.
if function do_mset search for all the strings simmilar to this example:
if ( !str_cmp( arg2, "sav1" ) )
{
if ( !can_mmodify( ch, victim ) )
return;
if ( value < -30 || value > 30 )
{
send_to_char( "Saving throw range is -30 to 30.\n\r", ch );
return;
}
victim->saving_poison_death = value;
if ( IS_NPC(victim) && xIS_SET(victim->act, ACT_PROTOTYPE) )
victim->pIndexData->saving_poison_death = value;
return;
}
The bolded areas are what need changing. Just simply remove the ACT_PROTOTYPE portion.
Ex. change the bolded line to:
if ( IS_NPC(victim) )
-Continued on Next Posting
Ok... You need to do that for all of the arguments to the mset command.
Now for oset.
Heres another example... Just remove the ITEM_PROTOTYPE stuff...
If you run into any snags... just ask..
-Kel
Now for oset.
if ( !str_cmp( arg2, "name" ) )
{
bool proto = FALSE;
if ( IS_OBJ_STAT(obj, ITEM_PROTOTYPE) )
proto = TRUE;
if ( proto && !can_omodify( ch, obj ) )
return;
STRFREE( obj->name );
obj->name = STRALLOC( arg3 );
if ( proto )
{
STRFREE(obj->pIndexData->name );
obj->pIndexData->name = QUICKLINK( obj->name );
}
return;
}
Heres another example... Just remove the ITEM_PROTOTYPE stuff...
If you run into any snags... just ask..
-Kel
**Heres another example... Just remove the ITEM_PROTOTYPE** **stuff... **
**If you run into any snags... just ask.. **
What exactly do i need to remove, and what do i replace it with?
Thanks!
I'm having a similar problem.