Talk:Weak Spotter: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
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) | |||
<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. | : 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. |
Revision as of 01:58, 13 January 2021
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)
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
orXRL.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