Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-22-2002, 11:04 PM
madborg
Banned
 
Join Date: Jan 2002
Posts: 322
Default spawnedit, itemedit

this is mostly a placeholder/reminder for me:

Here is a fairly simple scheme that allows mobs and items to be edited:

basic
spawnedit mob-id property <value> or [values]
itemedit item-id ...

Actually, I would write the set in a slightly different format:

spawn.create[list of properties and values] returns mob-id
spawn.dest mob-id
spawn.prop? mob-id
mob.id? <target>
spawn.edit ...

Or spawn-edit, or spawn_edit

a more complex form would be a list of properties and values, including nested list:

[[moveto x y z] [texture 1239] [heading 45] [speed dx dy dz]]

this form allows you to do this:

spawn.edit id [
[moveto x y z]
[texture ...]
and so on
]
->update the spawn (as one action)

where if you did
spawn.edit moveto x y z
spawn.edit texture ...

causes N spawn update actions

fancier
This same format allows you to both define objects and manipulate objects. You can probably create packages this way too -- a sort of inheritance.

[[a 1] [b 2] [c 3]] + [[c 4]]=>
[a 1] [b 2] [c 4]

or a shortcut

define A=[[a 1] [b 2] [c 3]]
then [<op>[A][c 3]]

where <op> is some kind of operator

even fancier
finally, in a extended model, you would need r/w, w, ro for each property, addprop to add a property, delprop to delete a property, and some kind of object lock where properties cannot be added or deleted.

persistence
objects created this way must also be persistent.

format

the [] is just another form of lisp structures. Don't really need it for simple commands, but it is useful for more complex structures.
Then you can use list functions like first and rest. It also fairly easy to tear apart structures and glue them back together.

Or lisp-like:

(instance mob-id (addprop heading x)(addprop texture 1234))

and this whole thing would be fed to the spawn-edit function

(spawn-edit (instance mob-id(...)))

but would really be written as something like this:

spawn.edit id [heading x][texture 1234] or
spawn.edit id [
[heading x][texture 1234]
]


and finally...

loadfile <filename>

binary enhancements
{for compact files I guess}

not sure about this. The addprop format would allow the encoding to be like this:

(addprop a 1)(addprop b 2.0) (addprop c "xc")

which would get translated to:

addint ptr-a literal 1 addfloat ptr-b literal 2.0 addstring ...


Comments?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:23 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3