Page 1 of 1

Mission Update Project

Posted: Mon Jan 07, 2019 7:52 am
by Mark_Farlander
Hello brave pilots, starship designers, weapon experimenters, hyperdrive technicians and tactical officers.
As you surely know, even though X-Wing Alliance is the best Star Wars game ever released, it still suffers a huge problem: Mission Bugs.
My project is aimed at solving bugs present in campaign missions without affecting the game difficulty or the in-mission progression of events in any way.

Thanks to the info collected in the AlliED unknowns repository topic (http://xwaupgrade.com/phpBB3/viewtopic.php?f=9&t=10819) and thanks to all the people who contributed in such findings, detecting mission bugs will be much simpler than in the past.
I've already taken a first look at most of the 53 campaign missions, and I have to say that the things needed to be checked in detail are orders, arrival and departure conditions, and jump to order conditions. Now thanks to the updated Class.txt and Conds.txt files these ones are easily understood.

I think a distinction is needed: problems affecting a single mission and problems affecting many missions.
Here are 2 examples, one for each category.

In B1M4 if you destroy Platform 2 Bundil II before the Nebulon-B2 Frigate Archon arrives, M/FRG Archon will never enter the area, and you get the bonus points for her destruction anyway. This is obviously a bug affecting a single mission.
Explanation: the Arrival condition of M/FRG Archon has "Via PLT/2 Bundil II".
Solution: change it to "Via Hyperspace".

Starfighters attacking escape pods instead of their targets. This is a problem affecting nearly all the campaign missions.
Explanation: all the escape pods launched from damaged starships and stations are set to Global Group 0, so every Flight Group with order “Attack Global Group 0” can potentially attack them.
Solution 1 (recommended): all Flight Groups belonging to Global Group 0 must be reassigned to an unused Global Group, and all orders and conditions referring to Global Group 0 must be changed accordingly.
Solution 2 (not recommended): give “No AI ejection” status to every single Flight Group in the game campaign, even Starfighters because ejected pilots suffer the same issue affecting escape pods.

Of course there can be more than 1 solution to a problem or mission bug, but there is usually one less invasive than another.

I'm going to use this topic to discuss about solutions to mission problems. I'll keep you updated on my progresses.

Re: Mission Update Project

Posted: Mon Jan 07, 2019 11:44 am
by Phoenix Leader
I'm quite experienced with mission editing, so I can give you a hand in the task.
Mark_Farlander wrote:
Mon Jan 07, 2019 7:52 am

Starfighters attacking escape pods instead of their targets. This is a problem affecting nearly all the campaign missions.
Explanation: all the escape pods launched from damaged starships and stations are set to Global Group 0, so every Flight Group with order “Attack Global Group 0” can potentially attack them.
Solution 1 (recommended): all Flight Groups belonging to Global Group 0 must be reassigned to an unused Global Group, and all orders and conditions referring to Global Group 0 must be changed accordingly.
Solution 2 (not recommended): give “No AI ejection” status to every single Flight Group in the game campaign, even Starfighters because ejected pilots suffer the same issue affecting escape pods.
I know what you are talking about and I'm aware that it takes forever to manually make such fix to all the missions, or at least to the missions where at least a flight group has the order “Attack Global Group 0” in a given region.
I think a bit more automation in the process is needed.


What if Captain Bolvan, the gunnery officer in charge on the ISD Devastator, had not ordered not to fire to an escape pod launched from the CRV Tantive IV only because there were no life signs aboard?

Re: Mission Update Project

Posted: Wed Jan 09, 2019 9:29 am
by keiranhalcyon7
Phoenix Leader wrote:
Mon Jan 07, 2019 11:44 am
I think a bit more automation in the process is needed.
You could ask MikeG to add some kind of scripting support to YOGEME.

Re: Mission Update Project

Posted: Mon Jan 14, 2019 5:10 am
by JaggedFel
YOGEME already has a mechanism to fix GG references if a Flight Group is deleted per the last update, I can look into tweaking that to update references on changes as well.

Re: Mission Update Project

Posted: Mon Jan 14, 2019 2:30 pm
by Phoenix Leader
This might be helpful.

Re: Mission Update Project

Posted: Sat Jan 19, 2019 9:19 pm
by Fek'LeyrTarg
Could a dll hook be used to prevent any AI craft from firing on escape pods and ejected pilots?

Re: Mission Update Project

Posted: Sun Jan 20, 2019 7:52 pm
by JeremyaFr
For info,
The function that creates escape pods / pilots is situated at address 00404290.
The function that defines escape pods / pilots count for a craft is situated at address 0041A960.

Re: Mission Update Project

Posted: Sun Jan 20, 2019 8:57 pm
by keiranhalcyon7
Great finds. Would it make better sense to modify the first of those functions to put the escape pods/ejectees into global group (max value)? On the hunches that: nothing is ever intended to attack these craft, and even if they were, it wouldn't be implemented via the global group mechanic; and of course that the last global group is probably never used. (Might be worth checking those assumptions first.)

Re: Mission Update Project

Posted: Mon Jan 21, 2019 10:38 am
by Phoenix Leader
Interesting, in B0M5 there are many conditions referring to Global Group 0, but all Smuggler crafts (SCT Ravenno, CLK/F Zolo 10 and 11, GSP Loose Cannon) have status 22 (NO AI ejection).

Re: Mission Update Project

Posted: Mon Jan 21, 2019 3:51 pm
by Phoenix Leader
The situation in B0M6 is overwhelming.
Rebel crafts sometimes don't departure because of the too long wait time of "Park at" order.
An ATR Omega parks on a disabled escape pod, though its orders seem OK apart from the the fact it doesn't return to ISDII Corrupter once the Hospital has been destroyed.
TIE Fighters attacking the hyper buoy and CRV Farelly parked on an Imperial pilot.

Men this is going to be a hard one to solve.

Re: Mission Update Project

Posted: Mon Jan 21, 2019 4:08 pm
by Mark_Farlander
I'm afraid we will have to reassign nearly all orders using Flight Groups and Global Units and avoiding that "any... except" at all costs.
One of the most bugged missions.

Re: Mission Update Project

Posted: Wed Jan 23, 2019 4:40 pm
by JeremyaFr
Fek'LeyrTarg wrote:
Sat Jan 19, 2019 9:19 pm
Could a dll hook be used to prevent any AI craft from firing on escape pods and ejected pilots?
Hello,
I think this can be done by setting the team to 9 for the escape pods and ejected pilots.

Code: Select all

; set team = 9 for escape pods / pilots
At offset 003881, replace 8A0C45F1DC8000 with B1099090909090.
At offset 003A93, replace 8A8198000000 with B00990909090.
To test in skirmish mission, you can apply this:

Code: Select all

; enable escape pod / pilots ejection on skirmish missions
At offset 178BB6, replace C68429C90D000016 with C68429C90D000000.

; set escape pods / pilots order to null
At offset 0042EB, replace 0F87F4000000 with 90E9F4000000.
The escape pods / pilots will be static and you can easily see if the AI crafts attack them.

Re: Mission Update Project

Posted: Tue Feb 12, 2019 12:47 am
by Phoenix Leader
There are a few strange behaviors worth to be discussed.
In Prologue, Mission 1 and 3 if you order the Selu to inspect the Pursuer Aeron will open turret fire against you.
Checked all the orders using a mission editor and they are all OK.
I think the problem is how the AI manages the transition when the player "overwrites" the "Escort (prevent boarding)" order.
In Prologue, Mission 5 things go even worse because the Otana would prematurely attack the smugglers if you order to inspect SCT Ravenno.

In Prologue, Mission 2 FRS Andrasta prematurely leaves target area 2 (and Emkay will follow) if you ordered Emon to attack the drones once all deployed in the previous target area.
And if you order Emon (FRS Andrasta) to attack the drones before an entire FG has been deployed, the remaining ones of that FG will not be dropped once the Andrasta has resumed mission.
The explanation here is how the "Drop off/Deploy" order works: it cannot be cut.

Re: Mission Update Project

Posted: Tue Feb 12, 2019 1:03 am
by Phoenix Leader
Of course there is a very simple, though extreme, solution to solve all those problems in missions without altering the AI: the said ships must be assigned to another Global Unit. This solution will prevent the player from giving orders.

Personally I think this solution is OK in some prologue missions, when the player is not supposed to give orders because Ace is still learning from Aeron and Emon, but it will ruin all the tactical sense of the game if applied in advanced missions with the Alliance such as Battle 2, Mission 4.

Re: Mission Update Project

Posted: Tue Feb 12, 2019 11:38 am
by Mark_Farlander
Phoenix Leader wrote:
Tue Feb 12, 2019 12:47 am
There are a few strange behaviors worth to be discussed.
In Prologue, Mission 1 and 3 if you order the Selu to inspect the Pursuer Aeron will open turret fire against you.
Checked all the orders using a mission editor and they are all OK.
I think the problem is how the AI manages the transition when the player "overwrites" the "Escort (prevent boarding)" order.
In Prologue, Mission 5 things go even worse because the Otana would prematurely attack the smugglers if you order to inspect SCT Ravenno.

In Prologue, Mission 2 FRS Andrasta prematurely leaves target area 2 (and Emkay will follow) if you ordered Emon to attack the drones once all deployed in the previous target area.
And if you order Emon (FRS Andrasta) to attack the drones before an entire FG has been deployed, the remaining ones of that FG will not be dropped once the Andrasta has resumed mission.
The explanation here is how the "Drop off/Deploy" order works: it cannot be cut.
Phoenix Leader wrote:
Tue Feb 12, 2019 1:03 am
Of course there is a very simple, though extreme, solution to solve all those problems in missions without altering the AI: the said ships must be assigned to another Global Unit. This solution will prevent the player from giving orders.
This is true and I've tried this solution, but in B0M2 you don't have control of your craft, so if you set a different energy configuration in Region 4 (Dunari's Casino), the only way you have to avoid a collision with FRS Andrasta in Region 1 (Azzameen Station) is to order Emon to form up.
Additionally, if we exclude Andrasta from the flight command menu, the player is also more likely to redirect all power to engines in Region 4 to reach PES Enkidu before it leaves (300 bonus points for attacking PES Enkidu).

The solution you propose is OK for B0M1, where the only order a player is likely to give Selu is to inspect the Pursuers to get the bonus points, and Selu will fire to you in this case (awful bug). The player can still get the bonus points by redirecting all power to engines to inspect the Pursuers before they leave Region 2 (Harlequin Station), and this is the recommended strategy.