RimWorld

RimWorld

Breachable Embrasures - An AI-Behaviour Change
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.
amm90 28 Aug @ 1:12pm 
i tested with other mod Ancient Ruin Walls and Embrasures and ignore the embrasures
https://imgur.com/a/CFk7rQT
amm90 28 Aug @ 6:16am 
CalamaBanana  [author] 27 Aug @ 10:28pm 
Likely, just test quickly.
amm90 27 Aug @ 2:28pm 
works with [HRK] Vanilla Expanded Extra Embrasures?
ArmoredStone 25 Aug @ 3:30pm 
Dang okay :( I was hoping it would be a simple copy paste thing from the humanoids to man hunter animals. Thank you for the quick responses tho. I appreciate it ❤️
CalamaBanana  [author] 25 Aug @ 9:00am 
Manhunters do not work like other enemies, sadly. Other enemies have long logic ThinkTrees where they decide what to do and when to do. If enemies did not find your pawns, they went into a mode where they randomly trash your colony. Was clean and simple to intercept that and sneak in the breaching code there.
Manhunters on the other hand have just one mode, manhunting. It would be a lot more code and a lot more of a compatibility headache to touch that.
ArmoredStone 25 Aug @ 7:50am 
I do have a few of those magic gemstone turrets that aren't able to be placed in doorways, and they do seem to try to break into them. So doorways might cause an issue. Idk if you could easily solve that one

What about man hunter animals? Would you be willing to look into them attacking embrasures to get to colonists?
CalamaBanana  [author] 25 Aug @ 1:21am 
@ArmoredStone
Those MO-spike things do not stop them, no.

Enemies that are trying to breach are always looking for the quickest way to your pawns. They are not going to waste time trying to breach your 2x1500HP granite castle embrasures if they smell a 100HP wooden wall on the other side of your base.

But on the other hand, having them stand on doors might mess with things, thinking about it. I know from temperature managment that that one tile a door is on counts as a fully seperate room. If a pawn stands there, they might not count as being "behind embrasures" anymore and the AI ignores them.
ArmoredStone 24 Aug @ 5:55pm 
Okay I see you mentioned in another comment that you play with MO. So I think I've encountered a bit of an issue. For my outer perimeter walls, I have two layers of castle embrasures, which leads to a line of walls and doors alternating (my pawns stand in the doors, and if anyone gets close to breaching, I move the colonist out of the doorway to close the door on the raider). But the raiders don't seem to actually target the embrasures. I do have spikes against the walls to discourage them, but I would assume they would still try to get through the walls wouldn't they? They do seem to target other ways to get in that I haven't reinforced yet, but they don't make a beeline for my colonists
ArmoredStone 24 Aug @ 4:32pm 
Hey Calama :) I have two questions for ya

1. Does this work with embrasures added by Medieval Overhaul?
2. Would you be able/willing to make it so man hunter animals attack embrasures to get to colonists? I always feel so cheesy shooting them from safety like that
CalamaBanana  [author] 23 Aug @ 10:52pm 
@Branbo
It's not "Pick up and Haul", and I just tested "Walls are Solid" in a minimal modlist using "Seamless Embrasures". Works fine. Could not find Animal Behaviours, but you can test yourself. Load up just with that and the embrasure mods.

Although I am starting to believe maybe the steam workshop was being the steam workshop for you again. Please do test if the mod works at all for you. Load up with just "Seamless Embrasures" and this one, and paint yourself a quick bunker like I used in my example gifs, then spawn a raid with the dev-console (I recommend spawning hostile tribals, they bring most melee)
Branbo 23 Aug @ 2:48pm 
@CalamaBanana Animal Behaviours and Pick Up and Haul are they only 2 that touch AI. Animal Behaviours could be borking it maybe, but i figured that would only mess with animals.

