View Full Version : Putting dice on cursor?
GEONE
June 6th, 2025, 22:26
Is there any way to put dice onto the cursor? When you right-click on a die on the desktop and choose "roll x" it puts x dice onto your cursor, I want to be able to trigger something like this programmatically, like a button that you click that adds dice to the cursor for you to then manually roll. How would I do this without having the ability to create a new dragdata object?
Trenloe
June 7th, 2025, 00:29
You can start dragging a dice from the desktop and right-click to add dice to it. I'm not sure what your use case is for this, so don't really understand what you're trying to accomplish. What's your use case?
GEONE
June 7th, 2025, 18:21
I'm adding a custom die to the desktop using a generic control with an icon. I want to be able to right click it and select "roll x" from the radial menu to pick up x dice onto the cursor just like the default behaviour for standard dice.
I currently have the radial options directly throwing dice into the chat when selected, but I want them to instead be added to the cursor to replicate the behaviour of the other dice on the desktop.
I've looked through CoreRPG and can't find the code that does this for the default dice, so either they're not exposed to the ruleset code or I'm just blind and can't find them.
Moon Wizard
June 7th, 2025, 21:52
For the onDragStart event for that custom control on the desktop, modify the draginfo to add dice and set the drag type to “dice”
Regards,
JPG
Moon Wizard
June 7th, 2025, 21:56
The Rolemaster does something similar to create a custom drag for open ended dice rolls from the desktop.
JPG
GEONE
June 7th, 2025, 22:40
For the onDragStart event for that custom control on the desktop, modify the draginfo to add dice and set the drag type to “dice”
Regards,
JPG
Yes I already have that, but what I want is the ability to add dice to the cursor via a radial menu selection like how the other dice work. When you right-click on a standard die (without any dice already on your cursor), you are given a radial menu that allows you to select "Roll 2" or "Roll 10" etc, and clicking one of those options automatically puts that many dice onto your cursor. I'm wanting to replicate that behaviour with my custom control. I already have the radial menu options, I just am unsure how to actually set dice onto the cursor without a dragdata object.
Moon Wizard
June 8th, 2025, 06:42
No, thats not available through the API.
You could provide a number field next to dice symbol to specify number before drag or click.
Regards,
JPG
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.