Re: medit

From: Mike Breuer (mbreuer@new.rr.com)
Date: 03/20/01


From: "Edward Felch" <dustlos@HOTMAIL.COM>
Sent: Monday, March 19, 2001 9:11 PM


> I've added in some new variables (fire, water, etc resistence) for
> players/mobs and am wondering, what do i need to do so builders can edit
the
> resistences in medit.c, what kind of changes would need to be done and
what
> would i have to do to the files (*.mob files)?

The easiest way to modify the .mob files would be to add your variables as
e-specs.  Your mob file would contain something like:

...
8 8 1
Fire: 50
Water: 10
E

The following summarizes the places in your code that you will need to
change:

in db.c:

1. Add a case to interpret_espec(..) for each variable.
2. Set reasonable defaults at the top of parse_mobile (anyone know if
there's a better spot?)

in oasis.h:

Add #defines to the end of the MEDIT_??? (the numerical responses) for each
variable.

in genmob.c:

Add lines to write_mobile_espec(..) to output your variables (this is what
saves them to the .mob file after you use medit)

And, saving the best for last, make the following changes in medit.c:

1. Set reasonable defaults in medit_setup_new(..)
2. Make copies of your variables in medit_setup_existing(..)
3. Add your descriptions and current values to the sprintf in
medit_disp_menu
4. In medit_parse_menu, add a case for each variable under the case
MEDIT_MAIN_MENU (there is a switch within that case...add it there).  Use
case 'g' as an example (or any of the numeric cases)
5. Finally, in the same function under case MEDIT_LEVEL (or somewhere around
there), add a case for each of the variables using the defines from oasis.h.
Follow the examples for the other numeric fields.

I ran through this rather quick, so please let me know if it seems that I
left anything out.

Mike

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/04/01 PST