[1.1] SimpleSidearms (1.4.0)

Started by PeteTimesSix, May 16, 2017, 04:21:35 PM

Previous topic - Next topic

BlueTressym

Hi.  I'm getting this error reporting in my debug log: 

QuoteJobDriver threw exception in initAction. Pawn=Joslyn, Job=WaitMaintainPosture, Exception: System.NullReferenceException: Object reference not set to an instance of an object
at SimpleSidearms.utilities.WeaponAssingment.doCQC (Verse.Pawn,Verse.Pawn) <0x001f8>
at SimpleSidearms.intercepts.Verb_MeleeAttack_TryCastShot_PostFix.TryCastShot (RimWorld.Verb_MeleeAttack) <0x00229>
at (wrapper dynamic-method) RimWorld.Verb_MeleeAttack.TryCastShot_Patch1 (object) <0x00722>
at (wrapper dynamic-method) Verse.Verb.TryCastNextBurstShot_Patch0 (object) <0x00040>
at Verse.Verb.WarmupComplete () <0x00028>
at (wrapper dynamic-method) Verse.Verb.TryStartCastOn_Patch0 (object,Verse.LocalTargetInfo,bool,bool) <0x00564>
at RimWorld.Pawn_MeleeVerbs.TryMeleeAttack (Verse.Thing,Verse.Verb,bool) <0x001dc>
at Verse.AI.JobDriver_Wait.CheckForAutoAttack () <0x0032b>
at Verse.AI.JobDriver_Wait/<MakeNewToils>c__Iterator1B4.<>m__76E () <0x0008e>
at Verse.AI.JobDriver.TryActuallyStartNextToil () <0x002d9>
lastJobGiver=, curJob.def=WaitMaintainPosture, curDriver=Verse.AI.JobDriver_WaitMaintainPosture
Verse.Log:Error(String)
Verse.AI.Pawn_JobTracker:StartErrorRecoverJob(String)
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.Pawn_JobTracker:StartJob(Job, JobCondition, ThinkNode, Boolean, Boolean, ThinkTreeDef, Nullable`1)
Verse.AI.Pawn_JobTracker:EndCurrentJob_Patch1(Object, JobCondition, Boolean)
Verse.AI.JobDriver:EndJobWith(JobCondition)
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

Please let me know if you need more info.  Also, someone suggested there might be an issue with this and mods that add more weaponry, such as XeoNovaDan's Vanilla-Friendly Weapon Expansion.  Is this the case?  If so, is there any way to overcome it? 

paulvin

when i select multiple units to melee attack an enemy they will only auto-switch to melee when they are the enemy's target. basically they will only auto-switch when they get melee'd by the enemy and the other units will still use their guns to melee because they havent been targeted yet.

is this intended or am i missing a setting?

SpaceDorf

I have to admit that I micromanage those occasions.
When I send my pawns into melee, I switch the weapons myself and rely on autoswitch only as a backup, if I miss something in combat.

There is the Trigger Option : switch only on attacks from target
which might be what you are looking for.

But if an actual option exists that forces a weapon switch when ordered into melee I don't know.
If it does not .. I declare it a feature request.
And I have to take a deeper look in how to make my pawns use firearms in close combat.

[attachment deleted by admin: too old]
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

sirgzu

Ye this mod is nifty as a mean to carry a bunch of weapons but the switching logic is just unreliable.

It would work find if pawns actually considered their sidearm ranges to switch weapons, including when melee is equipped. A lot of the times you want your pawns to use some tool for their day job but you don't want to run into a pack of zombies with only a trowel or a hammer...

kixiye

I love this mod, would it be possible to make a version for it for apparel? It would be amazingly practical to swiftly switch from work gear to combat gear, or high/low temperature clothing. Can't go for too long without a hat on the tundra, but getting bullet'd in the skull is not  too great either.


kixiye

I had totally missed that one, started a game with it now and so far it seems like I'm getting the hang of it. Thanks Canute!

Roolo

Amazing mod PeteTimesSix. I have a question. I was impressed with how you implemented the section in the mod's options in which players can configure what weapons can be used as a simple sidearm. I want to implement something similar for my RunAndGun mod. My mod allows players to gun while running, with a certain movement penalty. I want to allow users to make this movement penalty dependent on what weapons are being used, and players should be able to configure this (in a similar way like how players can configure allowed simple side arms weapons). Now my question is: Is it ok if I use some of your code to implement my mod's options?


faltonico

@Roolo
He released the source without stating the license, so it is basically public domain, aka, you can do whatever you want with the code.
Unless i am mistaken and PeteTimesSix corrects me.

Bergil

This was by far the most useful mod for me! Any chance of it being updated when A18 comes out?

Vane

Quote from: Bergil on November 10, 2017, 11:38:50 PM
This was by far the most useful mod for me! Any chance of it being updated when A18 comes out?

+1 to this! Really can't wait for it to be B18

WereCat88

I found kind of an exploit, a caravan visited and a caravan member got melee attacked by a
maddened bunny and dropped his weapon but didn't take it back, leaving it to the colony.(Or he intended to but we stole it)
I am The Primal Mammelon

FrodoOf9Fingers

Created a temporary patch for B18, and sent a pull request to the author. If you want an unofficial version, download the zip here:
https://github.com/FrodoOf9Fingers/SimpleSidearms

fallout2077

Quote from: FrodoOf9Fingers on November 20, 2017, 09:57:01 PM
Created a temporary patch for B18, and sent a pull request to the author. If you want an unofficial version, download the zip here:
https://github.com/FrodoOf9Fingers/SimpleSidearms

Thank you very, very much for this patch! I tried to build a B18 version based on the source code for this and the B18 version of HugsLib, but I received several errors.

Sixdd

Awesome! Can't wait to try the update in the morning.