Moves genders to an array.
Adds some trans genders. Adds some utility methods to simplify displaying a menu and choosing a string id from a list of strings.
This commit is contained in:
14
TODO.md
14
TODO.md
@@ -15,8 +15,6 @@
|
||||
* Replace all uses of PrintMenu and PrintMenuWithValues use pm and specific MenuStyles
|
||||
* Rename pm to PrintMenu after this is done.
|
||||
* Spending virtue points
|
||||
* Support genders other than male/female.
|
||||
* Change all references to sex to gender instead.
|
||||
|
||||
# Low Priority
|
||||
* Calculating values not directly queried for.
|
||||
@@ -81,8 +79,14 @@
|
||||
* This will probably just go away by converting to pm over PrintMenu and PrintMenuWithValues, because we'll be creating an array of MenuItems for each one. We still have to fill the array each time, but we can look into making that suck less afterwards.
|
||||
* Get attribute/ability/rank names from arrays when to print them (plural and singular) in loops like "Choose your tertiary attribute?" and "Which talent would you like to spend 1 of your 6 points on?"
|
||||
* Reorganize functions/subs so the order/grouping makes more sense. move all global dims together and group them with their constants.
|
||||
|
||||
# Uncategorized
|
||||
* Consider supporting freeform gender strings.
|
||||
* The main reason for not doing this is limiting the string length.
|
||||
* We don't do it for other strings, but we don't want to add more until we have a good way to handle them.
|
||||
* Should we let you know on input that it's too long.
|
||||
* How/where can se store the specific length in a way that allows for multiple character sheet formats.
|
||||
* Maybe just say fuck it and leave that up to the user to know it's too long when it gets cut off.
|
||||
* We also like keeping it like this because it suggests "other" genders better than a freeform string.
|
||||
* In a text-based ui it may seem like male/female are the expected options and users would likely not even consider that there are other options.
|
||||
* Move the ruleset dims/constants/getters/setters out into separate bas files.
|
||||
* Probably 1 file per system
|
||||
* Maybe keep stubs for the functions in the main bas that call the rulset specific versions.
|
||||
@@ -93,3 +97,5 @@
|
||||
* Have the stubs use a select case to call the specific ruleset variant based on the RULESET_* constant passed in.
|
||||
* Maybe only load the ruleset bas files as they are required to save memory. If we can't unload this could still suck.
|
||||
* Imagine telling someone you've created to many classes of character. You need to close and reopen the program if you want to create any new classes, but you can create more of the old ones.
|
||||
|
||||
# Uncategorized
|
||||
|
||||
@@ -186,6 +186,14 @@ Const BACKGROUND_STATUS = 10
|
||||
Const BACKGROUNDS_COUNT = 10
|
||||
Dim Shared Backgrounds(1 To BACKGROUNDS_COUNT) As String
|
||||
|
||||
Const GENDER_MALE = 1
|
||||
Const GENDER_FEMALE = 2
|
||||
Const GENDER_TRANS_MALE = 3
|
||||
Const GENDER_TRANS_FEMALE = 4
|
||||
Const GENDER_NON_BINARY = 5
|
||||
Const GENDERS_COUNT = 5
|
||||
Dim Shared Genders(1 To GENDERS_COUNT) As String
|
||||
|
||||
Type CharacterType
|
||||
name As String
|
||||
player As String
|
||||
@@ -482,6 +490,13 @@ Sub InitializeMemory
|
||||
Backgrounds(BACKGROUND_RESOURCES) = "Resources"
|
||||
Backgrounds(BACKGROUND_RETAINERS) = "Retainers"
|
||||
Backgrounds(BACKGROUND_STATUS) = "Status"
|
||||
|
||||
' Genders
|
||||
Genders(GENDER_MALE) = "Male"
|
||||
Genders(GENDER_FEMALE) = "Female"
|
||||
Genders(GENDER_TRANS_MALE) = "Trans-Male"
|
||||
Genders(GENDER_TRANS_FEMALE) = "Trans-Female"
|
||||
Genders(GENDER_NON_BINARY) = "Non-Binary"
|
||||
End Sub
|
||||
|
||||
Sub SplashScreen
|
||||
@@ -584,8 +599,7 @@ Function GetChoice (min As Integer, max As Integer)
|
||||
End Function
|
||||
|
||||
Function GetMenuChoice (items() As MenuItem, style As MenuStyle, count As Integer)
|
||||
' pull showrandom from style
|
||||
' only allow random id or an id from a visible menuitem
|
||||
' Only allow random id or an id from a visible menuitem.
|
||||
choice = -1
|
||||
acceptChoice = FALSE
|
||||
Do
|
||||
@@ -1157,17 +1171,47 @@ Sub NewCharacter (ch As CharacterType)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Sub BuildMenu (items() As MenuItem, labels() As String, count As Integer)
|
||||
ReDim items(1 To count) As MenuItem
|
||||
For i = 1 To count
|
||||
Dim mi As MenuItem
|
||||
Call NewMenuItem(mi, labels(i), i)
|
||||
items(i) = mi
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Sub BuildMenuWithValues (items() As MenuItem, labels() As String, values() As Integer, count As Integer)
|
||||
ReDim items(1 To count) As MenuItem
|
||||
For i = 1 To count
|
||||
Dim mi As MenuItem
|
||||
Call NewMenuItemWithValue(mi, labels(i), i, values(i))
|
||||
items(i) = mi
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Function ChooseStringId (labels() As String, style As MenuStyle, count As Integer, prompt As String)
|
||||
Cls
|
||||
Dim mnuItems(1 To count) As MenuItem
|
||||
Call BuildMenu(mnuItems(), labels(), count)
|
||||
Call AdjustMenuStyle(style, mnuItems(), count, TRUE)
|
||||
Print prompt
|
||||
Call pm(mnuItems(), count, style)
|
||||
choice = GetMenuChoice(mnuItems(), style, count)
|
||||
If choice = style.randomItemId Then choice = GetRandomMenuItemId(mnuItems(), style, count)
|
||||
ChooseStringId = choice
|
||||
End Function
|
||||
|
||||
Sub CGGetHeader (ch As CharacterType)
|
||||
Cls
|
||||
Dim ms As MenuStyle
|
||||
Call NewMenuStyle(ms)
|
||||
Input "What is the character's name? ", ch.name
|
||||
Input "Who is the player? ", ch.player
|
||||
Input "What chronicle is the character going to be used for? ", ch.chronicle
|
||||
Input "What is the character's Haven? ", ch.haven
|
||||
Input "What is the character's concept? ", ch.concept
|
||||
Input "How old is the character? ", ch.age
|
||||
Print "What is the sex of the character? 1 = Male 2 = Female 0 = Random"
|
||||
ch.gender = GetChoice(0, 2)
|
||||
If ch.gender = 0 Then ch.gender = GetRandomInt(1, 2)
|
||||
ch.gender = ChooseStringId(Genders(), ms, GENDERS_COUNT, "What is the character's gender?")
|
||||
Cls
|
||||
Print "What Clan is the character from?"
|
||||
Call PrintMenu(Clans(), CLANS_COUNT)
|
||||
@@ -1401,8 +1445,6 @@ Sub ShowCharacterSheet (ch As CharacterType)
|
||||
'230 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD>
|
||||
' enquote forms s/^([ɺ<><C9BA><EFBFBD>].*[<5B><><EFBFBD><EFBFBD>])$/print "$1"/g
|
||||
|
||||
' TODO: make this a string or pull from an array like Genders so we can suppor enby and maybe make trans explicit
|
||||
If ch.gender = 1 Then genderString$ = "Male" Else genderString$ = "Female"
|
||||
clanName$ = Clans(ch.clan)
|
||||
|
||||
Dim disciplineStrings(3) As String
|
||||
@@ -1433,7 +1475,7 @@ Sub ShowCharacterSheet (ch As CharacterType)
|
||||
|
||||
Cls
|
||||
Print "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ"
|
||||
Print "<22> Name: " + MakeFitL$(ch.name, 30, " ") + " <20> Sex: " + MakeFitL$(genderString$, 10, " ") + " Generation: " + MakeFitL$(itos$(ch.generation), 9, " ") + " <20>"
|
||||
Print "<22> Name: " + MakeFitL$(ch.name, 30, " ") + " <20> Sex: " + MakeFitL$(Genders(ch.gender), 10, " ") + " Generation: " + MakeFitL$(itos$(ch.generation), 9, " ") + " <20>"
|
||||
Print "<22> Clan: " + MakeFitL$(clanName$, 30, " ") + " <20> Age: " + MakeFitL$(ch.age$, 32, " ") + " <20>"
|
||||
Print "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Player: " + MakeFitL$(ch.player$, 29, " ") + " <20>"
|
||||
Print "<22> Attributes <20> Chronicle: " + MakeFitL$(ch.chronicle$, 26, " ") + " <20>"
|
||||
|
||||
Reference in New Issue
Block a user