There is no mechanical implementation of Effects.
Effects are descriptive only.
There are way too many differing systems to understand and implement a generic effects system for...
Printable View
Hello damned,
I create an ext for werewolf v20
and help me, thank
I want to add a function to the script (below) :
add dice to dicepool instead of throwing them directly ?
<template name="number_charabilityscore">
<basicnumber>
<anchored position="belowleft" offset="0,10" width="32" height="22" />
<default>0</default>
<script>
function action(draginfo)
local nodeWin = window.getDatabaseNode();
local nLimit = 0;
if nodeWin then
local rActor = ActorManager.getActor("pc", nodeWin.getChild("..."));
local nAttribLev = getValue();
nAttribLev = nAttribLev + (DB.getValue(nodeWin, "stats." .. self.target[1] .. ".mod", 0));
ActionAbility.performRoll(draginfo, rActor, nAttribLev, self.target[1]);
end
end
function onDragStart(button, x, y, draginfo)
return action(draginfo);
end
function onDoubleClick(x,y)
return action();
end
</script>
</basicnumber>
</template>
do it like this Meguido
https://www.fantasygrounds.com/forum...chmentid=31649
Use the (a), (b), (c) fields to link to other fields on the charsheet.
Attachment 31649
Re
I would like to integrate dicepool into the script (below)
<template name="number_charabilityscore">
<basicnumber>
<anchored position="belowleft" offset="0,10" width="32" height="22" />
<default>0</default>
<script>
function action(draginfo)
local nodeWin = window.getDatabaseNode();
local nLimit = 0;
if nodeWin then
local rActor = ActorManager.getActor("pc", nodeWin.getChild("..."));
local nAttribLev = getValue();
nAttribLev = nAttribLev + (DB.getValue(nodeWin, "stats." .. self.target[1] .. ".mod", 0));
ActionAbility.performRoll(draginfo, rActor, nAttribLev, self.target[1]);
end
end
function onDragStart(button, x, y, draginfo)
return action(draginfo);
end
function onDoubleClick(x,y)
return action();
end
</script>
</basicnumber>
</template>
possible to put roll in dicepool (script) ?
It is possible but you need more code than that.
you need something like this:
and then you need to define ActionDPQuote:
<script>
function action(draginfo)
local nodeWin = window.getDatabaseNode();
local rActor = ActorManager.getActor("pc", nodeWin);
local nScore = DB.getValue(nodeWin, "strength.score", 0);
local nAttrMod = DB.getValue(nodeWin, "strength.modifier", 0);
local sParams = "1d20+" .. 0 .. "x" .. nScore;
ActionDP.performAction(draginfo, rActor, sParams);
return true;
end
function onDragStart(button, x, y, draginfo)
return action(draginfo);
end
function onClickRelease(x, y)
return action();
end
</script>
And then you would modify a copy of the dicepool scripts and call it manager_action_dp.lua and have to adjust it to accept the parameters in the way that your script above is presenting them.Quote:
<script name="ActionDP" file="scripts/manager_action_dp.lua" />
What am I missing in terms of you not wanting to do it from within MoreCore?
my script linked to dice roll (ActionAblility : manager_action_ability.iua), how do I connect two scripts?
(manager_action_ability.lua defined Roll dice werewolf rules)
Possible to integrate dicepool fonction in template ?
Hi Meguido you are linking the scripts correctly but you need to pass the information to the script in the way that the script is expecting. The script you are passing to has nothing to do with dice pools though.
re
script link to template (above)
lien dropbox
https://www.dropbox.com/s/6qjpstisg6...ility.lua?dl=0
I noticed something seemed off about the roll /iron (for ironsworn rolls) and I believe I've found an issue in the code.
Specifically, in manager_custom_iron.lua line 94 reads:
local rRoll = { sType = "pbta", sDesc = sDesc, aDice = aFinalDice, nMod = nMod };
The sType was saying "pbta", but I expected "iron" there.
So on my computer I changed that line to read:
local rRoll = { sType = "iron", sDesc = sDesc, aDice = aFinalDice, nMod = nMod };
and now it seems to be working like a charm.
Did I find a mistype or did I mess up my version?
I hope this helped.