Thread: MoreCore Ruleset
-
April 1st, 2020, 03:15 #2041
Can you give me more info on the Move thing?
FGU or FGC?
There is no code in MoreCore that should affect that - its all CoreRPG afaik.
The second issue is not so straight forward.
The health bar is very simplistic - it has undamaged, 1-9 (or 1-10) damage and greater than that damage
It actually doesnt look at how many HPs you have - it only looks at damage.
NPCs have their token in the CT replaced with a Skull when they die.
-
April 1st, 2020, 04:39 #2042
- Join Date
- Nov 2016
- Posts
- 17
I'm having an issue with /rollunder in MoreCore. It may be user error? In which case I'm sorry in advance.
I'm trying to code skills and such in for Mothership. It uses 1d100, and players need to roll under their skills. The problem I'm running into is that the code is not just rolling 1d100. It's rolling 1d100 AND 1d10.
2020-03-31 23_33_59-Window.jpg
A secondary problem I'm running into is, and this is where I think the user error is, I can't seem to get it to add the referenced Stat to Biology to roll. (p1 + a1, in this case, doesn't work):
2020-03-31 23_34_12-Window.jpg
Thoughts? Thanks.
-
April 1st, 2020, 04:47 #2043
Hi benightedfae
Im guessing you are running under FGU?
They changed the d100 dice between FGC and FGU.
Try crack open the ruleset
go to /desktop/scripts/morecore_damned_rollunder.lua
and remove the following lines (87/88/89/90)
Code:-- For d100 rolls, we also need to add a d10 dice for the ones place if sSize == "100" then table.insert(rRoll.aDice, "d10"); end
You cant do Math if the roller hasnt been expressly written for it.
The rolls have to match the required format exactly.
I think Superteddy57 did an extension for Mothership but maybe it wasnt released?
If you can tell me in great detail how the rolls for mothership should work Ill try and write you one (better yet you could write one and share it back into MoreCore?)
-
April 1st, 2020, 04:56 #2044
- Join Date
- Nov 2016
- Posts
- 17
Thank you, I'm savvy enough to be able to edit that file.
I'm not, however, savvy enough to be able to write that code. I did do a search on the forum but didn't turn any up, so I guess it hasn't been released. If I can write something succinct enough, I may send it to you, but I know you're like, THE GUY, for MoreCore and I'd hate to take your time. My goal is eventually to be able to write my own code, but I'm having a terrible time starting because MoreCore is frankly above my coding grade, and I haven't found a ruleset that's built on top of CoreRPG that I both A) know and B) is easy enough for me to dissect to learn to backwards code.
Thanks for the quick reply!
-
April 1st, 2020, 04:58 #2045
Write me the detailed description of the roll then, bearing in mind you are translating it for MoreCore/FG and Ill write when I have some time.
-
April 1st, 2020, 05:20 #2046
- Join Date
- Nov 2016
- Posts
- 17
I appreciate that, and I will. And just so you know, deleting that code broke /rollunder completely for me. MoreCore still loaded fine, but /rollunder wouldn't do anything at all.
-
April 1st, 2020, 05:59 #2047
I just tested it here and its working ok for me.
Code:--- --- Initialization --- function onInit() Comm.registerSlashHandler("rollunder", processRoll); -- Damian added below to get the ModStack? GameSystem.actions["rollunder"] = { bUseModStack = true, sTargeting = "all" }; ActionsManager.registerResultHandler("rollunder", onRoll); -- send launch message -- local msg = {sender = "", font = "emotefont"}; -- msg.text = "Success count for Roll Under extension for CoreRPG based Rulesets. v1.0 by damned. Based on extensions by DMFirmy and Trenloe. Type \"/rollunder ?\" for usage."; -- ChatManager.registerLaunchMessage(msg); end --- --- This is the function that is called when the rollunder slash command is called. --- function processRoll(sCommand, sParams) if not sParams or sParams == "" then createHelpMessage(); return; end if sParams == "?" or string.lower(sParams) == "help" then createHelpMessage(); else local rRoll = createRoll(sParams); ActionsManager.roll(nil, nil, rRoll); end end --- --- This function creates the roll object based on the parameters sent in --- function createRoll(sParams) local rRoll = {}; rRoll.sType = "rollunder"; rRoll.nMod = 0; --- rRoll.sUser = User.getUsername(); rRoll.aDice = {}; local nStart, nEnd, sDicePattern, sDescriptionParam = string.find(sParams, "([^%s]+)%s*(.*)"); rRoll.sDesc = sDescriptionParam; Debug.console("Dice pattern = " .. sDicePattern); -- If no target number is specified, we will assume it is 10 if(not sDicePattern:match("(%d+)d([%dF]*)x(%d+)") and sDicePattern:match("(%d+)d([%dF]+)%s*(.*)")) then sDicePattern = sDicePattern .. " 10" end -- Now we check that we have a properly formatted parameter, or we set the sDesc for the roll with a message. if not sDicePattern:match("%d+d%d+x%d+%s*(.*)") then rRoll.sDesc = "Parameters not in correct format. Should be in the format of \"#d#x# [description]\""; return rRoll; end Debug.console("Dice pattern 2 = " .. sDicePattern); -- First try to match a rollunder string including a modifier - #d#x#[+-]# local sNum, sSize, sSuccessLevel, sCommandMod = sDicePattern:match("(%d+)d([%dF]+)x(%d+)([+-]%d+)"); -- If no modifier in the command string, process without - i.e. #d#x# if not sCommandMod then --Debug.console("Running pattern match without modifier"); sNum, sSize, sSuccessLevel = sDicePattern:match("(%d+)d([%dF]+)x(%d+)"); sCommandMod = "0"; end --local nMod = tonumber(sMod); local sDesc, nMod = ModifierStack.getStack(true); Debug.console("sNum = " .. sNum .. ", sSize = " .. sSize .. ", sSuccessLevel = " .. sSuccessLevel .. ", sCommandMod = " .. sCommandMod); -- Set the total modifier to the final successes to be the command string modifier + any modifier widget data. rRoll.nMod = tonumber(sCommandMod); --local sNum = tonumber(sNum); local count = tonumber(sNum); local nSuccessLevel = tonumber(sSuccessLevel) + nMod; -- Success level adjusted by the modifier box while count > 0 do table.insert(rRoll.aDice, "d" .. sSize); -- For d100 rolls, we also need to add a d10 dice for the ones place -- if sSize == "100" then -- table.insert(rRoll.aDice, "d10"); -- end count = count - 1; end rRoll.nSuccessLevel = nSuccessLevel; if sDesc ~= "" then rRoll.sDesc = rRoll.sDesc.." ["..sDesc.."]"; end return rRoll; end --- --- This function steps through each die result and checks if it is greater than or equal to the success target number --- adding to the success count if it is. --- function dropDiceResults(rRoll) local nSuccessLevel = tonumber(rRoll.nSuccessLevel) or 0; local nSuccesses = 0; local nMod = rRoll.nMod; for _,v in ipairs(rRoll.aDice) do if v.result <= nSuccessLevel then nSuccesses = nSuccesses + 1; end end nSuccesses = nSuccesses + nMod; -- If resulting successes are less than 0 due to a negative modifer, set the total successes to be 0 if nSuccesses < 0 then nSuccesses = 0; end Debug.console("Stuff: ", nSuccesses, nMod) rRoll.rollunder = nSuccesses; return rRoll; end --- --- This function creates a chat message that displays the results. --- function createChatMessage(rSource, rRoll) local rMessage = ActionsManager.createActionMessage(rSource, rRoll); Debug.console("rSource: "); Debug.console(rSource); Debug.console("rMessage: " .. rMessage.text); local nSuccessLevel = tonumber(rRoll.nSuccessLevel) or 0; rMessage.text = rMessage.text .. "\nSuccesses = " .. rRoll.rollunder .. "\n" .. "(Target = " .. nSuccessLevel .. ")"; return rMessage; end --- --- This function creates the help text message for output. --- function createHelpMessage() local rMessage = ChatManager.createBaseMessage(nil, nil); rMessage.text = rMessage.text .. "The \"/rollunder\" command is used to roll a set of dice and report the number of dice that roll equal to or under a success target number.\n"; rMessage.text = rMessage.text .. "You can specify the number of dice to roll, the type of dice, and the success target number"; rMessage.text = rMessage.text .. "by supplying the \"/rollunder\" command with parameters in the format of \"#d#x#\", where the first # is the "; rMessage.text = rMessage.text .. "number of dice to be rolled, the second number is the number of dice sides, and the number following the "; rMessage.text = rMessage.text .. "x being the success target number for each dice. There is an option modifier that adds/subtracts from the final number of successes - to a minimum of 0."; rMessage.text = rMessage.text .. " The modifier box adds/subtracts from the target success level."; Comm.deliverChatMessage(rMessage); end --- --- This is the callback that gets triggered after the roll is completed. --- function onRoll(rSource, rTarget, rRoll) rRoll = dropDiceResults(rRoll); rMessage = createChatMessage(rSource, rRoll); rMessage.type = "dice"; Comm.deliverChatMessage(rMessage); end
-
April 1st, 2020, 12:27 #2048
FGC. It's intermittent..it's almost like the map can't keep up with the movement of the token. I tried it this morning and it worked flawlessly, while yesterday while having someone connected it didn't work at all.
GBFFUltimate Edition license holder - No License Needed to Play My Games (Need Demo Version of FG Downloaded)
Timezone: Eastern Standard Time (EST) United States; GMT -5 hours
-
April 1st, 2020, 14:17 #2049
Hey guys,
I've just noticed something weird. When I roll dice into the chatbox, then drag the result to "Wounds" in the CT, the values in the box get replaced by the die roll, instead of adding to it. Can someone confirm this bug?
-
April 1st, 2020, 15:07 #2050
Thread Information
Users Browsing this Thread
There are currently 3 users browsing this thread. (0 members and 3 guests)
Bookmarks