More Character Creation

This commit is contained in:
Florian 2026-04-20 14:24:32 +02:00
parent 3cf5b9f35e
commit 2691eb6c47
9 changed files with 243 additions and 89 deletions

View File

@ -8,6 +8,13 @@
"data.tool": "checkbox", "data.tool": "checkbox",
"data.race": "checkbox", "data.race": "checkbox",
"data.race.speed": "number", "data.race.speed": "number",
"data.race.playable": "checkbox" "data.race.playable": "checkbox",
"data.race.minweight": "number",
"data.race.maxweight": "number",
"data.race.minheight": "number",
"data.race.maxheight": "number",
"data.race.maxage": "number",
"data.race.minage": "number",
"cost.1": "number"
} }
} }

View File

@ -4,20 +4,17 @@
"type": "split", "type": "split",
"children": [ "children": [
{ {
"id": "0c3e15a1ad9e2e82", "id": "020f3644f1d53ff7",
"type": "tabs", "type": "tabs",
"children": [ "children": [
{ {
"id": "231678df0ba9b0ba", "id": "388abadcb3247db6",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "bases", "type": "empty",
"state": { "state": {},
"file": "wiki/races/Races.base", "icon": "lucide-file",
"viewName": "Playable" "title": "New tab"
},
"icon": "lucide-table",
"title": "Races"
} }
} }
] ]
@ -182,18 +179,21 @@
"bases:Create new base": false "bases:Create new base": false
} }
}, },
"active": "231678df0ba9b0ba", "active": "f04c5c8ea681e8c9",
"lastOpenFiles": [ "lastOpenFiles": [
"wiki/races/Dragon.md", "wiki/costtables/CostTable.base",
"wiki/races/Human.md", "wiki/costtables/Attribute A.md",
"wiki/races/Orc.md", "wiki/weapons/Spear.md",
"wiki/races/Races.base", "wiki/races/Races.base",
"wiki/races/Orc.md",
"wiki/races/Human.md",
"wiki/races/Dragon.md",
"wiki/first subfolder/secondSub/Some Testnote.md",
"wiki/costtables",
"wiki/weapons/Items.base", "wiki/weapons/Items.base",
"wiki/races", "wiki/races",
"wiki/weapons/Spear.md",
"wiki/weapons/Sword.md", "wiki/weapons/Sword.md",
"wiki/weapons/Axt.md", "wiki/weapons/Axt.md",
"wiki/first subfolder/secondSub/Some Testnote.md",
"wiki/twomain/A Pdf.pdf", "wiki/twomain/A Pdf.pdf",
"wiki/Test123.md", "wiki/Test123.md",
"wiki/Authbased.md", "wiki/Authbased.md",
@ -205,8 +205,6 @@
"wiki/twomain", "wiki/twomain",
"adventures/Adventure.md", "adventures/Adventure.md",
"wiki/first subfolder/secondSub", "wiki/first subfolder/secondSub",
"wiki/first subfolder",
"adventures",
"Welcome.md" "Welcome.md"
] ]
} }

View File

@ -1,7 +1,7 @@
--- ---
data.race: true race: true
data.race.speed: 7 race.speed: 7
data.race.playable: false race.playable: false
--- ---
# Dragon # Dragon
Dragons are big, fire breathing, flying fortresses. Dragons are big, fire breathing, flying fortresses.

View File

@ -1,7 +1,13 @@
--- ---
data.race: true race: true
data.race.speed: 4 race.speed: 4
data.race.playable: true race.playable: true
race.maxage: 90
race.minweight: 55
race.maxweight: 105
race.minheight: 175
race.maxheight: 205
race.minage: 15
--- ---
# Human # Human
Humans are versatile creatures. Humans are versatile creatures.

View File

