Closed dorvek closed 6 months ago
I am not familiar with the system.
But if you for example want to roll an amount of d6 equal to the strength modifier you used as an example, you could write (@actor.system.attributes.str.mod)d6
. I am not sure how the system uses skills/abilities, but i think they may be items. In this case you should be able to use something like @skills.Lock_Picking.[some data path here]
to reference a skills value, in this case a theoretical skill named "Lock Picking".
I hope that helps. Feel free to ask any other questions you have. For more detailed help with the formulas i might need a .json export of an example character and a more in depth explanation of the system.
Thanks for the fast response! I'll try that when I have time, is there a way to call a macro as well?
The D6 system has every attribute and skill broken down into dice rolls. A dice is made up of 'pips' 3 pips is a full dice, less than 3 is added. Sorry not explaining too well.. the progression is like this. 2d6 (roll 2d6), 2d6+1 (roll 2 d6, add 1 to total), 2d6+2, 3d6 (the next 'pip, or what would be 2d6+3 makes it another dice, so you only ever have +1 or +2 to a dice roll) There are 6 attributes for most characters, Dexterity, Strength, Mechanical, Technical, Knowledge and Perception. All skills are broken down under the relevant attribute, and starts with the same dice as the attribute does, so Search is a Perception skill, if your perception is 3d+1, then the search skill is also 3d+1. Characters can spend their experience or character points, to increase the skills higher than the attribute, so they might have perception at 3d+1 and Search at 4d+1
Anyway, most rolls in game are opposed rolls where the player rolls their attribute or skill in d6 and adds the +pip to it if relevant. the GM either has a static value to beat or will roll an opposing roll.. most non combat things have either a static or roll difficulty, eg a lock might be a static difficulty of 8, or could be opposed by the gm rolling 2d6, depending on how lazy the gm is at the time lol
The problem with calling the .score of any attribute or skill, is it looks at the pips, not the dice.. so if I have 3d6+1 the .score sees it as (3dice of 3 pips each +1pip) = 10 so I guess there must be code somewhere when rolling to divide that 11 by 3 to get the amount of dice to roll and the leftover is the + pip..
The .mod is something that is added by an item to the .score of a skill or attribute, I might have armour that adds 6 to .mod and the system will see that as 2d and when the armour is on, add 2d6 to str, but calling the .mod of the attribute itself is usually just going to be 0
test actor .json included but I cant see the roll formula in there, but you might :) fvtt-Actor-test-r3HfW3YrHvf6ilDW.json
So, adding dice/roll based difficulties to locks is a bit harder, maybe possible with a few tricks but i will have to think about that. The normal static DCs or rather the player formulas shouldn't be problem though. I am assuming that the whole relevant value for a given attribute/skill is calculated by .score + .mod:
For the strength:
floor((@actor.system.attributes.str.score + @actor.system.attributes.str.mod)/3)d6 + (@actor.system.attributes.str.score + @actor.system.attributes.str.mod)%3
Lets for example say, that you also want to add lock picking hacking using the Security(?) Skill, it would look like this (skill mods seem to be already included in skill scores):
floor((@actor.system.attributes.tec.score + @actor.system.attributes.tec.mod + @skills.Security.system.mod)/3)d6 + (@actor.system.attributes.tec.score + @actor.system.attributes.tec.mod + @skills.Security.system.mod)%3
Dice based difficulty isnt a worry, worst case I'd just roll it and enter the result as a static value.
the formula you've provided is really close, I did neglect to mention a part of the rolls though.. I completely forgot until testing the formula! the first dice of the dice rolled is a Force or Fate dice, it explodes on a 6 and you get to re-roll it so essentially a 3d6+2 skill is broken down to 1 x 1d6 "Force die, exploding", 2 x 2d6 normal die and +2 'pips'
I did find this in the utilities.js file, since its not a json I couldnt upload the whole thing.
Function which returns a number of dice and pips from a raw score.
/**
And this from od6sroll.js: // Get the attribute of the skill or spec attribute = data.actor.items.filter(i => i.id === data.itemId)[0].system.attribute.toLowerCase(); if (typeof (attribute) === 'undefined') { attribute = null; } else { if (OD6S.flatSkills) { // Check if attribute of skill has at least 1 dice const attributeValues = od6sutilities.getDiceFromScore(data.actor.system.attributes[attribute].score); if (attributeValues.dice === 0) { ui.notifications.warn(game.i18n.localize("OD6S.SCORE_TOO_LOW")); return; } rollValues.dice = (+attributeValues.dice); rollValues.pips = (+attributeValues.pips);
not sure if that helps or not. if there is anywhere else I can get info from, just let me know. really appreciate the help especially given its not even a system you play!
Luckily Foundry already has exploding dice in the default formulas, the adjusted strength formula should look like this:
min(1, floor((@actor.system.attributes.str.score + @actor.system.attributes.str.mod)/3))d6xo6 + max(0, floor((@actor.system.attributes.str.score + @actor.system.attributes.str.mod)/3)-1)d6 + (@actor.system.attributes.str.score + @actor.system.attributes.str.mod)%3
One question though, can the same die explode multiple times, i.e. would you reroll it again if it again lands on a 6?
yes, on a skill roll it does.
I notice in chat when it rolls a force / fate / wild dice it notes it as 1dwx6 so 2d6 result 1dwx6 result
For the multiple rerolls the formula should then look like this (x instead of xo):
min(1, floor((@actor.system.attributes.str.score + @actor.system.attributes.str.mod)/3))d6x6 + max(0, floor((@actor.system.attributes.str.score + @actor.system.attributes.str.mod)/3)-1)d6 + (@actor.system.attributes.str.score + @actor.system.attributes.str.mod)%3
if think the 1dwx6
ist just an alternate way of writing 1d6x6
(not 100% sure though)
Awesome, looks like both work. the dwx6 makes the force/wild dice a different colour to the rest of them from what I can see.
I think that should make it all work for me, I was hoping it would be something like .attributes.strength.dice + .attributes.strength.pips or something easy lol
Yeah that would have been nice. The formulas for systems with roll rules more complex then xdy + z >= DC
tend to be quite long.
I dont think this is an issue as much as it is just I don't know what I'm doing. I'm using the Open D6 Space system (OD6S) and the Star Wars module on it. I can get password to work and I can get keys to work, but I can't get lockpick or bash formulas to work.
I can't figure out the key/syntax to use to get it to roll a skill or attribute. I can use @actor.system.attributes.str.mod (or.max or .score) but it only calls the static value. For example, strength might be 3d6+2, its not a static number, the score is in 'pips' and is 3 per dice and the +2 for a total of 11, but I cant figure out what to call to actually roll the 3d6+2, short of typing in 3d6+2, but that obviously doesn't adjust for each character.
I then thought I could make a macro and call that, but I have the same issue, I cant seem to call a macro either, using /macro Strength I'm sure its something I'm unaware of, but I can't figure it out, so if anyone knows, I'd really appreciate it!