Egoboo Community Forum

The Legend of Egoboo Sporks of Yore
It is currently Mon Nov 20, 2017 11:27 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Object Slots
PostPosted: Tue Jul 29, 2008 7:06 pm 
Offline
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
User avatar

Joined: Wed Jul 23, 2008 1:27 am
Posts: 3818
Location: Norway
Objects in Egoboo modules are fairly simple, once you know a few little things about them. This topic will attempt to describe the basics of how this works to give the necessary background information.
NOTE: This needs to be updated with the introduction of the new object loading system.

Two major concepts:

Modules basically contain two major parts related to objects: An "objects" directory which contains all the possible objects for that module, and a spawn.txt file, directing Egoboo where to put these objects.

Factories:

The main thing to remember is that the "Objects" directory is used like a factory, to create objects in the module. Having just an object folder in the "objects" directory will do pretty much nothing unless it's also being spawned.

Each object directory (ex: sword.obj) contains several files, but the important one as far as modules are concerned is "data.txt". This file has a "Slot Number" as it's first entry. This is how the spawn file refers to any particular object. Each object must have a unique ID in the ranges of 36 to 255. (NOTE: I am not positive of the upper limit)

The first 36 slots are reserved for importing of characters. Since Egoboo supports 4 Hero's (Players) at a time, each Hero can have 8 items. 0 would be player one, and 1 through 8 would be his/her items. 9 would then be player 2, and so on.

If an object has a conflicting Slot Number, egoboo will exit immediately because it will not be able to tell them apart.

Whenever an object is manually copied into a different module, the "Slot Number" must be unique. The module editor EgoMap does this automatically if an object is imported from inside the editor.

Spawning:

The file "spawn.txt" is used to create objects. It use's the object's Slot Number to figure out which object to spawn, and makes an instance of it at the positions specified (in "spawn.txt").


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Get Egoboo at SourceForge.net. Fast, secure and Free Open Source software downloads