Saibot393 / LocknKey

A Foundry VTT module to handle locking and unlocking of doors and other objects
MIT License
10 stars 7 forks source link

Incorrectly calculating lockpick roll formula in Starfinder #43

Closed jxj5034 closed 10 months ago

jxj5034 commented 10 months ago

This is for the Starfinder (sfrpg) system For the "Lockpick roll formula" and "Break lock formula", the module does not seem to read skill modifiers from the character sheet. For reference: the lockpick formula is typically an Engineering check which is 1d20 + the character's engineering skill.

If you enter 1d20 + @skills.eng.mod in the "lockpick roll formula" field, @skills.eng.mod always returns zero. This means every lockpick check is a flat 1d20 +0 and not intended behavior. This is the same for breaking the lock 1d20 + @skills.ath.mod where @skills.ath.mod also returns zero.

Changing the lockpick formula field to add flat modifiers such as 1d20+2 works as expected but this does not pull any information from the character sheet so is not very useful.

Foundry Version 11 Build 313 Starfinder 0.25.2 I have tried disabling all modules except Lock and Key, with the same behavior. Currently installed modules:

Saibot393 commented 10 months ago

Lock & Key uses a slightly more general path for skill modifiers, instead of e.g. @skills.eng.mod this should work: actor.system.skills.eng.mod I think the formulas should be this then: Lock picking: 1d20 + @actor.system.abilities.dex.mod + @actor.system.skills.eng.mod Lock breaking: 1d20 + @actor.system.abilities.str.mod + @actor.system.skills.ath.mod

jxj5034 commented 10 months ago

I just tested the formulas above, and your change works! Thank you for the quick reply, I've been pulling my hair out over this.

jxj5034 commented 10 months ago

One final note: In starfinder, the formula to lockpick a door should be: 1d20 + @actor.system.skills.eng.mod Dexterity is not included but the important part was getting the file paths correct which you provided and I am very grateful. Notably, there is also no 'general' formula for breaking a lock in starfinder. Thanks again!

Saibot393 commented 10 months ago

Thanks for the correction, its been a while since i last played Starfinder. I will include the formulas as default in the next version.