JSON help for Advanced rules definitions

Be sure to read and follow the guidelines for our forums.

Feb 2, 2024 1:09 am
I am failing with the JSON Coding.


{"background": {"image": ""},
"diceRules": [
    {"rolled": "d20","natural": 20,"highlight": "success bold underline"},
    {"rolled": "d20","natural": 1,"highlight": "fail bold underline"},
    {"rolled": "d20","reason": "DC##","total": "<##","contentAppend": "❌(Check Chart)","highlight": "fail invert bold"},
    {"rolled": "d20","reason": "DC##","total": ">=##","contentAppend": "✅(Check Chart)","highlight": "success invert bold"},
    {"rolled": "d20","reason": "AC##","total": "<##","contentAppend": "❌(Check Chart)","highlight": "fail invert bold"},
    {"rolled": "d20","reason": "AC##","total": ">=##","contentAppend": "✅(Check Chart)","highlight": "success invert bold"}
  ],
"characterSheetIntegration": {"gmSheets": [
      {"DnD5e SRD Equipment": "custom/20816"},
      {"DnD 5e": "custom/20680"},
 {"Dnd5e SRD Spells": "custom/28289"},
      {"Fantasy NPCs": "custom/20682"}
    ],
"gmExcludeNpcs": false,"gmExcludePcs": false},
"diceDefaults": {}
}

I want to change The following into player sheets with the same names.

{"DnD5e SRD Equipment": "custom/20816"},
{"DnD 5e": "custom/20680"},
 {"Dnd5e SRD Spells": "custom/28289"},


I need to add the code to the below but it is not working.

, "playerSheets": [{"DnD5e SRD Equipment": "custom/20816"},
{"DnD 5e": "custom/20680"},
{"Dnd5e SRD Spells": "custom/28289"},]},


Can anyone help.


I tried this and it didn't work.
{"background": {"image": ""},
"diceRules": [
    {"rolled": "d20","natural": 20,"highlight": "success bold underline"},
    {"rolled": "d20","natural": 1,"highlight": "fail bold underline"},
    {"rolled": "d20","reason": "DC##","total": "<##","contentAppend": "❌(Check Chart)","highlight": "fail invert bold"},
    {"rolled": "d20","reason": "DC##","total": ">=##","contentAppend": "✅(Check Chart)","highlight": "success invert bold"},
    {"rolled": "d20","reason": "AC##","total": "<##","contentAppend": "❌(Check Chart)","highlight": "fail invert bold"},
    {"rolled": "d20","reason": "AC##","total": ">=##","contentAppend": "✅(Check Chart)","highlight": "success invert bold"}
  ],
"characterSheetIntegration": {"playerSheets": [{"DnD5e SRD Equipment": "custom/20816", "DnD 5e": "custom/20680", "Dnd5e SRD Spells": "custom/28289"}],
"gmExcludeNpcs": false,"gmExcludePcs": false},
"diceDefaults": {}
}
Feb 2, 2024 1:47 am
What do you mean 'it is not working'? What happens that you don't expect, or what does not happen that you do expect?

Do you want these sheets available for both the players and the GM? I assume so, then the below should work. There is some duplication, but this allows you to add different sheets for the GM and the players, note how I have the DnD SRD Beasts sheet added for the GM but the players don't see it (as an example).


{"diceRules": [
    {"rolled": "d20","natural": 20,"highlight": "success bold underline"},
    {"rolled": "d20","natural": 1,"highlight": "fail bold underline"},
    {"rolled": "d20","reason": "DC##","total": "<##","contentAppend": "❌(Check Chart)","highlight": "fail invert bold"},
    {"rolled": "d20","reason": "DC##","total": ">=##","contentAppend": "✅(Check Chart)","highlight": "success invert bold"},
    {"rolled": "d20","reason": "AC##","total": "<##","contentAppend": "❌(Check Chart)","highlight": "fail invert bold"},
    {"rolled": "d20","reason": "AC##","total": ">=##","contentAppend": "✅(Check Chart)","highlight": "success invert bold"}
  ],
"characterSheetIntegration": {"playerSheets": [
      {"DnD5e SRD Equipment": "custom/20816"},
      {"DnD 5e": "custom/20680"},
      {"Dnd5e SRD Spells": "custom/28289"},
      {"Fantasy NPCs": "custom/20682"}
    ],
"gmSheets": [
      {"DnD5e SRD Equipment": "custom/20816"},
      {"DnD 5e": "custom/20680"},
      {"Dnd5e SRD Spells": "custom/28289"},
      {"Fantasy NPCs": "custom/20682"},
      {"DnD5e SRD Beasts": "custom/20819"}
    ]
  }
}
Feb 2, 2024 2:10 am
The last code didn't show me anything in the GMSheet. I didn't know that if the info was under Playersheets the GMsheet did not see it also.

Thank you! What you made works perferctly!

The way you have it set up also helps me figure out how to do it myself and edit it in the future. Ty you for the help.
Last edited February 2, 2024 2:12 am

You do not have permission to post in this thread.