5E Character Create Playlist
  1. #1

    Only some exploding dice in a single roll

    In the RPG, Arcanis, you roll two "Action" dice (2d10) and an "Attribute" die (can be anywhere from d4 to d12). The Attribute die can explode but the Action dice cannot.

    After chatting with Damned, I tweaked the manager_custom_explode lua file in the Morecore ruleset and added the two (highlighted) lines. It gets me exploding dice for d4, d6, d8 and d12 but (obviously) not for d10. Still, I'm happy with the result being the feeble coder that I am. Yet, I have to ask, is there a solution that gets me across the goal line and, somehow, explodes that third d10 when your Attribute die happens to be a d10? Anyone know?

    CropperCapture[12].jpg


    In case my attachment doesn't work, here is the relevant (twaked) section of the lua file.
    for i , v in ipairs (aSavedDice) do
    Debug.console("onLanded: last dice ", i, v);
    if v.exploded then
    w = aDice[k];
    k = k + 1; -- move on to next die for next time around
    v.result = v.result + w.result;
    if w.result == 10 then <-----------------These are the two lines I added
    v.exploded = false; <-----------------These are the two lines I added
    elseif w.result == getDieMax(w.type) then
    aRerollDice[j] = w.type;
    j = j + 1;
    v.exploded = true;
    else
    v.exploded = false;

    end
    end
    end
    Last edited by chillybilly; May 17th, 2019 at 16:36.

  2. #2
    and the answer was:

    for i , v in ipairs (aSavedDice) do
    Debug.console("onLanded: last dice ", i, v);
    if v.exploded then
    w = aDice[k];
    if getDieMax(w.type) == 10 then diecounter = diecounter+1;
    end
    k = k + 1; -- move on to next die for next time around
    v.result = v.result + w.result;
    if w.result == getDieMax(w.type) and (diecounter == 3 or getDieMax(w.type) ~= 10) then
    aRerollDice[j] = w.type;
    j = j + 1;
    v.exploded = true;
    else
    v.exploded = false;
    end
    end
    end

  3. #3
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,651
    Blog Entries
    1
    hi chillybilly

    good work

    w.result is the result of that particular individual dice roll so you want to exclude (or include) based on the number of sides of the dice.

    also you want to do this in a separate script - create one called manager_custom_arcanis.lua for example

  4. #4
    Thank you! The entire ruleset/extension is taking nice shape mostly thanks to your Open Legend extension (and of course, Morecore). When I get it truly functional, I'll share it in case anyone is interested in Arcanis (the non-5E one).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in