PDA

View Full Version : Feng-Shui and open-ended dice



pson
January 11th, 2011, 13:33
I'm new to this, so new that I don't have FGII yet. I was thinking about how hard it would be to write a ruleset for Feng-shui. Most of it would be fairly straight forward addition and subtraction of modifiers and or skills, as far as I can tell.

Only problem I see would be the standard resolution die, because I spent some time yesterday looking in this forums for how to build open-ended dice and I know it can be done, because at least Savage worlds has it in some form, only I have no clue about how or how useful that would be in this context. The fact that you use two, one positive and one negative (different coloured) open-ended dice could be solved by making them as different custom dice as shown in an example using d4s, somewhere in these forums.

So how hard would it be to write the code for a die-pair of one positive and one negative open-ended d6 to be rolled together?

Moon Wizard
January 11th, 2011, 19:13
Open-ended dice rolls (both low and high) are used in the Rolemaster ruleset as well.

The amount of work required to build a ruleset varies widely depending on how customized you want your ruleset to be. If you just want to make minor changes to an existing ruleset, it's going to be easier than building a ruleset with completely new character sheet, dice rolling behavior, combat tracker, etc. You will need to make modifications to XML files and/or LUA script to make any ruleset changes; so you should be comfortable with tinkering to do what you want, and any programming background will help. That said, the community here is very helpful, and you can post your questions here.

At it's core, FG can be used as a virtual tabletop to write notes, roll dice and chat. That's really all you need to play a game online, but all the other features in most rulesets are nice to have for that particular game system.

There's a wiki listed in the City Hall forum, which is managed by one of our excellent community members, and it contains links to all the community-made rulesets that are in the wild.

Check out the ruleset guides in the Library section as well for more info on ruleset creation.

Cheers,
JPG

pson
January 11th, 2011, 21:38
Thanks you for the answer, but given that I have no access to either Rollmaster (if I remember it right ;)) or any other non-included ruleset I have no clue as to how to implement it, or even if I can look at the code they used to implement the openended rolls if I bought the games for that specific purpose. So my question remain, how would I implement a positive/negative openended d6-pair?

However I seem to have bought FGII when I got back from work.

StuartW
January 11th, 2011, 22:03
The FG scripting is written in Lua, which is somewhere between Javascript and Basic (like Javascript in functionality, but like Basic in syntax). If you are comfortable with writing code more generally, then implementing open-ended dice in FG isn't a very big deal.

If you aren't familiar with general coding, then learning the language and writing code for open-ended rolls is probably a tough challenge.

Just my 2c!

Stuart

Moon Wizard
January 11th, 2011, 22:39
I'll have to let others in the community address whether any of the community rulesets show examples of open-ended rolls.

I personally haven't built this functionality in any of my rulesets (4E and 3.5E), because it's not required for them. So, I don't have any examples to share.

Essentially, you would have to capture the final die roll, then roll again instead of printing a message to the chat window. When the open rolls stop, then you would need to output the result of all the rolls to the chat window.

Regards,
JPG

SpudmanWP
January 12th, 2011, 02:08
Open ended how?

For a d4 do you want to keep rolling as long as the result is a 4?

Phystus
January 12th, 2011, 02:33
Check out this thread (https://www.fantasygrounds.com/forums/showthread.php?t=5955&highlight=%22exploding+dice%22). It's quite old, but may be helpful.

~P

pson
January 12th, 2011, 08:47
I'll have to let others in the community address whether any of the community rulesets show examples of open-ended rolls.

I personally haven't built this functionality in any of my rulesets (4E and 3.5E), because it's not required for them. So, I don't have any examples to share.

Essentially, you would have to capture the final die roll, then roll again instead of printing a message to the chat window. When the open rolls stop, then you would need to output the result of all the rolls to the chat window.
I think I will need to do play a lot with how dice are thrown in this game. Smiles and looks forward to a bit of programming.


Open ended how? For a d4 do you want to keep rolling as long as the result is a 4?
Precisely so.


Check out this thread (https://www.fantasygrounds.com/forums/showthread.php?t=5955&highlight=%22exploding+dice%22). It's quite old, but may be helpful.
It might be exactly right. Thank you! It even has Feng Shui dice in it, I wonder why I didn't find it when I searched for Feng Shui, my search-fu must be bad.

Bazil Remblai
November 10th, 2015, 04:06
I know this is an old thread, however I did achieve the desired effect using custom dice in the gameelements.xml file. I will note here, the variables I use are postmp (positive temp) and expos (exploded positive) as well as the neg (negative) abbreviations. You can access these dice using the radial from the d6 model and if you add them to a hotkey they work exactly as the do in the table top! Granted, it will not tell you if it's a critical... but you should realize that if both numbers are over 6 it is a crit.


<customdie name="Positive">
<model>d6</model>
<menuicon>d6icon</menuicon>
<script>
function onValue(result)
if result==6
then postmp=result
while postmp==6
do expos=math.random(6);result=result+expos;postmp=ex pos
end
end
return result
end
</script>
</customdie>

<customdie name="Negative">
<model>d6</model>
<menuicon>d6icon</menuicon>
<script>
function onValue(result)
if result==6
then negtmp=result
while negtmp==6
do exneg=math.random(6);result=result+exneg;negtmp=ex neg
end
end
return -result
end
</script>
</customdie>

pson
November 10th, 2015, 07:42
I know this is an old thread, however I did achieve the desired effect using custom dice in the gameelements.xml file. I will note here, the variables I use are postmp (positive temp) and expos (exploded positive) as well as the neg (negative) abbreviations. You can access these dice using the radial from the d6 model and if you add them to a hotkey they work exactly as the do in the table top! Granted, it will not tell you if it's a critical... but you should realize that if both numbers are over 6 it is a crit.

Thank you. I gave up on my Feng Shui in FGII some time later, since I didn't have enough time. Maybe I should look again now. Thanks for the update, even if the original was a long time ago.