crnormand/gurps

Plugin Questions: Quick Contest Module

Opened this issue · 1 comments

Hello, everyone,

I have written my first module for Foundry, called Gurps Quick Contest, the name says it all :)

I used some of GGA's methods and tried to get a feel for its functionality by looking at the code.

The repo can be found here https://github.com/giggioz/gurps-quick-contest

It is currently possible to drag and drop rollables (attributes, skills...) into the dialogue box to trigger a quick contest.

The module works but there is a lot of room for improvement, for example I would like to be able to give modifiers to each actor involved in the QC:

  1. Can you give me some guidance on how to do this by specifying the methods to call of GCA?

Another question:

  1. How is it possible to read the current value of a skill or an attribute of an actor?

Thank you

image

You can get the Skill object by calling:

s = GURPS.findSkillSpell(actor, skillname, true, false)
console.log("The skill level is " + s.level)

You can get the attribute levels with:

actor.system.attributes.DX.value
actor.system.attributes.HT.value
actor.system.attributes.ST.value
actor.system.attributes.IQ.value
actor.system.attributes.PER.value
actor.system.attributes.WILL.value

Unfortunately, we don't have a unified way of building up modifiers. We do, however, support drag and drop of the modified bucket itself. You code just needs to listen for drop events.