[QUESTION][AND PARTIAL FIX] Which Generic Missions Still Not Closing Out MD Cues?

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

User avatar
RoverTX
Posts: 1436
Joined: Wed, 16. Nov 11, 18:37
x4

[QUESTION][AND PARTIAL FIX] Which Generic Missions Still Not Closing Out MD Cues?

Post by RoverTX » Wed, 20. Jan 16, 06:24

I noticed this thread about FPS drops a while ago, and about how the reason behind it is left over Generic Mission Cues not being culled correctly. People where still commenting in it as of October of last year.

http://forum.egosoft.com/viewtopic.php? ... c&start=15

It references this thread where kurush suggest that the offending Generic mission is only buy asteroid data missions, L2M144.

http://forum.egosoft.com/viewtopic.php?p=3927921

At the moment I don't have a long lived save, so I was wondering if someone could verify kurush's findings. Also has anyone else attempted to address this at some point? Also if kurush is right, this would be fixed by disabling said mission type correct?

EDIT: I think I am down the path for a fix to the escort missions, you can find more information and a possible correct director here

http://forum.egosoft.com/viewtopic.php? ... 52#4616752
Last edited by RoverTX on Tue, 21. Jun 16, 02:12, edited 1 time in total.

User avatar
Spectre01
Posts: 453
Joined: Tue, 23. Dec 08, 10:15
xr

Post by Spectre01 » Sun, 24. Jan 16, 21:31

Wow, so this is the reason why 3 of my saves have fps drop down to 20 max after 2~3 in game days. What kind of script was kurush using to reset it? I popped the code into Xstudio and got told it's not a MSCI script.

User avatar
RoverTX
Posts: 1436
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX » Sun, 24. Jan 16, 22:09

It is a mission director that reset the whole generic mission cue. You have to jump to some a Xenon/an empty sector a few times for it to work correctly. Then save, shut the game down, then uninstall it.

I was asking around before I set out on a way to try and cull these with out causing as much disruption as his solution. So far I haven't had time to dig deep enough, and I don't have a long lived save anywhere.

Can you upload one of those saves somewhere I could download? Are they non modified?

User avatar
Spectre01
Posts: 453
Joined: Tue, 23. Dec 08, 10:15
xr

Post by Spectre01 » Sun, 24. Jan 16, 22:14

Welp, I long had overwritten those bugged savegames. I also have a pretty customized XRM so I'd doubt anyone can run the savegame except me.

User avatar
Spectre01
Posts: 453
Joined: Tue, 23. Dec 08, 10:15
xr

Post by Spectre01 » Mon, 25. Jan 16, 22:34

Took me 2 days to figure out how to make kurush's script to work.

All you need to do is jump to an empty sector without any station, then change your pilot name to "bounce"(no quote) for it to kick in. Once you see "cue reset" subtitle, you can then change your pilot name to whatever else and it won't reactive.

You don't need to remove the MD script as long as you don't keep your pilot name as "bounce".

I just did it on my current 2 days save which has 37 of that cue running with a maximum of 45 FPS(in an empty sector). Once the script kicked it, all those cues are cleared and the game gets very notable performance improvement.

User avatar
RoverTX
Posts: 1436
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX » Tue, 26. Jan 16, 00:33

Do you know how the mission director debugg works? If so can you try and verify Kurush's findings about it only being the astroid buying missions that aren't shutting off? I can walk you through it if you don't.

User avatar
Spectre01
Posts: 453
Joined: Tue, 23. Dec 08, 10:15
xr

Post by Spectre01 » Tue, 26. Jan 16, 08:45

Sorry, this is the first time I'm messing around with MD. I'm just glad for this thread to point me what's the causes for FPS degeneration in a long savegame.

User avatar
enenra
Posts: 7150
Joined: Fri, 8. Apr 05, 19:09
x4

Post by enenra » Tue, 26. Jan 16, 10:08

For some context:

The file that seems to be causing it is the manager that spawns generic missions in a sector once you enter it.

Several concern I have here:

1. Generally having a couple instances of a MD file should do nothing. L3M01 is one of the more complex files though, so possibly that could have had an influence.

2. What the cue of the file does (L3M01 Sector) that kurush describes in his original post is to keep track of whether the player is still in the sector that missions have been spawned for before. It's very short and simple. There will be an instance of this cue for every sector the player has been to recently. This is intended. It shouldn't persist but I'm not entirely convinced that this is the cause for the FPS drops.

