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

View File

@ -40,5 +40,30 @@
<Function Name="charlib_checkpreprint"> <Function Name="charlib_checkpreprint">
<Return>true</Return> <Return>true</Return>
</Function> </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> </Functions>
</Library> </Library>

View File

@ -74,90 +74,142 @@
</RowLayout> </RowLayout>
</Header> </Header>
<Body> <Body>
<RowLayout Styles="ValueBoxRow"> <ColumnLayout>
<Content> <RowLayout Styles="ValueBoxRow">
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Courage"> <Content>
<Content> <ColumnLayout Styles="ValueBox;ValueBoxChildren;Courage">
<Label> <Content>
<Text>"MU"</Text> <Label>
</Label> <Text>"MU"</Text>
<Label> </Label>
<Text>[data.character.attributes.courage]</Text> <Label>
</Label> <Text>[data.character.attributes.courage]</Text>
</Content> </Label>
</Content>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Intelligence">
<Content>
<Label>
<Text>"KL"</Text>
</Label>
<Label>
<Text>[data.character.attributes.intelligence]</Text>
</Label>
</Content>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Intuition">
<Content>
<Label>
<Text>"IN"</Text>
</Label>
<Label>
<Text>[data.character.attributes.intuition]</Text>
</Label>
</Content>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Charisma">
<Content>
<Label>
<Text>"CH"</Text>
</Label>
<Label>
<Text>[data.character.attributes.charisma]</Text>
</Label>
</Content>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Dexterity">
<Content>
<Label>
<Text>"FF"</Text>
</Label>
<Label>
<Text>[data.character.attributes.dexterity]</Text>
</Label>
</Content>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Agility">
<Content>
<Label>
<Text>"GE"</Text>
</Label>
<Label>
<Text>[data.character.attributes.agility]</Text>
</Label>
</Content>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Physique">
<Content>
<Label>
<Text>"KO"</Text>
</Label>
<Label>
<Text>[data.character.attributes.physique]</Text>
</Label>
</Content>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Strength">
<Content>
<Label>
<Text>"KK"</Text>
</Label>
<Label>
<Text>[data.character.attributes.strength]</Text>
</Label>
</Content>
</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>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Intelligence"> <ColumnLayout Styles="ValueBox;ValueBoxChildren">
<Content> <Label>
<Label> <Text>"INI"</Text>
<Text>"KL"</Text> </Label>
</Label> <Label>
<Label> <Text>Round(([data.character.attributes.courage] + [data.character.attributes.agility]) / 2)</Text>
<Text>[data.character.attributes.intelligence]</Text> </Label>
</Label>
</Content>
</ColumnLayout> </ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Intuition"> <ColumnLayout Styles="ValueBox;ValueBoxChildren">
<Content> <Label>
<Label> <Text>"AW"</Text>
<Text>"IN"</Text> </Label>
</Label> <Label>
<Label> <Text>Round(([data.character.attributes.intuition] + [data.character.attributes.agility] + [data.character.attributes.agility]) / 4)</Text>
<Text>[data.character.attributes.intuition]</Text> </Label>
</Label>
</Content>
</ColumnLayout> </ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Charisma"> <ColumnLayout Styles="ValueBox;ValueBoxChildren">
<Content> <Label>
<Label> <Text>"GS"</Text>
<Text>"CH"</Text> </Label>
</Label> <Label>
<Label> <Text>[data.character.race.speed]</Text>
<Text>[data.character.attributes.charisma]</Text> </Label>
</Label>
</Content>
</ColumnLayout> </ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Dexterity"> <ColumnLayout Styles="ValueBox;ValueBoxChildren" Visible="[data.character.definition.ismage]">
<Content> <Label>
<Label> <Text>"MN"</Text>
<Text>"FF"</Text> </Label>
</Label> <Label>
<Label> <Text>[data.character.magic.mana]</Text>
<Text>[data.character.attributes.dexterity]</Text> </Label>
</Label>
</Content>
</ColumnLayout> </ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Agility"> <ColumnLayout Styles="ValueBox;ValueBoxChildren" Visible="[data.character.definition.ismage]">
<Content> <Label>
<Label> <Text>"AM"</Text>
<Text>"GE"</Text> </Label>
</Label> <Label>
<Label> <Text>charlib_intrinsicmagic()</Text>
<Text>[data.character.attributes.agility]</Text> </Label>
</Label>
</Content>
</ColumnLayout> </ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Physique"> </RowLayout>
<Content> </ColumnLayout>
<Label>
<Text>"KO"</Text>
</Label>
<Label>
<Text>[data.character.attributes.physique]</Text>
</Label>
</Content>
</ColumnLayout>
<ColumnLayout Styles="ValueBox;ValueBoxChildren;Strength">
<Content>
<Label>
<Text>"KK"</Text>
</Label>
<Label>
<Text>[data.character.attributes.strength]</Text>
</Label>
</Content>
</ColumnLayout>
</Content>
</RowLayout>
</Body> </Body>
<!--<Footer></Footer>--> <!--<Footer></Footer>-->
</Page> </Page>