Changing station location

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

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

Post Reply
Zloth2
Posts: 52
Joined: Sat, 7. Jul 18, 17:16
xr

Changing station location

Post by Zloth2 » Thu, 15. Nov 18, 06:53

Is it possible to move a station's location with a mod? I presume they've got an x/y/z location somewhere in the files.

What I'm trying to do is move the pirate station in Murky Skies up or down enough that ships going from the jump beacon to Ratfish don't slam into the thing. If the ship still gets shot up, well, that's what emergency jump is for but I do find it silly that captains will actually fly their ships right into the side of the thing when trying to go to Ratfish.

iforgotmysocks
Posts: 1085
Joined: Fri, 8. Nov 13, 23:35
x4

Re: Changing station location

Post by iforgotmysocks » Sat, 17. Nov 18, 00:38

Uhm... i'm not quite sure if u can just unplug a station from a buildlocation or move it, don't think that will work, unless you wanna do some weird savegame editing. What should be possible is to change the coordinates for spawning upon starting a new game. What's also possible is to remove the current station and spawn another one somewhere else.

SirNukes
Posts: 392
Joined: Sat, 31. Mar 07, 23:44
x4

Re: Changing station location

Post by SirNukes » Sat, 17. Nov 18, 07:51

Since I have been a little curious about X:R modding, I took a stab at this with some success. "Move Murky Skies Distillery" is up on the steam workshop.

The actual field in maps\xu_ep1_universe\zones.xml was pretty quick to track down, once I found the right ids at https://roguey.co.uk/xrebirth/universe/ ... 72/item-4/. Then I spent 2-3 hours trying to wrap my head around an apparent bug/quirk in the X:R extension handling.

It seems that changes to zones.xml are only evaluated when an extension is added or removed from a saved game, not on each load. Further, station position gets cached into a save when you pass through its zone, and only gets set back to "default" (cached somewhere else?) when leaving the sector. Finally, position changes in zones.xml have no effect on a station with a non-default position recorded in the save.

The above aspect combine into this frustration: if the extension is applied to a save inside Murky Skies, the station will not move. If that game is then continued, flying to Devries, saving and reloading, the station will continue to be unmoved. Only by disabling the extension, saving again in Devries, reenabling the extension, and reloading, does the station move occur. A similar annoyance arises when removing the extension, required a mirrored process to fix.

Zloth2
Posts: 52
Joined: Sat, 7. Jul 18, 17:16
xr

Re: Changing station location

Post by Zloth2 » Sat, 17. Nov 18, 17:33

Oh great! Thanks SirNukes!

Post Reply

Return to “X Rebirth - Scripts and Modding”