diff --git a/TODO.md b/TODO.md index 78298d6..257067b 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,4 @@ # High Priority -* Calculate generation. * Calculate conscience. * Calculate conviction. * Calculate instinct. @@ -18,12 +17,16 @@ * Spending virtue points # Low Priority +* Add freebie points see page 92 VtM + * After other generation steps allow spending the freebie points on adding dots to the sheet. This should be a nested menu like "What do you want to spend points on? -> Which of those things do you want to add a dot to? + * We probably want to show the character sheet before asking or give the user a way to display it in the main menu of this section. * Rename items, abilities/abilities, abilityGroups rename the shared arrays and constants too * Change CharacterType to use fields like attribute_1_1 instead of attr_strength * Same for abilities like knowledge_computer -> ability_3_2, background_allies -> background_1, and discipline_obeah -> discipline_13. * This would let us hard-code a given number of those fields so other format plugins can use up to that number at least. * See if other combinations of clan and other variables cause missed questions. * Add blood pool to sheet and figure out what should replace it for non-vampires. + * Generation affects blood pool page 173 VtM. * Create a way to choose between VtM, VtDA, and WtA then load the appropriate lookup tables. * Completely generic plugin support would be great, but not possible. * Have specific predefined rulsets in the app. diff --git a/dos/sbf/sbf.bas b/dos/sbf/sbf.bas index 5d1e3ac..413b92f 100644 --- a/dos/sbf/sbf.bas +++ b/dos/sbf/sbf.bas @@ -19,6 +19,7 @@ Const TRUE = Not FALSE Const DISCIPLINE_POINTS = 3 Const BACKGROUND_POINTS = 5 +Const INITIAL_GENERATION = 13 ' Each set of these index constants "NAME_*" should start at 1 and go up to NAMES_COUNT without leaving any holes. ' This also goes the same for sub indexes like NAME_GROUP_SUBGROUP_* each NAME_GROUP_* set should have GetNumNamesInGroup(NAME_GROUP) items. @@ -654,6 +655,10 @@ Function MakeFitR$ (text As String, length As Integer, pad As String) MakeFitR = Right$(String$(length, pad) + text, length) End Function +Function MakeFitB$ (prefix As String, suffix As String, length As Integer, pad As String) + MakeFitB$ = MakeFitL$(MakeFitL$(prefix, length - Len(suffix), pad), length, pad) +End Function + Function MaxI (val1 As Integer, val2 As Integer) If (val1 > val2) Then MaxI = val1 @@ -1246,23 +1251,12 @@ Sub CGGetAttributes (ch As CharacterType) ranks(nextGroup) = i rankSum = rankSum + i + 1 groupSum = groupSum + nextGroup - Print "rank: " + itos$(i) + ", nextGroup: " + itos$(nextGroup) + ", rankSum: " + itos$(rankSum) + ", groupSum: " + itos$(groupSum) - Input a Next ' General formula for last choice given 1 to count based indexing is this ' (Sum from 1 to count) - (Sum of all previous choice IDs) ' Sum(1..AllAttributesCount)-Sum(Choice[1]..Choice[AllAttributesCount-1]) - Print "rank: " + itos$(i) + ", nextGroup: " + itos$(nextGroup) + ", rankSum: " + itos$(rankSum) + ", groupSum: " + itos$(groupSum) + ", lastGroup: " + itos$(lastGroup) lastGroup = rankSum - groupSum ranks(lastGroup) = ATTRIBUTE_GROUPS_COUNT - For i = 1 To ATTRIBUTE_GROUPS_COUNT - Print "ranks(" + itos$(i) + "): " + itos$(ranks(i)) - Next - - For i = 1 To ATTRIBUTE_GROUPS_COUNT - Print "ranks(" + AttributeGroups(i) + "): " + itos$(ranks(i)) - Next - Input a ' Spend attribute points For group = 1 To ATTRIBUTE_GROUPS_COUNT @@ -1310,14 +1304,6 @@ Sub CGGetAbilities (ch As CharacterType) ' Sum(1..AllAttributesCount)-Sum(Choice[1]..Choice[AllAttributesCount-1]) lastGroup = rankSum - groupSum ranks(lastGroup) = ABILITY_GROUPS_COUNT - For i = 1 To ABILITY_GROUPS_COUNT - Print "ranks(" + itos$(i) + "): " + itos$(ranks(i)) - Next - - For i = 1 To ABILITY_GROUPS_COUNT - Print "ranks(" + AbilityGroups(i) + "): " + itos$(ranks(i)) - Next - Input a ' Spend ability points For group = 1 To ABILITY_GROUPS_COUNT @@ -1392,6 +1378,7 @@ Sub CharacterGenerator () Call CGGetDisciplines(ch) Call CGGetAttributes(ch) Call CGGetAbilities(ch) + Call CGGetBackgrounds(ch) Call CGGetRoad(ch) Call CGSpendVirtuePoints(ch) @@ -1400,7 +1387,8 @@ Sub CharacterGenerator () ch.instinct = 3 ' TODO: figure out how to actually calculate generation; seems like a combination of 13 or 15 depending on clan and your generation background count - ch.generation = 13 + ' Generation starts at 13 and goes down 1 point per point of the "generation" background. + ch.generation = INITIAL_GENERATION - GetBackground(ch, BACKGROUND_GENERATION) ' TODO: figure out how to calculate willpower ch.willpower = 10 @@ -1459,7 +1447,7 @@ Sub ShowCharacterSheet (ch As CharacterType) ' TODO: Make the string fields show a full width "_" string for "empty lines" when printed. Cls Print "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»" - Print "º Name: " + MakeFitL$(ch.name, 30, " ") + " º Sex: " + MakeFitL$(Genders(ch.gender), 10, " ") + " Generation: " + MakeFitL$(itos$(ch.generation), 9, " ") + " º" + Print "º Name: " + MakeFitL$(ch.name, 30, " ") + " º Gender: " + MakeFitL$(Genders(ch.gender), 14, " ") + " Generation: " + MakeFitR$(itos$(ch.generation), 2, " ") + " º" Print "º Clan: " + MakeFitL$(Clans(ch.clan), 30, " ") + " º Age: " + MakeFitL$(ch.age$, 32, " ") + " º" Print "ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ Player: " + MakeFitL$(ch.player$, 29, " ") + " º" Print "º Attributes º Chronicle: " + MakeFitL$(ch.chronicle$, 26, " ") + " º" @@ -1481,7 +1469,7 @@ Sub ShowCharacterSheet (ch As CharacterType) Print "º º" Print "º <> º" Print "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ" - While InKey$ = "": Wend + Call PressAnyKeyToContinue Print "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»" Print "º " + MakeFitC$("Abilities", 76, " ") + " º" @@ -1499,7 +1487,7 @@ Sub ShowCharacterSheet (ch As CharacterType) Print "ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹" Print "º <> º" Print "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ" - While InKey$ = "": Wend + Call PressAnyKeyToContinue End Sub Sub FillAttributeValues (ch As CharacterType, values() As Integer, groupIndex As Integer) @@ -1542,6 +1530,10 @@ Sub VehicleGenerator Print "VehicleGenerator" End Sub +Sub PressAnyKeyToContinue () + While InKey$ = "": Wend +End Sub + Function GetNumAttributesInGroup (index As Integer) Select Case index Case ATTRIBUTE_GROUP_PHYSICAL