Talk:Weak Spotter

From Caves of Qud Wiki
Jump to navigation Jump to search

Regarding my latest edit - it feels like it's probably not intentional (maybe a bug), but it does indeed grant you 25% crit chance when combined with masterwork. I'll report it on the bug tracker and see what happens. Egocarib (talk) 01:58, 13 January 2021 (UTC)

This was fixed in today's patch and I've updated this page to describe the new behavior. Egocarib (talk) 17:54, 20 February 2021 (UTC)


I'm trying to mod this, but Pistol_WeakSpotter under XRL.World.Parts.Skill is just a dummy entry without any relevant code.

Many of the weapon skill effects, such as this one, are hard-coded into either XRL.World.Parts.MissileWeapon or XRL.World.Parts.Combat. The game performs skill checks in the flow of combat code to adjust critical hit chance and similar details.
Egocarib (talk) 14:02, 8 January 2021 (UTC)


I found the relevant code under the file you mentioned. It's this.

     int num1 = 0;
     if (this.ParentObject.HasPart("ModMasterwork"))
     {
       ModMasterwork part = this.ParentObject.GetPart("ModMasterwork") as ModMasterwork;
       num1 += part.Bonus;
     }
     if (this.Skill == "Pistol" && Owner.HasSkill("Pistol_WeakSpotter"))
       num1 = num1 == 0 ? 1 : (1 + num1) * 2;
     if (NaturalHitResult + num1 >= 20)
       State1 = true;

It seems to say, after you get weakspotter, if no masterwork mod, add 1 to crit chance, if do have masterwork mod, crit chance is (1+1)*2, which is 4? if i'm reading this right, this wiki is wrong, wiki says it should be +2, instead of +3

Yes, I agree with you on that - the page could probably be improved to more clearly call out the behavior you describe.
Egocarib (talk) 22:15, 8 January 2021 (UTC)