
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] }}
!script {{ {&global ([RaceResult] [\][\]1t[NPC-Race] \]\].value)} {&global ([GenderResult] [\][\]1t[NPC-Gender] \]\].value)} --#title|NPC Information --+Name| [\][\]1t[Tiefling-Male] \]\].value }}
!script {{ {&global ([RaceResult] [\][\]1t[NPC-Race] \]\].value)} {&global ([GenderResult] [\][\]1t[NPC-Gender] \]\].value)} --#title|NPC Information --+Race|RaceResult --+Gender|GenderResult }}
!script {{ {&global ([LeaveBlank] LeaveBlank)} --#title|NPC Information --&randomRace|[\][\]1t[NPC-Race] \]\].value --&randomGender|[\][\]1t[NPC-Gender] \]\].value --+Race|[&randomRace] --+Gender|[&randomGender] }}
--+Name|[\][\]1t[[&randomRace]-[&randomGender] \]\].value
!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?