I haven't looked at this stuff in too long to really tell what's going on without some extensive testing.

The danger with this method however is that you end up with "orphaned" objects and actors. What I mean by that is that by resetting a file while it's running it may result in objects and actors that were spawned by one of the missions it created to not get cleaned up and persist indefinitely. Granted that should not be happening with how the system is set up but I wouldn't be too sure.

Another concern I have is that this doesn't seem to be a very widely reported problem. Surely if it had that big of a performance impact, more people would be noticing it?

Are you guys running a non-vanilla game? If so, what mods and scripts do you have installed?

User avatar
Spectre01
Posts: 453
Joined: Tue, 23. Dec 08, 10:15
xr

Post by Spectre01 » Tue, 26. Jan 16, 18:30

Yeah, I've noticed that there's some NPC with missions that are now "empty" after I did the clean up(empty as they are on the comm menu, but can't be talked to). But that's a small price I'm willing to pay.

The performance impact is really noticeable. I run the game on a rig with i7 4790k at 4.4Ghz. Some of the major mods I used are XRM, IEX, TC plot for XRM AP, and bounce. On a fresh new game, I can get 40~60 FPS in any Terran sectors, 50~60 in 70% of the commonwealth sectors, and 60 in close to empty sectors. After run the game for 30+ in-game-hours, I see the "L3M01 sector" script has 47 instance, and my average FPS drops by 15 across the board. I can only get a maximum of 45 FPS in a completely empty sector. If there's 3~10 ships in a sector, the FPS drops to 35. And every other sectors gets 20~30 average. On my old 48+ hour savegame, there was time the game suddenly ran at a maximum of 17 FPS, even in a completely empty sector (even poorer when there's some high ploy station like that argon military sector), and made the game unplayable.

When I ran kurush's script in an empty sector after there's 47 instance of "L3M01 sector", the FPS jumps right from 47ish to 60 once those instances were cleared. I don't know why such a small script has this much an impact on even an i7 CPU with just 40 instance running. I think I will do some test on a vanilla installation for 40 hours and see if this problem is caused by unknown modding.

User avatar
enenra
Posts: 7150
Joined: Fri, 8. Apr 05, 19:09
x4

Post by enenra » Tue, 26. Jan 16, 19:53

Thanks, that would be great.

My main concern is that it's possible that this is not a vanilla issue but caused by one of the mods you have installed, or simply their interaction when installed together.

If this happens with a vanilla game other than bounce (which doesn't have an influence unless triggered by the player) then I can possibly look into it further. But as of now to me it sounds more like a mod issue than an issue with the vanilla game. I've taken a look at the file and it seems fine. Nothing that should spawn many instances. The vanilla one that is.

Issue is that just checking whether that file has been modified isn't enough either because the issue might lie with the things it triggers holding the instance of the cue alive, and not the cue itself.

User avatar
Spectre01
Posts: 453
Joined: Tue, 23. Dec 08, 10:15
xr

Post by Spectre01 » Tue, 26. Jan 16, 20:02

On a glance, I don't think it's mod related. From the first link RoverTX linked, Astyrrean was on vanilla AP and he still gets framerate drop with the MD cue with multi-day savegame.

I will just go ahead with my own vanilla testing and report back couple days later.

User avatar
enenra
Posts: 7150
Joined: Fri, 8. Apr 05, 19:09
x4

Post by enenra » Tue, 26. Jan 16, 20:18

Spectre01 wrote:On a glance, I don't think it's mod related. From the first link RoverTX linked, Astyrrean was on vanilla AP and he still gets framerate drop with the MD cue with multi-day savegame.

I will just go ahead with my own vanilla testing and report back couple days later.
Yep but AFAIK we're not really sure whether it was that particular cue that was causing problems for him. Could have been any other memory leak issue with the MD. :)

User avatar
RoverTX
Posts: 1436
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX » Wed, 27. Jan 16, 03:02

enenra wrote:Yep but AFAIK we're not really sure whether it was that particular cue that was causing problems for him. Could have been any other memory leak issue with the MD. :)
From second referenced link in OP
kurush wrote:It looks like some leftovers from purchase asteroid data missions are getting accumulated. Each of 43 instances had L2M144 in its subcues.
Isn't that pretty good proof right there, or at least some good data to make some starting assumptions off to move forward with?

fireanddream
Posts: 384
Joined: Sun, 13. Dec 15, 07:15
xr

Post by fireanddream » Wed, 27. Jan 16, 04:49

I'm willing to bet it's not mod-related, since I had the issue a few days ago and my game has only the bonus pack and bounce installed.

And same as you, disabling generic mission improved frame rate significantly.

User avatar
enenra
Posts: 7150
Joined: Fri, 8. Apr 05, 19:09
x4

Post by enenra » Wed, 27. Jan 16, 09:53

RoverTX wrote:
enenra wrote:Yep but AFAIK we're not really sure whether it was that particular cue that was causing problems for him. Could have been any other memory leak issue with the MD. :)
From second referenced link in OP
kurush wrote:It looks like some leftovers from purchase asteroid data missions are getting accumulated. Each of 43 instances had L2M144 in its subcues.
Isn't that pretty good proof right there, or at least some good data to make some starting assumptions off to move forward with?
You misunderstand. :)