I'm not 100% sure but the issue may be Walls Are Solid. The description only really mentions value changes and doesn't specifically say anywhere that AI behaviour is changed but maybe the value changes could confuse it?
CalamaBanana  [author] 23 Aug @ 5:52am 
@Branbo
No, it not being a room is exactly how the code figures out the enemy is behind embrasures. If the enemy and your pawn are in the same room, but can not reach each other, the enemy should start attacking things in the way. I personally play with Seamless Embrasures (when not doing a MO run).
Are you using any other mods that touch AI behaviour by chance? Or using factions from exotic mods?

@ LetTheMossReclaimYou
They should be, try it out and report back. You can add/remove this mod without starting a new colony.
LetTheMossReclaimYou 22 Aug @ 6:49pm 
Are the embrasures from Rebuild compatible?
Branbo 22 Aug @ 4:30pm 
Do embrasure rooms need to be recognised as actual rooms for this to work? I tested this with both seamless embrasures and vanilla expanded embrasures and raids always go into smash random stuff mode, never for my pawns behind the embrasures unless they get hit.

realised the rooms don't count as enclosed because embrasures aren't technically walls. Could just be a conflict with something else im running but thought i may just be missing something.
CalamaBanana  [author] 20 Aug @ 6:23am 
@Asep_Hejo
They will all target the rooms with the pawns inside. If you look at the "With my mod"-gif in the mod description, you can see the enemies splitting between 2 towers. They will not target empty rooms. (Unless that is the only way to get to your pawns, ofc)
Asep_Hejo 20 Aug @ 3:06am 
cool! but quick question. If i use this mod and let say i have 5 room with embasures and has pawn in the rooms will the raider attack only 1 room or would they spread or just chase the nearest one?
CalamaBanana  [author] 19 Aug @ 6:14am 
@Asep_Hejo
Yes, works perfectly fine with Medieval Overhaul palisades or castle walls. I usually play with that setup myself.
Asep_Hejo 19 Aug @ 5:09am 
does this mod worlds with MO Embasures?
CalamaBanana  [author] 31 Jul @ 10:40pm 
@sammysticks

1) There was a problem with vanilla pathfinding / combat logic back in 2021, unsure if it still exists. Might have a look at it again, annoys me slightly as well. For now, I do recommend building airlocks with two doors at your entrance and to compartmentalize your defenses. They might pile up on the first, especially if they spawned far away, but the second wall/door won't have the issue.

2) I am afraid that one is on you, you have some other mod touching animal combat behaviour. Vanilla animals can not breach or set your base on fire, and do not trigger this mod by default. The code in this mod executes whenever an enemy would go into "randomly break and torch stuff"-mode (As seen in the other gif), which animals are not supposed to have.
sammysticks 31 Jul @ 4:26pm 
Thanks for this mod! It definitely makes combat with embrasures more challenging. I'm enjoying it.

A couple requests:

1) The enemies can pile into one big group with 5-10 creatures somehow occupying the same tile and smashing at the same time. You'll see it in your imgur gif of the mod enabled. This breaks a core game combat mechanic Can this be changed, or at least made optional? I think it'd be better if melee enemies attack the same weak spot together while ranged fire over their shoulders at close range, either at the same spot or at my pawns on the other side of the embrasure.

2) Animals are using the same tactics. Animals aren't this smart to coordinate. Combined this with the piling into tiles already mentioned and it gets breaks the game. I just had 82 gazelle pound down 1 section of reinforced wall in like 3-5 seconds. Can the combat AI enhancement be an optional for animals? Or a lighter version where they aren't as smart & coordinated as humans?
CalamaBanana  [author] 27 Jul @ 10:40am 
@Caramel What other mods affecting mechs/combat are you using? I could not replicate it with a minimal modlist.
Caramel 27 Jul @ 8:38am 
error when War queen spawn War urchin
Rincewind 25 Jul @ 4:59pm 
well maybe you are right about low hp doors.
i had problems with rough barricade if it matter. it's not standart 1x1 barricade, but 2x2. Maybe it cause problems? They are about 600hp. But enemy prefer to hit usual steel door.
CalamaBanana  [author] 23 Jul @ 6:31am 
@ Rincewind - Nothing changed in that regard, in my 200+ mod game they go for walls and doors. Load order should not matter at all with this mod. But enemies always try to get to your pawn the quickest, if you are using 1000HP walls and 100HP doors, they rarely waste their time on the walls.
Rincewind 23 Jul @ 3:40am 
doesn't work for me now.
I played with this mod in 1.5 and it works fine, but not for now.
Enemies now attacking doors only.

