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

View File

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

View File

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

View File

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

View File

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

View File

@ -30,7 +30,13 @@
<Max>64</Max>
</String>
<String Name="gender"/>
<String Name="title"/>
<String Name="origin"/>
<String Name="profession"/>
<Bool Name="ismage"/>
<Int Name="height"/>
<Int Name="weight"/>
<Int Name="age"/>
</Variables>
</Group>
<Group Name="race">
@ -38,6 +44,12 @@
<String Name="id"/>
<String Name="name"/>
<Int Name="speed"/>
<Int Name="minage"/>
<Int Name="maxage"/>
<Int Name="minheight"/>
<Int Name="maxheight"/>
<Int Name="minweight"/>
<Int Name="maxweight"/>
</Variables>
</Group>
</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>
</BaseReference>
</Bases>
<Libraries>
<LibraryReference>charlib</LibraryReference>
</Libraries>
<StartPage>"start"</StartPage>
<Pages>
<Page Name="start">
@ -23,18 +26,14 @@
<Rule>[rule.createcharacter]</Rule>
</Create>
<OnPostLoad>
<Actions>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</Actions>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</OnPostLoad>
<OnPostCreate>
<Actions>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</Actions>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</OnPostCreate>
</DataSlotLoader>
</Content>
@ -63,13 +62,37 @@
<Display>[file.name]</Display>
<PropertyOutputs>
<PropertyOutput>
<Property>[data.race.speed]</Property>
<Property>[race.speed]</Property>
<Output>[data.character.race.speed]</Output>
</PropertyOutput>
<PropertyOutput>
<Property>[file.name]</Property>
<Output>[data.character.race.name]</Output>
</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>
</BaseSingleSelect>
</Content>
@ -87,15 +110,13 @@
<Button>
<Text>"Weiter"</Text>
<OnClick>
<Actions>
<Action>
<Do>"profile"</Do>
<Output>[data.character.flow.currentPage]</Output>
</Action>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</Actions>
<Action>
<Do>"profile"</Do>
<Output>[data.character.flow.currentPage]</Output>
</Action>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</OnClick>
</Button>
</Content>
@ -130,44 +151,98 @@
<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>
<Action>
<Do>"profile"</Do>
<Output>[data.character.flow.currentPage]</Output>
</Action>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</OnClick>
</Button>
<Button>
<Text>"Grundattribute"</Text>
<OnClick>
<Actions>
<Action>
<Do>"baseattributes"</Do>
<Output>[data.character.flow.currentPage]</Output>
</Action>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</Actions>
<Action>
<Do>"baseattributes"</Do>
<Output>[data.character.flow.currentPage]</Output>
</Action>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</OnClick>
</Button>
</Content>
</HorizontalContainer>
<!-- End Header Bar -->
<Header>
<Level>2</Level>
<Text>"Persönliche Daten"</Text>
</Header>
<GridContainer>
<Cols>2</Cols>
<Content>
<Label>
<Text>"Profile Page!"</Text>
<Text>"Name"</Text>
</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>
</GridContainer>
</Content>
</Page>
</Page><!-- End Profile Page-->
<Page Name="baseattributes">
<Content>
<!-- Header Bar -->
@ -196,29 +271,25 @@
<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>
<Action>
<Do>"profile"</Do>
<Output>[data.character.flow.currentPage]</Output>
</Action>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</OnClick>
</Button>
<Button>
<Text>"Grundattribute"</Text>
<OnClick>
<Actions>
<Action>
<Do>"baseattributes"</Do>
<Output>[data.character.flow.currentPage]</Output>
</Action>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</Actions>
<Action>
<Do>"baseattributes"</Do>
<Output>[data.character.flow.currentPage]</Output>
</Action>
<OpenPage>
<Page>[data.character.flow.currentPage]</Page>
</OpenPage>
</OnClick>
</Button>
</Content>