RimWorld

RimWorld

Breachable Embrasures - An AI-Behaviour Change
Showing 1-9 of 9 entries
Update: 21 Jun @ 10:57am

Updated to 1.6

Update: 10 Apr, 2024 @ 1:24am

Updated to 1.5

Update: 25 Oct, 2022 @ 5:31am

- Quick update to 1.4 by Jiopaba

Update: 12 Sep, 2021 @ 1:46pm

- Removed unecessary check on startup that was a leftover from previous versions, should now work for unlisted embrasures as well.

Update: 11 Aug, 2021 @ 9:04am

Another major code revision. Now the behaviour feels in the right spot.

After discovering that embrasures do not divide rooms anymore with 1.3, I was able to greatly simplify the code. Are you in the same room as a colonist you can't reach? Something needs smashing.

This also allowed me to rely fully on vanilla-AI sapper logic, which uses smart pathing through all your stuff to get to the juicy colonists.

Bonus: This means any embrasure mod that uses the same principle as the majority of them will now be compatible by default. I confirmed the compatibility of all the mods I was asked to add before this update.

Update: 10 Aug, 2021 @ 9:49am

- Mayor code revision: Instead of working by breaking vanilla code on accident, it now works intentionally
- Embrasure breaching now only targets embrasures leading to targets. If there are no targets, vanilla "smash colony" behaviour acts normally
- Embrasure breaching now ranks targets by layer thickness. Building your fortifications thick is supported.
- Ranged enemies will now target pawns behind embrasures actively, making use of their normal range
- Three more mods with embrasures supported

Gif of current behaviour:
https://gfycat.com/uncommonflickeringbug


- Current remaining issues:
- Building a fortification with multiple lines of embrasures that do not touch (meaning unreachable floor pockets between) will break the ranking. The outer layer will not be recognized as target.

- Solution:
- I realized late in the day I should just rely on vanilla sapper behaviour to find a breach path. Will swap my chonky layer based solution to that soon.

Update: 9 Aug, 2021 @ 10:20am

[Auto-generated text]: Update on 8/9/2021 7:20:32 PM.

No gameplay changes, just formatting and name fixes.

Update: 9 Aug, 2021 @ 9:20am

[Auto-generated text]: Update on 8/9/2021 6:20:12 PM.

- Adjusted target selection when searching in the "close" range. Enemies will now prefer embrasures that are below 50% health, otherwise a random one.
- Removed hard dependency on [O21] Seamless Embrasures. You still need a supported embrasure mod.
- Added support for AOBA's Fortifications - Neolithic and Medieval
- Added support for N7Huntsman's Combat Extended (Experimental - No issues in a quick test, but CE touches a lot of code.)

Update: 8 Aug, 2021 @ 12:45pm

[Auto-generated text]: Initial upload.