RimWorld

RimWorld

295 ratings
Breachable Embrasures - An AI-Behaviour Change
2
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4, 1.5, 1.6
File Size
Posted
Updated
1.020 MB
8 Aug, 2021 @ 12:45pm
21 Jun @ 10:57am
9 Change Notes ( view )

Subscribe to download
Breachable Embrasures - An AI-Behaviour Change

Description
Breachable Embrasures - an AI-behaviour change
This does not add embrasures, this changes AI-behaviour related to fortifications build from embrasures of compatible mods

Tired of enemy melee pawns running around like headless chickens in front of your embrasures? Tired of their ranged friends stumbling around passively until fired upon? This mod might help. Your cowardly pawns will no longer be safe.

Look at these short videos linked below for a comparison in behaviour. This is exactly the same raid, once with and once without my addition.

Without my mod.[imgur.com] Notice how the gold-stockpile honey pots seem far more important than my pawns behind embrasures. A pure shooting gallery for my pawns.

With my mod.[imgur.com] No mercy for embrasures. Even the longbowmen making use of their full range, too.


How it works:
Short version: Melee pawns go for embrasure-rooms with pawns in them. Ranged pawns will make use of their "go into shooting position" logic if they detect enemies behind embrasures. If there are no pawns behind embrasures, the AI will default to their normal vanilla behaviour. At that point of their decision tree that is "smash random stuff".


Questions asked:
  • Why do you not include embrasures themselves?
    I am neither artist nor art thief, and this way allows me to cover a wider array of embrasure types.
  • Won't you be able to use embrasures as bait for enemies?
    No. Only embrasures leading to your colonists are a valid target. Watch them ignore the honeypot gold stockpile encased in embrasures here.[imgur.com]
  • Is this or that mod compatible?
    If it acts like all the other embrasures, very very likely. Draw a line with your embrasures through your dormitory. If both sides still count as the same room, those embrasures are compatible.
  • What about performance?
    I did run a few tests, I did not detect anything too out of the ordinary. But, sapper-checks are more costly than simple "smash random thing" checks, undeniably. Usually pawns do their checks at different times, so this can be ignored. But they will perform those checks at the same time right after spawning in. If you spawn yourself three maximum size raids at the same time, the game might need a second.


Most embrasure mods should be compatible, as a selection I confirmed the following mods, using their version available on 11/August/2021:
190 Comments
amm90 30 Aug @ 9:29am 
Now I've tried it again, I don't get any errors but they don't attack either.
CalamaBanana  [author] 30 Aug @ 2:34am 
@ammo90

Do a binary search. Remove half your mods, if the error persists remove half your mods again. If not, load the other half of your mods. And so on. It's relatively quick.
amm90 30 Aug @ 2:17am 
The truth is, I have no idea what mod is causing the error: Search and Destroy? The Dead Man, or one of its submods? Is there a specific function that might give you a clue?
CalamaBanana  [author] 30 Aug @ 1:24am 
@amm90

I fail to replicate your error, it's not the vehicle framework. If you figure out which mod is being naughty, do tell me.
amm90 29 Aug @ 11:47am 
For the record, I'm solving other mod problems jajajaja
https://gist.github.com/HugsLibRecordKeeper/9e67c75496e26615b2e9ee4e348f97cc
CalamaBanana  [author] 29 Aug @ 2:51am 
@amm90

Yes, that error is very much relevant. Do link a full hugslog, please.
amm90 29 Aug @ 1:24am 
Maybe is vehicle framework?
https://imgur.com/a/mYBD4ks
CalamaBanana  [author] 29 Aug @ 12:23am 
@amm90

Not sure what to tell you, maybe some other mod interferes or you are doing something wrong.

I just tested it myself, just [HRK] Vanilla Expanded Extra Embrassures and Breachable Embrasures in the modlist. Works like a charm.

https://imgur.com/a/pm9IrwS
amm90 28 Aug @ 11:49pm 
I've retested the mod, just [HRK] Vanilla Expanded Extra Embrassures. Now they don't even try to hit the wall or the embrassures. Only 4 embrassures.
https://imgur.com/a/i7msopV
CalamaBanana  [author] 28 Aug @ 10:00pm 
@amm90

Seems to be working perfectly fine. Enemies trying to breach your embrasures instead of setting them on fire or running around like headless chickens. Try not building the entire thing of embrasures to make it more noticable for yourself.