
To preface this post I will mention, I am not a programmer so I ask for forgiveness for my transgressions against the gods of logic and mathematics.
I am attempting to create a character sheet for my custom (roll under) d100 ttrpg system using attributes and macros as I am not a pro member. The following code above works as intended, its purpose is to display the DC for a skill check in my system. When making a Skill check the Dm decides the attribute that will be used based on context of the action while the player picks an appropriate skill. Skills are not bound by any attribute in particular so I decided to have every skill check pull up a drop down menu allowing the player to select the attribute as chosen by the DM. For every rank you have in a skill the dc to roll under increases by +5
There is also an exhaustion mechanic where the character builds up "blemishes" either mental {MB} or physical {PB}. For every blemish you have you take -5 against the DC. So far I managed to get that part to work without much issues. However what I want to be able to do is set the maximum dc to be 95 and the minimum dc to be 5. The current method I attempted was nesting the kh1 command within pick attribute
?{Pick attribute| Phys [[{@{Phys}-[[5@{PB}]],5}kh1]]| Dex [[{@{Dex}-[[5@{PB}]],5}kh1]]| Int [[{@{Int}-[[5@{MB}]],5}kh1]]| Det [[{@{Det}-[[5@{MB}]],5}kh1]]}
This causes the Pick attribute command to freak out and stop working, instead of receiving a drop down menu I get a funky text box with the broken code inside of it as seen below
What it looks like when working:
What it looks like when not working:
Sorry if the way I have written this out is hard to understand but I think I got the idea across. If you guys have any suggestions or clarifying questions then feel free to send em.