Starting Character Creation Tool

This commit is contained in:
Florian 2026-04-16 15:52:29 +02:00
parent 545394f968
commit 18bf96f7d4
5 changed files with 200 additions and 35 deletions

View File

@ -1,11 +1,19 @@
<DataStructure Name="characterdata"> <DataStructure Name="characterdata">
<Version>1</Version> <Version>1</Version>
<Groups> <Groups>
<Group Name="flow">
<Variables>
<String Name="currentPage">
<Value>newchar</Value>
</String>
</Variables>
</Group>
<Group Name="definition"> <Group Name="definition">
<Variables> <Variables>
<String Name="name"> <String Name="name">
<Max>64</Max> <Max>64</Max>
</String> </String>
<String Name="gender"/>
<Bool Name="ismage"/> <Bool Name="ismage"/>
</Variables> </Variables>
</Group> </Group>
@ -16,10 +24,5 @@
<Int Name="speed"/> <Int Name="speed"/>
</Variables> </Variables>
</Group> </Group>
<Group Name="buff">
<Variables>
<Int Name="speed"/>
</Variables>
</Group>
</Groups> </Groups>
</DataStructure> </DataStructure>

View File

@ -25,14 +25,14 @@
<OnPostLoad> <OnPostLoad>
<Actions> <Actions>
<OpenPage> <OpenPage>
<Page>"newchar"</Page> <Page>[data.character.flow.currentPage]</Page>
</OpenPage> </OpenPage>
</Actions> </Actions>
</OnPostLoad> </OnPostLoad>
<OnPostCreate> <OnPostCreate>
<Actions> <Actions>
<OpenPage> <OpenPage>
<Page>"newchar"</Page> <Page>[data.character.flow.currentPage]</Page>
</OpenPage> </OpenPage>
</Actions> </Actions>
</OnPostCreate> </OnPostCreate>
@ -46,7 +46,7 @@
<Page Name="newchar"> <Page Name="newchar">
<Content> <Content>
<GridContainer> <GridContainer>
<Cols>3</Cols> <Cols>2</Cols>
<Content> <Content>
<Label> <Label>
<Text>"Name"</Text> <Text>"Name"</Text>
@ -54,24 +54,9 @@
<StringInput> <StringInput>
<Output>[data.character.definition.name]</Output> <Output>[data.character.definition.name]</Output>
</StringInput> </StringInput>
<Label>
<Text>[data.character.definition.name]</Text>
</Label>
<Label> <Label>
<Text>"Rasse"</Text> <Text>"Rasse"</Text>
</Label> </Label>
<Label>
<Text>[data.character.race.name]</Text>
</Label>
<Label>
<Text>[data.character.race.speed]</Text>
</Label>
<Label>
<Text>"Add Speed"</Text>
</Label>
<IntInput>
<Output>[data.character.buff.speed]</Output>
</IntInput>
<BaseSingleSelect> <BaseSingleSelect>
<Base>[base.races.Playable]</Base> <Base>[base.races.Playable]</Base>
<Output>[data.character.race.id]</Output> <Output>[data.character.race.id]</Output>
@ -87,21 +72,56 @@
</PropertyOutput> </PropertyOutput>
</PropertyOutputs> </PropertyOutputs>
</BaseSingleSelect> </BaseSingleSelect>
</Content> <Button>
</GridContainer> <Text>"Weiter"</Text>
<Label> <OnClick>
<Text>"Your race has "</Text> <Actions>
</Label> <Action>
<Label> <Do>"profile"</Do>
<Text>[data.character.race.speed] + [data.character.buff.speed]</Text> <Output>[data.character.flow.currentPage]</Output>
</Label> </Action>
<Label> <OpenPage>
<Text>" speed"</Text> <Page>[data.character.flow.currentPage]</Page>
</Label> </OpenPage>
</Actions>
</OnClick>
</Button>
<MarkdownDisplay> <MarkdownDisplay>
<MarkdownId>[data.character.race.id]</MarkdownId> <MarkdownId>[data.character.race.id]</MarkdownId>
</MarkdownDisplay> </MarkdownDisplay>
</Content> </Content>
</GridContainer>
</Content>
</Page>
<Page Name="profile">
<Content>
<HorizontalContainer>
<Content>
<Button>
<Text>"Profil"</Text>
<OnClick>
<Actions>
<Action>
<Do>"profile"</Do>
<Output>[data.character.flow.currentPage]</Output>
</Action>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</Actions>
</OnClick>
</Button>
</Content>
</HorizontalContainer>
<GridContainer>
<Cols>2</Cols>
<Content>
<Label>
<Text>"Profile Page!"</Text>
</Label>
</Content>
</GridContainer>
</Content>
</Page> </Page>
</Pages> </Pages>
</Tool> </Tool>

