[cv6] Dice Roller

[cv6] Dice Roller 2.4.0 Release Candidate

No permission to download
@Hoffi - I had this installed for a second and it completely shut down viewing threads or making posts. It seemed to work on the admin panel side of things, just not on the user side of things.

It works, and it normally could not block viewing threads or making posts. Even if you disallow all, the forum works and looks like the AddOn is not installed.

Do you have any ServerErrors logged in the AdminCP?
 
It works, and it normally could not block viewing threads or making posts. Even if you disallow all, the forum works and looks like the AddOn is not installed.

Do you have any ServerErrors logged in the AdminCP?

It looks like it interacted badly with Xon's Collaborative Threads and Threadmarks.

Code:
ErrorException: Template error: [E_USER_WARNING] Method canRollDice is not callable on the given object (SV\CollaborativeThreads\XF\Entity\Forum) src/XF/Template/Templater.php:1179

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home3/mafiacol...', 1179, Array)
#1 src/XF/Template/Templater.php(1179): trigger_error('Method canRollD...', 512)
#2 internal_data/code_cache/templates/l1/s1/public/forum_post_quick_thread.php(95): XF\Template\Templater->method(Object(SV\CollaborativeThreads\XF\Entity\Forum), 'canRollDice', Array)
#3 src/XF/Template/Templater.php(1644): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#4 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('forum_post_quic...', Array)
#5 src/XF/Mvc/Renderer/Json.php(84): XF\Template\Template->render()
#6 src/XF/Mvc/Renderer/Json.php(68): XF\Mvc\Renderer\Json->renderHtmlFallback('XF:Forum\\PostTh...', 'public:forum_po...', Array)
#7 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Json->renderView('XF:Forum\\PostTh...', 'public:forum_po...', Array)
#8 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#11 src/XF/App.php(2344): XF\Mvc\Dispatcher->run()
#12 src/XF.php(512): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}

%%%

array(4) {
  ["url"] => string(184) "/forums/testing-zone.23/post-thread?inline-mode=1&_xfRequestUri=%2Fforums%2Ftesting-zone.23%2F&_xfWithData=1&_xfToken=1629707251%2C98deb545d2b33c2926c98ad7351ad8fe&_xfResponseType=json"
  ["referrer"] => string(54) "https://www.mafiacolosseum.com/forums/testing-zone.23/"
  ["_GET"] => array(5) {
    ["inline-mode"] => string(1) "1"
    ["_xfRequestUri"] => string(24) "/forums/testing-zone.23/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1629707251,98deb545d2b33c2926c98ad7351ad8fe"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}

Screen Shot 2021-08-23 at 1.44.05 AM.webp
 
@osieorb18
Thanks for pointing this out. I think I can fix this for the next version.

If this can be made to work, that would be awesome. If it's simple to do it, I would love if the sample dice included some of the more unusual values up to d20. (I might be down to create an XML for that some time this week or similar actually.)
 
Here's a few d30 attachments (couldn't find a perfect one, oh well), and a new sample_dice.xml!
 

Attachments

  • d30sides.webp
    d30sides.webp
    4.6 KB · Views: 4
  • d30.webp
    d30.webp
    2.1 KB · Views: 4
  • d30side.webp
    d30side.webp
    2.3 KB · Views: 3
  • sample_dice.xml.zip
    sample_dice.xml.zip
    1.2 KB · Views: 6
Last edited:
I have a problem: i can't see the dice button near the attachment button...

EDIT: my fault. Not checked forum permission.

P.S. This addon is AWSOME.
 
Last edited:
There's a rule to sum dices with a contant value?

Example: Fireball, launch 6d6+4

i want to get the roll of total 6 dice (example 20) + 4 =24
 
Last edited:
There's a rule to sum dices with a contant value?
Rules are checking only the roll.
You can create a wireset with no rule and set sum options.

And, yea. There is a lack of functionality at the moment to modify the result.

Is the 4 fix for everyone, or shall it an input field for the user? Will dive into this.
Maybe a rule is a good way, even if its not performing some checks.
 
