RimWorld

RimWorld

Drafted Auto-Combat
102 Comments
ELF SLAYER 28 Sep @ 3:48pm 
Thanks for adding the option to disable gizmos! It was getting really crowded
biowreck 23 Sep @ 4:24pm 
Works now ::cozyspaceengineersc:
RedMattis  [author] 23 Sep @ 2:26pm 
@biowreck
Try updating it again. The name of the settings menu button had gone missing.
biowreck 22 Sep @ 8:24pm 
Hey, just trying to confirm if it's on my end or not. The options don't show up with only DLCs, Harmony, and your mod running. I've tried resubscribing a couple of times too. Does it work on your end?
RedMattis  [author] 22 Sep @ 11:15am 
Update:
Added mod settings menu and ability to toggle on and off display of buttons.

Also added the ability to make the main button be a dropdown menu instead.


@Roque the Rogue
The problem with swapping the state on abilities individually is that when you use it on a large group of pawns the behaviour becomes a bit chaotic.

I might add it as a right-click-menu option though.
Roque the Rogue 8 Sep @ 10:20pm 
Greetings RedMattis, I've had an idea for improving the toggle gizmo on left click;

What if when you click to autocast, it shuffles between;
-Normal mode (just the usual autocast, for basic abilities)
-1 Cast Once (like buffing or triggering a shield)
-2 Cast Twice (useful for certain powerful abilities)

It does another layer of utility.

I think doing this can solve some of the spam issues pawns seem to have with certain abilities, especially ones that consume a resource pool, like force abilities, like hemogen abilities, some mods, allows you use shield abilities and pawns will proceed to spam the ability quickly depleting resources.

Awesome if possible, thanks for your contributions.
next0ne22 7 Sep @ 12:57pm 
Thanks for reply, I will keep your mod in my list and check it later. Good piont is that auto-combat now is auto-disabled when undrafting, that was one of the reasons I had to look for alternatives. What I like in Drafted AI is avoiding friendly fire is also there.
RedMattis  [author] 6 Sep @ 9:32am 
Seems like I missed the language keys. This should be fixed now. Thanks for pointing it out. :)
DAOWAce 6 Sep @ 9:24am 
Yeah, code text is displaying instead of a friendly name on the, I assume, new option (3rd gizmo).
天才少公子 5 Sep @ 3:44pm 
The newly added Auto-Combat mode option seems to display incorrect text in the game.
RedMattis  [author] 5 Sep @ 1:28pm 
@elĐeve
Correct. This is a standalone version of the optional built-in auto-combat. :)
elĐeve 5 Sep @ 12:59am 
now i think of it it's the same autocombat that it's integrated in big and small? i just noticed i can enable it lol (i'm not subbed to this one) :SG0_BestGirl:
RedMattis  [author] 5 Sep @ 12:03am 
@next0ne22
If your issue is them charging too much then the new update might be what you were looking for.

If you wanted them to chase foes around corners then it is better to combine this mod with something like Search & Destroy.

I've not tried the Drafted AI mod, so I can't say how it compares to it, but if you have specific feedback I'm always grateful for it. :)

@elĐeve
I don't think this mod has any performance issues at all. Most of the methods I've created are probably cheaper than what the vanilla AI foes uses against you.

@tanyfilina
I don't know what the other mod does, but I did read a comment from someone saying they used them together.

@Some Random Pleya
Thanks!
RedMattis  [author] 4 Sep @ 11:55pm 
New update!
Melee characters can now be set to only engage nearby foes. Of course if you want them to hold their ground, just toggle autocombat on that pawn.

This was a feature voted by our supporters. :3

Also, auto-combat now is auto-disabled when undrafting. If you want to change the settings for this the auto-combat settings are in the B&S Framework.

I might make a setting menu for the standalone mod too though, it seems to get requested a fair bit.

Also pondering if I can make ability auto-cast clearer since I think most people miss what is probably the coolest feature. In my humble opinion ofc... :D
next0ne22 4 Sep @ 5:40pm 
Had to disable this mod, melee pawns didn't act smart. Drafted AI mod works better for me.
elĐeve 1 Sep @ 11:15pm 
does it perform better than 'search and destroy'?, that mod sometimes kills my tps when i activated for a high skilled melee pawn
Phoenix-D 31 Aug @ 11:56pm 
Run and Gun amazingly actually works fairly well un-updated.
tanyfilina 31 Aug @ 12:14pm 
It's amasing that there apeared two auto-combat mods at one time, I've missed this one! Would be helpful to know the differences. Do I understand right that this mod allows for auto-combat when not drafted too?
I would generally expect this mod to be better, as it's made by much more experienced modder, while that one, I suspect, is made largely by AI :)
(and while I'm here and if you engaged into the combal modding, maybe you could add the functionality of the Run and Gun mod? We're all waiting for Meme Goddess to update it, but still no news)
k/\ttnjiå 29 Aug @ 8:44am 
"At the moment you need Big & Small Framework since this mod doesn't have a mod menu for settings, but I might add it to this standalone as well if there is enough interest for tuning things in detail."

Certainly interested here uwu
Some Random Pleya 24 Aug @ 9:21pm 
ow this is better than search and destroy I love it
RedMattis  [author] 18 Aug @ 1:16pm 
Update:
I've added an option for toggling off the auto-combat when a pawn is undrafted.

At the moment you need Big & Small Framework since this mod doesn't have a mod menu for settings, but I might add it to this standalone as well if there is enough interest for tuning things in detail.
RedMattis  [author] 18 Aug @ 12:01pm 
@Bear
You mean for my abilities? Otherwise I don't have friendly fire avoidance, that is from the other mod.

if I disable the friendly-fire avoidance for abilities they will literally fireball their own team if an enemy would also be hit. I doubt there are many instances where you'd want this.

@Ali50
Sounds good. :)
Bear 18 Aug @ 10:26am 
Could you please add an option to disable the friendly fire avoidance behaviour?
Ali50 18 Aug @ 6:41am 
@RedMattis yes they work together with no real issues for ranged pawns. They use Drafted Auto-Combat for enemies in their sight and then switch to Drafted AI to search for new enemies on the map.

