Saibot393 / LocknKey

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

AGE Sysem support #82

Closed kamil-merdanov closed 9 months ago

kamil-merdanov commented 9 months ago

Hello there and thank you for your module!

I'm stuck at trying to make a working lockpick roll formula. It should be "3d6 + @abilities.int.value", but it always rolls with +0. No matter what actual value the current character has. The same formula works perfectly fine if rolled from chat.

I'am using AGE System (unofficial) with a lot of other modules, but I've also tried your module with The Expanse RPG (AGE). The formula is a bit different, but the result is the same: works in chat, does not with lockpicking. FoundryVTT version is 11.308.

lock-n-key-formula

Saibot393 commented 9 months ago

Due to Lock & Key being intended to be as system agnostic as possible some data paths are not available for rolls (though i really should have a look at adding them). The formula you wrote needs to start at the actor, so it should look like this: 3d6 + @actor.system.abilities.int.value

kamil-merdanov commented 9 months ago

It works! Thank you very much!

I'm totally new to the JS and Foundry, and when I was trying to determine the correct data path to the particular stat/roll, I've followed two methods described here. The first one gave me @abilities.int.value and the second @game.system.model.Actor.char.abilities.int.value. The latter didn't work at all.

Saibot393 commented 9 months ago

The first one would normally be correct 8just isn't implemented in Lock & Key yet). The second one is more to look at the theoretically available data of a given type of actor (character, npc and so on).