Re: [QUESTION] More Spells?!?!?

From: Rasmus 'Con' Ronlev (raro94ab@hp4.econ.cbs.dk)
Date: 02/20/97


On Thu, 20 Feb 1997, Ghost Shaidan wrote:

> This is a question on my list to figure out, I am _GUESSING_ you can
> change the MAX_SKILLS (but it says not to change ???)  in structs.h and
> then renumber your skills, npc skills, and top_spell_define AND  weapon
> attack types.  (I think thats it)
> Changing these in spells.h should do it.  (just not sure about the
> DO*NOT*CHANGE warning in structs.h and dont know enough to figure out why)

Well, the short sweet and shocking explanation is the fact, that
MAX_SKILLS is used somewhere in the pfile data that is saved, thus is you
change the size of the spell/skill array, you will corrupt your
playerfile. You can do four things:

1. Keep the array size, and adjust the
MAX_SPELLS/MAX_SKILLS/TOP_SPELL_DEFINE definitions.
(You actually have TOP_SPELL_DEFINE spell slots, but only MAX_SKILLS are
saved in the pfile if I remember correclty - the rest are NPC spells)

2. Keep the stuff as it is, and tell players to go play another mud if
they want more spells/skills :p

3. Make a conversion utility that loads the pfile(s), and saves them
(another place) with a bigger MAX_SPELLS array, then adjust that to fit
the size in the mud structure too. One thing to _NOTE_ here is, that you
*phuck* arround with the learned spells if you change the MAX_SPELLS. If
you make MAX_SPELLS 100 bigger, save the skills with an offset of +100 in
the converted pfiles b4 loading them onto the mud!

4. Make use of the ascii-pfile conversion and mud-use utility. Thing
Samedi made this one, and you can find it on his ftp site (which I don't
recall :P). Thus first make all the pfiles ascii based, and then adjust
the MAX_SPELLS/MAX_SKILLS to suit your needs. Again you should watch the
repossitioning of the skills if you adjust MAX_SPELLS, you should move the
skills in the pfile acordingly...

Well, 4 options varyong degrees of usability, portability and consumption
of time :) Personally I think making ascii pfiles is a winner, and when
you are at it, why not make every other file ascii-based too ? :)
This does add greatly to the flexibility of adding new stuff, like I've
done. Since making a LARGE pfile struct with tons of free space for
expansion seems a little uneffective in the long run *grin*

> Ack what a babble, If i am way off or even just a little, please let this
> guy know so he doesnt break his mud based on this pseudo advice *8)

He DOES break the mud on your advice if he adjusts the MAX_SKILLS!
Changing MAX_SPELLS in itself doesn't break anything, but it corrupts the
skills-learned since they'll still be where they were last saved i.e.
where MAX_SPELLS+1 was b4 the change, thus making a lot of people cry
about not knowing their skills *g*

Oh yeah, and I tried 3 out of the 4 possible solutions over time *cackle*
And no, I didn't adjust the pfile-array accordingly, so I had everyone cry
about the lost skill learned values *blush*

Regards,
Con

d.
--
     Rasmus Rønlev DOEK'94      WWW: http://www.econ.cbs.dk/people/raro94ab
     Student instructor         MUD: exiled.mud.circlemud.org 5000
                                         199.199.16.100 5000
       Student, B.Sc in Computer Science and Business Administration.

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
|    Or send 'info circle' to majordomo@cspo.queensu.ca     |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST