RimWorld

RimWorld

Simple Sidearms - Switch Weapon
170 Comments
fhhfxdfh2 7 hours ago 
Found a bug that the hunter drone die immediately when released :(
Noma 18 hours ago 
Thank you for the update, love you.
polat.cal 12 Jul @ 2:59pm 
Thank you for update and removed Hugslib dependency!
Syrus  [author] 12 Jul @ 1:35pm 
Version 1.6.1
Fixed settings not being saved
VitaKaninen 12 Jul @ 12:07pm 
Thanks!
Syrus  [author] 12 Jul @ 10:44am 
Update to 1.6
Removed HugsLib dependency
Reworked settings accordingly
Luccy_wq2 11 Jul @ 10:48pm 
hiiiii, thannk you for the mod, i've just been using for the past few weeks, and it is amaing, thanks for the work and mod, can't wait for the 1.6 :D
I hope this finds you well. From you friendly rimworlder
Gerewoatle 5 Jul @ 6:32pm 
Stop spamming the entire fucking workshop, you mindless p-zombie.
Evono 5 Jul @ 5:29pm 
is 1.6 planned please?
thorman123456789 4 Jul @ 12:42pm 
1.6 please?
Syrus  [author] 21 May @ 11:21am 
@Kira
Make sure you have the longest range weapon set as Default for the pawn. You can do so by left clicking on the icon in the Simple Sidearms widget while a pawn is undrafted, the weapon icon will then show a white "D" in the corner.

Pawns will not switch to a long range weapon if they are not already engaging an enemy.

You may also need to activate "Use best ranged weapon" in Simple Sidearms.
Kira 21 May @ 5:44am 
Hi! I have bolt action rifle and chain shotgun equiped. My pawns using Shotgun regardless of distance. so they wont switch to rifle even if the distance for shotgun is too long (they just staying there and not shooting at all). I only have simple sidearms and simple sidearms switch weapons mod for combat installed. What settings should i tweak?
Vandow 17 May @ 12:40am 
【翻译】
模组描述:
本模组拓展了Simple Sidearms功能,使玩家能够快速切换已征召小人的武器配置。
功能特性:
通过四个简易按钮,可强制小人切换至远程武器(无论其偏好设置如何)或使用近战/徒手战斗
支持多选批量操作:一键切换所有选中小人的武器,无需逐一手动调整
彻底告别逐个选择、逐个更换武器的繁琐流程
依赖模组:
需要前置模组:Simple Sidearms
兼容性说明:
暂无已知兼容性问题
问题反馈:
请在提交问题时附上HugsLib日志(按CTRL+F12生成),这将极大帮助定位故障原因。
Syrus  [author] 11 May @ 3:58pm 
@RustyRhino
If I remember correctly - can't check right now - I use the functionality that Simple Sidearms provides to switch weapons etc. In that case, the bug is very unlikely to come from the addon mod, coming from the main mod instead.
You could try to reproduce the bug without using Switch Weapons to make sure?
RustyRhino 11 May @ 6:05am 
wondering if anyone has seen similar issue; not sure which mod is the culprit.
i had the pawn pickup a Legendary ranged weapon, and i clicked on it in the gizmo, three times to make it his primary and to equip it, and when i went into his inventory to look at it, the quality changed to from Legendary to Normal.
this isn't the first time i've seen this happen, and it's intermittent, so it's the worst kind of bug to try and track down lol
Syrus  [author] 25 Feb @ 12:05pm 
Nothing is compatible with CE.
VitaKaninen 25 Feb @ 2:20am 
It says no known incompatibilities.
A N O N 25 Feb @ 1:34am 
Is this Combat extended compatible?
TKO 2 Feb @ 2:46am 
@SwiSSchriS some weapons are too heavy to be sidearms
SwiSSchriS 24 Nov, 2024 @ 8:24pm 
thank you very much for the fast answer. So this is 100% on me and I am doing something wrong. I keep trying. Maybe a conflict with the dual Weal mod...? anyway. thx alot
Syrus  [author] 24 Nov, 2024 @ 4:06pm 
Iiirc that should already be an option for Simple Sidearms itself, check the settings, I definitely remember my snipers switching to auto pistols when enemies were close but not in melee range.
Though it may be that the sniper rifle is still "better" at that range than the shotgun?
SwiSSchriS 24 Nov, 2024 @ 6:06am 
I hope someone can help with my question. What I would like my pawns to do is automatically switch from a sniper rifle to a shotgun the moment a enemy come for example closer that 10 tiles. Is that possible?
Scorpio 10 Nov, 2024 @ 3:51am 
@ notable notepad that's not on this mod but original on the sidearms mod
Syrus  [author] 9 Nov, 2024 @ 5:00pm 
In which way is this addon not compatible with that mod?

If it is an incompatibility with the main mod, you will have to address that with its author
Scorpio 19 Oct, 2024 @ 12:11pm 
+ 1 on no hugslib please
polat.cal 14 Oct, 2024 @ 4:31pm 
@Syrus - Do you plan to make this mod without requiring Hugslib? I love this mod and thank you for your great efforts but Hugslib seems to me broken.
SSS-class Warlock 7 Oct, 2024 @ 8:52am 
This submod is an eternal classic
Syrus  [author] 30 Aug, 2024 @ 3:53am 
Not sure what kind of shields you are talking about, the ones that stop bullets from vanilla RimWorld or modded (medieval'ish) ones.
Either way, it's not something this mod does aim to fix.
If you are talking about modded shields, the mod author of those should implement a way to make pawns not use shields when they are wielding an incompatible weapon

Last I played, I was using shields from some Vanilla Expanded mods, and, as far as I remember, those would not be used if a two handed weapon was switched to
Cybroxis 29 Aug, 2024 @ 6:29pm 
I was hoping that this would fix the problem of shields ALWAYS being used even when I currently want them to use a 2-handed weapon, leading to them holding for example a shotgun, but the use of said shotgun getting blocked by the shield. I don't want them to try and use the shield when they are trying to use a 2-handed weapon. If i tell them to use a sword/mace, they should use the shield. When I tell them to use a shotgun, they should put the shield away. Very frustrating. I assume your mod doesn't do that?
VitaKaninen 13 Apr, 2024 @ 11:18pm 
In the Vanilla Expanded world, you get bonuses when a pawn is holding a hammer when building, or a wrench when fabricating, or a scalpel when tending, etc. So you want them to swap to that tool when they are doing that task. There is a mod that does that, though.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2947023388
yellowdotchuck 13 Apr, 2024 @ 4:28pm 
Ah, okay.
Syrus  [author] 13 Apr, 2024 @ 4:27pm 
Simple Sidearms and subsequently this mod as well rely a lot on pawns being drafted.
Not saying it's impossible to get working somehow, but my attempts didn't work out as desired.

Not really sure why you need to be able to switch weapons on pawns doing such automated things anyway. Set them to ranged if you want them to carry ranged weapons, they will automatically switch to weapons more suited to closer range or melee by Simple-Sidearms-default. If you need more fine control, draft the pawn.

The only situation where I can imagine switching being helpful is if you got a melee-prefering pawn and want to set them to carry a ranged weapon while in guard mode...
I could add an option which patches the "prefered" setting so that it is always "ranged" while drafted or in guard mode.
yellowdotchuck 13 Apr, 2024 @ 2:49pm 
Okay. I was wondering if it was possible for them to switch like in drafted as in "work mode."
Syrus  [author] 13 Apr, 2024 @ 12:39pm 
Alright, I got preventing pawns from switching weapons while in guard mode to work - but once they engage in combat and switch their weapon, for example due to coming into close combat, they will not switch back to what they were set to. Even the "force weapon" is ignored. Neither will they switch back to their preferred weapon, staying with whatever they ended up last.

I'm not sure if that's what you would want, and I'm not sure how else to really implement this from my side. My advise would be to set everyone to "Ranged" as prefered, as I always do, that solves most of such issues in my opinion, especially because pawns will switch to melee when necessary.
yellowdotchuck 13 Apr, 2024 @ 12:53am 
I see. Why not try when in guard mode or reaction force if checked in?
Syrus  [author] 13 Apr, 2024 @ 12:52am 
If weapons stayed switched beyong being drafted, pawns would never switch back - weapon preferences would then not matter anymore and you would have to switch back manually if you for example made someone equip explosives. That could be what some people want, but overall I think it's preferable to have the switch matter while drafted only.
yellowdotchuck 12 Apr, 2024 @ 11:00pm 
@Syrus I think the problem is that it deactivates when draft is on and not when weapons are equipped. Maybe make it like how Simple Sidearms did and have it equipped with range since perhaps needing drafted is the issue.
VitaKaninen 12 Apr, 2024 @ 4:22pm 
Thanks!
Syrus  [author] 12 Apr, 2024 @ 4:17pm 
Version 1.5.0
Tiny code fix

---

Will have to look into Guards For Me later.
yellowdotchuck 11 Apr, 2024 @ 4:08pm 
Well, do I got news for you. The 1.5 update released today.
yellowdotchuck 11 Apr, 2024 @ 4:05pm 
Okay.
Syrus  [author] 11 Apr, 2024 @ 9:48am 
Ask me again when it is updated for 1.5.
Maybe I find time to look into it, no promises though.
yellowdotchuck 11 Apr, 2024 @ 1:50am 
@Syrus I tried playing it with Guards For Me, and it doesn't activate when in guard or Reaction Force. I wish that it can be able to be used for guards that are not drafted to be able to switch weapons. Will it be worked on for it to work with Guards for Me?
VitaKaninen 2 Mar, 2024 @ 12:55pm 
Works perfectly! Thanks so much!
Syrus  [author] 2 Mar, 2024 @ 12:25pm 
Version 1.4.8
- Implemented EMP button & made prev/next not switch to EMP if skipping dangerous/EMP weapons is active
- Sorting takes into account defName before thing's HashCode for more consistent sorting
- Dangerous & EMP buttons will no longer go back to first (can always go back using Previous-button or forward with Next, actually)
- ^ that also fixes bug when trying to switch from Unarmed to Dangerous / EMP
- Added option to make Range-buttons switch to highest range possible if no weapon capable of hitting target range was found
- Removed accidental debug prints

---

SimpleSidearms UI is sorted by market value, made worse yet by the fact that the equipped weapon is now put first. So it's all over the place and really not nice for iterating over.
I prefer sorting by range, makes a lot more sense.
Grenades might not be in order shown, but they should at least be in a consistent order now.
VitaKaninen 2 Mar, 2024 @ 11:43am 
The buttons make a lot more sense now that I know what they do, and I think the long, mid, and short ranged buttons are working properly as designed.

If I had the ability to manually change the grenade order in Simple Sidearms, and if your mod just cycled through them from left to right as they are shown, that would fix the issue, but you probably have no control over that.
Syrus  [author] 2 Mar, 2024 @ 11:23am 
The calculation printed is only part of the sorting process, don't put too much thought into it, it just calculates the DPS, required if the range, when sorting by range, is equal. Next step is sorting by HashCode - and that's where the problem of inconsistency comes into play. I changed it to look at the defName as the next step instead and only after that look at the HashCode as a very last resort if range, dps and defName were all equal. This is required to ensure it keeps switching through weapons and doesn't get stuck on switching between two. Only had it printing because I was checking if the range-based buttons would calculate dps-at-range correctly.
For your pawns Quail and Crane the difference is simply that Quails's grenades have a higher HashCode than his EMP grenades, while it is the other way around for Crane. Each item gets a unique id when crafted, which is pretty much just an increasing index in the save.
Syrus  [author] 2 Mar, 2024 @ 11:23am 
- There is now a setting for Prev/Next to NOT switch to dangerous weapons (default enabled)
- With this setting enabled Prev/Next only iterates over the currently equipped type of weapon:
non-dangerous/EMP, dangerous (or EMP in the version I'm working on)
- Prev/Next does not go back to the beginning/end when reaching the last/first weapon

- Explosives sorting should be improved in the next version
Though I'm not sure how to handle the problem with having an additional "dangerous" weapon (in your case the smoke launcher): the iteration will always start with the first weapon (depending on selected sorting algorithm) which for the two with the launcher is the launcher
I'm considering changing it to not cycle through and only go from first to last (you could use the Previous-button to get back)
- There will be an EMP button in the new version and EMP weapons are excluded from "Dangerous"

- Unarmed not allowing to switch to dangerous is a bug, fixed it in the new version
Syrus  [author] 2 Mar, 2024 @ 11:23am 
Wow, you went above and beyond with this! That's more than I could have asked for, thank you.

I think part of the confusion/problems comes from me not explaining the changes/buttons:

- Range buttons have a "target distance(/range)" for which it searches the best DPS (at that range) weapon; if a weapon does not reach far enough to hit that range, it will not be considered for switching
- Long Range uses a target range of 40, for example for snipers
None of the weapons you use reach that far, so it sticks with the current weapon
Maybe it would be a better idea to instead take the longest range weapon in that case?
- Medium range uses a target range of 25
- Short range uses a target range of 12
- All target ranges can be adjusted in the settings