[MOD] [XRM:AP] TC Plots in XRM:Albion Prelude

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

Post Reply
FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Post by FriendlyFirePhoenix » Thu, 15. Jun 17, 08:58

Holy cow, great work. I've added the IEX patch (and IEX) and will let you know if I see any problems.

I noticed you are working on a couple of other integrations to help with performance. You probably know all this already but I got a huge performance boost by removing the XRM trails (sorry paulwheeler) and lowering laser fire rates with the combat performance patch https://forum.egosoft.com/viewtopic.php?t=391855. Worth trying if you haven't already.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Fri, 16. Jun 17, 15:19

Awesome, thanks for sharing! I will definitely check it out. I was never a big fan of engine trails anyway.

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

Post by SirNukes » Thu, 22. Jun 17, 01:45

Thanks for your work on updating this. It has convinced me to give XRM a whirl.

However, during initial testing to tune XRM to my liking, I have noticed that the generic destroy convoy mission has a briefing bug, where the initial briefing window with mission details (targets, difficulty, reward, etc.) is largely blank. If accepted, the mission details do show up correctly in the mission log.

The "2.127 Generic Destroy Convoy.xml" file in "Updated TCAP files for X3AP3.2" seems like it might be the problem, around line 536+ or so. The version of this file in AP 3.2 04.cat has significantly different briefing related code there. Hopefully that isn't too hard to fix up, or maybe it's safe to just use the 04.cat version.

Also, what do you think of some of the other generic missions that exist in both TCAP and 04.cat: 2.180, 2.181, 2.182, 2.183? It would be nice to have the least buggy versions of those, since the TCAP generic missions have had issues with gradually bogging down a playthrough with many hours on it.


For 3.08 Sector Management.xml, I notice that your version mostly takes after the one in TCAP, which is missing a lot of the AP code for unfocused jump drive sectors. The AP code includes references to Shady Business, better sector randomization, and hidden tuning crates. I recall the code merge being pretty straightforward.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Thu, 22. Jun 17, 12:42

Thanks for the update! My primary goal was to make sure the AP 3.2 changes were incorporated into TCAP, so I only touched files that were modified by the newest patch. Adimittedly, I did not have access to older versions of TCAP to track changes between versions, so some guesswork was involved. I did notice the issue you mention once or twice, but I assumed it might be a bug since TCAP incorporates AP's generic war missions, but the war is disabled until all X3TC missions are completed. Do you see that for all Destroy Convoy missions?

I'll take a look at the other files, but again, those were left as they were by Dillpickle because the patch did not touch them. Without access to older versions, I had to rely on the "last modified" date of the files, and I assumed that all AP functionality that was compatible with TC missions was included. That, and a "if it ain't broken don't fix it" approach.

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Post by FriendlyFirePhoenix » Fri, 23. Jun 17, 13:16

When I 'fixed up' the TCAP for 3.2 for myself, I overwrote destroy convoy with the new 3.2 vanilla version. I *can* see mission details. I haven't seen bugs for that mission unless you count Terrans giving me a mission to kill Argon ships when they are supposed to be at peace. So generally speaking I'm voting for overwriting.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Fri, 23. Jun 17, 18:08

Alright, an update:

For reference, here are the files modified by AP3.2: https://forum.egosoft.com/viewtopic.php ... 04#4657504

Sector Management: Unless I am blind, there is no "stock" Sector Management MD file in the AP CATs. The most recent I can find is in X3TC's 11.cat; our version is almost identical to the X3TC one, apart with some additions like the UFJD code.

2.180-2.183: None of these missions were touched by the AP patches that allegedly fixed the memory leak issues, therefore there should be no problem to keep using the TCAP versions (actually, per Dillpickle, he did make some performance optimizations to his versions of the files). "0. 83 Dual Convoy" was fixed by AP3.2 but it's not touched by TCAP so that should be fine as well.

