There are two ways to do this. The easiest is with an autocalc field, but it's also the most limiting in terms of later expansion. The best way is a sheet worker, but that can be a pain to get to grips with if you've never used them. But before i get to that, I notice you are using tables for layout. If this sheet is for your personal group use, that's fine. If you are planning on adding it to the roll20 repository for everyone's use, it won't be accepted under the current rules. Tables are no longer allowed, and you'll need to look into a CSS solution to laout those fields. Back to your question: Set up: For either method, you need to give each tag a name. You have given your select a name, but you need to give the inputs one too. I have assumed for that static value you have added name="attr_droshchke_lenken" Autocalc Method Change your result input to <input style="width:100%" type="text" name="attr_result" value="[[@{droshchke_lenken} + @{eigenschaftsboni1}]]" disabled="true"/> The advantage of autocalc fields is they work just like macros. If you can do dice rolls and macros in roll20, you can create an autocalc field. Sheet Worker This method is a bit more complicated. First in your html, change the static value from disabled="true" to readonly <input style="width:100%" type="text" name="attr_droshchke_lenken" value="10" readonly /> Sheet workers do not work with disabled fields. Then you need to create a script block at the end of your html, which looks like < script type = "text/worker" >
</ script > Any sheet workers you create go between the two script tags. Here's one for your case: You need to name the attribute that will be the final result. I have named it result , for this worker. Replace result below with whatever you need. on ( "change:eigenschaftsboni1", function () { getAttrs ([ "eigenschaftsboni1", "droshchke_lenken"], function (values) {
let eigenschaftsboni1 = +values.eigenschaftsboni1 || 0;
let droshchke_lenken = +values.droshchke_lenken || 0;
let result = eigenschaftsboni1 + droshchke_lenken; setAttrs ({
result: result
});
});
}); Sheet workers are harder to understand (see the wiki for more), but can handle some situations that autocalcs cant, so it can be worth using them. I can explain what the worker is doing on each line if you need. Just ask. As an alternative to that sheet worker, I've created a script that lets you create multiple sheet workers more easily, over here . You'd just copy that entire script in the second post into your script block. Then find this section const multistats = { }; And for your calculation, change it to this const multistats = { result: {rule: 'sum', attributes: ['eigenschaftsboni1', 'droshchke_lenken']}, }; If you need to create any more workers of this type, you'd just add another line for each one, and change the all caps bits to the names of the needed attributes: const multistats = { result: {rule: 'sum', attributes: ['eigenschaftsboni1', 'droshchke_lenken']},
DESTINATION: {rule: 'sum', attributes: ['ATTRIBUTE_TO_ADD', 'ANOTHER_ATTRIBUTE_TO_ADD','MORE_ATTRIBUTES_TO_ADD']}, }; In this way you can add extra sheet workers with just a single line.