chillybilly
May 9th, 2015, 13:58
I am trying to create a homemade ruleset for Blade of the Iron Throne. I'm definitely not a programmer but I'm taking baby steps.
Someof the attributes take other attributes and then divide them by two. This yields fractions on my character sheet. Is there any way to code it so it rounds the fractions (up if equal to or great than .5 and down if less than .5)? Thank for any help! I'll also share the ruleset when it's functional (assuming that is allowed).
Here's the code:
<stringcontrol name="knockdowntitle"> <!--Knockdown-->
<anchored to="aimtitle" position="insidetopleft" offset="0,20"
width="100" height="20" />
<font>sheettext</font>
<static>Knockdown</static>
</stringcontrol>
<number_targetroll name="knockdown" source="abilities.knockdown">
<anchored to="knockdowntitle" position="insidetopleft" offset="105,0" width="30" height="20" />
<script>
function onInit()
setValue((window.strengthtot.getValue()+window.coo rdinationtot.getValue())/2);
end
</script>
<readonly />
<skill>Knockdown</skill>
</number_targetroll>
Someof the attributes take other attributes and then divide them by two. This yields fractions on my character sheet. Is there any way to code it so it rounds the fractions (up if equal to or great than .5 and down if less than .5)? Thank for any help! I'll also share the ruleset when it's functional (assuming that is allowed).
Here's the code:
<stringcontrol name="knockdowntitle"> <!--Knockdown-->
<anchored to="aimtitle" position="insidetopleft" offset="0,20"
width="100" height="20" />
<font>sheettext</font>
<static>Knockdown</static>
</stringcontrol>
<number_targetroll name="knockdown" source="abilities.knockdown">
<anchored to="knockdowntitle" position="insidetopleft" offset="105,0" width="30" height="20" />
<script>
function onInit()
setValue((window.strengthtot.getValue()+window.coo rdinationtot.getValue())/2);
end
</script>
<readonly />
<skill>Knockdown</skill>
</number_targetroll>