TOD5M06 - AI collisions differ from vanilla game

Issue #224 resolved
Dez E created an issue

Video

The above video shows an A/B comparison between X-Wing 98 and XWVM, for TOD5M06 (Prisoner Rescue).

There are three freighters, one of which the player needs to disable (the exact position is randomised based on start location).

  • In X-Wing 98, if the player disables one of the freighters at the front, the freighter behind it will pass through without incident.

  • In XWVM, the AI attempts to change course, but ends up colliding with the freighter in front, instantly destroying it (and likely failing the mission).

While I'm not wild about the idea of AI clipping its way through everything, maybe there is a solution here to have some kind of "AI clip on/off" flag, which could be overridden by mission sidecar files or a future file format? Then, the behaviour could default to vanilla for the campaign missions, but to the more logical and modern collision-friendly approach for custom missions?

Comments (10)

  1. Justagai

    Thanks to RandomStarfighter, we have a better grasp of what sets the no collision flag for AI (Players are not affected by these conditions at all).

    When two AI ships collide, the game checks to see what class they are and the orders they have.

    For reference to class types in game:

    • Fighter = 0
    • Shuttle = 1
    • Tug = 2
    • Freighter = 3
    • Starship = 4

    The conditions are as follows (excuse my improper syntax):

    • If Collidee and Collider class is < 3 (Fighters to Tugs)
    • Ignore collision except if collider(?) order = (validating order)
    • else
    • If Collidee or Collider class is >=3
    • do collision except if collider(?) order = (invalidating order)

    I put a "?" next to collider in the exceptions because I'm not sure if its the collider or the collidee order it looks at for the exception.

    Orders that invalidate collision (regardless of class):

    • Exiting Hanger
    • Entering Hanger
    • Performing Docking Operation

    More info to come on the orders.

  2. Justagai

    Here is some additional info on AI collision.

    When two AI ships heading on a collision course with each other, one, both or none (random chance, no matter AI rank) will try to evade if the order gives the ability for the AI to evade

    IFF does not matter

    Capital Ships (Capital ship colliding with Capital Ship) collide from their center point, not from the normal edges. This also applies to Freighters vs Freighters (but not Freighters vs Starships or anything else. The edges will be used instead).

    I'm going to classify the three types of collisions as "Type 0", "Type 1" and "Type 2".

    • Type 0: Player Collision = will collide with player except for certain orders. This is the first thing that the game checks for a collision. Most orders will be "Yes" so I didn't put it in the list.

    • Type 1: Fighter/Shuttle/Tug Class collision = Will NOT collide if both collider and collidee classes are < 3 (Less than Freighter) (There seems to be no orders that are an exception for this type. The only overall exception is for colliding with a player)

    • Type 2: Freighter/Starship Class Collision = Will collide if either the collider or collidee is this class except for certain orders

    Boarding orders will only give no collision flag to Border, NOT Bordee/Target

    Order - Evade other ships (Collision Avoidance) - Type 1 Collision - Type 2 Collision

    • Hold Steady - No - No - Yes
    • Fly home - No - No - No
    • Circle and Ignore - No - No - Yes
    • Fly Once and Ignore - No - No - Yes
    • Circle and Evade - Yes - No - Yes
    • Fly Once and Evade Yes - No - Yes
    • Attack Pri and Sec - Yes - No - Yes
    • Attack Enemies - Yes - No - Yes
    • Rendezvous - Yes - No - Yes?
    • Disabled - No - No - Yes
    • Board to Give Cargo - No - No - No
    • Board to Take Cargo - No - No - No
    • Board to Exchange Cargo - No - No - No
    • Board to Capture - No - No - No
    • Board to Destroy - No - No - No
    • Disable Pri/Sec Targets - Yes - No - Yes
    • Disable All - Yes - No - Yes
    • Attack Transports - Yes - No - Yes
    • Attack Freighters - Yes - No - Yes
    • Attack Starships - Yes - No - Yes
    • Disable Transports - Yes - No - Yes
    • Disable Freighters - Yes - No - Yes
    • Disable Starships - Yes - No - Yes
    • SS Hold Position - No - No - Yes
    • SS Fly Once - No - No - Yes
    • SS Circle - No - No - Yes
    • SS Await Return - No - No - Yes
    • SS Await Launch - No - No - Yes
    • SS Await Boarding - No - No - Yes
    • Wait For Arrival - No - No - Yes
    • Exiting Hanger - No - No - No
    • Entering Hanger - No - No - No
    • Entering Hyperspace - No - ? - ?
    • Exiting Hyperspace - No - ? - ?
  3. Justagai

    EDIT: Adding another order because it's pretty important:

    Following Flight Leader - Yes - No - Yes - No (4th entry is Type 0 which is collision with player)

  4. Justagai

    Added more information on Freighter vs Freighter collisions. This is also why we see what we see in the posted video.

  5. Justagai

    Random's info (as well as Azrapse's) is correct where its the origin vs the edge or vice versa when it comes to valid collisions so my previous info is incorrect (where I said its origin vs origin of the same class).

  6. Justagai

    I have made an excel spreadsheet located in my XWVM onedrive\Documents for the collision rules. I'll see if I can have the document be editable so that others can contribute.

  7. Justagai

    Excel spreadsheet has been completed. Let me know if there are any other orders to check or any other missing details.

  8. David Esparza Guerrero

    Fixed: Issue #224: TOD5M06 - AI collisions differ from vanilla game Added: Placeholder Rock Planet for all missing planets. Rules: In X-wing ruleset, AI no longer swerves away from incoming fire. Fixed: Issue #201: ​ Wingman crashes into transport while attacking it

    → <<cset c7c4c247145b>>

  9. Log in to comment