AI Turn Rate

Issue #239 resolved
Justagai created an issue

In XWVM, AI are turning at speeds that are not to the original specifications.

I've found the AI Maneuverability set in the ship data.

I'm not sure if its a modifier to the existing Pitch/Yaw of a ship, but based on the videos:

https://drive.google.com/open?id=1RM53vrXMPgRm9CmiYqKHRKI0aLsqvsX7 https://drive.google.com/open?id=1OrwJ1cwmXG0ZlK94Z8xuBwHSzvv14YSf https://drive.google.com/open?id=1lKnEYC7J2J7XVljBwA-yLmLXVKM9o5zx https://drive.google.com/open?id=1SXex9VdPTcC0pOH7w8E6w_FBHEC-a_WU

They seem to be yaw based. Which makes sense because if one removes the pitch on a ship, the AI won't be able to pitch at all.

Here are the AI Ship Maneuverability values:

  • X-wing: 10560
  • Y-wing: 8256
  • Awing: 12352
  • B-wing: 9600
  • TIE Fighter: 14336
  • TIE Interceptor: 15424
  • TIE Bomber: 12288
  • TIE Advanced: 16384
  • Assault Gunboat: 10560
  • Shuttle: 8960
  • Transport: 6144
  • Tug: 14336
  • Container: 10560
  • Freighter: 4096
  • Corvette: 3072
  • Nebulon B Frigate: 1536
  • Calamari Cruiser: 1024
  • Star Destroyer: 1024

EDIT: I believe they ignore the Yaw set in the ship and even bypass the yaw limit the player has. Which is why in one of the videos posted they seem to yaw so fast even though there is a yaw limit (I set it to 30000 something in high maneuverability and 4096 in the low maneuverability videos.

Also default value seems to be 10560.

EDIT 2: You're probably thinking "Dammit Justagai, the AI in XWVM already turn so fast, why do they need to be even faster?" which is a good question. Take a look at the video in the first link. Notice the AI pausing for about 3-4 seconds after executing its maneuver/movement. Keep in mind these are Top Ace AI. This gives a break to the player and allows him/her to catch up with the AI. I'm doing additional research on the exact timing of this "pause" but an implementation of the current theory into XWVM will help with a lot of the "AI turns too fast" complaints.

Comments (7)

  1. Justagai reporter

    Yes that's pretty much it. It replaces the Yaw depending on what ship they fly.

    More info on the pause mechanic (as well as a "wingmen pause mechanic")

    AI will sometimes pause between 1-4 seconds after executing a maneuver/movement. ? The reason they do this is so that they can get additional space between their target, and then attempt to engage head on. This also gives the player breathing room from a collision and potentially score a kill on the target.

    The reason why AI with higher maneuverable ships pause longer is because they quickly face the direction they want to use to distance themselves from the target quicker. While AI with lower maneuverable ships don’t pause as often because as they are trying to get away from their target, they are slowly moving to the direction they want to face and the target is most likely to change positions before they can face the direction they want.

    EDIT 4: The trigger of the "pause" is by distance (target is close) and the length of the pause is by chance. They will turn away from their target and pick a single direction. 1-4 seconds, but if the target changes position (not distance) too much, the AI will break the pause which is most likely to happen on lower maneuverable ships. If the AI so happens to face the target while turning, it will fire.

    I've also seen one other maneuver performed if the AI has wingmen. All of them will turn away from the target for about 10 seconds. Then turn and face the target head on. I've only seen this with AI with wingmen however and its not too common (and its quite interesting to see, especially if you're the target. I thought they were heading home or going to another waypoint at first).

    Basically, the AI will attempt to distance itself (wants to avoid colliding with its target and get a good shot) from the target and attack from the front. This should help prevent collisions and make it seem like the AI is not trying to "turn battle" the player.

  2. Justagai reporter

    The only thing I don't know at this point is whether the AI bypass the pitch limit or not. Some ships do have a higher pitch than the limit so this would be important to know.

  3. Justagai reporter

    I have confirmed that AI bypass the pitch limit imposed on players.

    I'm going to take an extreme example: The TIE Advanced and compare AI yaw/pitch to a player's.

    As AI:

    • Yaw: 16384 (From the list above)
    • Pitch: 6144 (from the ship data pitch value)

    As a Player:

    • Yaw: 12288 (due to player yaw limit)
    • Pitch: 4096 (due to player pitch limit)
  4. Justagai reporter

    Somethings to go over that we discussed in Discord for the "pause" mechanic:

    • Removal of the modification to the internal timer for the different AI ranks (but the function is still susceptible to the AI thinking process)
    • Utilize time (1-4 seconds based on chance for now) instead of laser distance
    • Since we will be using time, simply have the AI pick a direction away from the player rather than setting a temporary waypoint and fly straight
    • Implementation of wingmen maneuver (leader picks a direction away from player, wingmen follow leader and flies out for 10 seconds, then turns around and jousts the player) (very rare)
  5. David Esparza Guerrero

    Added: Debugging console (default binding CTRL+F1) Disabled: Flyby sounds until freeze and memory leaks are resolved. (Issue: #243: Out of Memory Crash) Disabled: Lines in map until freeze and memory leaks are resolved. (Issue: #243: Out of Memory Crash) Fixed: Issue #239: AI Turn Rate Fixed: Issue #238: AI Breaking off too quickly

    → <<cset af30060d7fa3>>

  6. Justagai reporter

    I don't think we should close this just yet. I still need to do some tests on this issue.

    EDIT: Moving the "pause" mechanic to a new issue

  7. Log in to comment