There's a lot there. I will try to help solve your problem, but the language barrier is a problem. You say, " I have a checkbox in medium armor, which should reduce speed by 10 feet and add disadvantage on dexterity checks" but I can't tell how that applies to this code. Which is the armour, which attributes should be modified by disadvantage? One issue I notice with your radio buttons might not always be unique. Purely by chance you might end up with 2 radio buttons that have the same value, and then roll20 will have no way to distunguish them. That might not be a problem, depending on how you use them, but it it is something to think about. Also 2) is it possible to create a single global attribute that applies
advantage or disadvantage to rolls when activated? My system is 1d6 at
beginner level, 2d6 at veteran level and 3d6 at champion level and there
are levels of advantage and disadvantage. Example: At veteran level,
one advantage would be 3d6kh2 and two advantages would be 4d6kh2. There are two ways to do this. The first, using autocalc fileds: you'd have to go through every attribute that is affected by advantage or disadvantage, and include code there to check which is in use, and to use that if so. Every single attribute. The second way is to use a sheet worker to create the code in each place. You'd have a utton to set advantage, normal, disadvantage, and this would then go through every attribute that icludes a roll and modifies it. it would need to have some way of extracting the relevat attributes and stats to match each attriute. Neither approach is easy to set up, but can be done.