diff --git a/dos/sbf/sbf.bas b/dos/sbf/sbf.bas index 36607d7..8720026 100644 --- a/dos/sbf/sbf.bas +++ b/dos/sbf/sbf.bas @@ -278,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 @@ -319,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) @@ -358,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 @@ -880,13 +880,42 @@ Sub CharacterGenerator () DisciplinePoints = DisciplinePoints - 1 Wend - Const All_Attributes_Count = 3 - Dim All_Attributes(1 To All_Attributes_Count) As String - All_Attributes(1) = "Physical" - All_Attributes(2) = "Social" - All_Attributes(3) = "Mental" + ' This would work, but I want a Print... function to print something like a sparse array to hide the already selected option. + ' It seems like a lot of work to support other sets of attributes and the code is only reused once for abilities. + 'Const All_Attribute_Groups_Count = 3 + 'Dim All_Attribute_Groups(1 To All_Attribute_Groups_Count) As String + 'Const ATTRIBUTE_GROUP_PHYSICAL = 1 + 'Const ATTRIBUTE_GROUP_SOCIAL = 2 + 'Const ATTRIBUTE_GROUP_MENTAL = 3 + 'All_Attribute_Groups(ATTRIBUTE_GROUP_PHYSICAL) = "Physical" + 'All_Attribute_Groups(ATTRIBUTE_GROUP_SOCIAL) = "Social" + 'All_Attribute_Groups(ATTRIBUTE_GROUP_MENTAL) = "Mental" + 'Const ATTRIBUTE_STRENGTH = 1 + 'Const ATTRIBUTE_DEXTERITY = 2 + 'Const ATTRIBUTE_STAMINA = 3 + 'Const ATTRIBUTE_APPEARANCE = 1 + 'Const ATTRIBUTE_CHARISMA = 2 + 'Const ATTRIBUTE_MANIPULATION = 3 + 'Const ATTRIBUTE_INTELLIGENCE = 1 + 'Const ATTRIBUTE_PERCEPTION = 2 + 'Const ATTRIBUTE_WITS = 3 + 'Dim PrimaryAttributeGroup As Integer + 'Do + ' Cls + ' For index = 1 To All_Attribute_Groups_Count + ' Print Str$(index) + " = " + All_Attribute_Groups(index) + " "; + ' Next + ' Print "0 = Random" + ' Input "Choose your primary attribute?", PrimaryAttribute + ' If PrimaryAttribute = 0 Then PrimaryAttribute = GetRandomInt(1, All_Attribute_Groups_Count) + 'Loop While PrimaryAttribute > All_Attribute_Groups_Count And PrimaryAttribute < 1 + + + 'SetAttribute(ch, group, attr, value) ' TODO: Find a more general form for this that stores the chosen attributes in an array + ' Most of the way this works just pisses me off. The second do loop is the worst part. I want it to be 1 = ..., 2 = ..., 0 = Random + ' If I can't have that then maybe at least something with less code or less reliance on there being 3 attribute groups. Dim PrimaryAttribute As Integer Do Cls @@ -971,6 +1000,22 @@ Sub CharacterGenerator () PhysicalPoints = PhysicalPoints - 1 Loop While PhysicalPoints > 0 + ' Something like this might work better + 'attr_group_index = 0 ' for 1 to all_attribute_groups_count + 'Points = 0 + 'Do + ' Cls + ' attr_count = GetAttributeCountInAttributeGroup(attr_group_index) + ' Dim attrs(attr_count) As String + ' Call FillAttributesFromGroup(attrs, attr_group_index) + ' Print "Which attribute would you like to spend 1 of your " + Str$(Points) + " points on?" + ' PrintMenuWithValues(attrs, values, states, showRandom) + ' attr = GetChoice(states, showRandom) + ' if (attr = 0 then attr = GetRandomIndex(1, attr_count, states) + ' SetAttribute(ch, attr_group_index, attr, GetAttribute(ch, attr_group_index, attr) + 1) + ' points = points - 1 + 'Loop While Points > 0 + ' Spend social points Do Cls @@ -1145,18 +1190,18 @@ 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 + '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 + ' 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" @@ -1188,46 +1233,46 @@ Sub CharacterGenerator () 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 "╚══════════════════════════════════════════════════════════════════════════════╝" + 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, " ") + " ║" + 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, " ") + " ║" + 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 "╚══════════════════════════════════════════════════════════════════════════════╝" + 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