If both are activated for melee pawns, Drafted AI's code for "avoid friendly fire lines" seems take precedent over your / B&S framework's code.
They will not close in on enemies shot by other pawns and only wriggle on the spot if those are the only enemies left. Otherwise they search for new targets on the map.

I think the severity of this can be configured in the mod config for Drafted AI but I have not tinkered with that yet. So far I would simply deactivate the DAI gizmo for melee pawns.
RedMattis  [author] 17 Aug @ 1:09pm 
@cass
Sure, I'll see about adding some option.

@Ali50
I just realized the other mod is called Drafted AI. Meanwhile "Drafted Jobs" & "Drafted Hunt" is literally internal names used in the code in this. I was quite confused for awhile. ^_^;;

I guess the summary is that they work together then?

@Fine motion
I don't know, but probably. This mod is written is a very compatible way.

@LettuceGrey
Thanks, glad you like it. :)
Ali50 16 Aug @ 5:31pm 
@amm90 & @RedMattis:
Ah yeah, Proper Polearms uses what is there in VEF and just makes more spears "double-melee-ranged". And to quote the mod FAQ:

Can AI fighters use this extra range?
Yes! They can use spears from a distance, just like how the player can.

So you probably don't need to handle it separately.
Ali50 16 Aug @ 5:25pm 
Update on "Drafted AI" compatibility: from my ~30 min barebones testing on a dev map with a few spawned spacer colonists and raiders, both mods seem compatible when both ( / all three, if "take cover" counts) gizmos are active.

The only strange behaviour comes from Drafted AI's friendly fire evasion mechanic.
This makes melee pawns useless as long as they could be hit by friendly fire and they then tend to just walk on the spot next to the ranged pawns or go off fighting on a different part of the map ... But the same behaviour is also there if Auto Combat gizmo is disabled and just Drafted AI enabled, so it should not come from some kind of incompatibility.

