You are viewing a potentially older version of this package. View all versions.
AudioKnight-StarlancerEnemyEscape-2.5.2 icon

StarlancerEnemyEscape

Allows enemies to travel both into and out of the facility while seamlessly switching AI modes.

Date uploaded a week ago
Version 2.5.2
Download link AudioKnight-StarlancerEnemyEscape-2.5.2.zip
Downloads 3815
Dependency string AudioKnight-StarlancerEnemyEscape-2.5.2

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
AudioKnight-StarlancerAIFix-3.8.3 icon
AudioKnight-StarlancerAIFix

Automatically assigns interior/exterior AI for enemies based on their spawn location. Also fixes a null reference exception regarding EnableEnemyMesh(). Part of my Starlancer Series!

Preferred version: 3.8.3

README

Starlancer Enemy Escape

This mod allows enemies to travel both into and out of the facility while seamlessly switching AI modes. Part of my Starlancer Series!

Get the full modpack!

Presets

ReasonableDefaults: Blob:2, Bunker Spider:10, Butler:5, Butler Bees:5, Centipede:0, Crawler:10, Flowerman:10, Hoarding bug:10, Jester:1, Nutcracker:5, Puffer:10, Spring:5, Baboon hawk:15, Earth Leviathan:1, ForestGiant:0, MouthDog:0, RadMech:0, Tulip Snake:5, Clay Surgeon:5, Maneater:1
Disabled: All 0s
Minimal: All 1s
Chaos: All 100s (Use at your own risk :3 )

Important Notes

StarlancerAIFix is a hard dependency for StarlancerEnemyEscape, as it prevents issues with certain enemies that are not in their native environment.

Bracken Issues

The bracken does not enjoy being told to go to the opposite half of the level if it is waiting for a player to be in its area. My system accounts for this by not allowing it to randomly path, but it may still follow a player out of (or into) the facility if it maintains a target on that player.

Baboon Hawk & Hoarding Bug Issues

My system has allowed the hawks and lootbugs the opportunity to carry scrap out of (or into) the facility. At times, there is the possibility of slightly glitchy behavior while carrying scrap, though I've tried to account for this as best I can. If you're close enough notice this issue, their AI will probably fix itself anyway.

Credits

HUGE thanks to Zaggy1024, IAmBatby, mrov, qwbarch, and Xu Xiaolan for their support and help with the code!

CHANGELOG

  • 2.5.7

    • Reverted the changes from 2.5.5 and 2.5.6, because I seem to have fixed the actual issue.
  • 2.5.6

    • Reverted the changes from 2.5.5, switching to a different, hopefully less null-prone method of teleport-pathing. Please let me know if any unexpected behavior occurs.
  • 2.5.5

    • Added some early aborts to the teleporting method in case of null references. These will log errors that will point to what is null, as well as what moon or interior it belongs to.
  • 2.5.4

    • Enemies will no longer randomly path into the main entrance when the interior is the Mineshaft.
      • This will hopefully cut down on both strange behavior and error spamming.
    • Implemented a failsafe to disable Escaping for the round to prevent moons/dungeons with improperly set up DungeonGenerators or EntranceTeleports from spamming error logs.
      • An error will be printed pointing to either the Moon or the Interior. Please direct these error reports to the correct author.
    • Cleaned up some leftover logging from my tests.
  • 2.5.3

    • Implemented a fix for enemies pathing erratically and not always teleporting to matching entrances. Please let me know if issues persist.
      • Hoarder Bugs' and Baboon Hawks' interaction with scrap is not 100% consistent, I'll continue working on this.
  • 2.5.2

    • Fixed the description of "Reasonable Defaults"
  • 2.5.1

    • If you experience errors after updating, delete the config and allow a new one to generate.
    • Completely missed implementing the new Spider/Blob fixes in both directions. Oops.
    • Code cleanup and optimization.
  • 2.5.0

    • Optimized the SetDestinationToPositionPrefix, thanks to Xu Xiaolan!
    • Optimized the method in which the AI is given fresh behavior upon transition into/out of the interior, thanks to IAmBatby!
    • Added the Maneater to the vanilla enemy list with a default escape chance of 1%.
      • The reason for the low default chance is that its attack is an instant kill.
    • Sandworm now has a default escape chance of 1%, since I was able to fix their interior behavior in AIFix.
      • I feel that the Sandworm being able to go into/out of interiors makes logical sense, since it tunnels through the earth itself and there's no reason it should be able to get underneath interiors.
      • The reason for the low default chance is that its attack is an instant kill.
      • Previously they wouldn't attack in any interior besides the Factory.
    • Blob physics have been fixed, so it has been given a default escape chance of 2%.
      • This is to balance the fact that entering/exiting right on top of it can be... hazardous :3c
      • Previously, the body of the slime would often lag when transitioning into/out of the interior, creating visual and gameplay issues.
    • Bunker Spiders now function properly.
      • Previously, their mesh refused to follow their NavMeshAgent outside, leading to odd behavior.
  • 2.4.2

    • Since none of my attempts seemed to work, Circuit Bees are now blacklisted from being affected by Enemy Escape.
  • 2.4.1

    • Disabled the instantiation of nodes near EntranceTeleports. After the rework, the instanced nodes no longer provided any benefit to functionality, and instead caused issues with Bracken camping fire exits.
  • 2.4.0

    • Added logic to prevent circuit bees from bouncing back and forth towards an entrance while stationed at their hive.
    • Added logic to allow circuit bees to properly path back to an entrance and teleport while inside.
  • 2.3.0

    • Added some logic to prevent Circuit Bees from uselessly hanging around the entrance. Let me know if the issue persists.
  • 2.2.2

    • Removed an accidental cyclic method call in the SetDestinationToPositionPrefix() that was causing heavy performance issues.
  • 2.2.1

    • Adjusted some logic to prevent NREs from occurring.
  • 2.2.0

    • Added logic to the SetDestinationToPositionPrefix() so that it only runs the EE-relevant code if an Escape Component is present on the enemy.
    • Renamed EnemyWhitelist to EnemyBlacklist so that it properly describes its purpose.
  • 2.1.0

    • Added logic to accommodate for the case where an EnemyAI has a null enemyType or enemyName. This should prevent the NREs that could sometimes cause the registration of enemies in the configuration file to fail.
    • Added logic to remove the EscapeComponent from enemies that were placed on a moon as a prefab. This should prevent the hard-crashes that have been occurring on custom moons that utilize that concept (Solace, for example).
    • Fixed a mistake in the code for determining an inside-spawning enemy's favorite outside spot.
  • 2.0.0

    • Almost a complete overhaul from v1.0.0
    • Instead of only allowing enemies a chance to use the EntranceTeleports if they happen to wander close enough, a system has been implemented to make an enemy path directly to an EntranceTeleport and warp to its match on the other half of the level. The range at which they may search for a teleport and the cooldown for an attempted search are configurable per enemy.
      • "Chance To Escape" now represents the chance for them to initiate pathing to the teleport.
    • Implemented a HarmonyPrefix to EnemyAI.SetDestinationToPosition() in order to prevent enemies from getting stuck if the position they want to path to is on the other half of the level.
  • 1.0.0

    • Initial Release.