Re: [code] Playerfile conversion

From: Rasmus 'Con' Ronlev (raro94ab@hp4.econ.cbs.dk)
Date: 10/04/96


On Thu, 3 Oct 1996, Thomas Pedersen wrote:

> I'm reaching the limit of the experience field (int) and need to convert
> it to longint.  Does anyone have a utility of such kind already? (i'd hate
> to wipe the pfile -again-).

Well, I've managed to write some utilities to convert the pfiles, so
they've stayed 'unwiped' for the past 8 months or so, even though the
format of them has been changed quite a lot. Currently I've junked all of
the code though, to start from scratch at some time, to see if I can make
up a better (read: more flexible) converter than I've been using.
Currently I havent found any easy way, you have to write a utility that
loads each playerfilerecord and it's .objs file (if you change that too),
and writes it either OVER the existing file (not a good idea unless you
load all the stuff you convert into memory first :p) or simply puts the
converted/new data in a new set of files.

I beleave I saw a skeleton you can use on the snippets page that is
refered to on this list once in a while (ask someone else on this list for
the adress of it :P). Furthermore thre is a 2.2 -> 3.0 playerfile
converter in the 3.0bpl11 distribution. Those two pieces of code might be
just what you're in need of, to get an idea of, how it's done.

> Hopefully we'll see ascii pfiles in the future.

Well, ascii playerfiles ain't all glory :P You can have people mess
arround with it easily, and I've been told that on some operating systems
it will use a tremendous amount of space, not to mention that a flexible
ASCII player/obj/etc. file system would have to include a lot of 'fill'
information, like what type of field you are loading/saving etc. Ofcourse
the upside is, that it will (sometimes :P) be easier to add/delete entries
in ascii file formats, and that the portability will be very high (unless
some OS refuses to read ASCII pfiles *grin*).

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   |
+-----------------------------------------------------------+



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