What I referenced was the first link since that guy is running the game in vanilla. For him we don't know what specifically was the problem.

fireanddream wrote:I'm willing to bet it's not mod-related, since I had the issue a few days ago and my game has only the bonus pack and bounce installed.

And same as you, disabling generic mission improved frame rate significantly.
Oh I bet disabling generic missions improved your framerate. But that's normal. Disabling all textures will also improve your framerate by quite a bit... but you lose textures. ;)

If you want I could try and take a look at your save file. I can't guarantee that I can find or solve the issue but I should be able to get a bit more insight with the MD debug tools I have here.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13094
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer » Wed, 27. Jan 16, 14:07

Hi all,

I have looked into these issues with Generic Missions and have some fixes. We'll hopefully get these out at some point but I can't guarantee it at the moment.

Affected missions were the Scan Asteroids and Escort Ship missions.

Owen

fireanddream
Posts: 384
Joined: Sun, 13. Dec 15, 07:15
xr

Post by fireanddream » Wed, 27. Jan 16, 15:28

Xenon_Slayer wrote:Hi all,

I have looked into these issues with Generic Missions and have some fixes. We'll hopefully get these out at some point but I can't guarantee it at the moment.

Affected missions were the Scan Asteroids and Escort Ship missions.

Owen
Thank you!

I really thought I was the only one having the problem a while ago. After a bit of research I found people saying the generic MD issue was fixed in AP patch 1.1. It really confused me I almost blamed bounce/bonus pack for it... :(

Space Traveller
Posts: 35
Joined: Sat, 28. Sep 13, 13:30
x3tc

Post by Space Traveller » Fri, 19. Feb 16, 20:39

It's good to see that you still look into it. After all, X3:AP is the best X there ever was (at least for me).

Meanwhile, is there a "quick and dirty" (yet effective) fix/workaround available before we (might) see an official patch? I'd like to play some X again, but not if I know that the savegame is doomed to become unplayable after a couple days.

And do i get it right that some people don't have this bug at all, yet the reasons for it to appear are yet unknown? So after all it's pure luck?

Edit:
I might be naive here...but would it actually help ("help" in the meaning of "prevent this bug from starting") to never accept this kind of missions?

User avatar
OneOfMany
Posts: 448
Joined: Thu, 15. May 14, 14:25
x4

Post by OneOfMany » Sat, 20. Feb 16, 10:51

Space Traveller wrote:Edit:
I might be naive here...but would it actually help ("help" in the meaning of "prevent this bug from starting") to never accept this kind of missions?
Since I read this topic I've not used either.

fireanddream
Posts: 384
Joined: Sun, 13. Dec 15, 07:15
xr

Post by fireanddream » Sat, 20. Feb 16, 14:21

Space Traveller wrote:It's good to see that you still look into it. After all, X3:AP is the best X there ever was (at least for me).

Meanwhile, is there a "quick and dirty" (yet effective) fix/workaround available before we (might) see an official patch? I'd like to play some X again, but not if I know that the savegame is doomed to become unplayable after a couple days.

And do i get it right that some people don't have this bug at all, yet the reasons for it to appear are yet unknown? So after all it's pure luck?

Edit:
I might be naive here...but would it actually help ("help" in the meaning of "prevent this bug from starting") to never accept this kind of missions?
There is an modified mission director file somebody made to clear all generic mission, you can download that, save, delete the file to restore your fps. When it gets laggy do it again. Meanwhile, I think it's the opposite of what you guessed, nobody did escort convoy missions and everybody got the lag, so in my current save I take those mission whenever possible to just send those ships to their death. Haven't seen any significant fps hit in 4 in-game days yet.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”