Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ i feel dumb...... mset question

i feel dumb...... mset question

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by QTipOfDeth   (6 posts)  Bio
Date Fri 02 Nov 2001 12:28 AM (UTC)
Message
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.
Top

Posted by Kelsid   USA  (35 posts)  Bio
Date Reply #1 on Fri 02 Nov 2001 05:16 AM (UTC)
Message
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.

-Kelsid
Top

Posted by QTipOfDeth   (6 posts)  Bio
Date Reply #2 on Sat 03 Nov 2001 02:13 PM (UTC)
Message
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
Top

Posted by Kelsid   USA  (35 posts)  Bio
Date Reply #3 on Sun 04 Nov 2001 10:37 AM (UTC)
Message
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

-Kelsid
Top

Posted by QTipOfDeth   (6 posts)  Bio
Date Reply #4 on Sun 04 Nov 2001 05:19 PM (UTC)
Message
yeah i will need that code.. thanks for all your help!
Top

Posted by Kelsid   USA  (35 posts)  Bio
Date Reply #5 on Mon 05 Nov 2001 08:15 AM (UTC)
Message
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:



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

-Kelsid
Top

Posted by Kelsid   USA  (35 posts)  Bio
Date Reply #6 on Mon 05 Nov 2001 08:25 AM (UTC)
Message
Ok... You need to do that for all of the arguments to the mset command.


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

-Kelsid
Top

Posted by Travis   (8 posts)  Bio
Date Reply #7 on Tue 05 Feb 2002 04:41 AM (UTC)
Message



**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.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


21,924 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.