Thread: MoreCore Ruleset
-
June 8th, 2022, 06:37 #3101Patriarch
- Join Date
- Nov 2019
- Posts
- 452
So something like that?Code:<windowclass name="cas_stats" mergerule="merge"> <script> previous code here </scripts <sheetdata> <string_column name="clichatcommand"> <script> function onLoseFocus( ) end </script> </string_column> </sheetdata> </windowclass>
I was looking at the way that the srun4 roll was done and noticed it did things differently for exploding than I had done for the Shadowrun 5e extension. I've been trying to get back to working on it, but time is limited.
I wanted to make an extension that just has the roll code for Shadowrun 5e, and saw another post that said what was needed to be added for a new roll. I figured I'd do it as an extension to remind myself how the heck this is all done.
Btw the srun4 is not rolling the way shadowrun 4e rolls.
sr4 doesn't compound the die rolls when it explodes, and it also doesn't explode on every roll.
I think sr1 and 2 did it that way, not sure about 3.
sr4 doesn't have limits, sr5 does.
sr4 only explodes when you spend edge. The exploding adds dice to the total dice instead of like previous editions that added the exploded rolls to the die it was exploding.Last edited by rmilmine; June 8th, 2022 at 06:42.
-
June 8th, 2022, 06:45 #3102
try....
setting rRoll.expr = '#d6'
after the roll and before results are shown
-
June 8th, 2022, 06:50 #3103
Include all the existing stuff and then add your own...
Code:<windowclass name="cas_stats" merge="join"> <script> function onInit() update(); end function update() local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode()); description.setReadOnly(bReadOnly); clichatcommand.setReadOnly(bReadOnly); tracker_enabled.setReadOnly(bReadOnly); tracker_reverse.setReadOnly(bReadOnly); number_trackers.setReadOnly(bReadOnly); number_min.setReadOnly(bReadOnly); trackers_icon.setReadOnly(bReadOnly); parameter_formula.setReadOnly(bReadOnly); p1_hidden.setReadOnly(bReadOnly); p1_tooltip.setReadOnly(bReadOnly); p2_hidden.setReadOnly(bReadOnly); p2_tooltip.setReadOnly(bReadOnly); p3_hidden.setReadOnly(bReadOnly); p3_tooltip.setReadOnly(bReadOnly); refa.setReadOnly(bReadOnly); refb.setReadOnly(bReadOnly); refc.setReadOnly(bReadOnly); end function onLoseFocus() end </script> </windowclass>
-
June 8th, 2022, 07:04 #3104
That doesnt work.
Its something in the rMessage.expr
but you could just turn it off?
Code:rMessage.diceskipexpr = true;
-
June 8th, 2022, 07:05 #3105Patriarch
- Join Date
- Nov 2019
- Posts
- 452
The function onLoseFocus is a function in a string_column control in the sheetdata section of the windowclass. It's not part of the windowclass's script section.
-
June 8th, 2022, 07:34 #3106Patriarch
- Join Date
- Nov 2019
- Posts
- 452
-
June 8th, 2022, 07:48 #3107
try below - adding your code in.
are you just adding another icon to the cycler or something else?
Code:<windowclass name="cas_stats" merge="join"> <sheetdata> <string_column name="clichatcommand"> <script> function onLoseFocus( ) local nameWindowDBNode = window.getDatabaseNode(); local nodeWin = nameWindowDBNode; local sName = nodeWin.getChild("name").getValue(); local sCommand = nodeWin.getChild("clichatcommand").getValue(); local sRollstype = nodeWin.getChild("rollstype").getValue(); local nStart,nEnd,sCommand,sParams = string.find(sCommand, '^/([^%s]+)%s*(.*)'); if sCommand == "rollon" then nodeWin.getChild("rollstype").setValue("table"); elseif sCommand == "mod" then nodeWin.getChild("rollstype").setValue("modifier"); etc elseif sCommand == "spellpoints" then nodeWin.getChild("rollstype").setValue("spellpoints"); elseif sCommand == "c1mod" then nodeWin.getChild("rollstype").setValue("c1mod"); elseif sCommand == "c2mod" then nodeWin.getChild("rollstype").setValue("c2mod"); elseif sCommand == "c3mod" then nodeWin.getChild("rollstype").setValue("c3mod"); elseif sCommand == "c4mod" then nodeWin.getChild("rollstype").setValue("c4mod"); elseif sCommand == "c5mod" then nodeWin.getChild("rollstype").setValue("c5mod"); elseif sCommand == "tmod" then nodeWin.getChild("rollstype").setValue("table"); elseif sCommand == "dbdamage" then nodeWin.getChild("rollstype").setValue("dbdamage"); elseif sCommand == "damageme" then nodeWin.getChild("rollstype").setValue("damageme"); elseif sCommand == "healme" then nodeWin.getChild("rollstype").setValue("healme"); elseif sCommand == "damageroll" then nodeWin.getChild("rollstype").setValue("dbdamage"); elseif sCommand == "damagedr" then nodeWin.getChild("rollstype").setValue("damagedr"); elseif sCommand == "damagel5r" then nodeWin.getChild("rollstype").setValue("legenddmg"); elseif sCommand == "damagedr4" then nodeWin.getChild("rollstype").setValue("damagedr"); elseif sCommand == "unidamage" then nodeWin.getChild("rollstype").setValue("unidamage"); elseif sCommand == "gsdamage" then nodeWin.getChild("rollstype").setValue("gsdamage"); elseif sCommand == "attackac" then nodeWin.getChild("rollstype").setValue("attack"); elseif sCommand == "drwho" then nodeWin.getChild("rollstype").setValue("drwho"); elseif sCommand == "mythras" then nodeWin.getChild("rollstype").setValue("mythras"); elseif sCommand == "chatimage" then nodeWin.getChild("rollstype").setValue("chatimage"); elseif sCommand == "silcore" then nodeWin.getChild("rollstype").setValue("silcore"); elseif sCommand == "battled6" then nodeWin.getChild("rollstype").setValue("battled6"); elseif sCommand == "dragon" then nodeWin.getChild("rollstype").setValue("dragon"); elseif sCommand == "afmbedmg" then nodeWin.getChild("rollstype").setValue("dbdamage"); elseif sCommand == "vermine" then nodeWin.getChild("rollstype").setValue("vermine"); elseif sCommand == "vaesen" then nodeWin.getChild("rollstype").setValue("vaesen"); elseif sCommand == "mother1" then nodeWin.getChild("rollstype").setValue("mother1"); elseif sCommand == "mother2" then nodeWin.getChild("rollstype").setValue("mother2"); elseif sCommand == "vda" then nodeWin.getChild("rollstype").setValue("vda"); elseif sCommand == "rpexa" then nodeWin.getChild("rollstype").setValue("rpexa"); elseif sCommand == "rk" then nodeWin.getChild("rollstype").setValue("rk"); elseif sCommand == "topsecret" then nodeWin.getChild("rollstype").setValue("topsecret"); elseif sCommand == "rngroll" then nodeWin.getChild("rollstype").setValue("rngroll"); elseif sCommand == "tsprimary" then nodeWin.getChild("rollstype").setValue("tsprimary"); elseif sCommand == "tstertiary" then nodeWin.getChild("rollstype").setValue("tstertiary"); elseif sCommand == "tsmove" then nodeWin.getChild("rollstype").setValue("tsmove"); elseif sCommand == "tslife" then nodeWin.getChild("rollstype").setValue("tslife"); elseif sCommand == "tsdamage" then nodeWin.getChild("rollstype").setValue("tsdamage"); elseif sCommand == "atkatow" then nodeWin.getChild("rollstype").setValue("atkatow"); elseif sCommand == "mcds1" then nodeWin.getChild("rollstype").setValue("mcds1"); elseif sCommand == "mcds2" then nodeWin.getChild("rollstype").setValue("mcds2"); elseif sCommand == "btdamage" then nodeWin.getChild("rollstype").setValue("btdamage"); elseif sCommand == "blades" then nodeWin.getChild("rollstype").setValue("blades"); elseif sCommand == nil then nodeWin.getChild("rollstype").setValue("chat"); else nodeWin.getChild("rollstype").setValue("rolls"); end end </script> </string_column> </sheetdata> </windowclass>
-
June 8th, 2022, 07:58 #3108Patriarch
- Join Date
- Nov 2019
- Posts
- 452
-
June 8th, 2022, 08:39 #3109
If you share the icon with me and the command ill just put it in to MoreCore if you like?
-
June 8th, 2022, 09:17 #3110Patriarch
- Join Date
- Nov 2019
- Posts
- 452
Shadowrun 5e.ext
I've attached what I have done.
Includes the graphics, etc. At least I think I included what was needed.
If I missed anything please let me know.Last edited by rmilmine; June 8th, 2022 at 09:22.
Thread Information
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)


Reply With Quote

Bookmarks