Hello There, Guest! Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(WIP) Adding Buildings To Worlds using the snapshot (.ws) files.
These are notes i'm compiling as i go and are not in the best order yet, if i can crack it i'll write them up into a guide when i'm finished. Thanks to Timbab for the help so far.

If anybody is able to help here (Or someone has actually got a stable building inserted), feel free and post in this thread.

The only thread of note on the subject that i have found is this one on the Emu forums.


For this excercise i'm trying to add an imperial bunker to Naboo just outside Kaadara. Exact file: /object/building/general/shared_bunker_imperial_01.iff

I've looked at structures post 14.1 and they seem to be at first glance, the same file structure so would be easy to add.... but thats for later.....

First open Tre explorer and extract /snapshot/naboo.ws save to where ever you like. Now edit with tre explorer the file you just extracted and you will see the explorer window open into two parts. The left side is the list of objects and associated child objects which are essentially a list of all objects or decorative objects placed in the world that you can either interact with or are used to build the world (buildings, starports, bunkers, street furniture, baazar terminals etc.). The list seems to be in no particular order and i'm guessing it was compiled from the the SOE world editor as the planet was built. The right side is for world positional details and other info.

If you scroll down the list and pick a building with cells and study it's format, you can see it's fairly simplistic. The list is objectID and objectType, child objects are usually either cells or sound objects accoiated with the parent (Sounds in starports etc). On the right are the objects world details, Each item in the list has basic world info that you can put in for placement. X, Y, Z for position, ow, oy, ox, oz for quaternion rotation, object name string, clientGameObjectType, Id and POB CRC and scale (Not sure what this is used for and on everything else it's left blank).

Before doing any thing else, scroll down to the bottom of the list and note the last ID number and what the object is, just to make sure your adding a new object, not editing a pre existing one.

Scroll back to the top and click on WSNPFORM and then click "Add new node", a new node will be added to the list at the bottom. The numbers for Parent ID and cellID are generated automatically as you add new objects. Scroll down to the bottom of the list and there should now be a new objectID to edit. Click the object and from the object dropdown on the right select /object/building/general/shared_bunker_imperial_01.iff

If it is not in the list, you may have to add it..... So scoot back up to the button bar and hit "Manage Items" and in the text field type /object/building/general/shared_bunker_imperial_01.iff and hit the top button on the right to add it to the list then close the manage items box and select the bunker you just added from the drop down list.

Now you need to add your world co-ords. To find them, In-Game, go to the place you would like to place you bunker and face the direction you wish it to be placed and enter the command /dumpZoneInformation. The email you receive will contain all the location info that is needed to be entered. Copy the details onto the form and press save.

There are a few more details that need to be added, to find them (and there are several ways of finding this, but this method is probably quickest), on you server, navigate to the file /scripts/object/building/general/objects.lua and open to edit. Scroll down to the entry for /object/building/general/shared_bunker_imperial_01.iff

The information you require is in the commented out section:

    clientGameObjectType = 512
    totalCellNumber = 9
    portalLayoutFilename = "appearance/poi_all_impl_bunker_s01.pob"

You will be using this information to add the building to the world snapshot file. But first, in tre explorer again open the POB file /appearance/poi_all_impl_bunker_s01.pob at the bottom of the left list is a heading CRC. Highlight and note down the 8-digit hex number on the right.

Now open up naboo.ws again and enter the remaining details.

Type is 512.00
CRC should be A1 05 47 64. This is where explorer alters the hex number because it assumes that each CRC should be unique, and for all other purposes it is, so it changes the last digit. If this happens you will have toopen the .ws file in your favourite hex editor (I use HxD), search for the number explorer changed it to (in my case A1 05 47 60 and there should only be on entry of this) and manually edit it to the correct value then save.

Lastly the cells.
In this case the bunker has nine cells so in explorer, click the building ID for the building you have added on the left and from the button bar click 'add node' nine times. You will see that the nodes you have just added will all have default values and will need to be changed so, back in the right pane (or is that pain), from the Object drop down choose object/cell/shared_cell.iff. Do this for all of the nine cells you have added.

Now this is the bit where i'm relying on info in the other cell entries in the .ws file. You will note that ALL of the other cell entries in other nodes are blank except oY which is 1.0 so this is what i have copied. Do the same for each cell and save the file.

Add the .ws to your tre and recompile then add to both server and client.

Rebuild the server and start client and server

ATM, all looks well untill your toon heads to where the bunker is then the client crashes. If you logged out where the bunker is, when you start the client will crash immediatly, you can use other toons elsewhere but be aware of this.

I also added to my file a baazar terminal in meonia as a test of the process, this spawned ok and is still working with no problems so the actual editing/adding procedure works. Just seems to be anything with cells atm.

So where are we now???

.ws file is a correct pre-cu file not a later one maybe causing CRC errors.
Bunker is an existing pre-cu so should not cause conflicts.
Correct number of cells in .ws file for building being added.
The naboo.ws file has been edited, triple checked, repacked into tre file and loaded on the server and client.
Server has been rebuilt for ID info to be updated.
Client crashes when toon enters Kaadara area.
Bazaar term also coded ito the .ws file loads ok and is still operational (Leading to assumption that the edit process is valid).
Seems something client side is causing trouble...OR, more likely...Cell/Building conflict?? is causing client crash.

Issues with Tre Explorer editing .ws files (Timbab working on new editor).

Unable to add new nodes to cells for soundObjects within structures (Starport noise, machinery etc).
Known issue where explorer changes CRC entry if that entry has been used before. ie. On any POB structure that is used more than once (Bunker, building etc.).
Continuing my moral support here!! W2G!

Forum Jump:

Browsing: 1 Guest(s)