
Hi - I have been strugging with this script for days, and I think I've taken this to the limits of my ability. Looking for an API wizard to help me break through. The idea is I want to create a Random NPC Generator. A Random Race and Gender will be rolled, and then, based on the Race and Gender, a Random name corresponding to that Race and Gender would be rolled. Using Scriptcards, the script I came up with looks like this: !script{{
--#title| NPC Information
--=randomRace| [T#NPC-Race]
--=randomGender| [T#NPC-Gender]
--=randomPicture| [T#Silium-Tusk]
--=randomName| [T#[$randomRace.tableEntryText]-[$randomGender.tableEntryText]]
--+| [c][img width = 200][$randomPicture.tableEntryImgURL][/img][/c]
--+Name| [$randomName.tableEntryText]
--+Race| [$randomRace.tableEntryText]
--+Gender| [$randomGender.tableEntryText]
}}
It works except for one big problem. Many of these Tables have recursive rolls and the output fails to show the recursive roll text (as if I didn't have the Recursive Table API installed). A great example is when I roll a name for Tiefling-Male or Tiefling-Female. There is a 50% chance that the NPC will have one of the Tiefling Virtue names instead of a Tiefling name ascribed to their Gender, and then it roles on the Tiefling-Virtue roll table. My research online said that ZeroFrame might be able to help. But I've hit some snags. I got this to work: !script {{ {&global ([RaceResult] [\][\]1t[NPC-Race] \]\].value)} {&global ([GenderResult] [\][\]1t[NPC-Gender] \]\].value)}
--#title|NPC Information
--+Name| [\][\]1t[Tiefling-Male] \]\].value
}}
In the above script, if the Tiefling-Male rolltable results in a Tiefling-Virtue name, the Tiefling-Virtue rolltable result displays correctly. I've also gotten this to work: !script {{ {&global ([RaceResult] [\][\]1t[NPC-Race] \]\].value)} {&global ([GenderResult] [\][\]1t[NPC-Gender] \]\].value)}
--#title|NPC Information
--+Race|RaceResult
--+Gender|GenderResult
}}
Additionally, I've gotten this to work: !script {{ {&global ([LeaveBlank] LeaveBlank)}
--#title|NPC Information
--&randomRace|[\][\]1t[NPC-Race] \]\].value
--&randomGender|[\][\]1t[NPC-Gender] \]\].value
--+Race|[&randomRace]
--+Gender|[&randomGender]
}}
But now I can't figure out how to get the Race and Gender results to affect the Name Result, just like I was able to accomplish before using ZeroFrame. This doesn't work: --+Name|[\][\]1t[[&randomRace]-[&randomGender] \]\].value This doesn't work either: !script {{ {&global ([randomRace] [\][\]1t[NPC-Race] \]\].value)} {&global ([randomGender] [\][\]1t[NPC-Gender] \]\].value)} --#title|NPC Information
--+Name|[\][\]1t[randomRace-randomGender] \]\].value
--+Race|randomRace
--+Gender|randomGender
}} I'm stuck and I can't figure this out for the life of me. Anyone know what I can do or if what I'm trying to accomplish is possible?