PDA

View Full Version : Adding a customdie to the desktop



Erkenfresh
February 8th, 2015, 19:28
In my ruleset, I have a need for a 1/2d6 (aka a d3). I can create the custom die and I just used the d4 model in this case. The onResult function simply returns random(3), hoping my players never notice that visually it's 2 but then shows up in the results as a 1 or 3. ;)

Anyhow, the only way to roll this die is to put the d4 on the desktop, then right-click it and access the d3 die through the radial menu. I really don't want my players ever rolling a d4 so this only causes extra confusion. It would be great if I could somehow cause picking up the d4 to just roll the d3 instead. Can this be done or am I just out of luck?

Andraax
February 8th, 2015, 19:55
Why don't you just use the one that is on the right click menu of the d6?

Valarian
February 8th, 2015, 20:29
You can roll the custom die quickly through the /die command. Or you can create a macro by dropping the dice on to the macro slot, or by dragging a /die command to a macro slot from the chat entry area. Andraax is also correct, the d6 model is usually used for a d3 as the custom die just uses a rounded result/2. This equates to a 1 & 2 result returning 1, 3 & 4 returning 2 and 5 & 6 returning 3.

Erkenfresh
February 8th, 2015, 21:35
Fair enough, I'll just set it to be based off a d6. That makes a decent amount of sense actually. The need for 1/2d6 is pretty rare and it won't clutter up the desktop with a useless d4. Thanks!

Andraax
February 8th, 2015, 23:34
No, I meant why don't you use the one that is already included in the ruleset?

Erkenfresh
February 9th, 2015, 02:44
I don't follow sir. There is no d3 included in the ruleset. I had to create one in gameelements.xml. By basing it off of the d6, now I can see it in the radial menu for the d6 die on the desktop.



<die name="dF" merge="delete" />
<die name="d4" merge="delete" />
<die name="d8" merge="delete" />
<die name="d10" merge="delete" />
<die name="d12" merge="delete" />
<die name="d20" merge="delete" />
<die name="d100" merge="delete" />

<customdie name="d3">
<model>d6</model>
<icon>d3icon</icon>
<menuicon>d3icon</menuicon>
<script>
function onValue(result)
return math.floor((result+1)/2);
end
</script>
</customdie>

Erkenfresh
February 9th, 2015, 02:45
Oh and my crafty d3 icon is a d6 cut in half diagonally. I got a kick out of that. ;)

Andraax
February 9th, 2015, 04:09
Sorry, thought there was one included in CoreRPG; my mistake.

Andraax
February 9th, 2015, 04:10
You should make a D2 as well - and make the icon a coin. :-)

Erkenfresh
February 9th, 2015, 04:26
I don't suppose there's a way to color a particular 3d model of the die a different color than your usual dice is there? Then the d3 would look like a d6 but have a different color to make it distinguishable.