2.127: My version of this mission is based on AP 3.2, with some additions from TCAP's version for compatibility reasons and to manage the war missions. Also, I moved some things around, so the diff doesn't always line up. However, I just run the diff again and I realized that I missed updating the text IDs for some mission briefings (the references are changed in XRM-TCAP since it it uses a custom 7360 t file). I am attaching a link below to a fixed version of the mission file as well as of the 7360 t file; let me know if that works. Just remove the EXPERIMENTAL part from the file names, and drop it in your addon/director folder for the mission and in addon/t for the t file:

(addon/director) http://www.mediafire.com/file/vjg4n2kxt ... Convoy.xml

(addon/t) http://www.mediafire.com/file/o3d77c1ky ... 0-L044.xml
Last edited by Mythrantar on Fri, 23. Jun 17, 18:41, edited 3 times in total.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Fri, 23. Jun 17, 18:10

FriendlyFirePhoenix wrote:When I 'fixed up' the TCAP for 3.2 for myself, I overwrote destroy convoy with the new 3.2 vanilla version. I *can* see mission details. I haven't seen bugs for that mission unless you count Terrans giving me a mission to kill Argon ships when they are supposed to be at peace. So generally speaking I'm voting for overwriting.
Was this while you were using XRM-TCAP also? I am asking because I want to see if the custom 7360 t file makes a difference.

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Post by FriendlyFirePhoenix » Sat, 24. Jun 17, 11:00

Yes. Confirmed yesterday while running XRM:TCAP. I'll try your experimental files and let you know what I see.

Update: After adding your experimental file, I was offered a combat mission with no briefing information. Turned out to be a destroy convoy mission. The mission itself seemed to function okay.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Sat, 24. Jun 17, 13:45

You used both experimental files and saw no difference? Bummer - back to the drawing board.

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Post by FriendlyFirePhoenix » Sun, 25. Jun 17, 08:03

Both files, yes. There was a difference for me because destroy convoy was displaying briefing before. I'm using destroy convoy from vanilla X3, just to be absolutely clear.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Wed, 28. Jun 17, 19:58

I am trying to get to the bottom of this, but I have not had much luck yet. What makes things complicated is that not all Destroy Convoy missions have the missing briefing bug. I even have a save where in the same station there are 2 people who give Destroy Convoy missions, however one quest giver has the bug while the other one does not. To make things even more complicated, if I accept the briefing-less mission and then try to view the briefing from the "Missions" menu, then the briefing works fine!

UPDATE: Without being able to see all the changes made step by step between the various versions of TCAP and the official AP patches, my current limited understanding of the system prevents me from determining the root cause of the issue. As a result, I have updated the TCAP patch for AP3.2 to Version 2.0: It restores the most recent official versions of "0.27 Destroy Convoy" and "2.127 Generic Destroy Convoy" MD files, which seems to resolve the issues with those generic missions. This is save-game compatible, but you will need to also reapply "Updated XRM-TCAP files for AP3.2 and TCAP2.2a.zip"

If you are already using these files (e.g. by manually extracting 0.27 from X3TC 13.CAT and 2.127 from AP 04.CAT) you don't need to download and install the new version.

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

Post by SirNukes » Mon, 3. Jul 17, 00:37

The AP version of sector management is in addon/03.cat. The Shady Business stuff looks to cover lines 81-98 and 104. The better sector randomization covers lines 153-246, and seems like it replaces lines 1029-1060 in TCAP. Hidden special ware spawning (tunings and PALCs) are on line 248-265, and can just be copied over. There is another minor change at line 424 to include player docked ships for some energy crate spawning decisions, but that is not too important. There is also non-UFJD stuff at 672-692 about counting terran ice miners, present in 03.cat but not TCAP; I don't know what its purpose is, but it might be safest to copy it over.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Mon, 3. Jul 17, 01:48

Thanks for that, there was something funky going on with my X3 Editor, but I reinstalled it and is working now. I will take a look, thanks for the pointers! Did my updated version of the files fix your missing mission briefings issue?

UPDATE: Combining the two Sector Management files was easy. The only thing I removed from the UFJD generation is the completion of Shady Business, since completing the Goner Plot also provides a UFJD and wouldn't want to lock the player out until Shady Business is completed as well. The updated version (V2.0) of the XRM-TCAP patch for AP3.2 is linked in my signature.

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