Load order is important? Mod should be loaded before ambrasure mods or after?

Well my modlist is changed alot since 1.5, but i didn't installed any combat AI related mods.
i eat cigarettes 17 Jul @ 12:04pm 
ah, it must be an issue on my end. thank you for taking the time to test it, anyhow.
CalamaBanana  [author] 17 Jul @ 11:56am 
That one works fine for me, just tested with just that mod, its prerequisite and this mod. Keep in mind that only enemies that will trash your base will breach your embrasures. In an unmodded game, that is everyone but manhunting animals.
i eat cigarettes 17 Jul @ 10:35am 
this doesn't seem to work with the rebuild embrasure mod (https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3500482839) , do you know why that might be the case? i'm not sure if it's some error on my part, but enemies still seem to be confused around embrasures.
CalamaBanana  [author] 21 Jun @ 10:59am 
Pushed an update for 1.6, but did not have time for extensive playtesting. Please report back if something is behaving strangely.
CalamaBanana  [author] 19 Jun @ 9:11am 
Normal vanilla enemies go into "destroy random stuff" mode when they can not reach any pawns. This mod hooks in there, and checks if they have a target behind embrasures they could deal with instead first. If an enemy does not have that behaviour, this mod won't affect them. E.g. vanilla manhunter animals are not, but vanilla insects are.
isalcaruz 17 Jun @ 3:04pm 
a question, does the behavior of attacking the embrasures also work for creature type enemies? I installed the mod The Army Of Fetid Corpses and the VOID and I realized that melee type enemies (zombies and necromorphs) take the embrasures as impassable walls and ignore the settlers behind them and just wander around outside, sometimes they don't even move from their spawn point unless a settler goes outside of them and if they enter again the enemies stop again and wander right where they are
Compineer 6 Jun @ 1:09pm 
@CalamaBanana

Planning out a new base design with the Deserter mod which adds those 3x3 turrets as well as the big imperial 6x6 turrets. I know that pawns shooting from behind an embrasure will have raiders prioritise/attack the wall they are shooting from. Does the same go for turrets or will they ignore them despite turrets shooting at them from behind walls?
Gerewoatle 2 Jun @ 1:58pm 
@Frission - I assume you possess the degree of basic literacy necessary to read and understand the mod's description.
Frission 2 Jun @ 1:48pm 
This is the most bizzare type of mod there can possibly be - a mod that purely exists to nerf other mods. Just, why?
Black Dog 30 May @ 10:06pm 
I would second that - at the moment (most) Anomaly creatures dont attack the embrasures
Luneyl 11 Mar @ 4:15am 
Can this also work on manhunters/anomalies? Right now they ignore pawns behind embrasures that are shooting at them.
Seb 6 Feb @ 12:08pm 
Ditto on the fleshmass and enclosed fleshbeast issues. Breachable embrasure tick taking 1+ second.
CalamaBanana  [author] 27 Jan @ 10:19am 
I am honestly not sure what could be causing this, you are the first one since release of Anomaly to report an issue like this.

Please do use devmode to reveal the entire map, just to make sure there is no insect hive out of control in some pocket that got woken by the fleshmass.

Also do use the devmode to kill stuck fleshmass mobs (How many of those do exist?), just to doublecheck that it is them causing the lag build up.