PDA

View Full Version : Core RPG: Colouring 6's and removing them froö the dice sum?



Unahim
July 3rd, 2015, 20:23
I'm interested in playing some Eon 4th edition with my group. In that system, a roll of a 6 on a d6 means you re-roll that dice, plus add an extra dice. I was thinking that the easiest way to do this would be to highlight or colour all rolls of 6 on a d6 (to warn us of the roll) and count the 6 as a result of 0 for the displayed dice sum. That way the player can then roll his bonus dice and we can just add up the various dice rolls once no more 6s are rolled, without having to mentally subtract all the rolled 6s from the sum. Can this be done? And if so, where do I start? I'm a total noob and frankly have no clue.

Edit: There is now a working version of this extension on the bottom of page 2, courtesy of Ianmward.

damned
July 4th, 2015, 00:37
currently this type of dice rolling isnt supported other than throwing teh dice and doing it manually. it will be a feature of the Unity release but there is no release date for that yet - it might be a year away.
you can certainly do it old school though just throwing your dice but there is no macro to do that one.

Blackfoot
July 4th, 2015, 11:58
An extension could be built to handle it.. similar to exploding dice in the Savage Worlds ruleset... but this would involve some coding.

Unahim
July 5th, 2015, 20:15
It doesn't have to throw the new dice automatically, just mark them in the dice window (like this from the shadowrun ruleset: https://dl.dropboxusercontent.com/u/139651415/example.png) and count them as 0's in the sum (basically, make the dice range 0-5 instead of 1-6). Can those be done?

damned
July 6th, 2015, 04:28
it can be done - but it would require doing the coding as IanMWard has done in the SR4 ruleset.

Unahim
July 6th, 2015, 12:35
Hmmm, I see. I'll look into his ruleset then, but I probably can't do it. :P Thanks for the help.

ianmward
July 6th, 2015, 14:01
The Shadowrun ruleset does this sort of thing, it colours 5s and 6s green as successes and 1s red for glitches.

damned
July 6th, 2015, 14:16
Hmmm, I see. I'll look into his ruleset then, but I probably can't do it. :P Thanks for the help.

Unahim. If you are not a programmer it will feel like a daunting task. If you really like that feature I would explore the files and ask some questions. You might find you are capable of things you never knew :)

Unahim
July 6th, 2015, 19:05
I've found where the dice icon backgrounds are stored at least, now it is just a case of finding where in the code it pulls from them and how to apply that here.

Blackfoot
July 6th, 2015, 20:02
take a look at gameelements.xml .. but there's really a good bit more to it than that.

ianmward
July 7th, 2015, 12:32
The code you need is in the scripts/manager_actions2.lua in the function createRollTable, though how that gets called is a little involved...
Each time you roll dice, the type of roll is specified and used to decide how to handle the result. For a straight die roll in CoreRPG, the roll type is "dice" so you need to register a handler for rolls of that type, as I did in scripts/manager_action_dice.lua.
Your code should be similar to that.

As Blackfoot mentions, you also need to define the new dice types for green dice.

damned
July 7th, 2015, 12:51
I've found where the dice icon backgrounds are stored at least, now it is just a case of finding where in the code it pulls from them and how to apply that here.

I see IanMWard has posted too.
Now you have the names for the backgrounds - do a Find In Files search on the filename.
You will find the variable name that references these.
Do a Find in Files on that variable name and you will find where these are being used.
Look at the function names etc and keep searching. These things will help you find what you are looking for.

ianmward
July 7th, 2015, 13:00
Send me a pm with your email and I'll send you a cut down version with just the bits you need... If you're lucky and I have time, I might even make it an extension :-)

Trenloe
July 7th, 2015, 18:37
Slightly related thread here (colouring dice - simple extension included): https://www.fantasygrounds.com/forums/showthread.php?25068-Change-colour-on-1-dice&p=220623#post220623

And page 2 of this thread discusses changing the dice roll total to drop dice, etc.: https://www.fantasygrounds.com/forums/showthread.php?24581-A-question-about-posting-rolls-to-chat/page2

ianmward
July 13th, 2015, 04:44
I put together an extension to do this and emailed it to Unahim, but then I thought other people might like to see it too, so here it is.

Unahim
July 13th, 2015, 12:59
Wow, thanks a bundle! I'm looking at it now, and with all the other things stripped away it is much easier to see how to change some of this stuff myself. The extension itself I cannot seem to get to work though. I put it in the extensions folder but it won't show up in the extension list. I've checked the file I think is responsible for attributing extensions to rulesets (extensions.xml?) but as far as I can tell from comparing to extensions that do show up everything is set up fine there...

ianmward
July 13th, 2015, 13:25
So sorry, rookie mistake!
I was in a hurry and zipped it up wrong. Unzip it to your extensions folder and delete the .ext file, then it will work.
To make the ext file you should zip the files from inside the folder, so the extension.xml is in the root of the zip, not in a folder...

Unahim
July 13th, 2015, 17:46
I've done as instructed and tinkered with it a bit. I removed the debug message that was being posted to chat and added the other dice back in, partially because I like having them and partially because the d10 at least is still used in Eon 4 on occasion (for wound tables, mostly). Here is that version for those interested. A lot of thanks Ian, it's absolutely perfect for my purposes and giving me some insight into the process that went into making it.

damned
July 14th, 2015, 08:55
Have you also tried adding MoreCore extension to give you more combat options?

Unahim
July 14th, 2015, 13:32
Have you also tried adding MoreCore extension to give you more combat options?

Looks interesting, thank you. A lot of things in Eon that you would need to keep track of are notated with dice pools or numbers such as "2/12" but I can still find a use for the columns, and the ability to add attacks to the combat tracker is of course always useful.