-
February 12th, 2018, 20:25 #1
Dice string with "macros" exist already?
So I'm beginning to hack at a part of the 5e ruleset that has been something I've been asked about a lot and that is dice strings with "macros", specifically things like damage for spells based on level of caster. So instead of having to adjust the spells damage when you level it will automatically do it for something like fireball with "LVLd6" damage string.
Has any other ruleset or extension done this sorta thing before? I'm curious how it was handled and the UI portion. Wanting to see what worked and what didn't.
Right now I'm looking at having a toggle for Dice or Text "mode" for the spell. I "store" the "ArcaneLevel" or "DivineLevel" as the character levels up so depending on the type I'll replace the "LVL" or "Level" with the level for that type of spell.
Sorta like this.
And the "Text" version looks like this.
Eventually I plan to do the same thing for duration.---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
February 12th, 2018, 20:29 #2
Have a look at spell actions for 3.5E/PF - there are some adjustments based of CL (Caster Level).
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
February 12th, 2018, 20:43 #3
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Dice input
If part of your question involves the input mechanism for dice:
I am doing that in the Generators extension. I could not figure out a way through the interface to get a mixture of dice in the drag, so I have a text field where you can enter a dice expression (e.g. 2d2+3d4+5, for a ridiculous example). To do this, I overrode the onClick on the existing dice field (which was just a drop zone for dice) so it invoked my own string field to enter the dice. This is the template necessary for the dice entry:
Code:<template name="dice_input_string"> <stringcontrol> <anchored to="dice" position="over" /> <script> local aSaveDice; function onGainFocus() if aSaveDice then return; end local nodeWindow=window.getDatabaseNode(); aSaveDice=DB.getValue(nodeWindow,"dice",{}); if #aSaveDice~=0 then local sDice=StringManager.convertDiceToString(aSaveDice); setValue(sDice); end TableManager.setRollGuard(true); DB.setValue(nodeWindow,"dice","dice",{}); TableManager.setRollGuard(true); end function onLoseFocus() if StringManager.trim(getValue())=="" then TableManager.setRollGuard(true); DB.setValue(nodeWindow,"dice",aSaveDice); TableManager.setRollGuard(false); destroy(); elseif textOK() then local aDice, nMod = StringManager.convertStringToDice(getValue()); local nodeWindow=window.getDatabaseNode(); TableManager.setRollGuard(true); DB.setValue(nodeWindow,"dice","dice",aDice); TableManager.setRollGuard(false); DB.setValue(nodeWindow,"mod","number",nMod); destroy(); else setFocus(); end end function textOK() if StringManager.isDiceMathString(getValue()) then return true; else TableManager.notifyError("error_gen_bad_dice"); return false; end end </script> </stringcontrol> </template>
Code:<basicdice name="dice"> <script> function onClickDown(button,x,y) return true; end function onClickRelease(button,x,y) window.createControl("dice_input_string","user_dice_input"); window.user_dice_input.setFocus(); return true; end </script> </basicdice>
-
February 12th, 2018, 21:52 #4
That is exactly what I was looking for. Much more mechanical input with less dependence on "formatting" knowledge to make it work. Even deals with "max" size. I like it a lot.
Thanks Bidmaron. I'll review the code and see how I might be able to use it.---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
February 13th, 2018, 06:24 #5
This seems to somewhat match the PF/3.5 e version and meets the needs of AD&D.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
February 13th, 2018, 11:00 #6
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
As long as all you want is a set of dice of the form xdy, where x is number of dice and y is sides, that will work. The code I posted lets you do arbitrarily complex dice expressions (not really sure when you would need them though honestly for this.)
-
February 13th, 2018, 11:06 #7
Just out of interest - you guys do know that a lot of this has already been done (no, not all of it, but a hell of a lot) with the UDR (Universal Die Roller) in the new DORCore Ruleset - don't you?
Dulux-Oz
√(-1) 2^3 Σ Π
...And it was Delicious!
Alpha-Geek
ICT Professional
GMing Since 1982
NSW, Australia, UTC +10
LinkedIn Profile: www.linkedin.com/in/mjblack
Watch our games on Twitch: www.twitch.tv/dulux_oz
Support Me on Patreon: www.patreon.com/duluxoz
Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz
-
February 13th, 2018, 11:08 #8
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Dulux, can you (meaning me) change the inheritance of PF or another nested ruleset to include DORCore? Sounds dangerous.
-
February 13th, 2018, 11:22 #9
You could try it - with a new campaign, obviously - but I'm not sure what will break (if anything).
You actually have two options:
- Change the DORCore to be a child of PF, or
- Change the 3.5E to be a child of DORCore - as the DORCore was designed to be at a "low-level" in the Ruleset-Stack this is what I'd be looking at, BUT it hasn't been tested (primarily because I'm not arrogant enough to believe that SW would change the Ruleset-Stack for their "official" Rulesets - I'm arrogant, yes, but not THAT arrogant )
In either case, my expectation straight off the bat is that "something" will break - but yes, it can be done.
As a side-note, my vision for the DORCore was for all of the Community Ruleset Devs to consider it for their Ruleset-Stack for new (or newly-ported) Rulesets. All of my Community Rulesets, for example, use the DORCore as the basis on which to build their own Rules. What I had not considered was people might want to "slip it into" the Ruleset-Stack of SW's "offical" Rulesets - however, if people want to try then the Ruleset-Stack should run CoreRPG=>DORCore=>"offical" Ruleset.Dulux-Oz
√(-1) 2^3 Σ Π
...And it was Delicious!
Alpha-Geek
ICT Professional
GMing Since 1982
NSW, Australia, UTC +10
LinkedIn Profile: www.linkedin.com/in/mjblack
Watch our games on Twitch: www.twitch.tv/dulux_oz
Support Me on Patreon: www.patreon.com/duluxoz
Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz
-
February 13th, 2018, 12:41 #10
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks