Talk:Weak Spotter: Difference between revisions

1,759 bytes added ,  17:54, 20 February 2021
no edit summary
(where is the code for this skill?)
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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. [[User:Egocarib|Egocarib]] ([[User talk: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. [[User:Egocarib|Egocarib]] ([[User talk:Egocarib|talk]]) 17:54, 20 February 2021 (UTC)
<hr>
I'm trying to mod this, but Pistol_WeakSpotter under XRL.World.Parts.Skill is just a dummy entry without any relevant code.
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 <code>XRL.World.Parts.MissileWeapon</code> or <code>XRL.World.Parts.Combat</code>. The game performs skill checks in the flow of combat code to adjust critical hit chance and similar details.
:[[User:Egocarib|Egocarib]] ([[User talk: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.
:[[User:Egocarib|Egocarib]] ([[User talk:Egocarib|talk]]) 22:15, 8 January 2021 (UTC)