[5.0] Chasing Leads stopped during patrol step

The place to discuss scripting and game modifications for X4: Foundations.

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

gingeravalanche
Posts: 4
Joined: Thu, 7. Apr 22, 05:09
x4

[5.0] Chasing Leads stopped during patrol step

Post by gingeravalanche »

  • Game Verion: 5.0 English
  • Whether or not your game is modified using any third party scripts or mods: Yes. VRO is the most notable one, which may have messed with a ship being able to spawn.
  • Game start: Terran 2 (Project Genesis)
  • Your system specifications: Intel i7-6950X, NVIDIA TITAN X Pascal 12GB VRAM, 16GB DDR3 RAM
In the Chasing Leads mission for the Hatikvah Trade League, during the part where you have to patrol to several points throughout Hatikvah's Choice I for 15 seconds each. At one of the points, the mission tells me to just "Patrol" and doesn't give either a timer or any other sort of update. From searching the forum, I gather this might be where a ship (Teladi Kestrel?) is supposed to spawn for me to follow, but it hasn't done so.

I realize that the fact my game is modded means the bug is probably not with X4, but with one of my mods (probably VRO) but the support I would like is to see if there might be a way to force the quest to the next phase, either with some sort of console command or by editing my save. I've managed to find the following in my save file, and was wondering if I could edit it to something to see if I could either back up to a previous mission cue and then get the game to retry, or fast forward to the next valid cue.

Code: Select all

<cue id="548891" name="Pt4_Patrol_Area_Started" state="cancelled"/>
<cue id="548892" name="Pt4_Patrol_Timeout" state="cancelled"/>
<cue id="548893" name="Pt4_Patrol_Ended" state="cancelled"/>
</cue>
<cue id="548894" name="Pt4_Follow_Ship_Trigger" state="complete" time="182759.906" index="1">
<cue id="548895" name="Pt4_Follow_Ship_Go_To_Gate" version="2" state="waiting">
<cue id="548896" name="Pt4_Spawn_Follow_Mission_Ship">
<cue id="548897" name="Pt4_Follow_Ship_Destroyed"/>
I don't quite understand how the mission director works, so all my attempts to change the mission's state so far have failed. But I'm generally pretty good at figuring things out, if the best that can be done is a general explanation. Anything is appreciated. Thanks!
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13485
Joined: Sun, 15. Feb 04, 20:12
x4

Re: [5.0] Chasing Leads stopped during patrol step

Post by euclid »

Hi gingeravalache :-)

Missions are usually triggered by events. You could try to progress the mission using "signal_cue" (see md.xsd in the libraries folder for more info) but I recommend to be very careful as it may cause other problems. A better way is to try to finish your patrol mission. IIrc the ship should spawn near a gate close to the mission start. It is easy to miss. You also could try to load a saved game and restart the mission.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
gingeravalanche
Posts: 4
Joined: Thu, 7. Apr 22, 05:09
x4

Re: [5.0] Chasing Leads stopped during patrol step

Post by gingeravalanche »

Thanks for the direction, euclid. Unfortunately, I don't consider reloading a previous save to be an option, as I didn't even realize the scale of the bug until long enough after it happened that all my saves and autosaves are post-bug.

If I were a developer, though, I would code the mission to clear special state objects (like spawned ships) if the player decided to ignore the mission at that point, and then spawn them again when the player came back, to avoid scenarios in which the mission could become uncompletable. I'm going to *hope* that's what Egosoft did, because it would mean the ship is being spawned and the fault is my own for not seeing it, which is reasonable and much more easily fixable. :P
gingeravalanche
Posts: 4
Joined: Thu, 7. Apr 22, 05:09
x4

Re: [5.0] Chasing Leads stopped during patrol step

Post by gingeravalanche »

euclid wrote: Sun, 10. Apr 22, 14:52 Hi gingeravalache :-)

Missions are usually triggered by events. You could try to progress the mission using "signal_cue" (see md.xsd in the libraries folder for more info) but I recommend to be very careful as it may cause other problems. A better way is to try to finish your patrol mission. IIrc the ship should spawn near a gate close to the mission start. It is easy to miss. You also could try to load a saved game and restart the mission.

