Containers L cannot be hit by AI crafts
Containers L cannot be hit by AI crafts
- Phoenix Leader
- Posts: 437
- Joined: Wed Aug 08, 2018 2:20 pm
While I was playing Prologue, Mission #2 I experienced this problem: FRS Andrasta is not able to hit the type L containers.
I've uploaded a video: https://www.youtube.com/watch?v=TyGw8qo1IWI
This is not an issue related to the mission because I have the same problem in the Flight Simulator, skirmish mode.
I also tried to change craft and the X-Wing got the same result.
This has definitely something to do with the type L containers, not the fighters.
I've uploaded a video: https://www.youtube.com/watch?v=TyGw8qo1IWI
This is not an issue related to the mission because I have the same problem in the Flight Simulator, skirmish mode.
I also tried to change craft and the X-Wing got the same result.
This has definitely something to do with the type L containers, not the fighters.
- JeremyaFr
- Posts: 3922
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
You can try this patch:
Tell me if this works or not.
You can try this patch:
Code: Select all
; fix ContainerSphere not being hittable by AI
At offset 0119A6, replace 0F842F010000 with 909090909090.
- Phoenix Leader
- Posts: 437
- Joined: Wed Aug 08, 2018 2:20 pm
I tried to open XwingAlliance.exe with Resource Hacker, but I didn't find 0F842F010000.
Did I use the wrong software to open .exe?
I forgot to write I have DSUCP v2.5 installed.
I don't know in detail how it modifies XwingAlliance.exe.
Did I use the wrong software to open .exe?
I forgot to write I have DSUCP v2.5 installed.
I don't know in detail how it modifies XwingAlliance.exe.
- JeremyaFr
- Posts: 3922
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
As an alternative, you can use XwaExePatcher and add this to patcher.xml:
Code: Select all
<Patch Name ="fix ContainerSphere not being hittable by AI">
<Item Offset="0119A6" From="0F842F010000" To="909090909090" />
</Patch>
- Phoenix Leader
- Posts: 437
- Joined: Wed Aug 08, 2018 2:20 pm
I downloaded the XwaExePatcher-1.0.11.zip (14.8 KB), extracted the files, opened patcher.xml with notepad and added the patch (of course before </ArrayOfPatch>); than I copied patcher.xml and pasted it to the X-Wing Alliance directory.
The problem is partially solved: some fighters, the Firespray for example, are now able to hit the containers type L, while others, the X-Wing for example, still miss the targets.
Is there anything I did wrong in the patch installation process?
The problem is partially solved: some fighters, the Firespray for example, are now able to hit the containers type L, while others, the X-Wing for example, still miss the targets.
Is there anything I did wrong in the patch installation process?
- Darksaber
- Posts: 10931
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
No, extract the XwaExePatcher-1.0.11.zip then add
to the patcher.xml (you can open this with Notepad)
and yes before the </ArrayOfPatch>
Next goto you xwa Dir copy and paste the XwingAlliance.exe in to the XwaExePatcher-1.0.11 directory
next click on XwaExePatcherWindow.exe a window will open, scroll down to the bottom you will see the "fix ContainerSphere not being hittable by AI"
click "Apply" you have now applied the fix
Next Copy and paste the XwingAlliance.exe back to your XWA Dir, test the fix by playing the game
If you find the fix doesn't work repeat the above but click on "Restore to remove the "fix ContainerSphere not being hittable by AI".
Hope thats a little clearer
Code: Select all
<Patch Name ="fix ContainerSphere not being hittable by AI">
<Item Offset="0119A6" From="0F842F010000" To="909090909090" />
</Patch>
and yes before the </ArrayOfPatch>
Next goto you xwa Dir copy and paste the XwingAlliance.exe in to the XwaExePatcher-1.0.11 directory
next click on XwaExePatcherWindow.exe a window will open, scroll down to the bottom you will see the "fix ContainerSphere not being hittable by AI"
click "Apply" you have now applied the fix
Next Copy and paste the XwingAlliance.exe back to your XWA Dir, test the fix by playing the game
If you find the fix doesn't work repeat the above but click on "Restore to remove the "fix ContainerSphere not being hittable by AI".
Hope thats a little clearer
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- JeremyaFr
- Posts: 3922
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Like I said, it's a try. The patch may not work.
- Darksaber
- Posts: 10931
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
Ok I've done a test, without the patch, 6 container L (sphere) vs 6 x-wing, the xwings destroyed the spheres
Without Patch 6 Tie fighters again destroyed the sheres
Awings same result
Bwings, find it harder to hit the spheres and Firesprays couldn't hit a death star if it was right infront of them
Tried exactly the same with the patch and got the same result
Because the Ties, Awing and X-wings lasers are closer to centre the AI find it easy destroying the targets
Bwings and the Firspray there lasers are a fare bit off centre so the AI find it harder to hit anything
I don't think the patch works, I think its just the positioning of the lasers on the craft, the further away the lasers are from centre the hard AI craft find it to hit anything
So if your going to have a squardon of anything select a craft the has laser near the centre
Without Patch 6 Tie fighters again destroyed the sheres
Awings same result
Bwings, find it harder to hit the spheres and Firesprays couldn't hit a death star if it was right infront of them
Tried exactly the same with the patch and got the same result
Because the Ties, Awing and X-wings lasers are closer to centre the AI find it easy destroying the targets
Bwings and the Firspray there lasers are a fare bit off centre so the AI find it harder to hit anything
I don't think the patch works, I think its just the positioning of the lasers on the craft, the further away the lasers are from centre the hard AI craft find it to hit anything
So if your going to have a squardon of anything select a craft the has laser near the centre
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
Yes the issue does seem to be related to how the AI aim for the center of the target. With an unmodded XWA installation, some ships may have trouble hitting the container on the first pass but they will most likely destroy it on the second pass. Weird that this is happening with the upgraded container. Is it possible that the upgraded container is off center?
EDIT: There may be something hardcoded to compensate aim for the L container. I know in XvT there was specific hardcoding for certain containers and their hitbox since they weren't large enough to be considered for precision collision checking. Just a theory though.
EDIT: There may be something hardcoded to compensate aim for the L container. I know in XvT there was specific hardcoding for certain containers and their hitbox since they weren't large enough to be considered for precision collision checking. Just a theory though.
- Darksaber
- Posts: 10931
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
No I've checked them
I still believe its the positioning of the laser hardpoints, the further away the laser hardpoints are away from the centre of the craft, I think it makes it harder for an AI craft to aim, just look at the positioning of the laser hardpoint on the slave1 and Bwing, Then look at the positioning of of the laser hardpoints on say the Tie Fighter or Awing
It like having a gun in both hands, then stretching your arms out to the side and still trying to fire forward, your aim is going to be way off.
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- Phoenix Leader
- Posts: 437
- Joined: Wed Aug 08, 2018 2:20 pm
Thanks for the replies.
So this seems to be an AI related issue and solving it could require editing AI behavior, which means essentially cheating.
I knew Emon is getting old.
So this seems to be an AI related issue and solving it could require editing AI behavior, which means essentially cheating.
LOLFiresprays couldn't hit a death star if it was right in front of them
I knew Emon is getting old.
-
- Posts: 1167
- Joined: Mon Apr 05, 2004 11:01 pm
I noticed a similar issue a few years ago when I had a corvette try to clear a mine field, but it shot right through the mines without damaging them.
Last edited by Bman on Tue Jan 15, 2019 5:57 am, edited 1 time in total.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
I did some filming, and as far as I can tell, the AIs don't use laser convergence. I think, if they did, it would resolve the issue.
- Phoenix Leader
- Posts: 437
- Joined: Wed Aug 08, 2018 2:20 pm
Strange, the laser convergence system is turned on by default.
Shouldn't the AI be using the auto-setting?
Shouldn't the AI be using the auto-setting?
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
I was going to post "Not all ships have convergence systems" but I wanted to see how the AI is acting with a ship that does have convergence. I have uploaded a video with me spectating the AI.
https://1drv.ms/v/s!AoEpIrw6LOkUjcYCwwp1D4tUm7qd4Q
keiranhalcyon7 is correct, the AI don't use convergence. As a matter of fact, they will turn it off if its on which I find interesting.
https://1drv.ms/v/s!AoEpIrw6LOkUjcYCwwp1D4tUm7qd4Q
keiranhalcyon7 is correct, the AI don't use convergence. As a matter of fact, they will turn it off if its on which I find interesting.
- JeremyaFr
- Posts: 3922
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
The code that defines gun convergence for AI crafts looks like this:
As you can see, the AI doesn't use gun convergence when shooting to containers.
You can enable gun convergence for AI craft with this patch:
The first item removes the ship category/model index filter for the current craft.
The second item enables gun convergence when shooting at people and container
With the patch, the code will look like that:
The code that defines gun convergence for AI crafts looks like this:
Code: Select all
s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_Off;
if( s_XwaObjects[s_V0x07CA1A0.ObjectIndex].ShipCategory == ShipCategory_Starfighter || s_XwaObjects[s_V0x07CA1A0.ObjectIndex].ModelIndex == ModelIndex_051_0_38_EscortShuttle )
{
switch( s_XwaObjects[esp18].ShipCategory )
{
case ShipCategory_Starfighter:
case ShipCategory_Transport:
case ShipCategory_UtilityVehicle:
case ShipCategory_Mine:
case ShipCategory_Satellite:
case ShipCategory_Droid:
case ShipCategory_Armament:
if( s_ExeCraftTable[s_pXwaCurrentCraft->CraftIndex].GunConvergence == GunConvergence_Manual )
{
s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_Medium;
}
else if( s_ExeCraftTable[s_pXwaCurrentCraft->CraftIndex].GunConvergence == GunConvergence_Auto )
{
s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_On;
}
break;
}
}
You can enable gun convergence for AI craft with this patch:
Code: Select all
<Patch Name ="fix gun convergence for AI">
<Item Offset="0A6C09" From="7407" To="EB07" />
<Item Offset="0A77E4" From="0303" To="0202" />
</Patch>
The second item enables gun convergence when shooting at people and container
With the patch, the code will look like that:
Code: Select all
s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_Off;
switch( s_XwaObjects[esp18].ShipCategory )
{
case ShipCategory_Starfighter:
case ShipCategory_Transport:
case ShipCategory_UtilityVehicle:
case ShipCategory_Mine:
case ShipCategory_Satellite:
case ShipCategory_People:
case ShipCategory_Container:
case ShipCategory_Droid:
case ShipCategory_Armament:
if( s_ExeCraftTable[s_pXwaCurrentCraft->CraftIndex].GunConvergence == GunConvergence_Manual )
{
s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_Medium;
}
else if( s_ExeCraftTable[s_pXwaCurrentCraft->CraftIndex].GunConvergence == GunConvergence_Auto )
{
s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_On;
}
break;
}
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
Confirmed, both the Firespray and the B-Wing have no trouble hitting the containers with this patch applied. I also threw in some zero-g Stormtroopers, which they also had no trouble with.
EDIT: Although now I realize that zero-g Stormtroopers are in the droid category, not the people category, and as such, the AIs always used convergence against them, and never had any trouble hitting them. I guess clones are closer to droids than to people? Anyway, I couldn't actually find anything with ship type: people in MXvTED with which to test that part of the change.
So s_V0x07CA1A0 appears to be a data structure for the current craft, and esp18 is the ObjectIndex for the target craft. I'm curious, is s_pXwaCurrentCraft just a pointer to s_V0x07CA1A0?
EDIT: Although now I realize that zero-g Stormtroopers are in the droid category, not the people category, and as such, the AIs always used convergence against them, and never had any trouble hitting them. I guess clones are closer to droids than to people? Anyway, I couldn't actually find anything with ship type: people in MXvTED with which to test that part of the change.
So s_V0x07CA1A0 appears to be a data structure for the current craft, and esp18 is the ObjectIndex for the target craft. I'm curious, is s_pXwaCurrentCraft just a pointer to s_V0x07CA1A0?
- JeremyaFr
- Posts: 3922
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
It seems that the people category is never used.
s_V0x07CA1A0 is a data structure used by the AI code. esp18 is the object index of the target craft. s_pXwaCurrentCraft is not a pointer to s_V0x07CA1A0. It is a pointer to a structure that contains data related to a craft.
s_V0x07CA1A0 is a data structure used by the AI code. esp18 is the object index of the target craft. s_pXwaCurrentCraft is not a pointer to s_V0x07CA1A0. It is a pointer to a structure that contains data related to a craft.
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
Hmm, thanks, Jeremy. And congrats on post 1000!
- Darksaber
- Posts: 10931
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
If I apply this to the DSUCP and XWACP, is this going to bugger up any missions???
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
This is very good stuff! I'll add this to the database.JeremyaFr wrote: ↑Mon Jan 14, 2019 5:23 pmHello,
The code that defines gun convergence for AI crafts looks like this:As you can see, the AI doesn't use gun convergence when shooting to containers.Code: Select all
s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_Off; if( s_XwaObjects[s_V0x07CA1A0.ObjectIndex].ShipCategory == ShipCategory_Starfighter || s_XwaObjects[s_V0x07CA1A0.ObjectIndex].ModelIndex == ModelIndex_051_0_38_EscortShuttle ) { switch( s_XwaObjects[esp18].ShipCategory ) { case ShipCategory_Starfighter: case ShipCategory_Transport: case ShipCategory_UtilityVehicle: case ShipCategory_Mine: case ShipCategory_Satellite: case ShipCategory_Droid: case ShipCategory_Armament: if( s_ExeCraftTable[s_pXwaCurrentCraft->CraftIndex].GunConvergence == GunConvergence_Manual ) { s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_Medium; } else if( s_ExeCraftTable[s_pXwaCurrentCraft->CraftIndex].GunConvergence == GunConvergence_Auto ) { s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_On; } break; } }
You can enable gun convergence for AI craft with this patch:The first item removes the ship category/model index filter for the current craft.Code: Select all
<Patch Name ="fix gun convergence for AI"> <Item Offset="0A6C09" From="7407" To="EB07" /> <Item Offset="0A77E4" From="0303" To="0202" /> </Patch>
The second item enables gun convergence when shooting at people and container
With the patch, the code will look like that:Code: Select all
s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_Off; switch( s_XwaObjects[esp18].ShipCategory ) { case ShipCategory_Starfighter: case ShipCategory_Transport: case ShipCategory_UtilityVehicle: case ShipCategory_Mine: case ShipCategory_Satellite: case ShipCategory_People: case ShipCategory_Container: case ShipCategory_Droid: case ShipCategory_Armament: if( s_ExeCraftTable[s_pXwaCurrentCraft->CraftIndex].GunConvergence == GunConvergence_Manual ) { s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_Medium; } else if( s_ExeCraftTable[s_pXwaCurrentCraft->CraftIndex].GunConvergence == GunConvergence_Auto ) { s_pXwaCurrentCraft->LasersConvergence = LasersConvergence_On; } break; }
Maybe? For example, enemy craft that are attacking friendly small containers would be more difficult. But it also works in reverse.
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- Phoenix Leader
- Posts: 437
- Joined: Wed Aug 08, 2018 2:20 pm
There is only 1 mission where enemy fighters attack friendly containers: B2M1 where TIE Experimental M1 attack type B containers, but they aren't small.Maybe? For example, enemy craft that are attacking friendly small containers would be more difficult. But it also works in reverse.
As for the opposite situation, there are no mission where friendly fighters attack enemy containers, unless you order them to do so.
- Mark_Farlander
- Posts: 580
- Joined: Tue Jan 16, 2018 10:47 pm
Hello pilots,
I've applied the "fix gun convergence for AI" patch with XwaExePatcherWindow (XwaExePatcher-1.0.25) and now Firesprays can hit small objects such as Containers G that they couldn't hit before, but with the patch another issue has come: the gun turret on YT-1300 in B0M2 moves without input from player.
This happens regardless of the fact the Sabra is performing the "Follow Targets" order or not, therefore it cannot be a mission problem, but this only happens in areas where such order is present at any time, therefore it "seems" a mission problem.
I'm puzzled.
I've applied the "fix gun convergence for AI" patch with XwaExePatcherWindow (XwaExePatcher-1.0.25) and now Firesprays can hit small objects such as Containers G that they couldn't hit before, but with the patch another issue has come: the gun turret on YT-1300 in B0M2 moves without input from player.
This happens regardless of the fact the Sabra is performing the "Follow Targets" order or not, therefore it cannot be a mission problem, but this only happens in areas where such order is present at any time, therefore it "seems" a mission problem.
I'm puzzled.
I don't judge tactics. The Battle is the best and only Judge.