PDA

View Full Version : Help with a custom die



ziggitycheese
June 26th, 2018, 04:19
I've searched around and either my Google Fu is off, or more likely, I don't know enough to understand what I've found.

I want to make a custom die where the possible results are 0,0,1. Like a Fate Die but without the "-" Can someone assist me?

Much appreciated.

damned
June 26th, 2018, 04:45
You wont be able to get the physical dice to display those.
You will be able to get the Chat result to show that.

There are several dice extensions - there is a funky dice extension and you can also look up the custom dice in CoreRPG for d3 and d2.

damned
June 26th, 2018, 04:52
https://www.fantasygrounds.com/forums/showthread.php?28287-Mutant-Year-Zero-Dice-Mechanic
https://www.fantasygrounds.com/forums/showthread.php?23013-Demi-Dice

ziggitycheese
June 26th, 2018, 18:44
Don't really care what the dice look like when I'm rolling, I only care about the results outputted.

So from the look of it I can do this by adding this to my gameelements.xml in the .pak for
my ruleset, which would make a 1 or a 2 = 1 and a 3+ result in a 0. I'll test when I get home.

<customdie name="d001">
<model>d6</model>
<menuicon>customdice</menuicon>
<script>
function onValue(result)
if result >= 3 then
modresult = 0;
else
modresult = 1;
end
return modresult;
end
</script>
</customdie>

ziggitycheese
June 27th, 2018, 15:03
This worked.
Just because I hate finding a solved question that doesn't have the solution in it, here's what I ended up doing. Because I only wanted this single function for the die, I changed the Fate Die rather than make a custom die.

1.Made a copy of the ruleset I was wanting to edit, and renamed it.
2.In the copy, i edited the gameelements.xml file added this before between the </position> and </die> under the dF die:

<script>
function onValue(result)
if result == 1 then
modresult = 1;
else
modresult = 0;
end
return modresult;
end
</script>

3. Started a new Campaign using the copied ruleset I made.

This made it so the Default action of the Fate die was ignore the "-" and make it a 0 instead.

Thanks for pointing me in the right direction @Damned

damned
June 27th, 2018, 15:05
Good start - but you do need to make it into an extension or you will either miss out on Ruleset updates or your change will be overwritten on an update.