Ok, think i have it. Take a look at the chat log and tell me if this looks valid for the DC system. There is a variable that is set at the top of the script to determine checks are made by percentage. When set to true, the script works as it has been. Character attributes are the baseline for success, modified by the values in the door control, and compared to a d100 roll. A roll of or under the modified attribute score is considered a success. attribute + modifier >= d100 equals success When the variable is set to false, it uses a DC type approach. bar1_max becomes the DC rating for the lock, and bar2_max become the DC rating for the trap (both detection and removal). A d20 is rolled, modified by the attribute. A modified result that is greater than the DC rating of the door indicates success. d20 + attribute >= DC rating equals success The only check that is tricky would be hidden doors. Since there isn't a field used for a modifier against 'casual detection' (this isn't an active check roll), I had to add an additional variable to use as a DC check. This means that every hidden door is rolled against the same DC rating for detection. d20 + attribute >= global variable DC rating equals success Is this the implementation you were looking for? (I've not updated the OP with these code changes yet). Something else to consider as a whole... Do you think it would be better to save the values that are currently entered into the switch control as part of the state data? This would allow for more flexibility in choice of settings (for example, each door having a unique DC rating for detection), but the trade-off would be the ease of reviewing/changing the data. It's currently very easy to go in and change a door from locked to unlocked, or hidden, or see what the trap will display, etc... Moving this to state data means having to use api commands to see or change how a door is configured. I'm debating, but would be curious as to your opinions...