PDA

View Full Version : Using special keys



Maspalio
April 28th, 2017, 09:22
Hi,

Well, giving it another try to my ruleset, i'd like to know if i can use keys to modify the way rolls are done. Let's say i roll d10's on basic roll action. Can i use the CTRL key while rolling to change that to d10's +2 ? This is just an example. The thing i want to do is add control keys to call changes on rolls. If so, how do i spell that in the manager_whatever.lua file ? If CTRL then ... ? Thanks !

damned
April 28th, 2017, 15:34
Have a look at the code for saving throws in 5e. I thunk you can ctrl+scroll to make adjustments to the modifier. You will see the ctrl code there - how you modify it from there is up to you :)

Trenloe
April 28th, 2017, 15:46
API commands to check if shift, CTRL or Alt are pressed are detailed here: https://www.fantasygrounds.com/refdoc/Input.xcp

In 5E search for isShiftPressed in scripts\manager_action_attack.lua and scripts\manager_action_damage.lua for a couple of examples.