From 043c7bac7c9aafc56f4e0c036fa526998c4f7aef Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 26 Feb 2023 00:02:06 -0800 Subject: [PATCH] Adds talents, skills, and knowledges. Adds backgrounds. Adds an initializer for CharacterType. Adds getters/setters for character talents, skills, knowledges, disciplines, and backgrounds. --- dos/sbf/sbf.bas | 1030 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 816 insertions(+), 214 deletions(-) diff --git a/dos/sbf/sbf.bas b/dos/sbf/sbf.bas index 7fb323d..36607d7 100644 --- a/dos/sbf/sbf.bas +++ b/dos/sbf/sbf.bas @@ -1,13 +1,24 @@ $Debug ' Setup ' TODO: See if other combinations of clan and other variables cause sub questions. +' TODO: Calculate generation +' TODO: Calculate conscience +' TODO: Calculate conviction +' TODO: Calculate instinct +' TODO: Calculate self-control +' TODO: Calculate courage +' TODO: Calculate humanity/road +' TODO: Calculate willpower +' TODO: Add blood pool to sheet +' TODO: Input/Print derangements +' TODO: Some input prompts/messages have an extra space before the numeric variable in the string. Why? e.g. Which thingy to you want to spend 1 of your 3 remaining points on. +' TODO: Abstract the ALL_* stuff some more to support differences in VtDA and WtA stuff. Randomize Timer 'Call Test 'End - -' TODO: maybe make these some kind of typedef with an id and a label constants or enums would be great +' TODO: maybe make these some kind of typedef with an id and a label. Constants or enums would be great. Const All_Clans_Count = 18 Dim Shared All_Clans(1 To All_Clans_Count) As String All_Clans(1) = "Anarch" @@ -29,7 +40,6 @@ All_Clans(16) = "Toreador" All_Clans(17) = "Tzismice" All_Clans(18) = "Ventrue" -' TODO: Find a word that encapsulates both nature and demeanor. There is probably one in the book. Const All_Archetypes_Count = 30 Dim Shared All_Archetypes(1 To All_Archetypes_Count) As String All_Archetypes(1) = "Architect" @@ -90,6 +100,70 @@ All_Disciplines(22) = "Thanantosis" All_Disciplines(23) = "Thaumaturgy" All_Disciplines(24) = "Vicissitude" +Const All_Attributes_Count = 3 +Dim Shared All_Attributes(1 To All_Attributes_Count) As String +All_Attributes(1) = "Physical" +All_Attributes(2) = "Social" +All_Attributes(3) = "Mental" + +Const All_Abilities_Count = 3 +Dim Shared All_Abilities(1 To All_Attributes_Count) As String +All_Abilities(1) = "Talents" +All_Abilities(2) = "Skills" +All_Abilities(3) = "Knowledges" + +Const All_Talents_Count = 10 +Dim Shared All_Talents(1 To All_Talents_Count) As String +All_Talents(1) = "Acting" +All_Talents(2) = "Alertness" +All_Talents(3) = "Athletics" +All_Talents(4) = "Brawl" +All_Talents(5) = "Dodge" +All_Talents(6) = "Empathy" +All_Talents(7) = "Intimidation" +All_Talents(8) = "Leadership" +All_Talents(9) = "Streetwise" +All_Talents(10) = "Subterfuge" + +Const All_Skills_Count = 10 +Dim Shared All_Skills(1 To All_Skills_Count) As String +All_Skills(1) = "Animal Ken" +All_Skills(2) = "Drive" +All_Skills(3) = "Etiquette" +All_Skills(4) = "Firearms" +All_Skills(5) = "Melee" +All_Skills(6) = "Music" +All_Skills(7) = "Repair" +All_Skills(8) = "Security" +All_Skills(9) = "Stealth" +All_Skills(10) = "Survival" + +Const All_Knowledges_Count = 10 +Dim Shared All_Knowledges(1 To All_Knowledges_Count) As String +All_Knowledges(1) = "Bureaucracy" +All_Knowledges(2) = "Computer" +All_Knowledges(3) = "Finance" +All_Knowledges(4) = "Investigation" +All_Knowledges(5) = "Law" +All_Knowledges(6) = "Linguistics" +All_Knowledges(7) = "Medicine" +All_Knowledges(8) = "Occult" +All_Knowledges(9) = "Politics" +All_Knowledges(10) = "Science" + +Const All_Backgrounds_Count = 10 +Dim Shared All_Backgrounds(1 To All_Backgrounds_Count) As String +All_Backgrounds(1) = "Allies" +All_Backgrounds(2) = "Contacts" +All_Backgrounds(3) = "Fame" +All_Backgrounds(4) = "Generation" +All_Backgrounds(5) = "Herd" +All_Backgrounds(6) = "Influence" +All_Backgrounds(7) = "Mentor" +All_Backgrounds(8) = "Resources" +All_Backgrounds(9) = "Retainers" +All_Backgrounds(10) = "Status" + Type CharacterType name As String player As String @@ -101,7 +175,37 @@ Type CharacterType clan As Integer nature As Integer demeanor As Integer - 'disciplines() as integer + conscience As Integer + selfControl As Integer + courage As Integer + ' Special but don't know why + conviction As Integer + instinct As Integer + ' Disciplines + discipline_animalism As Integer + discipline_auspex As Integer + discipline_bardo As Integer + discipline_celerity As Integer + discipline_chimestry As Integer + discipline_dementation As Integer + discipline_dominate As Integer + discipline_fortitude As Integer + discipline_melpominee As Integer + discipline_mortis As Integer + discipline_mytherceria As Integer + discipline_necromancy As Integer + discipline_obeah As Integer + discipline_obfuscate As Integer + discipline_obtenebration As Integer + discipline_potence As Integer + discipline_presence As Integer + discipline_protean As Integer + discipline_quietus As Integer + discipline_serpentis As Integer + discipline_spiritus As Integer + discipline_thanantosis As Integer + discipline_thaumaturgy As Integer + discipline_vicissitude As Integer ' Attributes attr_strength As Integer attr_dexterity As Integer @@ -112,9 +216,52 @@ Type CharacterType attr_intelligence As Integer attr_perception As Integer attr_wits As Integer + ' Talents + talent_acting As Integer + talent_alertness As Integer + talent_athletics As Integer + talent_brawl As Integer + talent_dodge As Integer + talent_empathy As Integer + talent_intimidation As Integer + talent_leadership As Integer + talent_streetwise As Integer + talent_subterfuge As Integer + ' Skills + skill_animalKen As Integer + skill_drive As Integer + skill_etiquette As Integer + skill_firearms As Integer + skill_melee As Integer + skill_music As Integer + skill_repair As Integer + skill_security As Integer + skill_stealth As Integer + skill_survival As Integer + ' Knowledges + knowledge_bureaucracy As Integer + knowledge_computer As Integer + knowledge_finance As Integer + knowledge_investigation As Integer + knowledge_law As Integer + knowledge_linguistics As Integer + knowledge_medicine As Integer + knowledge_occult As Integer + knowledge_politics As Integer + knowledge_science As Integer + ' Backgrounds + background_allies As Integer + background_contacts As Integer + background_fame As Integer + background_generation As Integer + background_herd As Integer + background_influence As Integer + background_mentor As Integer + background_resources As Integer + background_retainers As Integer + background_status As Integer End Type - ' Splash screen Cls Print " Welcome to Tom's Storyteller's Best Friend. This is a program that is meant" @@ -131,29 +278,29 @@ Wend Let choice = 0 Do Cls - Print "浜様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様融" - Print " What are you going to do? " - Print " 1 = Character Generator " - Print " 2 = Character Generator for Dummies " - Print " 3 = Combat Computer " - Print " 4 = Dice Roller " - Print " 5 = Random Character Generator " - Print " 6 = " - Print " 7 = Vehicle Generator " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " 0 = End " - Print " " - Print "藩様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様夕" + Print "" + Print " What are you going to do? " + Print " 1 = Character Generator " + Print " 2 = Character Generator for Dummies " + Print " 3 = Combat Computer " + Print " 4 = Dice Roller " + Print " 5 = Random Character Generator " + Print " 6 = " + Print " 7 = Vehicle Generator " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " 0 = End " + Print " " + Print "" choice = GetChoice(0, 7) Select Case choice Case 1 @@ -172,29 +319,29 @@ Do Loop Until choice = 0 Sub BlankScreen - Print "浜様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様融" - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print " " - Print "藩様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様夕" + Print "" + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print " " + Print "" End Sub Function GetChoice (min As Integer, max As Integer) @@ -211,7 +358,7 @@ End Function Sub PrintMenu (items() As String, num_items As Integer) ' TODO: allow opting out of the random item. - ' TODO: allow printing inside of a box 1 = item . + ' TODO: allow printing inside of a box 1 = item . index_length = Len(Str$(num_items)) max_item_length = Len("Random") For i = 1 To num_items @@ -226,6 +373,7 @@ End Sub Sub PrintMenuWithValues (items() As String, values() As Integer, num_items As Integer) ' TODO: @see PrintMenu + ' TODO: Make a better separation between index, item, value triples max_index_length = Len(Str$(num_items)) max_item_length = Len("Random") max_value_length = 0 @@ -268,8 +416,424 @@ Function MaxI (val1 As Integer, val2 As Integer) End If End Function +Sub SetDiscipline (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case 1 + ch.discipline_animalism = value + Case 2 + ch.discipline_auspex = value + Case 3 + ch.discipline_bardo = value + Case 4 + ch.discipline_celerity = value + Case 5 + ch.discipline_chimestry = value + Case 6 + ch.discipline_dementation = value + Case 7 + ch.discipline_dominate = value + Case 8 + ch.discipline_fortitude = value + Case 9 + ch.discipline_melpominee = value + Case 10 + ch.discipline_mortis = value + Case 11 + ch.discipline_mytherceria = value + Case 12 + ch.discipline_necromancy = value + Case 13 + ch.discipline_obeah = value + Case 14 + ch.discipline_obfuscate = value + Case 15 + ch.discipline_obtenebration = value + Case 16 + ch.discipline_potence = value + Case 17 + ch.discipline_presence = value + Case 18 + ch.discipline_protean = value + Case 19 + ch.discipline_quietus = value + Case 20 + ch.discipline_serpentis = value + Case 21 + ch.discipline_spiritus = value + Case 22 + ch.discipline_thanantosis = value + Case 23 + ch.discipline_thaumaturgy = value + Case 24 + ch.discipline_vicissitude = value + End Select +End Sub + +Function GetDiscipline (ch As CharacterType, index As Integer) + Select Case index + Case 1 + GetDiscipline = ch.discipline_animalism + Case 2 + GetDiscipline = ch.discipline_auspex + Case 3 + GetDiscipline = ch.discipline_bardo + Case 4 + GetDiscipline = ch.discipline_celerity + Case 5 + GetDiscipline = ch.discipline_chimestry + Case 6 + GetDiscipline = ch.discipline_dementation + Case 7 + GetDiscipline = ch.discipline_dominate + Case 8 + GetDiscipline = ch.discipline_fortitude + Case 9 + GetDiscipline = ch.discipline_melpominee + Case 10 + GetDiscipline = ch.discipline_mortis + Case 11 + GetDiscipline = ch.discipline_mytherceria + Case 12 + GetDiscipline = ch.discipline_necromancy + Case 13 + GetDiscipline = ch.discipline_obeah + Case 14 + GetDiscipline = ch.discipline_obfuscate + Case 15 + GetDiscipline = ch.discipline_obtenebration + Case 16 + GetDiscipline = ch.discipline_potence + Case 17 + GetDiscipline = ch.discipline_presence + Case 18 + GetDiscipline = ch.discipline_protean + Case 19 + GetDiscipline = ch.discipline_quietus + Case 20 + GetDiscipline = ch.discipline_serpentis + Case 21 + GetDiscipline = ch.discipline_spiritus + Case 22 + GetDiscipline = ch.discipline_thanantosis + Case 23 + GetDiscipline = ch.discipline_thaumaturgy + Case 24 + GetDiscipline = ch.discipline_vicissitude + End Select +End Function + +Sub FillDisciplines (ch As CharacterType, disciplines() As Integer) + For index = 1 To All_Disciplines_Count + disciplines(index) = GetDiscipline(ch, index) + Next +End Sub + +Sub SetTalent (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case 1 + ch.talent_acting = value + Case 2 + ch.talent_alertness = value + Case 3 + ch.talent_athletics = value + Case 4 + ch.talent_brawl = value + Case 5 + ch.talent_dodge = value + Case 6 + ch.talent_empathy = value + Case 7 + ch.talent_intimidation = value + Case 8 + ch.talent_leadership = value + Case 9 + ch.talent_streetwise = value + Case 10 + ch.talent_subterfuge = value + End Select +End Sub + +Function GetTalent (ch As CharacterType, index As Integer) + Select Case index + Case 1 + GetTalent = ch.talent_acting + Case 2 + GetTalent = ch.talent_alertness + Case 3 + GetTalent = ch.talent_athletics + Case 4 + GetTalent = ch.talent_brawl + Case 5 + GetTalent = ch.talent_dodge + Case 6 + GetTalent = ch.talent_empathy + Case 7 + GetTalent = ch.talent_intimidation + Case 8 + GetTalent = ch.talent_leadership + Case 9 + GetTalent = ch.talent_streetwise + Case 10 + GetTalent = ch.talent_subterfuge + End Select +End Function + +Sub SetSkill (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case 1 + ch.skill_animalKen = value + Case 2 + ch.skill_drive = value + Case 3 + ch.skill_etiquette = value + Case 4 + ch.skill_firearms = value + Case 5 + ch.skill_melee = value + Case 6 + ch.skill_music = value + Case 7 + ch.skill_repair = value + Case 8 + ch.skill_security = value + Case 9 + ch.skill_stealth = value + Case 10 + ch.skill_survival = value + End Select +End Sub + +Function GetSkill (ch As CharacterType, index As Integer) + Select Case index + Case 1 + GetSkill = ch.skill_animalKen + Case 2 + GetSkill = ch.skill_drive + Case 3 + GetSkill = ch.skill_etiquette + Case 4 + GetSkill = ch.skill_firearms + Case 5 + GetSkill = ch.skill_melee + Case 6 + GetSkill = ch.skill_music + Case 7 + GetSkill = ch.skill_repair + Case 8 + GetSkill = ch.skill_security + Case 9 + GetSkill = ch.skill_stealth + Case 10 + GetSkill = ch.skill_survival + End Select +End Function + +Sub SetKnowledge (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case 1 + ch.knowledge_bureaucracy = value + Case 2 + ch.knowledge_computer = value + Case 3 + ch.knowledge_finance = value + Case 4 + ch.knowledge_investigation = value + Case 5 + ch.knowledge_law = value + Case 6 + ch.knowledge_linguistics = value + Case 7 + ch.knowledge_medicine = value + Case 8 + ch.knowledge_occult = value + Case 9 + ch.knowledge_politics = value + Case 10 + ch.knowledge_science = value + End Select +End Sub + +Function GetKnowledge (ch As CharacterType, index As Integer) + Select Case index + Case 1 + GetKnowledge = ch.knowledge_bureaucracy + Case 2 + GetKnowledge = ch.knowledge_computer + Case 3 + GetKnowledge = ch.knowledge_finance + Case 4 + GetKnowledge = ch.knowledge_investigation + Case 5 + GetKnowledge = ch.knowledge_law + Case 6 + GetKnowledge = ch.knowledge_linguistics + Case 7 + GetKnowledge = ch.knowledge_medicine + Case 8 + GetKnowledge = ch.knowledge_occult + Case 9 + GetKnowledge = ch.knowledge_politics + Case 10 + GetKnowledge = ch.knowledge_science + End Select +End Function + +Sub SetBackground (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case 1 + ch.background_allies = value + Case 2 + ch.background_contacts = value + Case 3 + ch.background_fame = value + Case 4 + ch.background_generation = value + Case 5 + ch.background_herd = value + Case 6 + ch.background_influence = value + Case 7 + ch.background_mentor = value + Case 8 + ch.background_resources = value + Case 9 + ch.background_retainers = value + Case 10 + ch.background_status = value + End Select +End Sub + +Function GetBackground (ch As CharacterType, index As Integer) + Select Case index + Case 1 + GetBackground = ch.background_allies + Case 2 + GetBackground = ch.background_contacts + Case 3 + GetBackground = ch.background_fame + Case 4 + GetBackground = ch.background_generation + Case 5 + GetBackground = ch.background_herd + Case 6 + GetBackground = ch.background_influence + Case 7 + GetBackground = ch.background_mentor + Case 8 + GetBackground = ch.background_resources + Case 9 + GetBackground = ch.background_retainers + Case 10 + GetBackground = ch.background_status + End Select +End Function + +Sub FillBackgrounds (ch As CharacterType, backgrounds() As Integer) + For index = 1 To All_Backgrounds_Count + backgrounds(index) = GetBackground(ch, index) + Next +End Sub + +Sub InitializeCharacter (ch As CharacterType) + ch.name = "" + ch.player = "" + ch.chronicle = "" + ch.haven = "" + ch.concept = "" + ch.age = "" + ch.sex = 0 + ch.clan = 0 + ch.nature = 0 + ch.demeanor = 0 + ch.conscience = 0 + ch.selfControl = 0 + ch.courage = 0 + ch.conviction = 0 + ch.instinct = 0 + ' Disciplines + ch.discipline_animalism = 0 + ch.discipline_auspex = 0 + ch.discipline_bardo = 0 + ch.discipline_celerity = 0 + ch.discipline_chimestry = 0 + ch.discipline_dementation = 0 + ch.discipline_dominate = 0 + ch.discipline_fortitude = 0 + ch.discipline_melpominee = 0 + ch.discipline_mortis = 0 + ch.discipline_mytherceria = 0 + ch.discipline_necromancy = 0 + ch.discipline_obeah = 0 + ch.discipline_obfuscate = 0 + ch.discipline_obtenebration = 0 + ch.discipline_potence = 0 + ch.discipline_presence = 0 + ch.discipline_protean = 0 + ch.discipline_quietus = 0 + ch.discipline_serpentis = 0 + ch.discipline_spiritus = 0 + ch.discipline_thanantosis = 0 + ch.discipline_thaumaturgy = 0 + ch.discipline_vicissitude = 0 + ' Attributes + ch.attr_strength = 1 + ch.attr_dexterity = 1 + ch.attr_stamina = 1 + ch.attr_appearance = 1 + ch.attr_charisma = 1 + ch.attr_manipulation = 1 + ch.attr_intelligence = 1 + ch.attr_perception = 1 + ch.attr_wits = 1 + ' Talents + ch.talent_acting = 0 + ch.talent_alertness = 0 + ch.talent_athletics = 0 + ch.talent_brawl = 0 + ch.talent_dodge = 0 + ch.talent_empathy = 0 + ch.talent_intimidation = 0 + ch.talent_leadership = 0 + ch.talent_streetwise = 0 + ch.talent_subterfuge = 0 + ' Skills + ch.skill_animalKen = 0 + ch.skill_drive = 0 + ch.skill_etiquette = 0 + ch.skill_firearms = 0 + ch.skill_melee = 0 + ch.skill_music = 0 + ch.skill_repair = 0 + ch.skill_security = 0 + ch.skill_stealth = 0 + ch.skill_survival = 0 + ' Knowledges + ch.knowledge_bureaucracy = 0 + ch.knowledge_computer = 0 + ch.knowledge_finance = 0 + ch.knowledge_investigation = 0 + ch.knowledge_law = 0 + ch.knowledge_linguistics = 0 + ch.knowledge_medicine = 0 + ch.knowledge_occult = 0 + ch.knowledge_politics = 0 + ch.knowledge_science = 0 + ' Backgrounds + ch.background_allies = 0 + ch.background_contacts = 0 + ch.background_fame = 0 + ch.background_generation = 0 + ch.background_herd = 0 + ch.background_influence = 0 + ch.background_mentor = 0 + ch.background_resources = 0 + ch.background_retainers = 0 + ch.background_status = 0 +End Sub + Sub CharacterGenerator () Dim ch As CharacterType + Call InitializeCharacter(ch) Input "What is the character's name? ", ch.name Input "Who is the player? ", ch.player @@ -297,20 +861,23 @@ Sub CharacterGenerator () If ch.demeanor > All_Archetypes_Count Or ch.demeanor < 1 Then ch.demeanor = GetRandomInt(1, All_Archetypes_Count) ' The character starts with 3 discipline points and they can spend them on one or more disciplines - Dim disciplines(1 To All_Disciplines_Count) As Integer - For i = 1 To All_Disciplines_Count - disciplines(i) = 0 - Next - discipline_points = 3 + DisciplinePoints = 3 - While discipline_points > 0 + ' I don't like having to build an empty array for return values here. Ideally PrintMenuWithValues could take the character and a mapping fn(index) that + ' calls GetDiscipline(ch, index) to fetch the value. At least for BASIC this seems like a better solution. PrintMenuWithValues does piss me off though. + ' I don't want it to exist. I want a formatting function there that takes the character and the index then prints "1 = Bullshit: 3" or something like that. + ' But we can't have nice things like nested custom types, arrays in custom types, or function objects/pointers. + ' TODO: Try to find a better way to do this. + Dim disciplines(All_Disciplines_Count) As Integer + While DisciplinePoints > 0 Cls - Print "Which discipline do you want to spend " + Str$(discipline_points) + " discipline points on?" + Print "Which discipline do you want to spend 1 of your " + Str$(DisciplinePoints) + " discipline points on?" + Call FillDisciplines(ch, disciplines()) Call PrintMenuWithValues(All_Disciplines(), disciplines(), All_Disciplines_Count) discipline = GetChoice(0, All_Disciplines_Count) If discipline = 0 Then discipline = GetRandomInt(1, All_Disciplines_Count) - disciplines(discipline) = disciplines(discipline) + 1 - discipline_points = discipline_points - 1 + Call SetDiscipline(ch, discipline, GetDiscipline(ch, discipline) + 1) + DisciplinePoints = DisciplinePoints - 1 Wend Const All_Attributes_Count = 3 @@ -327,7 +894,7 @@ Sub CharacterGenerator () Print "2 = " + All_Attributes(2) + " "; Print "3 = " + All_Attributes(3) + " "; Print "0 = Random" - Input "Choose your primary attribute?"; PrimaryAttribute + Input "Choose your primary attribute?", PrimaryAttribute If PrimaryAttribute = 0 Then PrimaryAttribute = GetRandomInt(1, All_Attributes_Count) Loop While (PrimaryAttribute > All_Attributes_Count And PrimaryAttribute < 1) @@ -339,29 +906,20 @@ Sub CharacterGenerator () If PrimaryAttribute <> 2 Then Print "2 = " + All_Attributes(2) + " "; If PrimaryAttribute <> 3 Then Print "3 = " + All_Attributes(3) + " "; Print "0 = Random" - Input "Choose your secondary attribute?"; SecondaryAttribute + Input "Choose your secondary attribute?", SecondaryAttribute If SecondaryAttribute = 0 Or SecondaryAttribute = PrimaryAttribute Then SecondaryAttribute = GetRandomInt(1, All_Attributes_Count - 1) If SecondaryAttribute >= PrimaryAttribute Then - PrimaryAttribute = PrimaryAttribute + 1 + SecondaryAttribute = SecondaryAttribute + 1 End If End If - Loop Until SecondaryAttribute >= 1 And SecondaryAttribute <= 3 + Loop Until SecondaryAttribute >= 1 And SecondaryAttribute <= 3 And SecondaryAttribute <> PrimaryAttribute ' General formula for last choice is ' Sum(1..AllAttributesCount)-Sum(Choice[1]..Choice[AllAttributesCount-1]) TertiaryAttribute = 2 * All_Attributes_Count - PrimaryAttribute - SecondaryAttribute - ' Initialize all attributes to 1 - ch.attr_strength = 1 - ch.attr_dexterity = 1 - ch.attr_stamina = 1 - ch.attr_appearance = 1 - ch.attr_charisma = 1 - ch.attr_manipulation = 1 - ch.attr_intelligence = 1 - ch.attr_perception = 1 - ch.attr_wits = 1 - + ' TODO: Make this less annoying. I want three assignments not three switches. I also want it to be tied to a const instead of 3. + ' TODO: The point values themselves (7, 5, and 3) should be consts themselves or a formula. ' Initialize physical, social, and mental points Select Case PrimaryAttribute Case 1 @@ -391,6 +949,11 @@ Sub CharacterGenerator () ' Spend physical points Do Cls + ' TODO: Make this less hard-coded. Attribute names should be pulled from All_* arrays. The menu should be printed with PrintMenu. + ' We have 6 uses of this block and I want them to be 6 sub calls passing in arrays. Something like: + ' Call SpendPoint(ch, attrGroup) that could lookup GetAllAttributesInGroup(group) to get Str, dex, sta, ... + ' That could "return" an array filled with {index, value} pairs and then use PrintMenuWithValues to actually print the values + ' Still need a way to handle GetChoice([0, 1, 3]) or whatever it looks like. Maybe an array of another struct like {index, hidden}. Print "Your physical attributes are:" Print "Strength " + Str$(ch.attr_strength) + ", Dexterity " + Str$(ch.attr_dexterity) + ", Stamina " + Str$(ch.attr_stamina) Print "Which attribute would you like to add 1 of your " + Str$(PhysicalPoints) + " points to?" @@ -448,68 +1011,123 @@ Sub CharacterGenerator () MentalPoints = MentalPoints - 1 Loop While MentalPoints > 0 - ' TODO: Choose priorities for talents/skills/knowledges - 'Print "1 = Talents 2 = Skills 3 = Knowledges 0 = Random" - 'Print "Which is your primary Ability? " - 'Print "Which is your secondary Ability? " - 'Print "Which is your tertiary Ability? " + ' TODO: Find a more general form for this that stores the chosen abilities in an array + Dim PrimaryAbility As Integer + Do + Cls + Print "1 = " + All_Abilities(1) + " "; + Print "2 = " + All_Abilities(2) + " "; + Print "3 = " + All_Abilities(3) + " "; + Print "0 = Random" + Input "Choose your primary ability?", PrimaryAbility + If PrimaryAbility = 0 Then PrimaryAbility = GetRandomInt(1, All_Abilities_Count) + Loop While (PrimaryAbility > All_Abilities_Count And PrimaryAbility < 1) - ' TODO: Spend talent points - 'Your Talents are: - ' 1 = Acting: 0 - ' 2 = Alertness: 0 - ' 3 = Athletics: 0 - ' 4 = Brawl: 0 - ' 5 = Dodge: 0 - ' 6 = Empathy: 0 - ' 7 = Intimidation: 0 - ' 8 = Leadership: 0 - ' 9 = Streetwise: 0 - '10 = Subterfuge: 0 - 'Which would you like to add 1 of your 5 points to? + Dim SecondaryAbility As Integer + Dim TertiaryAbility As Integer + Do + Cls + If PrimaryAbility <> 1 Then Print "1 = " + All_Abilities(1) + " "; + If PrimaryAbility <> 2 Then Print "2 = " + All_Abilities(2) + " "; + If PrimaryAbility <> 3 Then Print "3 = " + All_Abilities(3) + " "; + Print "0 = Random" + Input "Choose your secondary ability?", SecondaryAbility + If SecondaryAbility = 0 Or SecondaryAbility = PrimaryAbility Then + SecondaryAbility = GetRandomInt(1, All_Abilities_Count - 1) + If SecondaryAbility >= PrimaryAbility Then + SecondaryAbility = SecondaryAbility + 1 + End If + End If + Loop Until SecondaryAbility >= 1 And SecondaryAbility <= 3 And SecondaryAbility <> PrimaryAbility + TertiaryAbility = 2 * All_Abilities_Count - PrimaryAbility - SecondaryAbility - ' TODO: Spend skill points - 'Your Skills are: - ' 1 = Animal Ken: 0 - ' 2 = Drive: 0 - ' 3 = Etiquette: 0 - ' 4 = Firearms: 0 - ' 5 = Melee: 0 - ' 6 = Music: 0 - ' 7 = Repair: 0 - ' 8 = Security: 0 - ' 9 = Stealth: 0 - '10 = Survival: 0 - 'Which would you like to add 1 of your 13 points to? + ' Initialize talent, skill, knowledge points + Select Case PrimaryAbility + Case 1 + TalentPoints = 13 + Case 2 + SkillPoints = 13 + Case 3 + KnowledgePoints = 13 + End Select + Select Case SecondaryAbility + Case 1 + TalentPoints = 9 + Case 2 + SkillPoints = 9 + Case 3 + KnowledgePoints = 9 + End Select + Select Case TertiaryAbility + Case 1 + TalentPoints = 5 + Case 2 + SkillPoints = 5 + Case 3 + KnowledgePoints = 5 + End Select - ' TODO: Spend knowledge points - 'Your Knowledges are: - ' 1 = Bureaucracy: 0 - ' 2 = Computer: 0 - ' 3 = Finance: 0 - ' 4 = Investigation: 0 - ' 5 = Law: 0 - ' 6 = Linguistics: 0 - ' 7 = Medicine: 0 - ' 8 = Occult: 0 - ' 9 = Politics: 0 - '10 = Science: 0 - 'Which would you like to add 1 of your 9 points to? + Print "Primary: " + Str$(PrimaryAbility) + ", Secondary: " + Str$(SecondaryAbility) + ", Tertiary: " + Str$(TertiaryAbility) + Print "Talents: " + Str$(TalentPoints) + ", Skills: " + Str$(SkillPoints) + ", Knowledges: " + Str$(KnowledgePoints) + Input A - ' TODO: Spend background points - ' 1 = Allies 0 - ' 2 = Contacts 0 - ' 3 = Fame 0 - ' 4 = Generation 0 - ' 5 = Herd 0 - ' 6 = Influence 0 - ' 7 = Mentor 0 - ' 8 = Resources 0 - ' 9 = Retainers 0 - '10 = Status 0 - 'Which Background would you like to spend 1 of your remaining 5 on? + ' Spend talent points + Do + Cls + Print "Which talent would you like to spend 1 of your " + Str$(TalentPoints) + " points on?" + Print " 0 = Random" + For index = 1 To All_Talents_Count + Print MakeFitR$(Str$(index), 2, " ") + " = " + MakeFitL$(All_Talents(index) + ":", 20, " ") + " " + MakeFitR$(Str$(GetTalent(ch, index)), 3, " ") + Next + talent = GetChoice(0, All_Talents_Count) + If talent = 0 Then talent = GetRandomInt(1, All_Talents_Count) + Call SetTalent(ch, talent, GetTalent(ch, talent) + 1) + TalentPoints = TalentPoints - 1 + Loop While TalentPoints > 0 - ' TODO: Choose your road + ' Spend skill points + Do + Cls + Print "Which skill would you like to spend 1 of your " + Str$(SkillPoints) + " points on?" + Print " 0 = Random" + For index = 1 To All_Skills_Count + Print MakeFitR$(Str$(index), 2, " ") + " = " + MakeFitL$(All_Skills(index) + ":", 20, " ") + " " + MakeFitR$(Str$(GetSkill(ch, index)), 3, " ") + Next + skill = GetChoice(0, All_Skills_Count) + If skill = 0 Then skill = GetRandomInt(1, All_Skills_Count) + Call SetSkill(ch, skill, GetSkill(ch, skill) + 1) + SkillPoints = SkillPoints - 1 + Loop While SkillPoints > 0 + + 'Spend knowledge points + Do + Cls + Print "Which knowledge would you like to spend 1 of your " + Str$(KnowledgePoints) + " points on?" + Print " 0 = Random" + For index = 1 To All_Knowledges_Count + Print MakeFitR$(Str$(index), 2, " ") + " = " + MakeFitL$(All_Knowledges(index) + ":", 20, " ") + " " + MakeFitR$(Str$(GetKnowledge(ch, index)), 3, " ") + Next + knowledge = GetChoice(0, All_Knowledges_Count) + If knowledge = 0 Then knowledge = GetRandomInt(1, All_Knowledges_Count) + Call SetKnowledge(ch, knowledge, GetKnowledge(ch, knowledge) + 1) + KnowledgePoints = KnowledgePoints - 1 + Loop While KnowledgePoints > 0 + + ' Spend background points + BackgroundPoints = 5 + Dim backgrounds(All_Backgrounds_Count) As Integer + While BackgroundPoints > 0 + Cls + Print "Which background do you want to spend 1 of your " + Str$(BackgroundPoints) + " background points on?" + Call FillBackgrounds(ch, backgrounds()) + Call PrintMenuWithValues(All_Backgrounds(), backgrounds(), All_Backgrounds_Count) + background = GetChoice(0, All_Backgrounds_Count) + If background = 0 Then background = GetRandomInt(1, All_Backgrounds_Count) + Call SetBackground(ch, background, GetBackground(ch, background) + 1) + BackgroundPoints = BackgroundPoints - 1 + Wend + + ' TODO: Choose your road. This is only for dark ages so skip for now '1 = Road of the Beast - Feed the beast so it will not break loose. '2 = Road of Blood - Blood grants the power for revenge. '3 = Road of Chivalry - Treat your equals with honor and your betters with respect. @@ -527,28 +1145,25 @@ Sub CharacterGenerator () 'Which virtue do you wish to add one of your 7 points to? '... 0123456789 - '160 、ぅΗ┤ - '170 葦桶 - '180 患況弦沙悉 - '190 梢請唾津毒 - '200 班碧麺力佰 - '210 厶壞嶐慵无 - '220 槿渤珀矣粤 - '230 肄蓍裨2跋鈿 + '160 叩鱈坦炭単捉尊多 + '170 測遜村臓束損 + '180 も≠≒b + '190 癌錫 + '200 р + '210 モ + '220 留裡 + '230 袖陸立隆2竜 ' Where do you want the file to be saved? (default is C:\Windows\Desktop)? ' What do you want the file to be called? (default is CHAR1)? - ' enquote forms s/^([漂藩].*[産執])$/print "$1"/g - Input a - ' TODO: figure out how to actually calculate generation + ' enquote forms s/^([].*[])$/print "$1"/g + + ' TODO: figure out how to actually calculate generation; seems like a combination of 13 or 15 depending on clan and your generation background count generation$ = "13" If ch.sex = 1 Then sex_string$ = "Male" Else sex_string$ = "Female" clan_string$ = All_Clans(ch.clan) - Dim discipline_strings$(3) - discipline_1_string$ = "" - discipline_2_string$ = "" - discipline_3_string$ = "" + Dim discipline_strings(3) As String discipline_strings_index = 0 For index = 1 To All_Disciplines_Count If disciplines(index) > 0 Then @@ -556,76 +1171,63 @@ Sub CharacterGenerator () If disciplines(index) > 1 Then suffix$ = " x" + Str$(disciplines(index)) End If - discipline_strings$(discipline_strings_index) = All_Disciplines(index) + suffix$ + discipline_strings(discipline_strings_index) = All_Disciplines(index) + suffix$ + End If + Next + + Dim background_strings(5) As String + background_strings_index = 0 + For index = 1 To All_Backgrounds_Count + If backgrounds(index) > 0 Then + suffix$ = "" + If backgrounds(index) > 1 Then + suffix$ = " x" + Str$(backgrounds(index)) + End If + background_strings$(background_strings_index) = All_Backgrounds(index) + suffix$ End If Next Cls - Print "浜様様様様様様様様様様様様様様様様様様曜様様様様様様様様様様様様様様様様様様様融" - Print " Name: " + MakeFitL$(ch.name, 30, " ") + " Sex: " + MakeFitL$(sex_string$, 10, " ") + " Generation: " + MakeFitL$(generation$, 9, " ") + " " - Print " Clan: " + MakeFitL$(clan_string$, 30, " ") + " Age: " + MakeFitL$(age$, 32, " ") + " " - Print "麺様様様様様様様様様様様様様様様様様様郵 Player: " + MakeFitL$(player$, 29, " ") + " " - Print " Attributes Chronicle: " + MakeFitL$(chronicle$, 26, " ") + " " - Print " Physical Social Mental Haven: " + MakeFitL$(haven$, 30, " ") + " " - Print " Str. " + MakeFitL$(Str$(ch.attr_strength), 7, " ") + " App. " + MakeFitL$(Str$(ch.attr_appearance), 7, " ") + " Int. " + MakeFitL$(Str$(ch.attr_intelligence), 5, " ") + " Concept: " + MakeFitL$(concept$, 28, " ") + " " - Print " Dex. " + MakeFitL$(Str$(ch.attr_dexterity), 7, " ") + " Cha. " + MakeFitL$(Str$(ch.attr_charisma), 7, " ") + " Per. " + MakeFitL$(Str$(ch.attr_perception), 5, " ") + " 麺様様様様様様様様様様様様様様様様様様様" - Print " Sta. " + MakeFitL$(Str$(ch.attr_stamina), 7, " ") + " Man. " + MakeFitL$(Str$(ch.attr_manipulation), 7, " ") + " Wit. " + MakeFitL$(Str$(ch.attr_wits), 5, " ") + " Derangements: " - Print "麺様様様様様様様様様様様様様様様様様様郵 Regression,__________________________ " - Print " Disciplines: _____________________________________ " - Print " " + MakeFitL$(discipline_strings$(0), 36, " ") + " _____________________________________ " - Print " " + MakeFitL$(discipline_strings$(1), 36, " ") + " _____________________________________ " - Print " " + MakeFitL$(discipline_strings$(2), 36, " ") + " _____________________________________ " - Print "麺様様様様様様様様様様様様様様様様様様洋様様様様様様様様様様様様様様様様様様様郵" - Print " Typhon: 7 Nature: " + MakeFitL$(All_Archetypes(ch.nature), 29, " ") + " " - Print " Willpower: 3 Demeanor: " + MakeFitL$(All_Archetypes(ch.demeanor), 27, " ") + " " - Print "麺様様様様様様様様様様様様様様様様様様擁様様様様様様様様様様様様様様様様様様様郵" - Print " " - Print " " - Print " " - Print " <> " - Print "藩様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様夕" - Input a - Print "浜様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様融" - Print " Abilities " - Print " Talents Skills Knowledges " - Print " Acting: 2 Animal Ken: 1 Bureaucracy: 0 " - Print " Alertness: 1 Drive: 1 Computer: 1 " - Print " Athletics: 1 Etiquette: 0 Finance: 0 " - Print " Brawl: 2 Firearms: 2 Investigation: 0 " - Print " Dodge: 3 Melee: 0 Law: 0 " - Print " Empathy: 0 Music: 0 Linguistics: 2 " - Print " Intimidation: 0 Repair: 2 Medecine: 1 " - Print " Leadership: 1 Security: 1 Occult: 0 " - Print " Streetwise: 1 Stealth: 2 Politics: 1 " - Print " Subterfuge: 2 Survival: 0 Science: 0 " - Print "麺様様様様様様様様様様様様様様様様様様曜様様様様様様様様様様様様様様様様様様様郵" - Print " Backgrounds: Virtues: " - Print " Allies Conscience: 0 " - Print " Allies Conviction: 4 " - Print " Contacts Instinct: 3 " - Print " Resources Self-Control: 0 " - Print " Status Courage: 3 " - Print "麺様様様様様様様様様様様様様様様様様様擁様様様様様様様様様様様様様様様様様様様郵" - Print " <> " - Print "藩様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様夕" - - - - - - - - - - - - - - - - - - + Print "" + Print " Name: " + MakeFitL$(ch.name, 30, " ") + " Sex: " + MakeFitL$(sex_string$, 10, " ") + " Generation: " + MakeFitL$(generation$, 9, " ") + " " + Print " Clan: " + MakeFitL$(clan_string$, 30, " ") + " Age: " + MakeFitL$(age$, 32, " ") + " " + Print " Player: " + MakeFitL$(player$, 29, " ") + " " + Print " Attributes Chronicle: " + MakeFitL$(chronicle$, 26, " ") + " " + Print " Physical Social Mental Haven: " + MakeFitL$(haven$, 30, " ") + " " + Print " Str. " + MakeFitL$(Str$(ch.attr_strength), 7, " ") + " App. " + MakeFitL$(Str$(ch.attr_appearance), 7, " ") + " Int. " + MakeFitL$(Str$(ch.attr_intelligence), 5, " ") + " Concept: " + MakeFitL$(concept$, 28, " ") + " " + Print " Dex. " + MakeFitL$(Str$(ch.attr_dexterity), 7, " ") + " Cha. " + MakeFitL$(Str$(ch.attr_charisma), 7, " ") + " Per. " + MakeFitL$(Str$(ch.attr_perception), 5, " ") + " " + Print " Sta. " + MakeFitL$(Str$(ch.attr_stamina), 7, " ") + " Man. " + MakeFitL$(Str$(ch.attr_manipulation), 7, " ") + " Wit. " + MakeFitL$(Str$(ch.attr_wits), 5, " ") + " Derangements: " + Print " Regression,__________________________ " + Print " Disciplines: _____________________________________ " + Print " " + MakeFitL$(discipline_strings(0), 36, " ") + " _____________________________________ " + Print " " + MakeFitL$(discipline_strings(1), 36, " ") + " _____________________________________ " + Print " " + MakeFitL$(discipline_strings(2), 36, " ") + " _____________________________________ " + Print "" + Print " Typhon: 7 Nature: " + MakeFitL$(All_Archetypes(ch.nature), 29, " ") + " " + Print " Willpower: 3 Demeanor: " + MakeFitL$(All_Archetypes(ch.demeanor), 27, " ") + " " + Print "" + Print " " + Print " " + Print " " + Print " <> " + Print "" + Input A + Print "" + Print " " + MakeFitC$("Abilities", 76, " ") + " " + Print " " + MakeFitC$("Talents", 25, " ") + " " + MakeFitC$("Skills", 25, " ") + " " + MakeFitC$("Knowledges", 24, " ") + " " + For index = 1 To 10 + Print " " + MakeFitC(MakeFitL$(All_Talents(index) + ":", 14, " ") + Str$(GetTalent(ch, index)), 25, " ") + " " + MakeFitC(MakeFitL$(All_Skills(index) + ":", 14, " ") + Str$(GetSkill(ch, index)), 25, " ") + " " + MakeFitC(MakeFitL$(All_Knowledges(index) + ":", 14, " ") + Str$(GetKnowledge(ch, index)), 24, " ") + " " + Next + Print "" + Print " Backgrounds: Virtues: " + Print " " + MakeFitL$(background_strings(0), 36, " ") + " " + MakeFitL$(MakeFitL$("Conscience:", 14, " ") + MakeFitR$(Str$(ch.conscience), 2, " "), 37, " ") + " " + Print " " + MakeFitL$(background_strings(1), 36, " ") + " " + MakeFitL$(MakeFitR$("Conviction:", 14, " ") + MakeFitR$(Str$(ch.conviction), 2, " "), 37, " ") + " " + Print " " + MakeFitL$(background_strings(2), 36, " ") + " " + MakeFitL$(MakeFitR$("Instinct:", 14, " ") + MakeFitR$(Str$(ch.instinct), 2, " "), 37, " ") + " " + Print " " + MakeFitL$(background_strings(3), 36, " ") + " " + MakeFitL$(MakeFitR$("Self-Control:", 14, " ") + MakeFitR$(Str$(ch.selfControl), 2, " "), 37, " ") + " " + Print " " + MakeFitL$(background_strings(4), 36, " ") + " " + MakeFitL$(MakeFitR$("Courage:", 14, " ") + MakeFitR$(Str$(ch.courage), 2, " "), 37, " ") + " " + Print "" + Print " <> " + Print "" While InKey$ = "": Wend End Sub