PDA

View Full Version : Altering the way dice rolls are displayed in chat?



Brenn
May 1st, 2008, 13:52
I'm working on a mod for the One Roll Engine and I need to alter the way dice rolls are displayed in chat.

If a player rolls a pool of d10, I need to display the matching sets- i.e. 2x4, 3x10 and 1x5 (rolled 2 fours, 3 tens and 1 five). I know how to script the sorting, it's the chatbox display I'm having problems with. What I want to do is alter the way the chat displays the roll- instead of showing 6 d10 icons with the individual numbers, I want to display (using the above example):

2x(d10 icon with a 4), 3x(d10 icon with a 10), 1x(d10 icon with a 5)

Is there any way to do this?

Also is there any way to disable/change the sum, +/-, etc. radial menu that pops up off of this widget in chat?

Brenn
May 5th, 2008, 19:15
I assume from no responses that this is application controlled, well not just an assumption- I've pretty much determined it's nowhere in the scripts/xml that I can find. No huge deal, I'll just have to construct my own way to deal with the dice sets and manipulation of them- I just wanted to do it inside of the chat window.

BTW, I'm loving what I can do in FG2, my ability to mod has increased quite a bit from what I remember from FG1. I wouldn't even have considered what I'm doing now in 1. I'd love it even more if we had access to metatables, but I assume there is a design reason for the omission.

One thing I've noted is that getSize acts screwy on anchored controls if you use the setVisible method on those controls. It works fine if you are using staticBounds and toggling the visibility, however.

joshuha
May 5th, 2008, 19:23
There are plans for extending the dice control but right now a lot of that is hardcoded in directx I believe. The best way to do it currently would be output another line after the roll with the grouping you want. You won't get the pretty icons but it should still allow you to convey the information you want.

Brenn
May 5th, 2008, 21:53
I'm just going to make a tray to store the sets and the waste dice in (with icons ;) ). That's actually better anyway since you might need to access/manipulate them after that line has scrolled off of the chat. As it is now they display as a roll in the chat sorted by width then height, which is good enough for now.

VenomousFiligree
June 16th, 2009, 07:03
Hi Brenn, did you get anywhere with this?