Re: [CODE] Restring

From: Matthew Lowe (
Date: 02/04/99

Well, Lately I've just added vehicals into my mud + olc support. Anyways
the things I did for vehicals or method I should say seems to be exactly
what you could be looking for.

Just an over view of what my vehicals do then I'll explain how they
affect you. Vehicals are like portable houses plus they add things to
you damm roll and ac, etc. These vehicals can be saved and unsaved at
the parkcade(A simple spec proc).

The main part that applies is the part of how the vehicals are saved.
First off I made an exact duplicate of the obj_file_elem and added all
the important vehical elements to the duplicate.(That doesn't apply to
you) But if you were to add strings to your objects you would add a
string element in the obj_file_elem. The length should be
MAX_STRING_LENGTH or perhaps a custom size(I'm not sure what all the
constants are off hand) Then in the function which dumps all the
important information from obj_data to obj_file_elem just do a simple
copy between the strings. This will of course ruin all your objects...
UNLESS, you do some thinking and only make it write the new objects.
Then every one would just have to log in and then rent again. But their
would be problems(Eg. The struct it reads and writes are the same so
when you change the one to write it, the same thing will apply to the
part to do with reading the objects) In other words without ruining the
pfiles it would be quite hard.
Jourge Bush

Now to make

See I made a struct called vehical_specs and also made ITEM_VEHICAL a
container (Kinda like portable houses) anyways with a few modified
command in act.informative and a little spec proc for a parkcade manager
people could put items in their vehicals move around in them and park
them. The main part I'm getting at is the spec proc. Personally I made
an identicle struct as the obj_save_elem (called vehical_specs) and then
just added in the vehical parts I needed to save (so the actual object
files didn't get too big and it didn't ruin the current object files.
Anyways what you would do is simply add in a string to the
obj_save_elem, then in the function which copys over all important info
to obj_save_elem just add the string you created before.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

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