25
tools/test/testdata.xml Normal file
View File

@ -0,0 +1,25 @@
<DataStructure Name="testdata">
<Version>1</Version>
<Groups>
<Group Name="definition">
<Variables>
<String Name="name">
<Max>64</Max>
</String>
<Bool Name="ismage"/>
</Variables>
</Group>
<Group Name="race">
<Variables>
<String Name="id"/>
<String Name="name"/>
<Int Name="speed"/>
</Variables>
</Group>
<Group Name="buff">
<Variables>
<Int Name="speed"/>
</Variables>
</Group>
</Groups>
</DataStructure>

107
tools/test/testtool.xml Normal file
View File

@ -0,0 +1,107 @@
<Tool>
<Name>Test Tool</Name>
<AccessRule>[rule.access]</AccessRule>
<Display>Test Tool</Display>
<Description>The Test Tool</Description>
<Data>
<DataSlot Name="character">
<DataStructure>testdata</DataStructure>
</DataSlot>
</Data>
<Bases>
<BaseReference Name="races">
<Path>wiki/races/Races</Path>
</BaseReference>
</Bases>
<StartPage>"start"</StartPage>
<Pages>
<Page Name="start">
<Content>
<DataSlotLoader>
<DataSlot>[data.character]</DataSlot>
<Create>
<Rule>[rule.createcharacter]</Rule>
</Create>
<OnPostLoad>
<Actions>
<OpenPage>
<Page>"newchar"</Page>
</OpenPage>
</Actions>
</OnPostLoad>
<OnPostCreate>
<Actions>
<OpenPage>
<Page>"newchar"</Page>
</OpenPage>
</Actions>
</OnPostCreate>
</DataSlotLoader>
</Content>
<!--
<OnOpen/>
<OnClose/>
-->
</Page>
<Page Name="newchar">
<Content>
<GridContainer>
<Cols>3</Cols>
<Content>
<Label>
<Text>"Name"</Text>
</Label>
<StringInput>
<Output>[data.character.definition.name]</Output>
</StringInput>
<Label>
<Text>[data.character.definition.name]</Text>
</Label>
<Label>
<Text>"Rasse"</Text>
</Label>
<Label>
<Text>[data.character.race.name]</Text>
</Label>
<Label>
<Text>[data.character.race.speed]</Text>
</Label>
<Label>
<Text>"Add Speed"</Text>
</Label>
<IntInput>
<Output>[data.character.buff.speed]</Output>
</IntInput>
<BaseSingleSelect>
<Base>[base.races.Playable]</Base>
<Output>[data.character.race.id]</Output>
<Display>[file.name]</Display>
<PropertyOutputs>
<PropertyOutput>
<Property>[data.race.speed]</Property>
<Output>[data.character.race.speed]</Output>
</PropertyOutput>
<PropertyOutput>
<Property>[file.name]</Property>
<Output>[data.character.race.name]</Output>
</PropertyOutput>
</PropertyOutputs>
</BaseSingleSelect>
</Content>
</GridContainer>
<Label>
<Text>"Your race has "</Text>
</Label>
<Label>
<Text>[data.character.race.speed] + [data.character.buff.speed]</Text>
</Label>
<Label>
<Text>" speed"</Text>
</Label>
<MarkdownDisplay>
<MarkdownId>[data.character.race.id]</MarkdownId>
</MarkdownDisplay>
</Content>
</Page>
</Pages>
</Tool>

View File

@ -38,6 +38,16 @@
<AccessRule>isLoggedIn()</AccessRule> <AccessRule>isLoggedIn()</AccessRule>
</ToolArea> </ToolArea>
</ToolAreas> </ToolAreas>
<ToolAreas>
<ToolArea>
<Path>test</Path>
<Name>Tooltest</Name>
<Description>Testing Tools</Description>
<DisplayInBar>true</DisplayInBar>
<SortPriority>150</SortPriority>
<AccessRule>isLoggedIn()</AccessRule>
</ToolArea>
</ToolAreas>
</ToolConfig> </ToolConfig>
<BaseConfig> <BaseConfig>
<ParameterConfigs> <ParameterConfigs>