I'm managing to get really confused about how this is working. I know attributes aren't set on a character until they're changed from the default, so I'm using getAttrByName() to read the default value for an attribute within my API script if it's not in the list of attributes for that character. However, it's not bringing back the correct default value. Except - it does in the character sheet sandbox. Some time ago (several weeks, and several commits since then) I pushed a patch for the Mongoose Traveller 2e character sheet to change the default characteristic for skills to be something more suitable for that skill rather than defaulting to "Strength" for everything. That's now live, and if I create a new character, the characteristics default correctly on the character sheet. However, if I call getAttrByName() from an API script, the value that gets pulled back is always "Strength" still, even though on the character sheet it defaults to something else (such as "Intellect", or "Dexterity"). The strange thing is, if I run things in the character sheet sandbox, with either an older, or latest, version of the character sheet, then it behaves as expected - it returns the actual default value for that skill. So I'm not sure why it's returning the wrong thing in live, and I can't see why it's working in the sandbox. The applicable part of the character sheet is this: <select type="text" class="sheet-input" name="attr_skillCharacteristicDM-Survival" value="0" style="width:95px" />
<option value="@{mod-Strength}" data-i18n="skillstrengthoption-u">Strength</option>
<option value="@{mod-Dexterity}" data-i18n="skilldexterityoption-u">Dexterity</option>
<option value="@{mod-Endurance}" data-i18n="skillenduranceoption-u">Endurance</option>
<option value="@{mod-Intellect}" selected data-i18n="skillintellectoption-u">Intellect</option>
<option value="@{mod-Education}" data-i18n="skilleducationoption-u">Education</option>
<option value="@{mod-Social}" data-i18n="skillsocialoption-u">Social</option>
</select> It seems wrong to me that the <select/> element is closed, but it was like that before I patched it (I'm not the original author), and it behaves okay in the sandbox. My change was to add a 'selected' attribute to the default option, and that change went live weeks ago. My API script command is: char = getAttrByName(characterId, "skillCharacteristicDM-"+skillName); And that always brings back "@{mod-Strength}" regardless of what the actual default value is. Unless it runs in the sandbox. That's probably not enough to figure out what the problem is, but I'm stuck about where to go from here. I've tried with completely new characters in case something was being cached on a character, the only thing I haven't tried is creating a new game. Any suggestions about what I could try next would be greatly appreciated. Thanks. Sam.