Egoboo Forum

The Legend of Egoboo Sporks of Yore
Global object repository: What does it mean?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Egoboo Forum Forum Index -> -> Development
View previous topic :: View next topic  
Author Message
PurpleSquerkle
Supreme Cookiemancer
Supreme Cookiemancer


Joined: 28 Oct 2007
Age: 28
Posts: 4370
Location: Midwestern US

PostPosted: Sat Jul 19, 2008 12:44 am    Post subject: Global object repository: What does it mean? If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

So, can someone (probably bgbirdsey, considering he did it -- and thanks, by the way, if it will do what I think it will, that's awesome!) explain further what this means we can and still cannot do?

Are all objects now referenced by a global slot number?
So modules no longer contain objects, and each unique object in the repository (which I will now refer to as "GOR") has its own slot number?
If so, would it not be more efficient (although it would admittedly involve more work; it seems I'm often suggesting things that involve more work for other people Razz ) to remove the slot system entirely, and instead give every object an ID? For example, if you wanted to spawn as sword, you would just set tmpargument to "longsword" and spawn the object.
Or, if it would be easier, it could use IDSZs; we'd just have to come up with a new, unique one for every object... but I think it'd be more convenient if it was just "longsword", "crossbow", "grubbug", "adventurer", etc.

Now, on to another question; does this mean we can spawn any object and at any time?
So we could potentially have spellbooks that summon friendly monsters and suchlike?
Think of the possibilities (there are many)!
_________________

+ PurpleSquerkle

--My website--
Latest update= 7/15/08; Three new midi loops.

{new Squerkle coming as soon as I stop being lazy}
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bgbirdsey
Developer
Developer


Joined: 25 Sep 2007
Posts: 873
Location: Minnesota

PostPosted: Sat Jul 19, 2008 5:18 am    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

The plan will be for the objects to be loaded by name. If you look in the ./modules/bishopiacity.mod/gamedat/spawn.txt file, you have lines like

monk.obj: NONE 96 24.0 42.0 0.5 N 0 0 11 4 0 F F N

    name = NONE
    slot = 96
    pos = <24.0, 42.0, 0.5>
    direction = North
    $ = 0
    skin = 0
    passage = 11
    "content" = 4
    status = off
    ghost = false
    team = Null or Neutral


For a lot of things it would be perfectly good to forget the slot and just load up the object in monk.obj.

I created a directory called ./objects/monk.obj with all the basic monk info in it. If you need to modify this info for a specific module (changing the script, for instance) you just plop the modded script in the directory ./modules/bishopiacity.mod/objects/monk.obj. It is a little more complicated than that, but that's the basics.

You can see the problem with leaving out the "actual slot number" in the above example because the passage numbers and slot numbers need to be linked up between passages.txt and spawn.txt. ARGH!!!

Anyway, the idea behind the global database is to eliminate all the useless duplication and to make modding a lot simpler.

In the end, the best thing might be to convert most of the datafiles to an xml format, which is human readable and extensible. That means that you can mod it with a text editor and you never have to put things in a strange order because you want to add a new feature AND keep backward compatability.

I have already written some xml translators, so I know that it is not too difficult in c++. In c, it is a bit more difficult because all of the xml libraries out there really scanners instead of loaders and that causes all kinds of technical difficulties, since you don't really have random access to the data in the file...

Anyway, it is a step in a certain direction.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Egoboo Forum Forum Index -> -> Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


© 2007 Informe.com. Get Your Own Free Portal.
Powered by phpBB © 2001, 2005 phpBB Group


RedSilver 1.01 Theme was programmed by DEVPPL HTML Forum
Images were made by DEVPPL Photoshop Forum