X3FL (1.2): Idle ships all over the place.

General discussion about X³: Farnham's Legacy.

Moderators: Moderators for English X Forum, Moderators for the X3:FL Forums

Deathifier
Posts: 160
Joined: Wed, 6. Nov 02, 20:31
xr

Re: X3FL (1.2): Idle ships all over the place.

Post by Deathifier » Wed, 18. Aug 21, 19:15

Hwitvlf wrote:
Wed, 18. Aug 21, 17:23
It's great that this is figured out. Given the cause, you would think every sector with a SPP would end up with frozen ships eventually, yet most SPP sectors don't have any in my game.

The Unmodified tag doesn't mean anything to me either and I would be happy to test any fixes- unofficially released or otherwise. Even if they might break my game, I think FL is well worth the effort to polish off the rough edges.
Well the cause does seem to be an infinite loop of some sort, although I don't know if I actually fixed it.

It turns out that when the modified file was saved in X-Studio II it saved with a hidden syntax error on a line I didn't change.
Thus the script was non-functional which had the helpful side effect of letting the ships move off and trade and whatnot, but not resupply (I followed one around for a while and got suspicious when it never tried to refuel) since I guess whenever the script is called it just returns control to the caller immediately or when it hits the error (which happens to be after the code that reloads the script when a new version is found).

I tried convincing the game to let me edit a copy of the original script but it simply refuses to do so - you can't directly edit that particular script (or I can't find out how to) and my custom script file gets hidden in-game whenever it has the content of the original script in it, even if I put that content in a brand new script file with new name, command, version, and description.

So unless Egosoft plans to release their fix I guess the options are to break the script or try to fix it properly.
To break it, open the original PCK file in X-Studio II and make the changes I set out earlier, then save it and you're set.
To fix it properly you'd probably have to make the edit in-game and I can't get that to work - if someone has suggestions I'll give it a try, though I'm not keen on spending much more time on this - esp. since it's already officially fixed.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Re: X3FL (1.2): Idle ships all over the place.

Post by Cycrow » Wed, 18. Aug 21, 19:44

The built in scripts are all in pck files, when you edit them ingame, it will save it out as an xml file, so you will have both the pck and xml files. As the game favours the pck file, it'll load in the old version each time.
there are several ways to allow editing these files. First, is to just edit the file and save it, then delete the old pck file before loading the game again. Or by unpacking the pck to an xml file.

if the script starts with ! then it wont be avaialble to edit, so you can unpack and rename the file, removing the ! to edit it. Just remember to rename back once its done. To do this you need to edit the file itself and make sure the filename inside the file matches.

an easy way to do this is to use the Plugin Manager Creator, that has an directory tool. This allows you to pack/unpack files, as well as renaming them. When renaming them it renames both the file and the contents

Deathifier
Posts: 160
Joined: Wed, 6. Nov 02, 20:31
xr

Re: X3FL (1.2): Idle ships all over the place.

Post by Deathifier » Thu, 19. Aug 21, 16:46

Alrighty with Cycrow's information I went back to the original PCK file for the script, extracted the XML file from it, renamed the file and the command name and version inside the file, and found that if renaming manually you have two instances of each value (name and version) to change - one at the top, and again further down where the script defines sval's.

I made the changes in-game as previously set out, renamed it back, deleted the compressed version and put the XML version in its place.

Loaded the game up with the new script in place and now it works properly.

I tested by watching a trade ship I'd previously followed.
The resupply script aborted due to the new version, the ship then resumed its trading script execution and went off to buy some crystals.
Once it purchased those it executed the new resupply script, went to a nearby solar power plant, docked and purchased 410 energy cells, then it started flying to its next purchasing destination which was an advanced satellite factory.

Thus the fix worked as I expected it to.

If you don't mind being in a modified game you could delete the v1.2 PCK file and put in its place a modified XML file that addresses this specific issue.

Since there is no ETA for a new release of X3FL I'll see if I can put the modified XML file in a Steam Guide.

steve_v
Posts: 159
Joined: Sun, 12. Jun 16, 08:39
x4

Re: X3FL (1.2): Idle ships all over the place.

Post by steve_v » Thu, 19. Aug 21, 17:06

Deathifier wrote:
Thu, 19. Aug 21, 16:46
Since there is no ETA for a new release of X3FL I'll see if I can put the modified XML file in a Steam Guide.
Not really sure what a "Steam Guide" is or what it has over a forum post here... But hey, progress is progress and it sounds like Cycrow isn't interested in sharing the "upstream" fix for some reason...
I'd be most grateful if you'd post it somewhere in any case.

Aside, I'd be a whole lot more interested in fixing this stuff myself if all the available packing/unpacking and external editing tools weren't Windoze-only, I stopped using that OS about 20 years ago.

