From 4b4fda698f6317b37685aa358a9e09dde03466da Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 21 Apr 2023 22:44:34 -0700 Subject: [PATCH] Updates comment in sbf.h with latest qb source. --- sbf-cpp/sbf.h | 2134 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 1996 insertions(+), 138 deletions(-) diff --git a/sbf-cpp/sbf.h b/sbf-cpp/sbf.h index 696334d..ffe0607 100644 --- a/sbf-cpp/sbf.h +++ b/sbf-cpp/sbf.h @@ -1,4 +1,4 @@ -#ifndef SBF_H__ +#ifndef SBF_H__ #define SBF_H__ /*************************************************************************************** * @file sbf.h @@ -27,7 +27,489 @@ const int kInitialGeneration = 13; $Debug ' Setup Randomize Timer + +Const FALSE = 0 +Const TRUE = Not FALSE +Const isDebugging = TRUE + +Const INITIAL_GENERATION = 13 + +Const COLOR_DARK_BLACK = 0 +Const COLOR_DARK_BLUE = 1 +Const COLOR_DARK_GREEN = 2 +Const COLOR_DARK_CYAN = 3 +Const COLOR_DARK_RED = 4 +Const COLOR_DARK_MAGENTA = 5 +Const COLOR_DARK_ORANGE = 6 +Const COLOR_DARK_YELLOW = 6 +Const COLOR_DARK_WHITE = 7 +Const COLOR_BRIGHT_BLACK = 8 +Const COLOR_BRIGHT_BLUE = 9 +Const COLOR_BRIGHT_GREEN = 10 +Const COLOR_BRIGHT_CYAN = 11 +Const COLOR_BRIGHT_RED = 12 +Const COLOR_BRIGHT_MAGENTA = 13 +Const COLOR_BRIGHT_ORANGE = 14 +Const COLOR_BRIGHT_YELLOW = 14 +Const COLOR_BRIGHT_WHITE = 15 + +Const COLOR_FOREGROUND_DEFAULT = COLOR_DARK_WHITE +Const COLOR_BACKGROUND_DEFAULT = COLOR_DARK_BLACK + +Dim Shared ScreenColor As Integer +ScreenColor = COLOR_FOREGROUND_DEFAULT + +Type MenuStyle + idWidth As Integer + labelWidth As Integer + valueWidth As Integer + screenWidth As Integer + randomItemName As String + randomItemId As Integer + randomItemColor as integer + cancelItemName As String + cancelItemId As Integer + cancelItemColor as integer + idLabelSeparator As String + labelValueSeparator As String + menuItemSpacer As String + showRandom As Integer + showCancel as integer + useColors As Integer +End Type + +Type MenuItem + label As String + id As Integer + value As Integer + color As Integer + isVisible As Integer + includeInRandom as integer +End Type + +' 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. Const CLAN_ANARCH = 1 Const CLAN_ASSAMITE = 2 Const CLAN_BAALI = 3 Const +CLAN_BRUJAH = 4 Const CLAN_CAITIFF = 5 Const CLAN_CAPPADOCIAN = 6 Const CLAN_GANGREL = 7 Const CLAN_GIOVANNI = 8 Const +CLAN_INCONNU = 9 Const CLAN_LASOMBRA = 10 Const CLAN_MALKAVIAN = 11 Const CLAN_NOSFERATU = 12 Const CLAN_RAVANOS = 13 +Const CLAN_SETTITE = 14 +Const CLAN_TREMERE = 15 +Const CLAN_TOREADOR = 16 +Const CLAN_TZISMICE = 17 +Const CLAN_VENTRUE = 18 +Const CLANS_COUNT = 18 +Dim Shared Clans(1 To CLANS_COUNT) As String + +Const ARCHETYPE_ARCHITECT = 1 +Const ARCHETYPE_AUTOCRAT = 2 +Const ARCHETYPE_BARBARIAN = 3 +Const ARCHETYPE_BON_VIVANT = 4 +Const ARCHETYPE_BRAVO = 5 +Const ARCHETYPE_CAREGIVER = 6 +Const ARCHETYPE_CARETAKER = 7 +Const ARCHETYPE_CELEBRANT = 8 +Const ARCHETYPE_CHILD = 9 +Const ARCHETYPE_CONFORMIST = 10 +Const ARCHETYPE_CONNIVER = 11 +Const ARCHETYPE_CURMUDGEON = 12 +Const ARCHETYPE_DEFENDER = 13 +Const ARCHETYPE_DEVIANT = 14 +Const ARCHETYPE_DIRECTOR = 15 +Const ARCHETYPE_FANATIC = 16 +Const ARCHETYPE_GALLANT = 17 +Const ARCHETYPE_INNOVATOR = 18 +Const ARCHETYPE_JESTER = 19 +Const ARCHETYPE_JUDGE = 20 +Const ARCHETYPE_LONER = 21 +Const ARCHETYPE_MARTYR = 22 +Const ARCHETYPE_MONSTER = 23 +Const ARCHETYPE_PENITENT = 24 +Const ARCHETYPE_REBEL = 25 +Const ARCHETYPE_ROGUE = 26 +Const ARCHETYPE_SURVIVOR = 27 +Const ARCHETYPE_TRADITIONALIST = 28 +Const ARCHETYPE_TYRANT = 29 +Const ARCHETYPE_VISIONARY = 30 +Const ARCHETYPES_COUNT = 30 +Dim Shared Archetypes(1 To ARCHETYPES_COUNT) As String + +Const DISCIPLINE_POINTS = 3 +Const DISCIPLINE_ANIMALISM = 1 +Const DISCIPLINE_AUSPEX = 2 +Const DISCIPLINE_BARDO = 3 +Const DISCIPLINE_CELERITY = 4 +Const DISCIPLINE_CHIMESTRY = 5 +Const DISCIPLINE_DEMENTATION = 6 +Const DISCIPLINE_DOMINATE = 7 +Const DISCIPLINE_FORTITUDE = 8 +Const DISCIPLINE_MELPOMINEE = 9 +Const DISCIPLINE_MORTIS = 10 +Const DISCIPLINE_MYTHERCERIA = 11 +Const DISCIPLINE_NECROMANCY = 12 +Const DISCIPLINE_OBEAH = 13 +Const DISCIPLINE_OBFUSCATE = 14 +Const DISCIPLINE_OBTENEBRATION = 15 +Const DISCIPLINE_POTENCE = 16 +Const DISCIPLINE_PRESENCE = 17 +Const DISCIPLINE_PROTEAN = 18 +Const DISCIPLINE_QUIETUS = 19 +Const DISCIPLINE_SERPENTIS = 20 +Const DISCIPLINE_SPIRITUS = 21 +Const DISCIPLINE_THANANTOSIS = 22 +Const DISCIPLINE_THAUMATURGY = 23 +Const DISCIPLINE_VICISSITUDE = 24 +Const DISCIPLINES_COUNT = 24 +Dim Shared Disciplines(1 To DISCIPLINES_COUNT) As String + +' Virtues +Const VIRTUE_POINTS = 7 +Const VIRTUE_SELF_CONTROL = 1 +Const VIRTUE_COURAGE = 2 +Const VIRTUE_CONSCIENCE = 3 +Const VIRTUES_COUNT = 3 +Dim Shared Virtues(1 To VIRTUES_COUNT) As String + +' These should probably be renamed like PHYSICAL_ATTRIBUTE_STRENGTH instead. +Const ATTRIBUTE_STRENGTH = 1 +Const ATTRIBUTE_DEXTERITY = 2 +Const ATTRIBUTE_STAMINA = 3 +Const PHYSICAL_ATTRIBUTES_COUNT = 3 +Dim Shared PhysicalAttributes(1 To PHYSICAL_ATTRIBUTES_COUNT) As String +Dim Shared PhysicalAttributeAbbreviations(1 To PHYSICAL_ATTRIBUTES_COUNT) As String + +Const ATTRIBUTE_CHARISMA = 1 +Const ATTRIBUTE_MANIPULATION = 2 +Const ATTRIBUTE_APPEARANCE = 3 +Const SOCIAL_ATTRIBUTES_COUNT = 3 +Dim Shared SocialAttributes(1 To SOCIAL_ATTRIBUTES_COUNT) As String +Dim Shared SocialAttributeAbbreviations(1 To SOCIAL_ATTRIBUTES_COUNT) As String + +Const ATTRIBUTE_INTELLIGENCE = 1 +Const ATTRIBUTE_PERCEPTION = 2 +Const ATTRIBUTE_WITS = 3 +Const MENTAL_ATTRIBUTES_COUNT = 3 +Dim Shared MentalAttributes(1 To MENTAL_ATTRIBUTES_COUNT) As String +Dim Shared MentalAttributeAbbreviations(1 To MENTAL_ATTRIBUTES_COUNT) As String + +Const ATTRIBUTE_GROUP_PHYSICAL = 1 +Const ATTRIBUTE_GROUP_SOCIAL = 2 +Const ATTRIBUTE_GROUP_MENTAL = 3 +Const ATTRIBUTE_GROUPS_COUNT = 3 +Dim Shared AttributeGroups(1 To ATTRIBUTE_GROUPS_COUNT) As String + +Const ABILITY_GROUP_TALENTS = 1 +Const ABILITY_GROUP_SKILLS = 2 +Const ABILITY_GROUP_KNOWLEDGES = 3 +Const ABILITY_GROUPS_COUNT = 3 +Dim Shared AbilityGroups(1 To ABILITY_GROUPS_COUNT) As String + +Const TALENT_ACTING = 1 +Const TALENT_ALERTNESS = 2 +Const TALENT_ATHLETICS = 3 +Const TALENT_BRAWL = 4 +Const TALENT_DODGE = 5 +Const TALENT_EMPATHY = 6 +Const TALENT_INTIMIDATION = 7 +Const TALENT_LEADERSHIP = 8 +Const TALENT_STREETWISE = 9 +Const TALENT_SUBTERFUGE = 10 +Const TALENTS_COUNT = 10 +Dim Shared Talents(1 To TALENTS_COUNT) As String + +Const SKILL_ANIMAL_KEN = 1 +Const SKILL_DRIVE = 2 +Const SKILL_ETIQUETTE = 3 +Const SKILL_FIREARMS = 4 +Const SKILL_MELEE = 5 +Const SKILL_MUSIC = 6 +Const SKILL_REPAIR = 7 +Const SKILL_SECURITY = 8 +Const SKILL_STEALTH = 9 +Const SKILL_SURVIVAL = 10 +Const SKILLS_COUNT = 10 +Dim Shared Skills(1 To SKILLS_COUNT) As String + +Const KNOWLEDGE_BUREAUCRACY = 1 +Const KNOWLEDGE_COMPUTER = 2 +Const KNOWLEDGE_FINANCE = 3 +Const KNOWLEDGE_INVESTIGATION = 4 +Const KNOWLEDGE_LAW = 5 +Const KNOWLEDGE_LINGUISTICS = 6 +Const KNOWLEDGE_MEDICINE = 7 +Const KNOWLEDGE_OCCULT = 8 +Const KNOWLEDGE_POLITICS = 9 +Const KNOWLEDGE_SCIENCE = 10 +Const KNOWLEDGES_COUNT = 10 +Dim Shared Knowledges(1 To KNOWLEDGES_COUNT) As String + +Const BACKGROUND_POINTS = 5 +Const BACKGROUND_ALLIES = 1 +Const BACKGROUND_CONTACTS = 2 +Const BACKGROUND_FAME = 3 +Const BACKGROUND_GENERATION = 4 +Const BACKGROUND_HERD = 5 +Const BACKGROUND_INFLUENCE = 6 +Const BACKGROUND_MENTOR = 7 +Const BACKGROUND_RESOURCES = 8 +Const BACKGROUND_RETAINERS = 9 +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 + +Const DERANGEMENTS_COUNT = 10 +Const DERANGEMENT_ID_AMNESIA = 1 +Const DERANGEMENT_ID_DELUSIONS_OF_GRANDEUR = 2 +Const DERANGEMENT_ID_FANTASY = 3 +Const DERANGEMENT_ID_MANIC_DEPRESSION = 4 +Const DERANGEMENT_ID_MULTIPLE_PERSONALITIES = 5 +Const DERANGEMENT_ID_OBSESSION = 6 +Const DERANGEMENT_ID_OVERCOMPENSATION = 7 +Const DERANGEMENT_ID_PARANOIA = 8 +Const DERANGEMENT_ID_PERFECTION = 9 +Const DERANGEMENT_ID_REGRESSION = 10 +Dim Shared Derangements(1 To DERANGEMENTS_COUNT) As DerangementType + +Const DERANGEMENT_COLOR_AMNESIA = COLOR_DARK_RED +Const DERANGEMENT_COLOR_DELUSIONS_OF_GRANDEUR = COLOR_DARK_MAGENTA +Const DERANGEMENT_COLOR_FANTASY = COLOR_DARK_ORANGE +Const DERANGEMENT_COLOR_MANIC_DEPRESSION = COLOR_DARK_WHITE +Const DERANGEMENT_COLOR_MULTIPLE_PERSONALITIES = COLOR_DARK_BLUE +Const DERANGEMENT_COLOR_OBSESSION = COLOR_BRIGHT_GREEN +Const DERANGEMENT_COLOR_OVERCOMPENSATION = COLOR_BRIGHT_CYAN +Const DERANGEMENT_COLOR_PARANOIA = COLOR_BRIGHT_RED +Const DERANGEMENT_COLOR_PERFECTION = COLOR_BRIGHT_MAGENTA +Const DERANGEMENT_COLOR_REGRESSION = COLOR_BRIGHT_YELLOW +Dim Shared DerangementColors(1 To DERANGEMENTS_COUNT) As Integer + +Dim Shared DerangementLabels(1 To DERANGEMENTS_COUNT) As String +Const DERANGEMENT_LABEL_AMNESIA = "Amnesia" +Const DERANGEMENT_LABEL_DELUSIONS_OF_GRANDEUR = "Delusions of Grandeur" +Const DERANGEMENT_LABEL_FANTASY = "Fantasy" +Const DERANGEMENT_LABEL_MANIC_DEPRESSION = "Manic-Depression" +Const DERANGEMENT_LABEL_MULTIPLE_PERSONALITIES = "Multiple Personalities" +Const DERANGEMENT_LABEL_OBSESSION = "Obsession" +Const DERANGEMENT_LABEL_OVERCOMPENSATION = "Overcompensation" +Const DERANGEMENT_LABEL_PARANOIA = "Paranoia" +Const DERANGEMENT_LABEL_PERFECTION = "Perfection" +Const DERANGEMENT_LABEL_REGRESSION = "Regression" + +Dim Shared DerangementDescriptions(1 To DERANGEMENTS_COUNT) As String +Const DERANGEMENT_DESCRIPTION_AMNESIA = "You forget a segment of your past. Additionally in some cases a character can +forget abilities and be unable to use them for the duration." Const DERANGEMENT_DESCRIPTION_DELUSIONS_OF_GRA = "You +imagine you are better than you are." Const DERANGEMENT_DESCRIPTION_FANTASY = "You enter a self-created world where you +are the forgotten hero." Const DERANGEMENT_DESCRIPTION_MANIC_DEPRESSION = "You sink into deep and fitful depressions, +showing no interest in anything which used to captivate your interests. You will go along with others rather than use +the energy to resist. Occasional fits of great energy grab hold of you, and you will work for hours or even days on your +projects. During this time you will resist even the need for sleep as you burn up blood and Willpower on your schemes." +Const DERANGEMENT_DESCRIPTION_MULTIPLE_PERSONA = "You possess a number of new personalities. You have amore than one +Mature, and will switch between them. Thus you regain Willpower points in defferent ways at defferent times" Const +DERANGEMENT_DESCRIPTION_OBSESSION = "You become obsessed with some interest or fetish." Const +DERANGEMENT_DESCRIPTION_OVERCOMPENSATION = "You make up for your moral weaknesses by playing up your strengths to an +extreme. You don't think you can frenzy and won't stop it." Const DERANGEMENT_DESCRIPTION_PARANOIA = "You are convinced +that you are being hunted. You hold even your closest Friends under suspicion." Const DERANGEMENT_DESCRIPTION_PERFECTION += "All your energy is directed toward preventing anything from going wong. When it does you must make a self-control +roll or frenzy." Const DERANGEMENT_DESCRIPTION_REGRESSION = "You become childlike retreating to an earlier time when +less was expected of you Willpower is regained inthe way a Child's is." + +Const FREEBIES_COUNT = 7 +Dim Shared FreebieCosts(1 To FREEBIES_COUNT) As Integer +Dim Shared FreebieLabels(1 To FREEBIES_COUNT) As String +Dim Shared FreebieNames(1 to FREEBIES_COUNT) As String +Dim Shared Freebies(1 To FREEBIES_COUNT) As FreebieType +Const FREEBIE_DISCIPLINE_ID = 1 +Const FREEBIE_DISCIPLINE_COST = 7 +Const FREEBIE_DISCIPLINE_NAME = "Discipline" +Const FREEBIE_DISCIPLINE_LABEL = "Add a discipline dot 7 points" + +Const FREEBIE_ATTRIBUTE_ID = 2 +Const FREEBIE_ATTRIBUTE_COST = 5 +Const FREEBIE_ATTRIBUTE_NAME = "Attribute" +Const FREEBIE_ATTRIBUTE_LABEL = "Add an attribute dot 5 points" + +Const FREEBIE_ABILITY_ID = 3 +Const FREEBIE_ABILITY_COST = 2 +Const FREEBIE_ABILITY_NAME = "Ability" +Const FREEBIE_ABILITY_LABEL = "Add an ability dot 2 points" + +Const FREEBIE_VIRTUE_ID = 4 +Const FREEBIE_VIRTUE_COST = 2 +Const FREEBIE_VIRTUE_NAME = "Virtue" +Const FREEBIE_VIRTUE_LABEL = "Add a virtue dot 2 points" + +' TODO: Make this configurable for VtDA +Const FREEBIE_HUMANITY_ID = 5 +Const FREEBIE_HUMANITY_COST = 1 +Const FREEBIE_HUMANITY_NAME = "Humanity" +Const FREEBIE_HUMANITY_LABEL = "Add a humanity dot 1 point" + +Const FREEBIE_BACKGROUND_ID = 6 +Const FREEBIE_BACKGROUND_COST = 1 +Const FREEBIE_BACKGROUND_NAME = "Background" +Const FREEBIE_BACKGROUND_LABEL = "Add a background dot 1 point" + +Const FREEBIE_SHOW_CHARACTER_SHEET_ID = 7 +Const FREEBIE_SHOW_CHARACTER_SHEET_COST = 0 +Const FREEBIE_SHOW_CHARACTER_SHEET_NAME = "Show character sheet" +Const FREEBIE_SHOW_CHARACTER_SHEET_LABEL = FREEBIE_SHOW_CHARACTER_SHEET_NAME + +Type CharacterType + name As String + player As String + chronicle As String + haven As String + concept As String + age As String + gender As Integer + clan As Integer + nature As Integer + demeanor As Integer + conscience As Integer + selfControl As Integer + courage As Integer + generation As Integer + roadName As String + roadValue As Integer + willpower As Integer + bloodPool As Integer + derangementId As Integer + freebiePoints 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 + attr_stamina As Integer + attr_appearance As Integer + attr_charisma As Integer + attr_manipulation As Integer + 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 + +Type DerangementType + id As Integer + label As String + description As String + textColor As Integer +End Type + +Type FreebieType + id As Integer + cost As Integer + name As String * 32 + label As String * 32 +End Type + +Const RANK_PRIMARY = 1 +Const RANK_PRIMARY_LABEL = "Primary" +Const RANK_SECONDARY = 2 +Const RANK_SECONDARY_LABEL = "Secondary" +Const RANK_TERTIARY = 3 +Const RANK_TERTIARY_LABEL = "Tertiary" +Const RANKS_COUNT = 3 + +Type RankType + id As Integer + label As String +End Type +Dim Shared Ranks(1 To RANKS_COUNT) As RankType + +Type AbilityType + id As Integer + singular As String + plural As String +End Type + +Const ABILITY_TALENTS_ID = 1 +Const ABILITY_TALENTS_SINGULAR = "Talent" +Const ABILITY_TALENTS_PLURAL = "Talents" +Const ABILITY_SKILLS_ID = 2 +Const ABILITY_SKILLS_SINGULAR = "Skill" +Const ABILITY_SKILLS_PLURAL = "Skills" +Const ABILITY_KNOWLEDGES_ID = 3 +Const ABILITY_KNOWLEDGES_SINGULAR = "Knowledge" +Const ABILITY_KNOWLEDGES_PLURAL = "Knowledges" +Const ABILITIES_COUNT = 3 +Dim Shared Abilities(1 To ABILITIES_COUNT) As AbilityType + Call InitializeMemory + ' Run "tests" at startup. Uncomment the end instruction to see the output and not run the rest of the program. Call Test Call SplashScreen @@ -67,7 +549,8 @@ End Sub Sub SplashScreen ' Splash screen - Cls ' " " + MaybeCls + ' " " Print "Welcome to Tom's Storyteller's Best Friend. This is a program that is meant to" Print "aid storytellers in running Vampire: the Masquerade Chronicles and Vampire: the" Print "Dark Ages Chronicles. This program could aid in running campaigns for other" @@ -82,30 +565,30 @@ Sub MainMenu ' Main menu 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 "������������������������������������������������������������������������������ͼ" + MaybeCls + 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 @@ -126,29 +609,29 @@ End Sub ' This sub is not called. It is here so it can be copied whenever I need to make a new bordered screen. 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) @@ -166,6 +649,7 @@ Function GetMenuChoice (items() As MenuItem, style As MenuStyle, count As Intege Do Input choice If style.showRandom And choice = style.randomItemId Then acceptChoice = TRUE + If style.showCancel And choice = style.cancelItemId Then acceptChoice = TRUE For i = 1 To count If choice = items(i).id And items(i).isVisible Then acceptChoice = TRUE @@ -189,7 +673,7 @@ Function MaxI (val1 As Integer, val2 As Integer) End Function Function ChooseStringId (labels() As String, style As MenuStyle, count As Integer, prompt As String) - Cls + MaybeCls ReDim mnuItems(1 To count) As MenuItem Call BuildMenu(mnuItems(), labels(), count) Call AdjustMenuStyle(style, mnuItems(), count, TRUE) @@ -201,13 +685,17 @@ Function ChooseStringId (labels() As String, style As MenuStyle, count As Intege End Function Function ChooseStringIdWithValues (labels() As String, values() As Integer, style As MenuStyle, count As Integer, prompt -As String) Cls Dim mnuItems(1 To count) As MenuItem Call BuildMenuWithValues(mnuItems(), labels(), values(), count) Call -AdjustMenuStyle(style, mnuItems(), count, FALSE) Print prompt Call PrintMenu(mnuItems(), count, style) choice = -GetMenuChoice(mnuItems(), style, count) If choice = style.randomItemId Then choice = GetRandomMenuItemId(mnuItems(), -count) ChooseStringIdWithValues = choice End Function +As String) MaybeCls Dim mnuItems(1 To count) As MenuItem Call BuildMenuWithValues(mnuItems(), labels(), values(), count) + Call AdjustMenuStyle(style, mnuItems(), count, FALSE) + Print prompt + Call PrintMenu(mnuItems(), count, style) + choice = GetMenuChoice(mnuItems(), style, count) + If choice = style.randomItemId Then choice = GetRandomMenuItemId(mnuItems(), count) + ChooseStringIdWithValues = choice +End Function Function ChooseStringIdWithColors (labels() As String, colors() As Integer, style As MenuStyle, prompt As String) - Cls + MaybeCls ' Check array bounds If LBound(labels) <> 1 Or LBound(colors) <> 1 Or UBound(labels) <> UBound(colors) Then ChooseStringIdWithColors = -1 @@ -226,14 +714,12 @@ Function ChooseStringIdWithColors (labels() As String, colors() As Integer, styl End Function Function ChooseMenuItemId (items() As MenuItem, style As MenuStyle, count As Integer, prompt As String, ignoreValue As -Integer) Cls Call AdjustMenuStyle(style, items(), count, ignoreValue) Print prompt Call PrintMenu(items(), count, style) - choice = GetMenuChoice(items(), style, count) - If choice = style.randomItemId Then choice = GetRandomMenuItemId(items(), count) - ChooseMenuItemId = choice -End Function +Integer) MaybeCls Call AdjustMenuStyle(style, items(), count, ignoreValue) Print prompt Call PrintMenu(items(), count, +style) choice = GetMenuChoice(items(), style, count) If choice = style.randomItemId Then choice = +GetRandomMenuItemId(items(), count) ChooseMenuItemId = choice End Function Sub CGGetHeader (ch As CharacterType) - Cls + MaybeCls Dim ms As MenuStyle Call NewMenuStyle(ms) Input "What is the character's name? ", ch.name @@ -253,9 +739,9 @@ Sub CGGetDisciplines (ch As CharacterType) Dim ms As MenuStyle Call NewMenuStyle(ms) disciplinePoints = GetDisciplinePoints - Dim disciplineValues(DISCIPLINES_COUNT) As Integer + Dim disciplineValues(1 To DISCIPLINES_COUNT) As Integer While disciplinePoints > 0 - Cls + MaybeCls Call FillDisciplines(ch, disciplineValues()) discipline = ChooseStringIdWithValues(Disciplines(), disciplineValues(), ms, DISCIPLINES_COUNT, "Which discipline do you want to spend 1 of your " + itos$(disciplinePoints) + " points on?") Call SetDiscipline(ch, @@ -344,9 +830,9 @@ Sub CGGetBackgrounds (ch As CharacterType) Dim ms As MenuStyle Call NewMenuStyle(ms) backgroundPoints = GetBackgroundPoints - Dim backgroundValues(BACKGROUNDS_COUNT) As Integer + Dim backgroundValues(1 To BACKGROUNDS_COUNT) As Integer While backgroundPoints > 0 - Cls + MaybeCls Call FillBackgrounds(ch, backgroundValues()) background = ChooseStringIdWithValues(Backgrounds(), backgroundValues(), ms, BACKGROUNDS_COUNT, "Which background do you want to spend 1 of your " + itos$(backgroundPoints) + " points on?") Call SetBackground(ch, @@ -366,8 +852,8 @@ Sub CGSpendVirtuePoints (ch As CharacterType) While virtuePoints > 0 Call FillVirtues(ch, values()) virtue = ChooseStringIdWithValues(Virtues(), values(), ms, VIRTUES_COUNT, "Which virtue do you want to spend 1 -of your " + itos$(virtuePoints) + " points on?") If virtue = 0 Then virtue = GetRandomInt(1, VIRTUES_COUNT) Call -SetVirtue(ch, virtue, GetVirtue(ch, virtue) + 1) virtuePoints = virtuePoints - 1 Wend End Sub +of your " + itos$(virtuePoints) + " points on?") Call SetVirtue(ch, virtue, GetVirtue(ch, virtue) + 1) virtuePoints = +virtuePoints - 1 Wend End Sub Sub CGGetDerangement (ch As CharacterType) If ch.clan = CLAN_MALKAVIAN Then @@ -377,13 +863,197 @@ Sub CGGetDerangement (ch As CharacterType) ms.useColors = TRUE ch.derangementId = ChooseStringIdWithColors(DerangementLabels(), DerangementColors(), ms, "Which derangement do -you want?") If ch.derangementId = 0 Then ch.derangementId = GetRandomInt(1, DERANGEMENTS_COUNT) End If End Sub +you want?") End If End Sub Sub CGSpendFreebiePoints (ch As CharacterType) + freebiePoints = GetFreebiePoints(ch) + Dim ms As MenuStyle + Call NewMenuStyle(ms) + While (freebiePoints > 0) + MaybeCls + Call MaybePrint("freebiePoints = " + itos$(freebiePoints)) + ' Build the menu + ReDim availableFreebies(1 To FREEBIES_COUNT) As FreebieType + numAvailableFreebies = 0 + For index = 1 To FREEBIES_COUNT + If Freebies(index).cost <= freebiePoints Then + numAvailableFreebies = numAvailableFreebies + 1 + availableFreebies(numAvailableFreebies) = Freebies(index) + End If + Next + + ReDim menuItems(1 To numAvailableFreebies) As MenuItem + For index = 1 To numAvailableFreebies + Dim mi As MenuItem + Call NewMenuItem(mi, availableFreebies(index).label, availableFreebies(index).id) + If index = FREEBIE_SHOW_CHARACTER_SHEET_ID Then mi.includeInRandom = FALSE + menuItems(index) = mi + Next + + prompt$ = "You have " + itos$(freebiePoints) + " freebie points remaining what would you like to spend the +points on?" id = ChooseMenuItemId(menuItems(), ms, numAvailableFreebies, prompt$, TRUE) + + Select Case id + Case FREEBIE_DISCIPLINE_ID + Call CGSpendDisciplinePoint(ch) + Case FREEBIE_ATTRIBUTE_ID + Call CGSpendAttributePoint(ch) + Case FREEBIE_ABILITY_ID + Call CGSpendAbilityPoint(ch) + Case FREEBIE_VIRTUE_ID + Call CGSpendVirtuePoint(ch) + Case FREEBIE_HUMANITY_ID + Call CGSpendHumanityPoint(ch) + Case FREEBIE_BACKGROUND_ID + Call CGSpendBackgroundPoint(ch) + Case FREEBIE_SHOW_CHARACTER_SHEET_ID + Call ShowCharacterSheet(ch) + End Select + + freebiePoints = GetFreebiePoints(ch) + Call MaybePrint("Auspex: " + itos$(GetDiscipline(ch, DISCIPLINE_AUSPEX))) + Call MaybePrint("Strength: " + itos$(GetAttributeValue(ch, ATTRIBUTE_GROUP_PHYSICAL, ATTRIBUTE_STRENGTH))) + Call MaybePrint("Acting: " + itos$(GetAbilityValue(ch, ABILITY_TALENTS_ID, TALENT_ACTING))) + Call MaybePrint("Conscience: " + itos$(GetVirtue(ch, VIRTUE_CONSCIENCE))) + Call MaybePrint("Humanity: " + itos$(GetRoadValue(ch))) + Call MaybePrint("Generation (Background): " + itos$(GetBackground(ch, BACKGROUND_GENERATION))) + Call MaybePrint("Generation: " + itos$(GetGeneration(ch))) + Wend +End Sub + +Sub CGSpendDisciplinePoint (ch As CharacterType) + MaybeCls + Dim ms As MenuStyle + Call NewMenuStyle(ms) + ms.showCancel = TRUE + ms.cancelItemId = DISCIPLINES_COUNT + 1 + Dim disciplineValues(1 To DISCIPLINES_COUNT) As Integer + Call FillDisciplines(ch, disciplineValues()) + prompt$ = "Which discipline do you want to spend 1 of your " + itos$(disciplinePoints) + " points on?" + id = ChooseStringIdWithValues(Disciplines(), disciplineValues(), ms, DISCIPLINES_COUNT, prompt$) + If id <> ms.cancelItemId Then + Call SetDiscipline(ch, id, GetDiscipline(ch, id) + 1) + Call SetFreebiePoints(ch, GetFreebiePoints(ch) - FREEBIE_DISCIPLINE_COST) + End If +End Sub + +Type GroupedStatReference + id As Integer + groupIndex As Integer + itemIndex As Integer +End Type + +Sub NewGroupedStatReference (ref As GroupedStatReference, id As Integer, groupIndex As Integer, itemIndex As Integer) + ref.id = id + ref.groupIndex = groupIndex + ref.itemIndex = itemIndex +End Sub + +Sub CGSpendAttributePoint (ch As CharacterType) + MaybeCls + Dim ms As MenuStyle + Call NewMenuStyle(ms) + ms.showCancel = TRUE + numAttributes = 0 + Dim numAttributesInGroup(1 To ATTRIBUTE_GROUPS_COUNT) As Integer + + For attributeGroupIndex = 1 To ATTRIBUTE_GROUPS_COUNT + numAttributesInGroup(attributeGroupIndex) = GetNumAttributesInGroup(attributeGroupIndex) + numAttributes = numAttributes + numAttributesInGroup(attributeGroupIndex) + Next + + Dim attributes(1 To numAttributes) As GroupedStatReference + Dim labels(1 To numAttributes) As String + Dim values(1 To numAttributes) As Integer + + attributeIndex = 1 + For attributeGroupIndex = 1 To ATTRIBUTE_GROUPS_COUNT + For index = 1 To numAttributesInGroup(attributeGroupIndex) + Dim attribute As GroupedStatReference + Call NewGroupedStatReference(attribute, attributeIndex, attributeGroupIndex, index) + attributes(attributeIndex) = attribute + labels(attributeIndex) = GetAttributeName$(attributeGroupIndex, index) + values(attributeIndex) = GetAttributeValue(ch, attributeGroupIndex, index) + attributeIndex = attributeIndex + 1 + Next + Next + + ' TODO: Make this show values. + prompt$ = "Which attribute do you want to add one dot to?" + ms.cancelItemId = numAttributes + 1 + id = ChooseStringIdWithValues(labels(), values(), ms, numAttributes, prompt$) + If id <> ms.cancelItemId Then + Dim attr As GroupedStatReference + attr = attributes(id) + Call SetAttributeValue(ch, attr.groupIndex, attr.itemIndex, GetAttributeValue(ch, attr.groupIndex, +attr.itemIndex) + 1) Call SetFreebiePoints(ch, GetFreebiePoints(ch) - FREEBIE_ATTRIBUTE_COST) End If End Sub + +Sub CGSpendAbilityPoint (ch As CharacterType) + Dim ms As MenuStyle + Call NewMenuStyle(ms) + ms.showCancel = TRUE + done = FALSE + While Not done + MaybeCls + ms.cancelItemId = ABILITY_GROUPS_COUNT + 1 + abilityGroupIndex = ChooseStringId(AbilityGroups(), ms, ABILITY_GROUPS_COUNT, "What kind of ability would you +like to add 1 dot to?") If abilityGroupIndex = ms.cancelItemId Then Exit Sub + + numAbilities = GetNumItemsForAbilityGroup(abilityGroupIndex) + Dim labels(1 To numAbilities) As String + Call FillAbilitiesForAbilityGroup(abilityGroupIndex, labels()) + ms.cancelItemId = numAbilities + 1 + abilityIndex = ChooseStringId(labels(), ms, numAbilities, "What ability would you like to add 1 dot to?") + If abilityIndex <> ms.cancelItemId Then + Call SetAbilityValue(ch, abilityGroupIndex, abilityIndex, GetAbilityValue(ch, abilityGroupIndex, +abilityIndex) + 1) Call SetFreebiePoints(ch, GetFreebiePoints(ch) - FREEBIE_ABILITY_COST) done = TRUE End If Wend End +Sub + +Sub CGSpendVirtuePoint (ch As CharacterType) + Dim ms As MenuStyle + Call NewMenuStyle(ms) + ms.showCancel = TRUE + ms.cancelItemId = VIRTUES_COUNT + 1 + prompt$ = "What virtue would you like to add 1 dot to?" + id = ChooseStringId(Virtues(), ms, VIRTUES_COUNT, prompt$) + If id <> ms.cancelItemId Then + Call SetVirtue(ch, id, GetVirtue(ch, id) + 1) + Call SetFreebiePoints(ch, GetFreebiePoints(ch) - FREEBIE_ABILITY_COST) + End If +End Sub + +Sub CGSpendHumanityPoint (ch As CharacterType) + numLabels = 2 + Dim labels(1 To numLabels) As String + labels(1) = "Yes" + labels(2) = "No" + Dim ms As MenuStyle + Call NewMenuStyle(ms) + ms.showRandom = FALSE + prompt$ = "Are you sure you want to add a dot to " + GetRoadName$(ch) + "?" + id = ChooseStringId(labels(), ms, numLabels, prompt$) + If id = 1 Then + Call SetRoadValue(ch, GetRoadValue(ch) + 1) + Call SetFreebiePoints(ch, GetFreebiePoints(ch) - FREEBIE_HUMANITY_COST) + End If +End Sub + +Sub CGSpendBackgroundPoint (ch As CharacterType) + Dim ms As MenuStyle + Call NewMenuStyle(ms) + ms.showCancel = TRUE + ms.cancelItemId = BACKGROUNDS_COUNT + 1 + prompt$ = "Which background would you like to add 1 dot to?" + id = ChooseStringId(Backgrounds(), ms, BACKGROUNDS_COUNT, prompt$) + If id <> ms.cancelItemId Then + Call SetBackground(ch, id, GetBackground(ch, id) + 1) + Call SetFreebiePoints(ch, GetFreebiePoints(ch) - FREEBIE_BACKGROUND_COST) + End If End Sub -' Ignore this warning ch is not used yet because the sub is not implemented yet. Sub SaveCharacterSheet (ch As CharacterType) + Call MaybePrint("TODO: Fill in SaveCharacterSheet") + Call MaybePrint(ch.name) ' 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)? @@ -396,7 +1066,7 @@ Sub SaveCharacterSheet (ch As CharacterType) '| Physical Social Mental | Haven: kkkkkk | '| Str. 5 App. 2 Int. 1 | Concept: llllll | '| Dex. 3 Cha. 2 Per. 1 |---------------------------------------| - '| Sta. 2 Man. 4 Wit. 4 | Derangements: | + '| Sta. 2 Man. 4 Wit. 4 | Derangementss: | '|--------------------------------------| _____________________________________ | '| Disciplines: | _____________________________________ | '| Obtenebration | _____________________________________ | @@ -544,22 +1214,22 @@ Sub CharacterGenerator () End Sub Sub ShowCharacterSheet (ch As CharacterType) - Dim disciplineValues(DISCIPLINES_COUNT) As Integer + Dim disciplineValues(1 To DISCIPLINES_COUNT) As Integer Call FillDisciplines(ch, disciplineValues()) - Dim backgroundValues(BACKGROUNDS_COUNT) As Integer + Dim backgroundValues(1 To BACKGROUNDS_COUNT) As Integer Call FillBackgrounds(ch, backgroundValues()) '... 0123456789 - '160 ���������� - '170 ���������� - '180 ���������� - '190 ���������� - '200 ���������� - '210 ���������� - '220 ����������� - '230 ������2���� - ' enquote forms s/^([ɺ���].*[����])$/print "$1"/g + '160 áíóúñѪº¿⌐ + '170 ¬½¼¡«»░▒▓│ + '180 ┤╡╢╖╕╣║╗╝╜ + '190 ╛┐└┴┬├─┼╞╟ + '200 ╚╔╩╦╠═╬╧╨╤ + '210 ╥╙╘╒╓╫╪┘┌█ + '220 ▄▌▐▀αßΓπΣσσ + '230 µτΦΘΩδ2∞φε∩ + ' enquote forms s/^([╔║╚═╠].*[╗║╝╣])$/print "$1"/g Dim disciplineStrings(3) As String disciplineStringsIndex = 0 @@ -591,87 +1261,78 @@ Sub ShowCharacterSheet (ch As CharacterType) Call MakeWrapLines(derangementStrings(), allDerangementsLine$, 37, 5) - Cls - Print "������������������������������������������������������������������������������ͻ" - 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, " ") + " �" Print "� -Physical Social Mental � Haven: " + MakeFitL$(ch.haven$, 30, " ") + " �" Print "� Str. " + -MakeFitL$(itos$(ch.attr_strength), 7, " ") + " App. " + MakeFitL$(itos$(ch.attr_appearance), 7, " ") + " Int. " + -MakeFitL$(itos$(ch.attr_intelligence), 5, " ") + " � Concept: " + MakeFitL$(ch.concept$, 28, " ") + " �" Print "� Dex. " -+ MakeFitL$(itos$(ch.attr_dexterity), 7, " ") + " Cha. " + MakeFitL$(itos$(ch.attr_charisma), 7, " ") + " Per. " + -MakeFitL$(itos$(ch.attr_perception), 5, " ") + " -���������������������������������������͹" - Print "� Sta. " + MakeFitL$(itos$(ch.attr_stamina), 7, " ") + " Man. " + MakeFitL$(itos$(ch.attr_manipulation), 7, " -") + " Wit. " + MakeFitL$(itos$(ch.attr_wits), 5, " ") + " � Derangements: �" Print -"��������������������������������������͹ " + derangementStrings(0) + -" �" Print "� Disciplines: � " + derangementStrings(1) + " �" Print "� " + -MakeFitL$(disciplineStrings(0), 36, " ") + " � " + MakeFitL$(derangementStrings(2), 37, "_") + " �" Print "� " + -MakeFitL$(disciplineStrings(1), 36, " ") + " � " + MakeFitL$(derangementStrings(3), 37, "_") + " �" Print "� " + -MakeFitL$(disciplineStrings(2), 36, " ") + " � " + MakeFitL$(derangementStrings(4), 37, "_") + " �" Print -"������������������������������������������������������������������������������͹" - Print "� " + MakeFitL$(ch.roadName + ": " + itos$(ch.roadValue), 36, " ") + " � Nature: " + -MakeFitL$(Archetypes(ch.nature), 29, " ") + " �" Print "� Willpower: " + MakeFitL$(itos$(ch.willpower), 25, " ") + " � -Demeanor: " + MakeFitL$(Archetypes(ch.demeanor), 27, " ") + " �" Print -"������������������������������������������������������������������������������͹" - Print "� �" - Print "� �" - Print "� �" - Print "� <> �" - Print "������������������������������������������������������������������������������ͼ" + MaybeCls + Print "╔══════════════════════════════════════╦═══════════════════════════════════════╗" + 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, " ") + " ║" Print "║ Physical Social Mental ║ Haven: " + MakeFitL$(ch.haven$, +30, " ") + " ║" Print "║ Str. " + MakeFitL$(itos$(ch.attr_strength), 7, " ") + " App. " + +MakeFitL$(itos$(ch.attr_appearance), 7, " ") + " Int. " + MakeFitL$(itos$(ch.attr_intelligence), 5, " ") + " ║ Concept: +" + MakeFitL$(ch.concept$, 28, " ") + " ║" Print "║ Dex. " + MakeFitL$(itos$(ch.attr_dexterity), 7, " ") + " Cha. " + +MakeFitL$(itos$(ch.attr_charisma), 7, " ") + " Per. " + MakeFitL$(itos$(ch.attr_perception), 5, " ") + " +╠═══════════════════════════════════════╣" Print "║ Sta. " + MakeFitL$(itos$(ch.attr_stamina), 7, " ") + " Man. " + +MakeFitL$(itos$(ch.attr_manipulation), 7, " ") + " Wit. " + MakeFitL$(itos$(ch.attr_wits), 5, " ") + " ║ Derangements: +║" Print "╠══════════════════════════════════════╣ " + derangementStrings(0) + " ║" Print "║ Disciplines: ║ " + +derangementStrings(1) + " ║" Print "║ " + MakeFitL$(disciplineStrings(0), 36, " ") + " ║ " + +MakeFitL$(derangementStrings(2), 37, "_") + " ║" Print "║ " + MakeFitL$(disciplineStrings(1), 36, " ") + " ║ " + +MakeFitL$(derangementStrings(3), 37, "_") + " ║" Print "║ " + MakeFitL$(disciplineStrings(2), 36, " ") + " ║ " + +MakeFitL$(derangementStrings(4), 37, "_") + " ║" Print +"╠══════════════════════════════════════╬═══════════════════════════════════════╣" Print "║ " + MakeFitL$(ch.roadName + +": " + itos$(ch.roadValue), 36, " ") + " ║ Nature: " + MakeFitL$(Archetypes(ch.nature), 29, " ") + " ║" Print "║ +Willpower: " + MakeFitL$(itos$(ch.willpower), 25, " ") + " ║ Demeanor: " + MakeFitL$(Archetypes(ch.demeanor), 27, " ") + +" ║" Print "╠══════════════════════════════════════╩═══════════════════════════════════════╣" Print "║ ║" Print "║ ║" + Print "║ ║" + Print "║ <> ║" + Print "╚══════════════════════════════════════════════════════════════════════════════╝" Call PressAnyKeyToContinue - Print "������������������������������������������������������������������������������ͻ" - Print "� " + MakeFitC$("Abilities", 76, " ") + " �" - Print "� " + MakeFitC$("Talents", 25, " ") + " " + MakeFitC$("Skills", 25, " ") + " " + MakeFitC$("Knowledges", 24, -" ") + " �" For index = 1 To 10 Print "� " + MakeFitC(MakeFitL$(Talents(index) + ":", 14, " ") + itos$(GetTalent(ch, + Print "╔══════════════════════════════════════════════════════════════════════════════╗" + Print "║ " + MakeFitC$("Abilities", 76, " ") + " ║" + Print "║ " + MakeFitC$("Talents", 25, " ") + " " + MakeFitC$("Skills", 25, " ") + " " + MakeFitC$("Knowledges", 24, +" ") + " ║" For index = 1 To 10 Print "║ " + MakeFitC(MakeFitL$(Talents(index) + ":", 14, " ") + itos$(GetTalent(ch, index)), 25, " ") + " " + MakeFitC(MakeFitL$(Skills(index) + ":", 14, " ") + itos$(GetSkill(ch, index)), 25, " ") + " " -+ MakeFitC(MakeFitL$(Knowledges(index) + ":", 14, " ") + itos$(GetKnowledge(ch, index)), 24, " ") + " �" Next Print -"������������������������������������������������������������������������������͹" - Print "� Backgrounds: � Virtues: �" - Print "� " + MakeFitL$(backgroundStrings(0), 36, " ") + " � " + MakeFitB$("Conscience:", itos$(ch.conscience), 37, " -") + " �" Print "� " + MakeFitL$(backgroundStrings(1), 36, " ") + " � " + MakeFitB$("Self-Control:", -itos$(ch.selfControl), 37, " ") + " �" Print "� " + MakeFitL$(backgroundStrings(2), 36, " ") + " � " + -MakeFitB$("Courage:", itos$(ch.courage), 37, " ") + " �" Print "� " + MakeFitL$(backgroundStrings(3), 36, " ") + " � " + -MakeFitL$("", 37, " ") + " �" Print "� " + MakeFitL$(backgroundStrings(4), 36, " ") + " � " + MakeFitL$("", 37, " ") + " -�" Print -"������������������������������������������������������������������������������͹" - Print "� <> �" - Print "������������������������������������������������������������������������������ͼ" - Call PressAnyKeyToContinue -End Sub ++ MakeFitC(MakeFitL$(Knowledges(index) + ":", 14, " ") + itos$(GetKnowledge(ch, index)), 24, " ") + " ║" Next Print +"╠══════════════════════════════════════╦═══════════════════════════════════════╣" Print "║ Backgrounds: ║ Virtues: ║" + Print "║ " + MakeFitL$(backgroundStrings(0), 36, " ") + " ║ " + MakeFitB$("Conscience:", itos$(ch.conscience), 37, " +") + " ║" Print "║ " + MakeFitL$(backgroundStrings(1), 36, " ") + " ║ " + MakeFitB$("Self-Control:", +itos$(ch.selfControl), 37, " ") + " ║" Print "║ " + MakeFitL$(backgroundStrings(2), 36, " ") + " ║ " + +MakeFitB$("Courage:", itos$(ch.courage), 37, " ") + " ║" Print "║ " + MakeFitL$(backgroundStrings(3), 36, " ") + " ║ " + +MakeFitL$("", 37, " ") + " ║" Print "║ " + MakeFitL$(backgroundStrings(4), 36, " ") + " ║ " + MakeFitL$("", 37, " ") + " +║" Print "╠══════════════════════════════════════╩═══════════════════════════════════════╣" Print "║ <> ║" Print +"╚══════════════════════════════════════════════════════════════════════════════╝" Call PressAnyKeyToContinue End Sub ' Simpler character generator with fewer questions and more things done randomly without asking. Sub CharacterGeneratorForDummies - Print "CharacterGeneratorForDummies" + Call MaybePrint("CharacterGeneratorForDummies") End Sub ' Maybe just remove this. It's kinda pointless. It asks some questions and calculates a contested roll. ' C1 dice pool, C1 difficulty, C2 dice pool, C2 difficulty, then rolls all the dice and does the math. ' In practice it's just slower than rolling the dice Sub CombatComputer - Print "CombatComputer" + Call MaybePrint("CombatComputer") End Sub ' Asks for a number of dice and a difficulty. Rolls the dice, calculates botches and successes. Sub DiceRoller - Print "DiceRoller" + Call MaybePrint("DiceRoller") End Sub ' Like the character generator if you choose random for everything. Should do random names/ages too, but doesn't yet. Sub RandomCharacterGenerator - Print "RandomCharacterGenerator" + Call MaybePrint("RandomCharacterGenerator") End Sub ' This had a function at one point but got taken out. Will only come back if the disassembly can figure it out. Sub Choice6 - Print "Unnamed choice 6" + Call MaybePrint("Unnamed choice 6") End Sub ' Like the character generator but for vehicles. Much simpler with fewer questions. Prints a vehicle sheet when done. -Never finished and crashes mid way through currently. Sub VehicleGenerator Print "VehicleGenerator" End Sub +Never finished and crashes mid way through currently. Sub VehicleGenerator Call MaybePrint("VehicleGenerator") End Sub Sub PressAnyKeyToContinue () While InKey$ = "": Wend @@ -782,14 +1443,1211 @@ Sub MakeWrapLines (lines() As String, text As String, maxWidth As Integer, maxLi Wend End Sub -'$include: 'colors.bm' -'$include: 'menus.bm' -'$include: 'character.bm' +Sub MaybeCls () + If Not isDebugging Then Cls +End Sub + +Sub MaybePrint (message As String) + If isDebugging Then Print message +End Sub + +Sub SetColor (c As Integer) + ScreenColor = c + Color c +End Sub + +Function GetColor () + GetColor = ScreenColor +End Function + +Sub PrintWithMaybeColor (message As String, textColor As Integer, useColors As Integer) + Dim oldColor As Integer + If useColors = TRUE Then + oldColor = GetColor + SetColor (textColor) + End If + Print message + If useColors = TRUE Then + SetColor (oldColor) + End If +End Sub + +Function GetRandomMenuItemId (items() As MenuItem, count As Integer) + numVisibleItems = 0 + Dim visibleItems(count) As Integer + For i = 1 To count + If items(i).isVisible and items(i).includeinrandom Then + visibleItems(numVisibleItems) = i + numVisibleItems = numVisibleItems + 1 + End If + Next + i = GetRandomInt(0, numVisibleItems - 1) + GetRandomMenuItemId = visibleItems(i) +End Function + +Sub BuildMenu (items() As MenuItem, labels() As String, count As Integer) + 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) + For i = 1 To count + Dim mi As MenuItem + Call NewMenuItemWithValue(mi, labels(i), i, values(i)) + items(i) = mi + Next +End Sub + +Sub BuildMenuWithColors (items() As MenuItem, labels() As String, colors() As Integer) + ' Check array bounds + If LBound(items) <> 1 Or LBound(colors) <> 1 Or UBound(items) <> UBound(colors) Then End + + count = UBound(items) + For i = 1 To count + Dim mi As MenuItem + Call NewMenuItemWithColor(mi, labels(i), colors(i), i) + items(i) = mi + Next +End Sub + +Sub AdjustMenuStyle (style As MenuStyle, items() As MenuItem, count As Integer, ignoreValue As Integer) + maxIdWidth = 0 + maxItemWidth = 0 + maxValueWidth = 0 + + For i = 1 To count + If items(i).isVisible Then + maxIdWidth = MaxI(maxIdWidth, Len(itos$(items(i).id))) + maxItemWidth = MaxI(maxItemWidth, Len(items(i).label + style.labelValueSeparator)) + maxValueWidth = MaxI(maxValueWidth, Len(itos$(items(i).value))) + End If + Next + If style.showRandom Then + maxIdWidth = MaxI(maxIdWidth, Len(itos$(style.randomItemId))) + maxItemWidth = MaxI(maxItemWidth, Len(style.randomItemName)) + End If + If style.showCancel Then + maxIdWidth = MaxI(maxIdWidth, Len(itos$(style.cancelItemId))) + maxItemWidth = MaxI(maxItemWidth, Len(style.cancelItemName)) + End If + style.idWidth = maxIdWidth + style.labelWidth = maxItemWidth + If Not ignoreValue Then style.valueWidth = maxValueWidth Else style.valueWidth = 0 +End Sub + +Sub PrintMenu (items() As MenuItem, count As Integer, style As MenuStyle) + Dim randomItem As MenuItem + Call NewMenuItemWithColor(randomItem, style.randomItemName, style.randomItemColor, style.randomItemId) + Dim cancelItem As MenuItem + Call NewMenuItemWithColor(cancelItem, style.cancelItemName, style.cancelItemColor, style.cancelItemId) + actualCount = count + If style.showCancel = TRUE Then actualCount = actualCount + 1 + If style.showRandom = TRUE Then actualCount = actualCount + 1 + If actualCount <= 10 Then + For i = 1 To count + If items(i).isVisible Then + title$ = GetTitle$(items(i), style) + Call PrintWithMaybeColor(title$, items(i).color, style.useColors) + End If + Next + If style.showCancel Then + cancelLabel$ = GetTitleWithoutValue$(cancelItem, style) + Call PrintWithMaybeColor(cancelLabel$, cancelItem.color, style.useColors) + End If + If style.showRandom Then + randomLabel$ = GetTitleWithoutValue$(randomItem, style) + Call PrintWithMaybeColor(randomLabel$, randomItem.color, style.useColors) + End If + Else + Dim emptyItem As MenuItem + Call NewMenuItem(emptyItem, "", 0) + itemWidth = Len(GetTitle$(emptyItem, style)) + itemsPerRow = style.screenWidth \ (itemWidth + Len(style.menuItemSpacer)) + columnWidth = style.screenWidth \ itemsPerRow + + column = 0 + For i = 1 To count + If items(i).isVisible Then + itemText$ = GetTitle$(items(i), style) + If column <> (itemsPerRow - 1) Then + If i <> count Or style.showRandom Then + textLength = Len(itemText$) + itemText$ = MakeFitL$(RTrim$(itemText$) + style.menuItemSpacer, textLength + +Len(style.menuItemSpacer), " ") End If End If label$ = MakeFitC$(itemText$, columnWidth, " ") Call +PrintWithMaybeColor(label$, items(i).color, style.useColors) End If column = (column + 1) Mod itemsPerRow If column = 0 +Then Print "" Next If style.showCancel Then cancelLabel$ = MakeFitC$(GetTitleWithoutValue$(cancelItem, style), +columnWidth, " ") Call PrintWithMaybeColor(cancelLabel$, cancelItem.color, style.useColors) End If If style.showRandom +Then randomLabel$ = MakeFitC$(GetTitleWithoutValue$(randomItem, style), columnWidth, " ") Call +PrintWithMaybeColor(randomLabel$, randomItem.color, style.useColors) End If End If End Sub + +Function GetTitle$ (mi As MenuItem, ms As MenuStyle) + id$ = itos$(mi.id) + label$ = mi.label + If ms.valueWidth > 0 Then label$ = label$ + ms.labelValueSeparator + value$ = itos$(mi.value) + GetTitle$ = MakeFitR$(id$, ms.idWidth, " ") + ms.idLabelSeparator + MakeFitL$(label$, ms.labelWidth, " ") + +MakeFitR$(value$, ms.valueWidth, " ") End Function + +Function GetTitleWithoutValue$ (mi As MenuItem, ms As MenuStyle) + GetTitleWithoutValue$ = MakeFitR$(itos$(mi.id), ms.idWidth, " ") + ms.idLabelSeparator + MakeFitL$(mi.label, +ms.labelWidth + ms.valueWidth + Len(ms.labelValueSeparator), " ") End Function + +Sub NewMenuStyle (ms As MenuStyle) + ms.idWidth = 0 + ms.labelWidth = 0 + ms.valueWidth = 0 + ms.screenWidth = 80 + ms.randomItemName = "Random" + ms.randomItemId = 0 + ms.randomItemColor = COLOR_FOREGROUND_DEFAULT + ms.cancelItemName = "Cancel" + ms.cancelItemId = -1 + ms.cancelItemColor = COLOR_FOREGROUND_DEFAULT + ms.idLabelSeparator = " = " + ms.labelValueSeparator = ": " + ms.menuItemSpacer = ", " + ms.showRandom = TRUE + ms.showCancel = false + ms.useColors = FALSE +End Sub + +Sub NewMenuItem (mi As MenuItem, label As String, id As Integer) + mi.id = id + mi.label = label + mi.value = 0 + mi.color = COLOR_DEFAULT + mi.isVisible = TRUE + mi.includeInRandom = true +End Sub + +Sub NewMenuItemWithValue (mi As MenuItem, label As String, id As Integer, value As Integer) + mi.id = id + mi.label = label + mi.value = value + mi.color = COLOR_DEFAULT + mi.isVisible = TRUE + mi.includeInRandom = true +End Sub + +Sub NewMenuItemWithColor (mi As MenuItem, label As String, textColor As Integer, id As Integer) + mi.id = id + mi.label = label + mi.value = 0 + mi.color = textColor + mi.isVisible = TRUE +End Sub + +$Debug +Sub Initialize_Character_Lib + ' For all of these lookup tables they should look something like this to know the mapping is correct + ' Names(NAME_ITEM1) = "Item1" + ' The index constants should start at 1 and go up to NAMES_COUNT without leaving any holes. + + ' Clans + Clans(CLAN_ANARCH) = "Anarch" + Clans(CLAN_ASSAMITE) = "Assamite" + Clans(CLAN_BAALI) = "Baali" + Clans(CLAN_BRUJAH) = "Brujah" + Clans(CLAN_CAITIFF) = "Caitiff" + Clans(CLAN_CAPPADOCIAN) = "Cappadocian" + Clans(CLAN_GANGREL) = "Gangrel" + Clans(CLAN_GIOVANNI) = "Giovanni" + Clans(CLAN_INCONNU) = "Inconnu" + Clans(CLAN_LASOMBRA) = "Lasombra" + Clans(CLAN_MALKAVIAN) = "Malkavian" + Clans(CLAN_NOSFERATU) = "Nosferatu" + Clans(CLAN_RAVANOS) = "Ravanos" + Clans(CLAN_SETTITE) = "Settite" + Clans(CLAN_TREMERE) = "Tremere" + Clans(CLAN_TOREADOR) = "Toreador" + Clans(CLAN_TZISMICE) = "Tzismice" + Clans(CLAN_VENTRUE) = "Ventrue" + + ' Archetypes + Archetypes(ARCHETYPE_ARCHITECT) = "Architect" + Archetypes(ARCHETYPE_AUTOCRAT) = "Autocrat" + Archetypes(ARCHETYPE_BARBARIAN) = "Barbarian" + Archetypes(ARCHETYPE_BON_VIVANT) = "Bon Vivant" + Archetypes(ARCHETYPE_BRAVO) = "Bravo" + Archetypes(ARCHETYPE_CAREGIVER) = "Caregiver" + Archetypes(ARCHETYPE_CARETAKER) = "Caretaker" + Archetypes(ARCHETYPE_CELEBRANT) = "Celebrant" + Archetypes(ARCHETYPE_CHILD) = "Child" + Archetypes(ARCHETYPE_CONFORMIST) = "Conformist" + Archetypes(ARCHETYPE_CONNIVER) = "Conniver" + Archetypes(ARCHETYPE_CURMUDGEON) = "Curmudgeon" + Archetypes(ARCHETYPE_DEFENDER) = "Defender" + Archetypes(ARCHETYPE_DEVIANT) = "Deviant" + Archetypes(ARCHETYPE_DIRECTOR) = "Director" + Archetypes(ARCHETYPE_FANATIC) = "Fanatic" + Archetypes(ARCHETYPE_GALLANT) = "Gallant" + Archetypes(ARCHETYPE_INNOVATOR) = "Innovator" + Archetypes(ARCHETYPE_JESTER) = "Jester" + Archetypes(ARCHETYPE_JUDGE) = "Judge" + Archetypes(ARCHETYPE_LONER) = "Loner" + Archetypes(ARCHETYPE_MARTYR) = "Martyr" + Archetypes(ARCHETYPE_MONSTER) = "Monster" + Archetypes(ARCHETYPE_PENITENT) = "Penitent" + Archetypes(ARCHETYPE_REBEL) = "Rebel" + Archetypes(ARCHETYPE_ROGUE) = "Rogue" + Archetypes(ARCHETYPE_SURVIVOR) = "Survivor" + Archetypes(ARCHETYPE_TRADITIONALIST) = "Traditionalist" + Archetypes(ARCHETYPE_TYRANT) = "Tyrant" + Archetypes(ARCHETYPE_VISIONARY) = "Visionary" + + ' Disciplines + Disciplines(DISCIPLINE_ANIMALISM) = "Animalism" + Disciplines(DISCIPLINE_AUSPEX) = "Auspex" + Disciplines(DISCIPLINE_BARDO) = "Bardo" + Disciplines(DISCIPLINE_CELERITY) = "Celerity" + Disciplines(DISCIPLINE_CHIMESTRY) = "Chimestry" + Disciplines(DISCIPLINE_DEMENTATION) = "Dementation" + Disciplines(DISCIPLINE_DOMINATE) = "Dominate" + Disciplines(DISCIPLINE_FORTITUDE) = "Fortitude" + Disciplines(DISCIPLINE_MELPOMINEE) = "Melpominee" + Disciplines(DISCIPLINE_MORTIS) = "Mortis" + Disciplines(DISCIPLINE_MYTHERCERIA) = "Mytherceria" + Disciplines(DISCIPLINE_NECROMANCY) = "Necromancy" + Disciplines(DISCIPLINE_OBEAH) = "Obeah" + Disciplines(DISCIPLINE_OBFUSCATE) = "Obfuscate" + Disciplines(DISCIPLINE_OBTENEBRATION) = "Obtenebration" + Disciplines(DISCIPLINE_POTENCE) = "Potence" + Disciplines(DISCIPLINE_PRESENCE) = "Presence" + Disciplines(DISCIPLINE_PROTEAN) = "Protean" + Disciplines(DISCIPLINE_QUIETUS) = "Quietus" + Disciplines(DISCIPLINE_SERPENTIS) = "Serpentis" + Disciplines(DISCIPLINE_SPIRITUS) = "Spiritus" + Disciplines(DISCIPLINE_THANANTOSIS) = "Thanantosis" + Disciplines(DISCIPLINE_THAUMATURGY) = "Thaumaturgy" + Disciplines(DISCIPLINE_VICISSITUDE) = "Vicissitude" + + ' Virtues + Virtues(VIRTUE_SELF_CONTROL) = "Self-Control" + Virtues(VIRTUE_COURAGE) = "Courage" + Virtues(VIRTUE_CONSCIENCE) = "Conscience" + + ' Physical Attributes + PhysicalAttributes(ATTRIBUTE_STRENGTH) = "Strength" + PhysicalAttributeAbbreviations(ATTRIBUTE_STRENGTH) = "Str." + PhysicalAttributes(ATTRIBUTE_DEXTERITY) = "Dexterity" + PhysicalAttributeAbbreviations(ATTRIBUTE_DEXTERITY) = "Dex." + PhysicalAttributes(ATTRIBUTE_STAMINA) = "Stamina" + PhysicalAttributeAbbreviations(ATTRIBUTE_STAMINA) = "Sta." + + ' Social Attributes + SocialAttributes(ATTRIBUTE_CHARISMA) = "Charisma" + SocialAttributeAbbreviations(ATTRIBUTE_CHARISMA) = "Cha." + SocialAttributes(ATTRIBUTE_MANIPULATION) = "Manipulation" + SocialAttributeAbbreviations(ATTRIBUTE_MANIPULATION) = "Man." + SocialAttributes(ATTRIBUTE_APPEARANCE) = "Appearance" + SocialAttributeAbbreviations(ATTRIBUTE_APPEARANCE) = "App." + + ' Mental Attributes + MentalAttributes(ATTRIBUTE_INTELLIGENCE) = "Intelligence" + MentalAttributeAbbreviations(ATTRIBUTE_INTELLIGENCE) = "Int." + MentalAttributes(ATTRIBUTE_PERCEPTION) = "Perception" + MentalAttributeAbbreviations(ATTRIBUTE_PERCEPTION) = "Per." + MentalAttributes(ATTRIBUTE_WITS) = "Wits" + MentalAttributeAbbreviations(ATTRIBUTE_WITS) = "Wits" + + ' Attribute Groups + AttributeGroups(ATTRIBUTE_GROUP_PHYSICAL) = "Physical" + AttributeGroups(ATTRIBUTE_GROUP_SOCIAL) = "Social" + AttributeGroups(ATTRIBUTE_GROUP_MENTAL) = "Mental" + + ' Abilities + AbilityGroups(ABILITY_GROUP_TALENTS) = "Talents" + AbilityGroups(ABILITY_GROUP_SKILLS) = "Skills" + AbilityGroups(ABILITY_GROUP_KNOWLEDGES) = "Knowledges" + + ' Talents + Talents(TALENT_ACTING) = "Acting" + Talents(TALENT_ALERTNESS) = "Alertness" + Talents(TALENT_ATHLETICS) = "Athletics" + Talents(TALENT_BRAWL) = "Brawl" + Talents(TALENT_DODGE) = "Dodge" + Talents(TALENT_EMPATHY) = "Empathy" + Talents(TALENT_INTIMIDATION) = "Intimidation" + Talents(TALENT_LEADERSHIP) = "Leadership" + Talents(TALENT_STREETWISE) = "Streetwise" + Talents(TALENT_SUBTERFUGE) = "Subterfuge" + + ' Skills + Skills(SKILL_ANIMAL_KEN) = "Animal Ken" + Skills(SKILL_DRIVE) = "Drive" + Skills(SKILL_ETIQUETTE) = "Etiquette" + Skills(SKILL_FIREARMS) = "Firearms" + Skills(SKILL_MELEE) = "Melee" + Skills(SKILL_MUSIC) = "Music" + Skills(SKILL_REPAIR) = "Repair" + Skills(SKILL_SECURITY) = "Security" + Skills(SKILL_STEALTH) = "Stealth" + Skills(SKILL_SURVIVAL) = "Survival" + + ' Knowwledges + Knowledges(KNOWLEDGE_BUREAUCRACY) = "Bureaucracy" + Knowledges(KNOWLEDGE_COMPUTER) = "Computer" + Knowledges(KNOWLEDGE_FINANCE) = "Finance" + Knowledges(KNOWLEDGE_INVESTIGATION) = "Investigation" + Knowledges(KNOWLEDGE_LAW) = "Law" + Knowledges(KNOWLEDGE_LINGUISTICS) = "Linguistics" + Knowledges(KNOWLEDGE_MEDICINE) = "Medicine" + Knowledges(KNOWLEDGE_OCCULT) = "Occult" + Knowledges(KNOWLEDGE_POLITICS) = "Politics" + Knowledges(KNOWLEDGE_SCIENCE) = "Science" + + ' Backgrounds + Backgrounds(BACKGROUND_ALLIES) = "Allies" + Backgrounds(BACKGROUND_CONTACTS) = "Contacts" + Backgrounds(BACKGROUND_FAME) = "Fame" + Backgrounds(BACKGROUND_GENERATION) = "Generation" + Backgrounds(BACKGROUND_HERD) = "Herd" + Backgrounds(BACKGROUND_INFLUENCE) = "Influence" + Backgrounds(BACKGROUND_MENTOR) = "Mentor" + 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" + + ' Derangements + DerangementColors(DERANGEMENT_ID_AMNESIA) = DERANGEMENT_COLOR_AMNESIA + DerangementColors(DERANGEMENT_ID_DELUSIONS_OF_GRANDEUR) = DERANGEMENT_COLOR_DELUSIONS_OF_GRANDEUR + DerangementColors(DERANGEMENT_ID_FANTASY) = DERANGEMENT_COLOR_FANTASY + DerangementColors(DERANGEMENT_ID_MANIC_DEPRESSION) = DERANGEMENT_COLOR_MANIC_DEPRESSION + DerangementColors(DERANGEMENT_ID_MULTIPLE_PERSONALITIES) = DERANGEMENT_COLOR_MULTIPLE_PERSONALITIES + DerangementColors(DERANGEMENT_ID_OBSESSION) = DERANGEMENT_COLOR_OBSESSION + DerangementColors(DERANGEMENT_ID_OVERCOMPENSATION) = DERANGEMENT_COLOR_OVERCOMPENSATION + DerangementColors(DERANGEMENT_ID_PARANOIA) = DERANGEMENT_COLOR_PARANOIA + DerangementColors(DERANGEMENT_ID_PERFECTION) = DERANGEMENT_COLOR_PERFECTION + DerangementColors(DERANGEMENT_ID_REGRESSION) = DERANGEMENT_COLOR_REGRESSION + + DerangementLabels(DERANGEMENT_ID_AMNESIA) = DERANGEMENT_LABEL_AMNESIA + DerangementLabels(DERANGEMENT_ID_DELUSIONS_OF_GRANDEUR) = DERANGEMENT_LABEL_DELUSIONS_OF_GRANDEUR + DerangementLabels(DERANGEMENT_ID_FANTASY) = DERANGEMENT_LABEL_FANTASY + DerangementLabels(DERANGEMENT_ID_MANIC_DEPRESSION) = DERANGEMENT_LABEL_MANIC_DEPRESSION + DerangementLabels(DERANGEMENT_ID_MULTIPLE_PERSONALITIES) = DERANGEMENT_LABEL_MULTIPLE_PERSONALITIES + DerangementLabels(DERANGEMENT_ID_OBSESSION) = DERANGEMENT_LABEL_OBSESSION + DerangementLabels(DERANGEMENT_ID_OVERCOMPENSATION) = DERANGEMENT_LABEL_OVERCOMPENSATION + DerangementLabels(DERANGEMENT_ID_PARANOIA) = DERANGEMENT_LABEL_PARANOIA + DerangementLabels(DERANGEMENT_ID_PERFECTION) = DERANGEMENT_LABEL_PERFECTION + DerangementLabels(DERANGEMENT_ID_REGRESSION) = DERANGEMENT_LABEL_REGRESSION + + DerangementDescriptions(DERANGEMENT_ID_AMNESIA) = DERANGEMENT_DESCRIPTION_AMNESIA + DerangementDescriptions(DERANGEMENT_ID_DELUSIONS_OF_GRANDEUR) = DERANGEMENT_DESCRIPTION_DELUSIONS_OF_GRA + DerangementDescriptions(DERANGEMENT_ID_FANTASY) = DERANGEMENT_DESCRIPTION_FANTASY + DerangementDescriptions(DERANGEMENT_ID_MANIC_DEPRESSION) = DERANGEMENT_DESCRIPTION_MANIC_DEPRESSION + DerangementDescriptions(DERANGEMENT_ID_MULTIPLE_PERSONALITIES) = DERANGEMENT_DESCRIPTION_MULTIPLE_PERSONA + DerangementDescriptions(DERANGEMENT_ID_OBSESSION) = DERANGEMENT_DESCRIPTION_OBSESSION + DerangementDescriptions(DERANGEMENT_ID_OVERCOMPENSATION) = DERANGEMENT_DESCRIPTION_OVERCOMPENSATION + DerangementDescriptions(DERANGEMENT_ID_PARANOIA) = DERANGEMENT_DESCRIPTION_PARANOIA + DerangementDescriptions(DERANGEMENT_ID_PERFECTION) = DERANGEMENT_DESCRIPTION_PERFECTION + DerangementDescriptions(DERANGEMENT_ID_REGRESSION) = DERANGEMENT_DESCRIPTION_REGRESSION + + For i = LBound(Derangements) To UBound(Derangements) + Call NewDerangement(Derangements(i), i, DerangementLabels(i), DerangementColors(i), DerangementDescriptions(i)) + Next + + ' Freebies + FREEBIECOSTS(FREEBIE_DISCIPLINE_ID) = FREEBIE_DISCIPLINE_COST + FREEBIENAMES(FREEBIE_DISCIPLINE_ID) = FREEBIE_DISCIPLINE_NAME + FREEBIELABELS(FREEBIE_DISCIPLINE_ID) = FREEBIE_DISCIPLINE_LABEL + Call NewFreebie(Freebies(FREEBIE_DISCIPLINE_ID), FREEBIE_DISCIPLINE_ID, FREEBIE_DISCIPLINE_COST, +FREEBIE_DISCIPLINE_NAME, FREEBIE_DISCIPLINE_LABEL) + + FREEBIECOSTS(FREEBIE_ATTRIBUTE_ID) = FREEBIE_ATTRIBUTE_COST + FREEBIENAMES(FREEBIE_ATTRIBUTE_ID) = FREEBIE_ATTRIBUTE_NAME + FREEBIELABELS(FREEBIE_ATTRIBUTE_ID) = FREEBIE_ATTRIBUTE_LABEL + Call NewFreebie(Freebies(FREEBIE_ATTRIBUTE_ID), FREEBIE_ATTRIBUTE_ID, FREEBIE_ATTRIBUTE_COST, +FREEBIE_ATTRIBUTE_NAME, FREEBIE_ATTRIBUTE_LABEL) + + FREEBIECOSTS(FREEBIE_ABILITY_ID) = FREEBIE_ABILITY_COST + FREEBIENAMES(FREEBIE_ABILITY_ID) = FREEBIE_ABILITY_NAME + FREEBIELABELS(FREEBIE_ABILITY_ID) = FREEBIE_ABILITY_LABEL + Call NewFreebie(Freebies(FREEBIE_ABILITY_ID), FREEBIE_ABILITY_ID, FREEBIE_ABILITY_COST, FREEBIE_ABILITY_NAME, +FREEBIE_ABILITY_LABEL) + + FREEBIECOSTS(FREEBIE_VIRTUE_ID) = FREEBIE_VIRTUE_COST + FREEBIENAMES(FREEBIE_VIRTUE_ID) = FREEBIE_VIRTUE_NAME + FREEBIELABELS(FREEBIE_VIRTUE_ID) = FREEBIE_VIRTUE_LABEL + Call NewFreebie(Freebies(FREEBIE_VIRTUE_ID), FREEBIE_VIRTUE_ID, FREEBIE_VIRTUE_COST, FREEBIE_VIRTUE_NAME, +FREEBIE_VIRTUE_LABEL) + + FREEBIECOSTS(FREEBIE_HUMANITY_ID) = FREEBIE_HUMANITY_COST + FREEBIENAMES(FREEBIE_HUMANITY_ID) = FREEBIE_HUMANITY_NAME + FREEBIELABELS(FREEBIE_HUMANITY_ID) = FREEBIE_HUMANITY_LABEL + Call NewFreebie(Freebies(FREEBIE_HUMANITY_ID), FREEBIE_HUMANITY_ID, FREEBIE_HUMANITY_COST, FREEBIE_HUMANITY_NAME, +FREEBIE_HUMANITY_LABEL) + + FREEBIECOSTS(FREEBIE_BACKGROUND_ID) = FREEBIE_BACKGROUND_COST + FREEBIENAMES(FREEBIE_BACKGROUND_ID) = FREEBIE_BACKGROUND_NAME + FREEBIELABELS(FREEBIE_BACKGROUND_ID) = FREEBIE_BACKGROUND_LABEL + Call NewFreebie(Freebies(FREEBIE_BACKGROUND_ID), FREEBIE_BACKGROUND_ID, FREEBIE_BACKGROUND_COST, +FREEBIE_BACKGROUND_NAME, FREEBIE_BACKGROUND_LABEL) + + FREEBIECOSTS(FREEBIE_SHOW_CHARACTER_SHEET_ID) = FREEBIE_SHOW_CHARACTER_SHEET_COST + FREEBIENAMES(FREEBIE_SHOW_CHARACTER_SHEET_ID) = FREEBIE_SHOW_CHARACTER_SHEET_NAME + FREEBIELABELS(FREEBIE_SHOW_CHARACTER_SHEET_ID) = FREEBIE_SHOW_CHARACTER_SHEET_LABEL + Call NewFreebie(Freebies(FREEBIE_SHOW_CHARACTER_SHEET_ID), FREEBIE_SHOW_CHARACTER_SHEET_ID, +FREEBIE_SHOW_CHARACTER_SHEET_COST, FREEBIE_SHOW_CHARACTER_SHEET_NAME, FREEBIE_SHOW_CHARACTER_SHEET_LABEL) End Sub + +' Character + +Sub NewCharacter (ch As CharacterType) + ' Scalars + ch.name = "" + ch.player = "" + ch.chronicle = "" + ch.haven = "" + ch.concept = "" + ch.age = "" + ch.gender = 0 + ch.clan = 0 + ch.nature = 0 + ch.demeanor = 0 + ch.generation = 13 + ch.roadName = "" + ch.roadValue = 0 + ch.willpower = 0 + ch.bloodPool = 0 + ch.derangementId = -1 + ch.freebiePoints = 15 + ' Virtues + ch.selfControl = 1 + ch.courage = 1 + ch.conscience = 1 + + ' Arrays/Objects + ' Abilities (Talents/Skills/Knowledges) + For groupIndex = 1 To ABILITY_GROUPS_COUNT + For index = 1 To GetNumItemsForAbilityGroup(groupIndex) + Call SetAbilityValue(ch, groupIndex, index, 0) + Next + Next + ' Attributes + For groupIndex = 1 To ATTRIBUTE_GROUPS_COUNT + For index = 1 To GetNumAttributesInGroup(groupIndex) + Call SetAttributeValue(ch, groupIndex, index, 1) + Next + Next + ' Backgrounds + For index = 1 To BACKGROUNDS_COUNT + Call SetBackground(ch, index, 0) + Next + ' Disciplines + For index = 1 To DISCIPLINES_COUNT + Call SetDiscipline(ch, index, 0) + Next +End Sub + +' Disciplines + +Function GetDisciplinePoints () + GetDisciplinePoints = DISCIPLINE_POINTS +End Function + +Sub SetDiscipline (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case DISCIPLINE_ANIMALISM + ch.discipline_animalism = value + Case DISCIPLINE_AUSPEX + ch.discipline_auspex = value + Case DISCIPLINE_BARDO + ch.discipline_bardo = value + Case DISCIPLINE_CELERITY + ch.discipline_celerity = value + Case DISCIPLINE_CHIMESTRY + ch.discipline_chimestry = value + Case DISCIPLINE_DEMENTATION + ch.discipline_dementation = value + Case DISCIPLINE_DOMINATE + ch.discipline_dominate = value + Case DISCIPLINE_FORTITUDE + ch.discipline_fortitude = value + Case DISCIPLINE_MELPOMINEE + ch.discipline_melpominee = value + Case DISCIPLINE_MORTIS + ch.discipline_mortis = value + Case DISCIPLINE_MYTHERCERIA + ch.discipline_mytherceria = value + Case DISCIPLINE_NECROMANCY + ch.discipline_necromancy = value + Case DISCIPLINE_OBEAH + ch.discipline_obeah = value + Case DISCIPLINE_OBFUSCATE + ch.discipline_obfuscate = value + Case DISCIPLINE_OBTENEBRATION + ch.discipline_obtenebration = value + Case DISCIPLINE_POTENCE + ch.discipline_potence = value + Case DISCIPLINE_PRESENCE + ch.discipline_presence = value + Case DISCIPLINE_PROTEAN + ch.discipline_protean = value + Case DISCIPLINE_QUIETUS + ch.discipline_quietus = value + Case DISCIPLINE_SERPENTIS + ch.discipline_serpentis = value + Case DISCIPLINE_SPIRITUS + ch.discipline_spiritus = value + Case DISCIPLINE_THANANTOSIS + ch.discipline_thanantosis = value + Case DISCIPLINE_THAUMATURGY + ch.discipline_thaumaturgy = value + Case DISCIPLINE_VICISSITUDE + ch.discipline_vicissitude = value + End Select +End Sub + +Function GetDiscipline (ch As CharacterType, index As Integer) + Select Case index + Case DISCIPLINE_ANIMALISM + GetDiscipline = ch.discipline_animalism + Case DISCIPLINE_AUSPEX + GetDiscipline = ch.discipline_auspex + Case discipline_barde + GetDiscipline = ch.discipline_bardo + Case DISCIPLINE_CELERITY + GetDiscipline = ch.discipline_celerity + Case DISCIPLINE_CHIMESTRY + GetDiscipline = ch.discipline_chimestry + Case DISCIPLINE_DEMENTATION + GetDiscipline = ch.discipline_dementation + Case DISCIPLINE_DOMINATE + GetDiscipline = ch.discipline_dominate + Case DISCIPLINE_FORTITUDE + GetDiscipline = ch.discipline_fortitude + Case DISCIPLINE_MELPOMINEE + GetDiscipline = ch.discipline_melpominee + Case DISCIPLINE_MORTIS + GetDiscipline = ch.discipline_mortis + Case DISCIPLINE_MYTHERCERIA + GetDiscipline = ch.discipline_mytherceria + Case DISCIPLINE_NECROMANCY + GetDiscipline = ch.discipline_necromancy + Case DISCIPLINE_OBEAH + GetDiscipline = ch.discipline_obeah + Case DISCIPLINE_OBFUSCATE + GetDiscipline = ch.discipline_obfuscate + Case DISCIPLINE_OBTENEBRATION + GetDiscipline = ch.discipline_obtenebration + Case DISCIPLINE_POTENCE + GetDiscipline = ch.discipline_potence + Case DISCIPLINE_PRESENCE + GetDiscipline = ch.discipline_presence + Case DISCIPLINE_PROTEAN + GetDiscipline = ch.discipline_protean + Case DISCIPLINE_QUIETUS + GetDiscipline = ch.discipline_quietus + Case DISCIPLINE_SERPENTIS + GetDiscipline = ch.discipline_serpentis + Case DISCIPLINE_SPIRITUS + GetDiscipline = ch.discipline_spiritus + Case DISCIPLINE_THANANTOSIS + GetDiscipline = ch.discipline_thanantosis + Case DISCIPLINE_THAUMATURGY + GetDiscipline = ch.discipline_thaumaturgy + Case DISCIPLINE_VICISSITUDE + GetDiscipline = ch.discipline_vicissitude + End Select +End Function + +Sub FillDisciplines (ch As CharacterType, disciplines() As Integer) + ReDim disciplines(1 To DISCIPLINES_COUNT) As Integer + For index = 1 To DISCIPLINES_COUNT + disciplines(index) = GetDiscipline(ch, index) + Next +End Sub + +' Virtues + +Function GetVirtuePoints () + GetVirtuePoints = VIRTUE_POINTS +End Function + +Sub SetVirtue (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case VIRTUE_SELF_CONTROL + ch.selfControl = value + Case VIRTUE_COURAGE + ch.courage = value + Case VIRTUE_CONSCIENCE + ch.conscience = value + End Select +End Sub + +Function GetVirtue (ch As CharacterType, index As Integer) + value = 0 + Select Case index + Case VIRTUE_SELF_CONTROL + value = ch.selfControl + Case VIRTUE_COURAGE + value = ch.courage + Case VIRTUE_CONSCIENCE + value = ch.conscience + End Select + GetVirtue = value +End Function + +Sub FillVirtues (ch As CharacterType, values() As Integer) + ReDim values(1 To VIRTUES_COUNT) As Integer + For index = 1 To VIRTUES_COUNT + values(index) = GetVirtue(ch, index) + Next +End Sub + +Function GetFreebiePoints(ch As CharacterType) + GetFreebiePoints = ch.freebiePoints +End Function + +Sub SetFreebiePoints(ch As CharacterType, points As Integer) + ch.freebiepoints = points +End Sub + +' Attributes + +Sub FillAttributeValues (ch As CharacterType, values() As Integer, groupIndex As Integer) + count = GetNumAttributesInGroup(groupIndex) + ReDim values(1 To count) As Integer + For i = 1 To count + values(i) = GetAttributeValue(ch, groupIndex, i) + Next +End Sub + +Function GetNumAttributesInGroup (index As Integer) + Select Case index + Case ATTRIBUTE_GROUP_PHYSICAL + count = PHYSICAL_ATTRIBUTES_COUNT + Case ATTRIBUTE_GROUP_SOCIAL + count = SOCIAL_ATTRIBUTES_COUNT + Case ATTRIBUTE_GROUP_MENTAL + count = MENTAL_ATTRIBUTES_COUNT + Case Else + count = 0 + End Select + GetNumAttributesInGroup = count +End Function + +Function GetAttributeName$ (groupIndex As Integer, attributeIndex As Integer) + attributeName$ = "" + Select Case groupIndex + Case ATTRIBUTE_GROUP_PHYSICAL + attributeName$ = PhysicalAttributes(attributeIndex) + Case ATTRIBUTE_GROUP_SOCIAL + attributeName$ = SocialAttributes(attributeIndex) + Case ATTRIBUTE_GROUP_MENTAL + attributeName$ = MentalAttributes(attributeIndex) + End Select + GetAttributeName = attributeName$ +End Function + +Sub FillAttributesInGroup (group As Integer, attributes() As String) + count = GetNumAttributesInGroup(group) + If count > 0 Then + ReDim attributes(1 To count) As String + Else + ReDim attributes(0) As String + End If + Select Case group + Case ATTRIBUTE_GROUP_PHYSICAL + For i = 1 To count + attributes(i) = PhysicalAttributes(i) + Next + Case ATTRIBUTE_GROUP_SOCIAL + For i = 1 To count + attributes(i) = SocialAttributes(i) + Next + Case ATTRIBUTE_GROUP_MENTAL + For i = 1 To count + attributes(i) = MentalAttributes(i) + Next + End Select +End Sub + +Sub FillAttributeAbbreviationsInGroup (group As Integer, abbreviations() As String, count As Integer) + count = GetNumAttributesInGroup(group) + If count > 0 Then + ReDim abbreviations(1 To count) As String + Else + ReDim abbreviations(0) As String + End If + Select Case group + Case ATTRIBUTE_GROUP_PHYSICAL + For i = 1 To count + abbreviations(i) = PhysicalAttributeAbbreviations(i) + Next + Case ATTRIBUTE_GROUP_SOCIAL + For i = 1 To count + abbreviations(i) = SocialAttributeAbbreviations(i) + Next + Case ATTRIBUTE_GROUP_MENTAL + For i = 1 To count + abbreviations(i) = MentalAttributeAbbreviations(i) + Next + End Select +End Sub + +Sub SetAttributeValue (ch As CharacterType, AttributeGroupIndex As Integer, AttributeIndex As Integer, Value As Integer) + Select Case AttributeGroupIndex + Case ATTRIBUTE_GROUP_PHYSICAL + Select Case AttributeIndex + Case ATTRIBUTE_STRENGTH + ch.attr_strength = Value + Case ATTRIBUTE_DEXTERITY + ch.attr_dexterity = Value + Case ATTRIBUTE_STAMINA + ch.attr_stamina = Value + End Select + Case ATTRIBUTE_GROUP_SOCIAL + Select Case AttributeIndex + Case ATTRIBUTE_CHARISMA + ch.attr_charisma = Value + Case ATTRIBUTE_MANIPULATION + ch.attr_manipulation = Value + Case ATTRIBUTE_APPEARANCE + ch.attr_appearance = Value + End Select + Case ATTRIBUTE_GROUP_MENTAL + Select Case AttributeIndex + Case ATTRIBUTE_INTELLIGENCE + ch.attr_intelligence = Value + Case ATTRIBUTE_PERCEPTION + ch.attr_perception = Value + Case ATTRIBUTE_WITS + ch.attr_wits = Value + End Select + End Select +End Sub + +Function GetAttributeValue (ch As CharacterType, attributeGroupIndex As Integer, attributeIndex As Integer) + GetAttributeValue = 0 + Select Case attributeGroupIndex + Case ATTRIBUTE_GROUP_PHYSICAL + Select Case attributeIndex + Case ATTRIBUTE_STRENGTH + GetAttributeValue = ch.attr_strength + Case ATTRIBUTE_DEXTERITY + GetAttributeValue = ch.attr_dexterity + Case ATTRIBUTE_STAMINA + GetAttributeValue = ch.attr_stamina + End Select + Case ATTRIBUTE_GROUP_SOCIAL + Select Case attributeIndex + Case ATTRIBUTE_CHARISMA + GetAttributeValue = ch.attr_charisma + Case ATTRIBUTE_MANIPULATION + GetAttributeValue = ch.attr_manipulation + Case ATTRIBUTE_APPEARANCE + GetAttributeValue = ch.attr_appearance + End Select + Case ATTRIBUTE_GROUP_MENTAL + Select Case attributeIndex + Case ATTRIBUTE_INTELLIGENCE + GetAttributeValue = ch.attr_intelligence + Case ATTRIBUTE_PERCEPTION + GetAttributeValue = ch.attr_perception + Case ATTRIBUTE_WITS + GetAttributeValue = ch.attr_wits + End Select + End Select +End Function + +Function GetAttributePointsForRank (rank As Integer) + GetAttributePointsForRank = 0 + Select Case rank + Case 1 + GetAttributePointsForRank = 7 + Case 2 + GetAttributePointsForRank = 5 + Case 3 + GetAttributePointsForRank = 3 + End Select +End Function + +' Abilities + +Sub SetAbilityValue (ch As CharacterType, groupIndex As Integer, index As Integer, value As Integer) + Select Case groupIndex + Case ABILITY_GROUP_TALENTS + Call SetTalent(ch, index, value) + Case ABILITY_GROUP_SKILLS + Call SetSkill(ch, index, value) + Case ABILITY_GROUP_KNOWLEDGES + Call SetKnowledge(ch, index, value) + End Select +End Sub + +Function GetAbilityValue (ch As CharacterType, abilityIndex As Integer, itemIndex As Integer) + GetAbilityValue = 0 + Select Case abilityIndex + Case ABILITY_GROUP_TALENTS + GetAbilityValue = GetTalent(ch, itemIndex) + Case ABILITY_GROUP_SKILLS + GetAbilityValue = GetSkill(ch, itemIndex) + Case ABILITY_GROUP_KNOWLEDGES + GetAbilityValue = GetKnowledge(ch, itemIndex) + End Select +End Function + +Function GetAbilityPointsForRank (rank As Integer) + GetAbilityPointsForRank = 0 + Select Case rank + Case 1 + GetAbilityPointsForRank = 13 + Case 2 + GetAbilityPointsForRank = 9 + Case 3 + GetAbilityPointsForRank = 5 + End Select +End Function + +Sub FillAbilityValues (ch As CharacterType, values() As Integer, groupIndex As Integer) + count = GetNumItemsForAbilityGroup(groupIndex) + ReDim values(1 To count) As Integer + For i = 1 To count + values(i) = GetAbilityValue(ch, groupIndex, i) + Next +End Sub + +Function GetNumItemsForAbilityGroup (index As Integer) + Select Case index + Case ABILITY_GROUP_TALENTS + count = TALENTS_COUNT + Case ABILITY_GROUP_SKILLS + count = SKILLS_COUNT + Case ABILITY_GROUP_KNOWLEDGES + count = KNOWLEDGES_COUNT + Case Else + count = 0 + End Select + GetNumItemsForAbilityGroup = count +End Function + +Function GetAbilityName$ (groupIndex As Integer, abilityIndex As Integer) + abilityName$ = "" + Select Case groupIndex + Case ABILITY_GROUP_TALENTS + abilityName$ = Talents(abilityIndex) + Case ABILITY_GROUP_SKILLS + abilityName$ = Skills(abilityIndex) + Case ABILITY_GROUP_KNOWLEDGES + abilityName$ = Knowledges(abilityIndex) + End Select + GetAbilityName = abilityName$ +End Function + +Sub FillAbilitiesForAbilityGroup (ability As Integer, items() As String) + count = GetNumItemsForAbilityGroup(ability) + If count > 0 Then + ReDim items(1 To count) As String + Else + ReDim items(0) As String + End If + Select Case ability + Case ABILITY_GROUP_TALENTS + For i = 1 To count + items(i) = Talents(i) + Next + Case ABILITY_GROUP_SKILLS + For i = 1 To count + items(i) = Skills(i) + Next + Case ABILITY_GROUP_KNOWLEDGES + For i = 1 To count + items(i) = Knowledges(i) + Next + End Select +End Sub + +' Ability - Talents + +Sub SetTalent (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case TALENT_ACTING + ch.talent_acting = value + Case TALENT_ALERTNESS + ch.talent_alertness = value + Case TALENT_ATHLETICS + ch.talent_athletics = value + Case TALENT_BRAWL + ch.talent_brawl = value + Case TALENT_DODGE + ch.talent_dodge = value + Case TALENT_EMPATHY + ch.talent_empathy = value + Case TALENT_INTIMIDATION + ch.talent_intimidation = value + Case TALENT_LEADERSHIP + ch.talent_leadership = value + Case TALENT_STREETWISE + ch.talent_streetwise = value + Case TALENT_SUBTERFUGE + ch.talent_subterfuge = value + End Select +End Sub + +Function GetTalent (ch As CharacterType, index As Integer) + Select Case index + Case TALENT_ACTING + GetTalent = ch.talent_acting + Case TALENT_ALERTNESS + GetTalent = ch.talent_alertness + Case TALENT_ATHLETICS + GetTalent = ch.talent_athletics + Case TALENT_BRAWL + GetTalent = ch.talent_brawl + Case TALENT_DODGE + GetTalent = ch.talent_dodge + Case TALENT_EMPATHY + GetTalent = ch.talent_empathy + Case TALENT_INTIMIDATION + GetTalent = ch.talent_intimidation + Case TALENT_LEADERSHIP + GetTalent = ch.talent_leadership + Case TALENT_STREETWISE + GetTalent = ch.talent_streetwise + Case TALENT_SUBTERFUGE + GetTalent = ch.talent_subterfuge + End Select +End Function + +' Ability - Skills + +Sub SetSkill (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case SKILL_ANIMAL_KEN + ch.skill_animalKen = value + Case SKILL_DRIVE + ch.skill_drive = value + Case SKILL_ETIQUETTE + ch.skill_etiquette = value + Case SKILL_FIREARMS + ch.skill_firearms = value + Case SKILL_MELEE + ch.skill_melee = value + Case SKILL_MUSIC + ch.skill_music = value + Case SKILL_REPAIR + ch.skill_repair = value + Case SKILL_SECURITY + ch.skill_security = value + Case SKILL_STEALTH + ch.skill_stealth = value + Case SKILL_SURVIVAL + ch.skill_survival = value + End Select +End Sub + +Function GetSkill (ch As CharacterType, index As Integer) + Select Case index + Case SKILL_ANIMAL_KEN + GetSkill = ch.skill_animalKen + Case SKILL_DRIVE + GetSkill = ch.skill_drive + Case SKILL_ETIQUETTE + GetSkill = ch.skill_etiquette + Case SKILL_FIREARMS + GetSkill = ch.skill_firearms + Case SKILL_MELEE + GetSkill = ch.skill_melee + Case SKILL_MUSIC + GetSkill = ch.skill_music + Case SKILL_REPAIR + GetSkill = ch.skill_repair + Case SKILL_SECURITY + GetSkill = ch.skill_security + Case SKILL_STEALTH + GetSkill = ch.skill_stealth + Case SKILL_SURVIVAL + GetSkill = ch.skill_survival + End Select +End Function + +' Ability - Knowledges + +Sub SetKnowledge (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case KNOWLEDGE_BUREAUCRACY + ch.knowledge_bureaucracy = value + Case KNOWLEDGE_COMPUTER + ch.knowledge_computer = value + Case KNOWLEDGE_FINANCE + ch.knowledge_finance = value + Case KNOWLEDGE_INVESTIGATION + ch.knowledge_investigation = value + Case KNOWLEDGE_LAW + ch.knowledge_law = value + Case KNOWLEDGE_LINGUISTICS + ch.knowledge_linguistics = value + Case KNOWLEDGE_MEDICINE + ch.knowledge_medicine = value + Case KNOWLEDGE_OCCULT + ch.knowledge_occult = value + Case KNOWLEDGE_POLITICS + ch.knowledge_politics = value + Case KNOWLEDGE_SCIENCE + ch.knowledge_science = value + End Select +End Sub + +Function GetKnowledge (ch As CharacterType, index As Integer) + Select Case index + Case KNOWLEDGE_BUREAUCRACY + GetKnowledge = ch.knowledge_bureaucracy + Case KNOWLEDGE_COMPUTER + GetKnowledge = ch.knowledge_computer + Case KNOWLEDGE_FINANCE + GetKnowledge = ch.knowledge_finance + Case KNOWLEDGE_INVESTIGATION + GetKnowledge = ch.knowledge_investigation + Case KNOWLEDGE_LAW + GetKnowledge = ch.knowledge_law + Case KNOWLEDGE_LINGUISTICS + GetKnowledge = ch.knowledge_linguistics + Case KNOWLEDGE_MEDICINE + GetKnowledge = ch.knowledge_medicine + Case KNOWLEDGE_OCCULT + GetKnowledge = ch.knowledge_occult + Case KNOWLEDGE_POLITICS + GetKnowledge = ch.knowledge_politics + Case KNOWLEDGE_SCIENCE + GetKnowledge = ch.knowledge_science + End Select +End Function + +' Backgrounds + +Sub SetBackground (ch As CharacterType, index As Integer, value As Integer) + Select Case index + Case BACKGROUND_ALLIES + ch.background_allies = value + Case BACKGROUND_CONTACTS + ch.background_contacts = value + Case BACKGROUND_FAME + ch.background_fame = value + Case BACKGROUND_GENERATION + ch.background_generation = value + Case BACKGROUND_HERD + ch.background_herd = value + Case BACKGROUND_INFLUENCE + ch.background_influence = value + Case BACKGROUND_MENTOR + ch.background_mentor = value + Case BACKGROUND_RESOURCES + ch.background_resources = value + Case BACKGROUND_RETAINERS + ch.background_retainers = value + Case BACKGROUND_STATUS + ch.background_status = value + End Select +End Sub + +Function GetBackground (ch As CharacterType, index As Integer) + Select Case index + Case BACKGROUND_ALLIES + GetBackground = ch.background_allies + Case BACKGROUND_CONTACTS + GetBackground = ch.background_contacts + Case BACKGROUND_FAME + GetBackground = ch.background_fame + Case BACKGROUND_GENERATION + GetBackground = ch.background_generation + Case BACKGROUND_HERD + GetBackground = ch.background_herd + Case BACKGROUND_INFLUENCE + GetBackground = ch.background_influence + Case BACKGROUND_MENTOR + GetBackground = ch.background_mentor + Case BACKGROUND_RESOURCES + GetBackground = ch.background_resources + Case BACKGROUND_RETAINERS + GetBackground = ch.background_retainers + Case BACKGROUND_STATUS + GetBackground = ch.background_status + End Select +End Function + +Sub FillBackgrounds (ch As CharacterType, backgrounds() As Integer) + For index = 1 To BACKGROUNDS_COUNT + backgrounds(index) = GetBackground(ch, index) + Next +End Sub + +Function GetBackgroundPoints () + GetBackgroundPoints = BACKGROUND_POINTS +End Function + +' Genders + +' Derangements + +Sub NewDerangement (derangement As DerangementType, id As Integer, label As String, textColor As Integer, description As +String) derangement.id = id derangement.label = label derangement.textColor = textColor derangement.description = +description End Sub + +Function GetAllDerangementsLine$ (ch As CharacterType) + Dim allDerangements(1) As DerangementType + Call FillDerangements(ch, allDerangements()) + allDerangementsString$ = "" + For i = 0 To UBound(allDerangements) - 1 + allDerangementsString$ = allDerangementsString$ + allDerangements(i).label + ", " + Next + GetAllDerangementsLine$ = allDerangementsString$ +End Function + +Sub FillDerangements (ch As CharacterType, myDerangements() As DerangementType) + count = 1 + If ch.derangementId < 0 Or ch.derangementId >= count Then + Exit Sub + End If + ReDim myDerangements(count) As DerangementType + myDerangements(0) = Derangements(ch.derangementId) +End Sub + +' Roads +function GetRoadName$(ch as charactertype) + getroadname = ch.roadName +end function + +sub SetRoadName(ch as charactertype, roadName as string) + ch.roadname = roadname +end sub + +function GetRoadValue(ch as charactertype) + getroadvalue = ch.roadValue +end function + +sub SetRoadValue(ch as charactertype, roadValue as integer) + ch.roadvalue = roadvalue +end sub + +' Freebies +sub NewFreebie (freebie As FreebieType, id As integer, cost As integer, freebieName As string, freebieLabel As string) + freebie.id = id + freebie.cost = cost + freebie.name = freebieName + freebie.label = freebieLabel +end sub + +' Scalars +function GetGeneration(ch as charactertype) + getgeneration = ch.generation +end function Sub Test 'End End Sub + + */ } // End namespace SBF