@ -1,7 +1,13 @@
--- ---
data.race: true race: true
data.race.speed: 5 race.speed: 5
data.race.playable: true race.playable: true
race.minweight: 50
race.maxweight: 120
race.minheight: 160
race.maxheight: 220
race.maxage: 110
race.minage: 50
--- ---
# Orc # Orc
Orcs are pesky little creatures that only have the worst in mind. Orcs are pesky little creatures that only have the worst in mind.

View File

@ -1,19 +1,33 @@
filters: filters:
and: and:
- note["data.race"] == true - race == true
views: views:
- type: table - type: table
name: All name: All
order: order:
- file.name - file.name
- data.race.speed - race
- race.maxage
- race.maxweight
- race.maxheight
- race.minage
- race.minweight
- race.minheight
- race.speed
sort: [] sort: []
- type: table - type: table
name: Playable name: Playable
filters: filters:
and: and:
- note["data.race.playable"] == true - note["race.playable"] == true
order: order:
- file.name - file.name
- data.race.speed - race
- race.maxage
- race.maxheight
- race.maxweight
- race.minage
- race.minheight
- race.minweight
- race.speed
sort: [] sort: []

View File

@ -30,7 +30,13 @@
<Max>64</Max> <Max>64</Max>
</String> </String>
<String Name="gender"/> <String Name="gender"/>
<String Name="title"/>
<String Name="origin"/>
<String Name="profession"/>
<Bool Name="ismage"/> <Bool Name="ismage"/>
<Int Name="height"/>
<Int Name="weight"/>
<Int Name="age"/>
</Variables> </Variables>
</Group> </Group>
<Group Name="race"> <Group Name="race">
@ -38,6 +44,12 @@
<String Name="id"/> <String Name="id"/>
<String Name="name"/> <String Name="name"/>
<Int Name="speed"/> <Int Name="speed"/>
<Int Name="minage"/>
<Int Name="maxage"/>
<Int Name="minheight"/>
<Int Name="maxheight"/>
<Int Name="minweight"/>
<Int Name="maxweight"/>
</Variables> </Variables>
</Group> </Group>
</Groups> </Groups>

View File

@ -0,0 +1,40 @@
<Library Name="charlib">
<Functions>
<Function Name="charlib_cost_a">
<Return>max(1, [param.0 - 11])</Return>
</Function>
<Function Name="charlib_cost_b">
<Return>max(1, [param.0 - 11]) * 2</Return>
</Function>
<Function Name="charlib_cost_c">
<Return>max(1, [param.0 - 11]) * 3</Return>
</Function>
<Function Name="charlib_cost_d">
<Return>max(1, [param.0 - 11]) * 4</Return>
</Function>
<Function Name="charlib_cost_e">
<Return>max(1, [param.0 - 11]) * 5</Return>
</Function>
<Function Name="charlib_cost_f">
<Return>max(1, [param.0 - 11]) * 6</Return>
</Function>
<Function Name="charlib_cost_attr">
<Return>max(1, [param.0] - 13) * 15</Return>
</Function>
<!--<Function Name="charlib_cost_b">
<Actions>
<Action>
<If>[param.0] &lt;= 12</If>
<Do>1</Do>
<Output>[local.cost]</Output>
</Action>
<Action>
<If>[param.0] > 12</If>
<Do>[param.0] - 11</Do>
<Output>[local.cost]</Output>
</Action>
</Actions>
<Return>[local.cost]</Return>
</Function>-->
</Functions>
</Library>

View File

