Jump to content

Export the coordinates of all objects in a cell


Recommended Posts

Hello!

 

Is there any way to "export" the X Y Z coordinates and the X Y Z rotation value of every object in a cell?

I want a table that looks something like this:

 

EditorID Type PosX PosY PosZ RotX RotY RotZ Scale

CityWall45turn Static 46729.0938 13774.7471 1792.0000 0 0 -135 1

 

I could do it "by hand" but that would take a long time. I want to do this for all the cells in the ShiveringIsles, exterior and interior. I already tried to open the ShiveringIsles.esm in TES4EDIT but I can't open it. Other files work fine. I've already tried to convert it to a esp-file and open that, but didn't work either.

 

Would be nice if someone knew anything about this!

Edited by Tharizdun73
Link to comment
Share on other sites

You would need a script to iterate thru all references and export the data you want:

 

use GetFirstRef / GetNextRef to iterate thru all references

use GetPos to get XYZ positions

use GetAngle to get the rotations

use GetObjectType to get the type

use GetFormIDString to get the reference FormID in string format (see below)

use ConScribe or Pluggy to export the data to a log file

 

EditorIDs are less easy as they do not exist at run time.

If you really need it, CSE has an export function (don't remember in which menu) that exports a lot of info about all objects loaded at the time, including the EditorID and the reference FormID. You could match the FormID found by the script with the one in the CSE export file to get the matching EditorID.

The CSE export file is easily imported into Excel.

 

I am not familiar with external tools like TES4EDIT. Maybe one of them has an easier way of doing this.

Edited by QQuix
Link to comment
Share on other sites

Wow, thanks for the very quick answer! I didn't expect anybody to still be here after all these years :happy:

What is this CSE you speak of? I am not really that familiar with modding Oblivion, so sorry for the question.

Edited by Tharizdun73
Link to comment
Share on other sites

CSE = Construction Set Extender )

It is an extension to the vanilla Construction Set.

it is an OBSE plugin

It is the the main tool for creating mods (writing scripts, adding/removing 'things' to/from the game world, etc) (like the Creation Kit for Skyrim)

 

If you are not familiar with creating Oblivion mods, I am afraid my answer will not be much help as creating that script would no be trivial (not difficult either)

 

 

 

 

 

 

Link to comment
Share on other sites

Thanks for making that clear.

I am familiar with the Skyrim CreationKit, so I think the Oblivion ConstructionSet will not be much different (maybe worse :laugh: ).

I think I could put something together that will work ... It's just for a personal project anyway ....

 

(I am basically trying to "recreate" the ShiveringIsles in Skyrim, just for personal use of course, that's why I need all the locations of all the objects)

Link to comment
Share on other sites

Oh . . . OK.

 

I did something like that once, as my mod added buildings to the mod world on the fly. I had to map every object in all vanilla interiors so I could dynamically recreate them as the player entered any of the dynamically created buildings.

 

To map the interiors, I wrote a script that :

 

- Each frame, moved the player to a new exterior cell

- In each exterior cell:

- - Scan the cell looking for doors

- - Activate the door to move the player inside the building

- - In each interior cell

- - - Map the contents and export the data

- - - Look for doors

- - - If the door leads to an unmapped interior cell, activate the door and repeat.

 

(unfortunately I do not have that script anymore, I needed it myself a couple of years after I wrote it and I could not find it)

Link to comment
Share on other sites

(I have not had Oblivion installed for quite a while and memory is getting worse by the day, so some vagueness expected)

 

Conscribe saves all messages printed to the console with PrintToConsole

So, you need your collected data nicely formatted into a text line and output this line with PrintToConsole

After exiting the game, open the log file in a text editor and select and copy these lines to wherever you want them

I do not remember exactly where the log files are, but they are somewhere in the Oblivion install folder

 

Pluggy has a set of functions to create / read / write / delete text files

Same idea: format your data and write the lines

Pluggy text files are in ...\Documents\My Games\Oblivion\Pluggy\User Files

Nice thing is that you may create multiple files in a single run (I think Conscribe also has this, but I am not sure)

 

Not sure about manuals. I use the Cs Wiki for pretty much everything

CS Wiki links >> Pluggy Conscribe and List of Functions (a scripter's Nirvana. my preferred page)

 

In both cases, you can create your lines with data delimited with semicolons and paste then into a worksheet, which comes handy sometimes.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...