You can just add an admin check to add a field for the user to add a constant add (or sutraction if someone put a -number)
 
Last edited:
I am just thinking over, to move the complete Sum settings into the rules. :unsure:

Any thoughts on this?
 
Sum Options are still in on the wireset level to be 100% backwards comptable. If difficult sums are needed, they can be included into the rule file.
 
I got this error:
  • ErrorException: Template error: [E_USER_WARNING] Template admin:cv6_style_fa_icon is unknown
  • src/XF/Template/Templater.php:689

Stack trace​


#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/---/...', 689, Array)
#1 src/XF/Template/Templater.php(689): trigger_error('Template admin:...', 512)
#2 src/XF/Template/Templater.php(1618): XF\Template\Templater->getTemplateData('admin', 'cv6_style_fa_ic...')
#3 src/XF/Template/Templater.php(1680): XF\Template\Templater->renderTemplate('cv6_style_fa_ic...', Array)
#4 internal_data/code_cache/templates/l1/s0/admin/style_property_macros.php(235): XF\Template\Templater->includeTemplate('admin:cv6_style...', Array)
#5 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l1/s0/admin/style_property_macros.php(30): XF\Template\Templater->callMacro('style_property_...', 'property_edit_v...', Array, Array)
#7 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#8 internal_data/code_cache/templates/l1/s0/admin/style_property_group_view.php(108): XF\Template\Templater->callMacro('style_property_...', 'property_edit', Array, Array)
#9 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#10 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('style_property_...', Array)
#11 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#12 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:StylePropert...', 'admin:style_pro...', Array)
#13 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#16 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
#17 src/XF.php(512): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}


Request state​


array(4) {
["url"] => string(73) "/admin.php?styles/ui-x-light.3/style-properties/group&group=cv6DiceRoller"
["referrer"] => string(99) "https://---.com/---.php?styles/ui-x-light.3/style-properties/group&group=uix_nodeIcons"
["_GET"] => array(2) {
["styles/ui-x-light_3/style-properties/group"] => string(0) ""
["group"] => string(13) "cv6DiceRoller"
}
["_POST"] => array(0) {
}
}
 
I got this error:
  • ErrorException: Template error: [E_USER_WARNING] Template admin:cv6_style_fa_icon is unknown
  • src/XF/Template/Templater.php:689

Stack trace​


#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/---/...', 689, Array)
#1 src/XF/Template/Templater.php(689): trigger_error('Template admin:...', 512)
#2 src/XF/Template/Templater.php(1618): XF\Template\Templater->getTemplateData('admin', 'cv6_style_fa_ic...')
#3 src/XF/Template/Templater.php(1680): XF\Template\Templater->renderTemplate('cv6_style_fa_ic...', Array)
#4 internal_data/code_cache/templates/l1/s0/admin/style_property_macros.php(235): XF\Template\Templater->includeTemplate('admin:cv6_style...', Array)
#5 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l1/s0/admin/style_property_macros.php(30): XF\Template\Templater->callMacro('style_property_...', 'property_edit_v...', Array, Array)
#7 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#8 internal_data/code_cache/templates/l1/s0/admin/style_property_group_view.php(108): XF\Template\Templater->callMacro('style_property_...', 'property_edit', Array, Array)
#9 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#10 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('style_property_...', Array)
#11 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#12 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:StylePropert...', 'admin:style_pro...', Array)
#13 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#16 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
#17 src/XF.php(512): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}


Request state​


array(4) {
["url"] => string(73) "/admin.php?styles/ui-x-light.3/style-properties/group&group=cv6DiceRoller"
["referrer"] => string(99) "https://---.com/---.php?styles/ui-x-light.3/style-properties/group&group=uix_nodeIcons"
["_GET"] => array(2) {
["styles/ui-x-light_3/style-properties/group"] => string(0) ""
["group"] => string(13) "cv6DiceRoller"
}
["_POST"] => array(0) {
}
}

This might be from the dice icons not being included.
 
Strange. Will dive into this now and deliver a fix today. Thank you for reporting. If I need more Information I will contact you.
 
Back
Top Bottom