Change ship position?

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Josch13
Posts: 4
Joined: Sat, 16. Nov 13, 20:52

Change ship position?

Post by Josch13 » Sat, 16. Nov 13, 21:14

As you may know, there is a problem for some people where you get kicked into empty space away from everything.
I had this problem too, and for several hours I just used quicksave(stupid, I know) so I don't have a recent savegame.
Is there a way to change my position?
I looked in the savegame, but couldn't find anything obvious.
Maybe someone of you modders knows an easy way :)

User avatar
ishmaeltheforsaken
Posts: 381
Joined: Sun, 15. Oct 06, 17:37
x4

Post by ishmaeltheforsaken » Sat, 16. Nov 13, 23:12

You can change your position by editing your savegame.

I can't remember exactly because I did it last night and I'm currently at work, but try this:

Search the save file for (owned by="player") minus parentheses, and there may not be a space, or it might be an underscore... finding the proper syntax should be easy.

Keep going through those until you find the entry for the Skunk; the macro name will have "playership" in it.

Once you have that, you should be able to find the entry for that object's position. You can freely edit x, y, and z coordinates.

Josch13
Posts: 4
Joined: Sat, 16. Nov 13, 20:52

Post by Josch13 » Sun, 17. Nov 13, 13:15

Thanks, finally found it :)

Oewyn
Posts: 3
Joined: Tue, 8. Apr 08, 02:35
x3

Post by Oewyn » Sun, 17. Nov 13, 21:31

It's owner="player"
macro is "unit_player_ship_macro".

Playing around with the position doesn't seem to help. I'm still playing with it.

punisher2004
Posts: 8
Joined: Wed, 22. Dec 04, 15:50
x3tc

Post by punisher2004 » Sun, 17. Nov 13, 21:44

Does someone have more details? IE: how much change is needed to move X distance (or Y/Z).
I just need to move about 500 feet to get unstuck from a station I somehow clipped into while exiting a highway.

Josch13
Posts: 4
Joined: Sat, 16. Nov 13, 20:52

Post by Josch13 » Sun, 17. Nov 13, 22:14

I just copied the position from an much older savegame.

MyMeatStick
Posts: 1
Joined: Mon, 18. Nov 13, 00:32

Post by MyMeatStick » Mon, 18. Nov 13, 00:35

If its not too much trouble could someone post a way to do this?

Tried playing around with every piece of code in the save file even remotely dedicated to location and my ship doesn't move from empty space.

Oewyn
Posts: 3
Joined: Tue, 8. Apr 08, 02:35
x3

Post by Oewyn » Mon, 18. Nov 13, 03:52

This is what I've been able to find out so far. I can manipulate my position and orientation by changing the first "offset" tag after the listeners section under the ship section.

Here is a picture which describes the orientation. It seems to be global position with positive X,Y,Z being Right, Up, Into the screen respectively with rotations positive Pitch, Yaw, Roll being Rotate Up, Rotate Right, Roll Clock-wise.

[ external image ]

I have been able to jitter my position by several km by changing the position attributes. For example I multiplied my Z position by 10000 and my distance to some far point changed by 29km. I don't know the exact method for getting a particular distance from the x/y/z positions because it seems to be normalized during the saving process. If i change the position then save/reload, i have the same position in-game but the new save file has different x/y/z positions.

For example: here is a snippet from one of my saves:

Code: Select all

<component class="ship_s" macro="unit_player_ship_macro" connection="space" attackmethod="hitbybullet" attacktime="20586.3" owner="player" id="[0x9f2]">
<listeners>
<listener listener="[0x9fe]" event="attacked changedzone gravidarhasscanned killed"/>
</listeners>
<movement class="player">
<offset>
<position x="-118.971" y="-48.8262" z="-21.2577"/>
<rotation yaw="-1.3081" pitch="-1.473" roll="81.053"/>
</offset>
Hope this helps some.

Return to “X Rebirth - Scripts and Modding”