Post by SirNukes » Mon, 3. Jul 17, 04:55

Looking at that Shady Business code closer, I think the AP Sector Management code should be fine as-is (keeping line 104 in there). The value "Shady Business Enabled" is only set to 1 for the story step between getting the Acinonyx and escaping the xenon ambush shortly afterward. There is a small window where the player can do an unfocused jump before flying to Lost Order, getting a sector with a few wrecks in it, but I think a UJ during that window is unlikely to happen and not a big deal if it does.

In my own play through I left the "Shady Business Enabled" checks in there and things worked fine: normal UJ sectors when I wasn't on that SB plot step, and the special xenon sector when I did do that plot step.

Looking at your edit, I am thinking your version would cause the standard unfocused jump sector stuff to spawn into the shady business story instance, which might be amusing until some Kha'ak find your busted up Acinonyx. This might be pretty similar to what would happen in the TCAP version of sector management as well, except that wouldn't have the xenon wrecks from SB map file.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Mon, 3. Jul 17, 15:56

That makes sense - thanks for the feedback and additional info. I updated the version again (V3.0 now), restoring the missing check.

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Post by FriendlyFirePhoenix » Tue, 4. Jul 17, 12:07

Nice work, v3 installed. I assume unless explicitly stated that a new gamestart is not required.
one quest giver has the bug while the other one does not
This is probably a stupid question but did you wait for the old quests to expire before testing your new code?

Also found a small bug. The sector north of Argon Sector M148 is called Enduring Light. This should be Unknown Sector, as per Kha'ak plot. It appears to be empty of stations, as it should be in TC plots.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Tue, 4. Jul 17, 16:15

Yup, no need for a new start, unless you already have the UFJD. Even though, I think it should be ok anyway.

Yeah, they were showing up on a new gamestart - it was really weird. No matter, it's all taken care of.

I know why the Unknown Sector has a name; it was named in AP. To be honest, unless you have found that it interferes with the plot in some way, I may not bother with it, unless I find out how to force a sector name change via the MD.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Wed, 5. Jul 17, 04:40

So, while I was poking around to find a way to use the MD to change a sector name, I found a critical error with the New Home plot as was included in XRM-TCAP: It was pointing to the wrong sector coordinates for the player sector (x=19 y=10, instead of x=20 y=9). I have updated the "Updates XRM TCAP for AP 3.2" to version 4.0 to address the issue. As always, it should be savegame compatible unless you have started the plot.

Incidentally, I may have found a way to change sector names, so I am going to see if it's worth the effort and if I can make it so that "Enduring Light" is "Unknown" until the Kha'ak plot is completed.

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

Post by SirNukes » Tue, 18. Jul 17, 10:11

I noticed an oddity while poking around the different text files when writing up some code to color sector names for me. File 7027-L044.xml on line 71 has a circular reference: <t id="1023801">{7,1023801}</t>. X3 Editor 2 was crashing on trying to load this file, which pointed me toward the problem. The error appears to be in the original TCAP/XRM merger patch, and is copied into the recent updated files.

The code line in XRM itself appears to be "<t id="1020619">{7,1023801}</t>". Elsewhere, the TCAP/XRM patch edits "<t id="1030619">" to be "<t id="1033801">". It seems Family Zyarth (0619) was renamed to Circle of Deceit (name assigned to 3801) by XRM, along with being given a new description. The TCAP/XRM patch appears to have swapped the new description over to 3801 (I assume where it would not get used, the intention just being to restore Family Zyarth), and restored the original name by swapping the name reference as well, generating the circular reference.

In short, I think the fix is just to comment out or remove line 71 in 7027-L044.xml. If left as-is, I don't know what the X3 engine would do in this case - maybe quietly ignore it, or maybe introduce some subtle bugs.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Wed, 19. Jul 17, 23:37

Thanks for the report. I am on vacation till the end of the month but will take a look at it once I come back!

Post Reply

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