Cheers Euclid

Hey, sorry to double-post, but I looked into it and don't think it's actually a mod-related error. Pt4_Follow_Ship_Go_To_Gate seems to be waiting to be signaled by the cue md.NPC_UseCases.UseCase that has the parameter for the Dal Busta speech event 30202098/30202099 (depending on player gender), but that cue must have errored somehow in my game, because that speech event never fired for me. I unfortunately don't have a log of whatever error was caused by this, because I didn't have logging enabled at the time.

Good news is, I think I can get to the next step (either fixing it or prompting another error for my debug log) by just signaling Pt4_Follow_Ship_Trigger again to have it signal the UseCase trigger again. But I, uh... haven't been able to figure out how to use signal_cue. :P I saw there was a command I could enter into the chat box to execute lua code, but "/lua signal_cue 'Pt4_Follow_Ship_Trigger'" doesn't do anything (I'm not even sure if signal_cue is lua, tbh) and I haven't been able to find any other way of executing arbitrary commands, short of creating a mod to do it (which then runs me up against the issue of how to manually execute whatever md cue I create). Any help you can give on that subject?
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13485
Joined: Sun, 15. Feb 04, 20:12
x4

Re: [5.0] Chasing Leads stopped during patrol step

Post by euclid »

gingeravalanche wrote: Sat, 16. Apr 22, 02:08 .... I looked into it and don't think it's actually a mod-related error.
.... (I'm not even sure if signal_cue is lua, tbh) and I haven't been able to find any other way or executing arbitrary commands. Any help you can give on that subject?
AfaIk you are the only player to have encountered this "bug" and hence it's probably due to some mod. But anyway, signal_cue is an MD command (hence my recommendation to check out the md.xsd file) and needs to be triggered via a corresponding XML file.

If you wish to explore this further, the way I'd approach this is to check the mission file (I suppose you have unpacked all files) to see what actually triggers it. If you are still on the "patrol" part it may well be that you need to kill a few more enemies for it to finish. But to be sure (and not to cause futher problems) check the corresponding file and only if you are certain that it is bugged then write a short MD script that triggers, for example, on saved game load (there are other ways to trigger it once) which calls the signal_cue. For more info on how to create an MD file please check the links in the sticky on top of this forum.

In any case I recommend to backup your saved game(s) before attempting it.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
gingeravalanche
Posts: 4
Joined: Thu, 7. Apr 22, 05:09
x4

Re: [5.0] Chasing Leads stopped during patrol step

Post by gingeravalanche »

euclid wrote: Sat, 16. Apr 22, 02:39 AfaIk you are the only player to have encountered this "bug" and hence it's probably due to some mod...
... the way I'd approach this is to check the mission file (I suppose you have unpacked all files) to see what actually triggers it...
I was able to trigger the next portion of the mission, then the next time an md.NPC_UseCases.UseCase was signaled, it broke again.

md.NPC_UseCases.UseCase was signaled by the part I was stuck on to trigger a conversation event with Dal. It was then used to trigger a conversation between the Teladi pilot and the police ship, several cues later. Both of those broke in my game. I was able to bypass them both by setting the cue that was `waiting` on the UseCase to `active` state instead. The weird thing is that it seems to be erroring only on UseCase, but it only started erroring on UseCase in Pt4, even though it's used in several other places in Pt1 and Pt2 that had no problems.

Luckily, the police encounter seems to be the last time UseCase is used by story_diplomacy_intro, and it's pretty much only used there and in scenario_combat (though there's one use in scenario_flightschool) so hopefully this is the last I'll have to deal with it. Leaving this message here in case anyone else ever has to deal with this issue.

I still don't know what could've caused UseCase to break so completely. None of my mods do anything regarding UseCase, and it didn't seem to be any issue concerning receiving multiple conversations at the same time (like from fleet commanders pestering you about what to do about being attacked), which is what I originally thought it could be, due to receiving a bunch of those around the time of the first error.

Return to “X4: Foundations - Scripts and Modding”