Deathifier
Posts: 160
Joined: Wed, 6. Nov 02, 20:31
xr

Re: X3FL (1.2): Idle ships all over the place.

Post by Deathifier » Sat, 21. Aug 21, 16:33

steve_v wrote:
Thu, 19. Aug 21, 17:06
Deathifier wrote:
Thu, 19. Aug 21, 16:46
Since there is no ETA for a new release of X3FL I'll see if I can put the modified XML file in a Steam Guide.
Not really sure what a "Steam Guide" is or what it has over a forum post here... But hey, progress is progress and it sounds like Cycrow isn't interested in sharing the "upstream" fix for some reason...
I'd be most grateful if you'd post it somewhere in any case.

Aside, I'd be a whole lot more interested in fixing this stuff myself if all the available packing/unpacking and external editing tools weren't Windoze-only, I stopped using that OS about 20 years ago.
It's a bit more work to setup however it lets me wrap the script in a bunch of warnings about it causing games to be flagged as modified and I can attach other info to it.
It's also a lot easier for me to maintain and monitor in general, and it is a bit more discoverable on Steam in case other users want the fix but have no idea that this forum thread exists.

I had hoped to paste the script in plain-text in the guide however it is far too long and it is also much too long to put in a forum post here.

So I put it in a zip file and hosted it on a website for the time being, linked from the guide so that if a better solution turns up in the future, or Egosoft updates the game and fixes it officially, it's easy to change.

You can view the Steam guide here:
https://steamcommunity.com/sharedfiles/ ... 2580955922

steve_v
Posts: 159
Joined: Sun, 12. Jun 16, 08:39
x4

Re: X3FL (1.2): Idle ships all over the place.

Post by steve_v » Sat, 21. Aug 21, 18:28

Deathifier wrote:
Sat, 21. Aug 21, 16:33
I put it in a zip file and hosted it on a website
Thanks, that seems to work nicely. :)

I'm kinda old-school, (free, decentralised internet etc.) so I was perhaps a little concerned that it might end up in the walled garden known as "Steam Workshop", making it gratuitously annoying for anyone else to get at.
There's enough of the steam-only club nonsense going on with X4 already, but I see you have your own corner of the 'net to host stuff on. That's both exactly what I would have done, and in this day and age quite refreshing. :D

Hwitvlf
Posts: 484
Joined: Tue, 13. Apr 21, 21:36

Re: X3FL (1.2): Idle ships all over the place.

Post by Hwitvlf » Mon, 23. Aug 21, 00:50

Thank you for this Deathifier. It seems to be working well so far and no noticed side effects :D

Deathifier
Posts: 160
Joined: Wed, 6. Nov 02, 20:31
xr

Re: X3FL (1.2): Idle ships all over the place.

Post by Deathifier » Mon, 23. Aug 21, 07:57

Good to hear it is working :)

There shouldn't be any obvious side-effects or faults caused by the change, however there might be some edge cases where the destination station is destroyed at an inappropriate time and maybe that would break something.
I'm not sure what happens in such circumstances although I hope that it'd just cause the script to gracefully fail and return control to the caller, and not do something silly like crash the game.

If this somehow does cause the game to crash please let me know.

Jimmy C
Posts: 1131
Joined: Tue, 17. Jul 12, 02:50
x3tc

Re: X3FL (1.2): Idle ships all over the place.

Post by Jimmy C » Mon, 23. Aug 21, 19:20

You could try getting the destination of a ship, then deliberately destroying it yourself and see what happens.

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: X3FL (1.2): Idle ships all over the place.

Post by alexalsp » Fri, 12. Nov 21, 10:02

As far as I understand, this bug will be fixed in version 1.3?

BrigandPhantos77
Posts: 517
Joined: Wed, 27. Dec 17, 05:47
x4

Re: X3FL (1.2): Idle ships all over the place.

Post by BrigandPhantos77 » Sat, 13. Nov 21, 05:59

alexalsp wrote:
Fri, 12. Nov 21, 10:02
As far as I understand, this bug will be fixed in version 1.3?
Confirmed. It "is" fixed in the Beta 1.3
Peace is a state of mind!
War is absolute!
~ Phantos ~

Deathifier
Posts: 160
Joined: Wed, 6. Nov 02, 20:31
xr

Re: X3FL (1.2): Idle ships all over the place.

Post by Deathifier » Sat, 13. Nov 21, 07:08

Good to hear, I've made a short update to my guide to reflect the fix in v1.3 and will make further updates once I've had a chance to test a v1.3 release candidate myself.

Post Reply

Return to “X³: Farnham's Legacy”