Hi all,
How can I determine my current location, for the purposes of filling out a <location> location tag in XML. I have a save with my ship where I want that location to be, but I can only find a <player> tag which has a reference to my current galaxy name in translated string form. (The save files are huge so I am probably missing something.) Is there some way to figure out the values needed for the "galaxy" and "zone" attributes of <location> tag (like in gamestarts.xml), as well as X/Y/Z and yaw/pitch/roll?
Thanks!
How to determine current location?
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 29
- Joined: Wed, 8. Nov 06, 08:53
Re: How to determine current location?
Ended up figuring this out:
This assumes that you:
This should get you enough data to properly fill out a <location> tag and set a new, unique starting point for your ship!
This assumes that you:
- have a fresh save where the player only owns one ship, and you've moved that ship into the position you want
- have that save decompressed and can find the large XML file that you need to search through
- understand basic XML terminology
- have a <location> tag that you need to fill out with X/Y/Z, pitch/yaw/roll, and galaxy/zone fields. (For example, you are working on a gamestart.)
- First, open up your decompressed save file in a text editor that allows you to search backwards and forwards from a starting point (Notepad++ works well, Sublime Text does not)
- Search for the string owner="player". One of those hits will take you to a <component> tag with the "class" attribute containing the word "ship" and the "owner" attribute set to "player". If you know your ship's macroname, it is shown in the "macro" attribute. Take note of the line number you are on (your "starting point").
- Search forward from the starting point for the phrase <movement player="1" class="player">. Immediately below the first hit should be an <offset> tag with <position> and <rotation> tags inside it. I believe these are your ships location and orientation inside the sector.
- Search backward from the starting point for the phrase <connection connection="zone001_cluster_. Immediately below the first hit should be a <component> tag with a "class" attribute set to "zone" and the "macro" attribute containing the value for the "zone" attribute of the <location> tag you wish to fill in.
This should get you enough data to properly fill out a <location> tag and set a new, unique starting point for your ship!
Code: Select all
<location galaxy="xu_ep2_universe_macro" zone="zone001_cluster_25_sector002_macro">
<position x="13465.525" y="-1501.484" z="-11617.59"/>
<rotation yaw="-23.57782" pitch="-2.93695" roll="0.000897155"/>
</location>