tl;dr both mods seem to be fully compatible without throwing errors or messing up pawn AI completely.
cass 16 Aug @ 11:06am 
Any chance we could get an option to automatically toggle it off when undrafting like s&d does? I keep getting caught off guard by pawns rushing forward before I'm ready.
LettuceGrey 16 Aug @ 3:20am 
Thank you, this will come in really handy, when the storyteller decides to trigger yet another raid on my colony, while I'm busy investigating some ruin or something.
Fine motion 16 Aug @ 1:00am 
How does it work in conjunction with Guards For Me?
amm90 15 Aug @ 10:58pm 
The thing is, I've never seen them use that weapon, so I don't know if the enemy AI uses it correctly. I know my settlers can attack at that distance, but only if I manually tell them to or activate search and destroy.
amm90 15 Aug @ 10:52pm 
@Ali50 I didn't know about the existence of that mod, I will ask the author if he can make it compatible.
RedMattis  [author] 15 Aug @ 12:52pm 
@Ali50
Proper Polearms is literally just using Vanilla Expanded's Polearm code.

@amm90
I'll make a note to look into it.

Does the (enemy) AI know how to use those polearms when given them? Otherwise I might need to handle them in some special way...

@jokesmcgee
Yes.

They won't use cover though. Be careful with autocast on some abilities. The Diabolus AoE self-centered fuel-spewing for example has a custom target selection logic that basically says "whenever you feel like it! yolo!". It definitely will use it in the middle of your army.
Ali50 15 Aug @ 5:55am 
@amm90 there is currently "Proper Polearms" but the Space addon for VFE-M2 is not yet added to the supported mods list, but you could ask the author there if he can make it compatible.
Link: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3430584657
amm90 15 Aug @ 2:57am 
Sorry, do you know if there's a mod or something that allows me to attack with a melee weapon that has a 2.8 range (2 squares) without moving from my position? I'd like to see the pikes in Space Knights - Armor Expansion for VFE Medieval 2 useful.
Tactical Femboy 14 Aug @ 12:13pm 
Pretty sure it's CE functional since it's verbed
C0lin2000 14 Aug @ 4:36am 
Gotta ask CE ready?
FirstBornAcorn 14 Aug @ 3:32am 
@RedMattis, decided to check out the changes, not sure what were exact changes tho before I tried last but now it works much better! Great job!
Mocho 14 Aug @ 2:05am 
One point of feedback is I think the icons could be a little more subtle. They're quite busy.
chrisque1 14 Aug @ 12:17am 
"This also exists built into Big and Small Framework as an optional setting (Mod Option Menu)". Tnxs Red!!! :cozybethesda:
fred 13 Aug @ 4:26pm 
@Stokeling9701 it kinda works with wasd, just be sure to disable auto combat to the pawn you are controlling
jokesmcgee 13 Aug @ 3:05pm 
does this also affect mechanoids?
Stokeling9701 13 Aug @ 12:24pm 
can you use this with the wasd mod
RedMattis  [author] 13 Aug @ 12:03pm 
@Mega
What lucky_one said. Also, if your pawns aren't drafted, the option is turned off, or they are currently executing an order it doesn't run anything at all.

@Broms
Thanks, glad you like it! :D
lucky_one 🍀 13 Aug @ 10:43am 
I did a few battle tests, seems to be working nicely. Imma replace S&D with it.

@Mega I didnt notice anything with the few battles I did, but I would guess it has the same impact than S&D, or even less, since this doesnt make your pawns chase to another continent looking for enemies.
Mega 13 Aug @ 10:29am 
What's the performance impact of this?
Broms 13 Aug @ 10:23am 
This mod is awesome
RedMattis  [author] 13 Aug @ 9:26am 
Update:
Added cover-seeking behavior toggle. When enabled colonists will automatically seek out cover in combat, including situations where their cover was destroyed or no longer applies due to flanking.

Also fixed the issue causing pawns with firearms not to close in.
lucky_one 🍀 13 Aug @ 6:37am 
I had the same issue when I tested it, with and without other mods. That's why I paired it with Search and Destroy.
Kim Jong-Un 13 Aug @ 4:25am 
Same here, I think. I haven't really tested it massively yet, but the one raid I did encounter last night saw my pawns standing about getting shot at when equipped for range combat.