FG Spreadshirt Swag
  1. #1

    Dice coding and tick boxes

    The ruleset I am designing rolls 2d20 and the goal is to get under a target number derived from adding the score of a discipline an attribute together (Modiphius Star Trek Adventures).

    Right now, the base ruleset made by Ian Kirk has it set up so you double-click on each one, which then transfers the value to the modifier window. Then you drag the dice over to roll them. I would like to change this up. Here's is how I was thinking of doing it differently.

    First you would tick a box next to the individual discipline and attribute, which would tell the system what the goal is. Then you would roll the dice. Here are my questions. Forgive me if there are a lot of them. I am still very green when it comes to coding.

    1) Is there a code to use that I could put a tick box on every attribute and discipline that would only allow me to have one ticked at a time. Meaning, if I tick Command for my discipline, and then I tick the box next to Conn, it would untick the Command one and tick the Conn one. And the same for the attributes.

    2) Sometimes you can use a focus, which means normally, when you roll a 1, you get two successes. But when you invoke a focus, then anything blow your Discipline roll counts as two successes. Could I add another tick box in my focus window and when it is checked the system would then use the discipline number as the double success goal.

    3) The normal roll is with 2d20, however, when someone assists, they would only roll 1d20. You can also buy d20's so you can roll a max of 5d20. I know I can code it to grab one, and the right click to increase the number of die to roll. Could I add a field that I would put a 1 to 5, and when I roll it will roll that many die?

    4) Finally, if you roll a 20, then that counts as a complication. There are certain things that could cause the complication level to go up, so at worse, anything 16 or above is a complication. Would this be as easy as taking the same code for the number field as in #3 to tell the system where the complication range is?

    I feel that the best way t do all this would be to have a specific roll windowclass with all the options in it and you would make all the choices there. That way it is all condensed into one area.

    Thank you to anyone who is willing to help me, and please forgive the greenness of my knowledge.

  2. #2
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,242
    Blog Entries
    9
    No idea on the coding side, and I've only played a STA game once (FGC one-shot, lots of fun!).
    I didn't mind the way the existing ruleset rolled, but you are right in that it could be improved. Rather than a tick/check box, might I suggest a depressable "button" that is the discipline or attribute descriptor (i.e. "conn"). Using this method, you wouldn't be using the modifier box like is currently done (hence the double clicking).

    Not sure how best to make an assist/help roll. Maybe two "roll" buttons? One for a check (which rolls 2d20) and one for assist (1d20).

    For focus, again you could depress the focus button, and the ruleset would automatically use the focus rules and decrements the focus amount by 1. Maybe you could handle momentum in a similar manner?

    Not sure how to use fate or changing the complication levels.

    Good luck with this

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  3. #3
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    You can do all of those things.
    How? There are many ways to code what you want.

    There are rolls in MoreCore that will take the number of dice you want to roll from the editable field.
    There are checkboxes in Barbarians of Lemuria that add dice and uncheck when you roll - rather than when you tick another.
    There are checkboxes in MoreCore - Trail Of Cthulhu that hide/show data that could be used to set/unset/check/uncheck other checkboxes.
    There are rolls in MoreCore that use variable targets based on editable fields that could be used to set complication levels.

    When learning this stuff I always look at existing examples that are similar and try and build from there.
    When asking questions you generally need to get as close as possible yourself and then ask very specific questions and provide as much detail as possible.
    In many, many cases people will not go and test your code or rewrite your code for you because it is very time consuming to try and understand someone elses code and how they got there and why they are doing things the way they are. They will generally offer a pointer or nudge or link or suggestion that might help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in