Update character creation tool XML: enhance attribute displays with new calculations (health bonus, mana, intrinsic magic), and refine layout with additional RowLayouts and ColumnLayouts

This commit is contained in:
Florian 2026-05-12 14:40:35 +02:00
parent e2565f4802
commit 3da2b824b5
3 changed files with 159 additions and 78 deletions

View File

@ -50,6 +50,7 @@
<Int Name="maxheight"/>
<Int Name="minweight"/>
<Int Name="maxweight"/>
<Int Name="healthbonus"/>
</Variables>
</Group>
<Group Name="attributes">
@ -208,6 +209,9 @@
</List>
<String Name="new_name"/>
<String Name="new_description"/>
<Int Name="mana">
<Value>10</Value>
</Int>
</Variables>
</Group>
<Group Name="print">

View File

@ -40,5 +40,30 @@
<Function Name="charlib_checkpreprint">
<Return>true</Return>
</Function>
<Function Name="charlib_intrinsicmagic">
<Actions>
<Action>
<Do>if([data.character.attributes.courage] >= 10, 0.25, 0) + if([data.character.attributes.intelligence] >= 10, 0.25, 0) + if([data.character.attributes.intuition] >= 10, 0.25, 0) + if([data.character.attributes.charisma] >= 10, 0.25, 0) + if([data.character.attributes.dexterity] >= 10, 0.25, 0) + if([data.character.attributes.agility] >= 10, 0.25, 0) + if([data.character.attributes.physique] >= 10, 0.25, 0) + if([data.character.attributes.strength] >= 10, 0.25, 0)</Do>
<Output>[local.sum10]</Output>
</Action>
<Action>
<Do>if([data.character.attributes.courage] >= 12, 0.5, 0) + if([data.character.attributes.intelligence] >= 12, 0.5, 0) + if([data.character.attributes.intuition] >= 12, 0.5, 0) + if([data.character.attributes.charisma] >= 12, 0.5, 0) + if([data.character.attributes.dexterity] >= 12, 0.5, 0) + if([data.character.attributes.agility] >= 12, 0.5, 0) + if([data.character.attributes.physique] >= 12, 0.5, 0) + if([data.character.attributes.strength] >= 12, 0.5, 0)</Do>
<Output>[local.sum10]</Output>
</Action>
<Action>
<Do>if([data.character.attributes.courage] >= 14, 0.75, 0) + if([data.character.attributes.intelligence] >= 14, 0.75, 0) + if([data.character.attributes.intuition] >= 14, 0.75, 0) + if([data.character.attributes.charisma] >= 14, 0.75, 0) + if([data.character.attributes.dexterity] >= 14, 0.75, 0) + if([data.character.attributes.agility] >= 14, 0.75, 0) + if([data.character.attributes.physique] >= 14, 0.75, 0) + if([data.character.attributes.strength] >= 14, 0.75, 0)</Do>
<Output>[local.sum10]</Output>
</Action>
<Action>
<Do>if([data.character.attributes.courage] >= 16, 1, 0) + if([data.character.attributes.intelligence] >= 16, 1, 0) + if([data.character.attributes.intuition] >= 16, 1, 0) + if([data.character.attributes.charisma] >= 16, 1, 0) + if([data.character.attributes.dexterity] >= 16, 1, 0) + if([data.character.attributes.agility] >= 16, 1, 0) + if([data.character.attributes.physique] >= 16, 1, 0) + if([data.character.attributes.strength] >= 16, 1, 0)</Do>
<Output>[local.sum10]</Output>
</Action>
<Action>
<Do>Truncate(Min([local.sum10], 1.5) + Min([local.sum12], 2) + Min([local.sum14], 1.5) + Min([local.sum16], 1))</Do>
<Output>[local.magic]</Output>
</Action>
</Actions>
<Return>[local.magic]</Return>
</Function>
</Functions>
</Library>

View File

@ -74,6 +74,7 @@
</RowLayout>
</Header>
<Body>
<ColumnLayout>
<RowLayout Styles="ValueBoxRow">
<Content>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Courage">
@ -158,6 +159,57 @@
</ColumnLayout>
</Content>
</RowLayout>
<RowLayout Styles="ValueBoxRow">
<ColumnLayout Styles="ValueBox;ValueBoxChildren">
<Label>
<Text>"LE"</Text>
</Label>
<Label>
<Text>[data.character.attributes.physique] + [data.character.attributes.physique] + [data.character.attributes.strength] + [data.character.race.healthbonus]</Text>
</Label>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren">
<Label>
<Text>"INI"</Text>
</Label>
<Label>
<Text>Round(([data.character.attributes.courage] + [data.character.attributes.agility]) / 2)</Text>
</Label>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren">
<Label>
<Text>"AW"</Text>
</Label>
<Label>
<Text>Round(([data.character.attributes.intuition] + [data.character.attributes.agility] + [data.character.attributes.agility]) / 4)</Text>
</Label>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren">
<Label>
<Text>"GS"</Text>
</Label>
<Label>
<Text>[data.character.race.speed]</Text>
</Label>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren" Visible="[data.character.definition.ismage]">
<Label>
<Text>"MN"</Text>
</Label>
<Label>
<Text>[data.character.magic.mana]</Text>
</Label>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren" Visible="[data.character.definition.ismage]">
<Label>
<Text>"AM"</Text>
</Label>
<Label>
<Text>charlib_intrinsicmagic()</Text>
</Label>
</ColumnLayout>
</RowLayout>
</ColumnLayout>
</Body>
<!--<Footer></Footer>-->
</Page>