@ -13,6 +13,9 @@
<Path>wiki/races/Races</Path> <Path>wiki/races/Races</Path>
</BaseReference> </BaseReference>
</Bases> </Bases>
<Libraries>
<LibraryReference>charlib</LibraryReference>
</Libraries>
<StartPage>"start"</StartPage> <StartPage>"start"</StartPage>
<Pages> <Pages>
<Page Name="start"> <Page Name="start">
@ -23,18 +26,14 @@
<Rule>[rule.createcharacter]</Rule> <Rule>[rule.createcharacter]</Rule>
</Create> </Create>
<OnPostLoad> <OnPostLoad>
<Actions> <OpenPage>
<OpenPage> <Page>[data.character.flow.currentPage]</Page>
<Page>[data.character.flow.currentPage]</Page> </OpenPage>
</OpenPage>
</Actions>
</OnPostLoad> </OnPostLoad>
<OnPostCreate> <OnPostCreate>
<Actions> <OpenPage>
<OpenPage> <Page>[data.character.flow.currentPage]</Page>
<Page>[data.character.flow.currentPage]</Page> </OpenPage>
</OpenPage>
</Actions>
</OnPostCreate> </OnPostCreate>
</DataSlotLoader> </DataSlotLoader>
</Content> </Content>
@ -63,13 +62,37 @@
<Display>[file.name]</Display> <Display>[file.name]</Display>
<PropertyOutputs> <PropertyOutputs>
<PropertyOutput> <PropertyOutput>
<Property>[data.race.speed]</Property> <Property>[race.speed]</Property>
<Output>[data.character.race.speed]</Output> <Output>[data.character.race.speed]</Output>
</PropertyOutput> </PropertyOutput>
<PropertyOutput> <PropertyOutput>
<Property>[file.name]</Property> <Property>[file.name]</Property>
<Output>[data.character.race.name]</Output> <Output>[data.character.race.name]</Output>
</PropertyOutput> </PropertyOutput>
<PropertyOutput>
<Property>[race.minage]</Property>
<Output>[data.character.race.minage]</Output>
</PropertyOutput>
<PropertyOutput>
<Property>[race.maxage]</Property>
<Output>[data.character.race.maxage]</Output>
</PropertyOutput>
<PropertyOutput>
<Property>[race.minweight]</Property>
<Output>[data.character.race.minweight]</Output>
</PropertyOutput>
<PropertyOutput>
<Property>[race.maxweight]</Property>
<Output>[data.character.race.maxweight]</Output>
</PropertyOutput>
<PropertyOutput>
<Property>[race.minheight]</Property>
<Output>[data.character.race.minheight]</Output>
</PropertyOutput>
<PropertyOutput>
<Property>[race.maxheight]</Property>
<Output>[data.character.race.maxheight]</Output>
</PropertyOutput>
</PropertyOutputs> </PropertyOutputs>
</BaseSingleSelect> </BaseSingleSelect>
</Content> </Content>
@ -87,15 +110,13 @@
<Button> <Button>
<Text>"Weiter"</Text> <Text>"Weiter"</Text>
<OnClick> <OnClick>
<Actions> <Action>
<Action> <Do>"profile"</Do>
<Do>"profile"</Do> <Output>[data.character.flow.currentPage]</Output>
<Output>[data.character.flow.currentPage]</Output> </Action>
</Action> <OpenPage>
<OpenPage> <Page>[data.character.flow.currentPage]</Page>
<Page>[data.character.flow.currentPage]</Page> </OpenPage>
</OpenPage>
</Actions>
</OnClick> </OnClick>
</Button> </Button>
</Content> </Content>
@ -130,44 +151,98 @@
<Button> <Button>
<Text>"Profil"</Text> <Text>"Profil"</Text>
<OnClick> <OnClick>
<Actions> <Action>
<Action> <Do>"profile"</Do>
<Do>"profile"</Do> <Output>[data.character.flow.currentPage]</Output>
<Output>[data.character.flow.currentPage]</Output> </Action>
</Action> <OpenPage>
<OpenPage> <Page>[data.character.flow.currentPage]</Page>
<Page>[data.character.flow.currentPage]</Page> </OpenPage>
</OpenPage>
</Actions>
</OnClick> </OnClick>
</Button> </Button>
<Button> <Button>
<Text>"Grundattribute"</Text> <Text>"Grundattribute"</Text>
<OnClick> <OnClick>
<Actions> <Action>
<Action> <Do>"baseattributes"</Do>
<Do>"baseattributes"</Do> <Output>[data.character.flow.currentPage]</Output>
<Output>[data.character.flow.currentPage]</Output> </Action>
</Action> <OpenPage>
<OpenPage> <Page>[data.character.flow.currentPage]</Page>
<Page>[data.character.flow.currentPage]</Page> </OpenPage>
</OpenPage>
</Actions>
</OnClick> </OnClick>
</Button> </Button>
</Content> </Content>
</HorizontalContainer> </HorizontalContainer>
<!-- End Header Bar --> <!-- End Header Bar -->
<Header>
<Level>2</Level>
<Text>"Persönliche Daten"</Text>
</Header>
<GridContainer> <GridContainer>
<Cols>2</Cols> <Cols>2</Cols>
<Content> <Content>
<Label> <Label>
<Text>"Profile Page!"</Text> <Text>"Name"</Text>
</Label> </Label>
<StringInput>
<Output>[data.character.definition.name]</Output>
</StringInput>
<Label>
<Text>"Geschlecht"</Text>
</Label>
<StringInput>
<Output>[data.character.definition.gender]</Output>
</StringInput>
<Label>
<Text>"Titel"</Text>
</Label>
<StringInput>
<Output>[data.character.definition.title]</Output>
</StringInput>
<Label>
<Text>"Herkunft"</Text>
</Label>
<StringInput>
<Output>[data.character.definition.origin]</Output>
</StringInput>
<Label>
<Text>"Profession"</Text>
</Label>
<StringInput>
<Output>[data.character.definition.profession]</Output>
</StringInput>
</Content>
</GridContainer>
<Header>
<Level>2</Level>
<Text>"Äußerliches"</Text>
</Header>
<GridContainer>
<Cols>3</Cols>
<Content>
<Label>
<Text>"Größe"</Text>
</Label>
<ValueAndBorders>
<Value>[data.character.definition.height]</Value>
<LowerBorder>[data.character.race.minheight]</LowerBorder>
<UpperBorder>[data.character.race.maxheight]</UpperBorder>
</ValueAndBorders>
<ValueButtons>
<Output>[data.character.definition.height]</Output>
<Cost>charlib_cost_a</Cost>
<Budget>[data.character.control.xp]</Budget>
<Buttons>
<ValueButton>
<Value>+50</Value>
</ValueButton>
</Buttons>
</ValueButtons>
</Content> </Content>
</GridContainer> </GridContainer>
</Content> </Content>
</Page> </Page><!-- End Profile Page-->
<Page Name="baseattributes"> <Page Name="baseattributes">
<Content> <Content>
<!-- Header Bar --> <!-- Header Bar -->
@ -196,29 +271,25 @@
<Button> <Button>
<Text>"Profil"</Text> <Text>"Profil"</Text>
<OnClick> <OnClick>
<Actions> <Action>
<Action> <Do>"profile"</Do>
<Do>"profile"</Do> <Output>[data.character.flow.currentPage]</Output>
<Output>[data.character.flow.currentPage]</Output> </Action>
</Action> <OpenPage>
<OpenPage> <Page>[data.character.flow.currentPage]</Page>
<Page>[data.character.flow.currentPage]</Page> </OpenPage>
</OpenPage>
</Actions>
</OnClick> </OnClick>
</Button> </Button>
<Button> <Button>
<Text>"Grundattribute"</Text> <Text>"Grundattribute"</Text>
<OnClick> <OnClick>
<Actions> <Action>
<Action> <Do>"baseattributes"</Do>
<Do>"baseattributes"</Do> <Output>[data.character.flow.currentPage]</Output>
<Output>[data.character.flow.currentPage]</Output> </Action>
</Action> <OpenPage>
<OpenPage> <Page>[data.character.flow.currentPage]</Page>
<Page>[data.character.flow.currentPage]</Page> </OpenPage>
</OpenPage>
</Actions>
</OnClick> </OnClick>
</Button> </Button>
</Content> </Content>