'VBScript 'The line above must be the very first line of the file. ' 'NOTE: 'This GCS file will only work with characters saved by 'GCA 4! ' Const LastUpdated = 20080312 'Last Updated: March 12, 2008 ' Const Stats = 1 Const Ads = 2 Const Disads = 3 Const Quirks = 4 Const Perks = 5 Const Skills = 6 Const Spells = 7 Const Equipment = 8 Const Packages = 9 const optYesNo = 0 const optTrueFalse = 1 const optList = 2 const optListNumber = 3 const optListFlag = 4 const optColor = 5 const optFont = 6 const optText = 7 const optListOrdered = 8 const optCaption = 9 const FieldEditBar = 0 'also the default if none is specified const FieldText = 1 const FieldButton = 2 const FieldLongText = 3 const FieldSettableText = 4 'for settable calced tags, currently only "score" or "level" const MinSpace = 0.0625 const ChildIndentLeft = 0.125 Const Black = &H0 Const Grey = &HCCCCCC const Red = &H0101FF const LightRed = &HCCCCFF const Green = &H01FF01 const LightGreen = &HCCFFCC Const Blue = &HFF0000 const LightBlue = &HFFCCCC const Cyan = &HFFFF00 const LightCyan = &HFFFFCC const Yellow = &H01FFFF const LightYellow = &HCCFFFF const Magenta = &HFF00FF const LightMagenta = &HFFCCFF const Orange = &H33CCFF dim BoxColor(), ShadeColor() Dim FormFont, FormFontSize Dim UserFont, UserFontSize Dim FormFontColor, UserFontColor Dim ShowModValues dim ColumnTop, ColumnWidth, ColumnHeight, MaxCols dim GroupChildren dim Shade, ShadeAll dim UseFootnotes, FootnoteBlock dim PseudoTop '**************************************** 'Creating options '**************************************** Sub CharacterSheetOptions() 'AddOption(OptionName As Variant, ' Optional OptionType As Variant = 0, ' Optional OptionList As Variant = "", ' Optional OptionDefault As Variant = True, ' Optional UserPrompt As Variant = "Select an option") 'The spacer/headers used below are all headers. If you just want 'a spacer, then set UserPrompt = "" and no line will be drawn, either '* Fonts * OptionName = "Section_Fonts" OptionType = -1 UserPrompt = "Font and Text Options" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "FormFont" OptionType = optFont OptionDefault = "Arial|10" UserPrompt = "Font for the form text items" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "FormFontColor" OptionType = optColor OptionDefault = 0 UserPrompt = "Color for the form text items" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "UserFont" OptionType = optFont OptionDefault = "Arial|10" UserPrompt = "Font for the user text items" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "UserFontColor" OptionType = optColor OptionDefault = 0 UserPrompt = "Color for the user text items" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt '* Included Sections * OptionName = "Section_TextBlocks" OptionType = -1 UserPrompt = "Sections to Include" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "ShowScratchStatsBlock" OptionType = optYesNo OptionDefault = False UserPrompt = "Include a 'scratch block' for easier tracking of attributes with constantly changing values? (Examples would be Hit Points or Fatigue Points, which might change frequently.)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowMovementBlock" OptionType = optYesNo OptionDefault = True UserPrompt = "Include a block for various movement rates, below the Encumbrance section?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowBodyPartsBlock" OptionType = optYesNo OptionDefault = False UserPrompt = "Include the Body Parts image (for DR coverage), below the Movement section? (If yes, turn off Protection Block below.)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowBodyPartsDB" OptionType = optYesNo OptionDefault = False UserPrompt = "On the Body Parts image, show DB values?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowProtectionBlock" OptionType = optYesNo OptionDefault = True UserPrompt = "Include a block for various protection values, below the Movement section? (If yes, turn off Body Parts block above.)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowPointSummaryBlock" OptionType = optYesNo OptionDefault = True UserPrompt = "Include a block for the Points Summary, below the Protection section?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowAllAdditionalStats" OptionType = optYesNo OptionDefault = False UserPrompt = "Include a block showing all additional stats, below the Point Summary section?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowAllAdditionalStats2" OptionType = optYesNo OptionDefault = False UserPrompt = "Include a block showing all additional stats, below the Reaction Modifiers section? (Note that you probably don't want to answer Yes to both this option and the one above.)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowSpells" OptionType = optYesNo OptionDefault = True UserPrompt = "Include for the character's spells? (If you're printing a Grimoire, you may want to say No here.)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt '* Additional Attributes to include in Attributes block * OptionName = "Section_MainAttributes" OptionType = -1 UserPrompt = "Additional Attributes for Attributes Block" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "AdditionalAttributes" OptionType = optText OptionDefault = "" UserPrompt = "If there are other attributes you'd like to list in the primary Attributes block (especially if you don't want to print the Additional Stats block), list them here in the order you'd like them to be listed (separated by commas), and they will be shown following the normally included attributes. Use a stat name of - (minus) for a blank line at that point, and -- (minus minus) for a line to be drawn at that point." Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt '* Scratch Stats settings * OptionName = "Section_ScratchStats" OptionType = -1 UserPrompt = "Attributes 'Scratch Block' section. (If you use one.)" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "ScratchStats" OptionType = optText OptionDefault = "Hit Points, Fatigue Points" UserPrompt = "List here the attributes you want included, using the full name of the attribute, and separating them by commas." Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ScratchStatLines" OptionType = optText OptionDefault = "2" UserPrompt = "The number of text lines you want each scratch attribute to have available for you to write on. You must have at least one, and more lines will give you more space to write in." Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt '* Column/Page Breaks * OptionName = "Section_Breaks" OptionType = -1 UserPrompt = "Required Column and/or Page Breaks" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "ReactionColumn" OptionType = optYesNo OptionDefault = False UserPrompt = "Force a new column before printing the Reaction Modifiers block?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "LanguagesColumn" OptionType = optYesNo OptionDefault = False UserPrompt = "Force a new column before printing the Languages block?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "AdvantagesColumn" OptionType = optYesNo OptionDefault = False UserPrompt = "Force a new column before printing the Advantages & Perks block?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "DisadvantagesColumn" OptionType = optYesNo OptionDefault = False UserPrompt = "Force a new column before printing the Disadvantages & Quirks block?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "SkillsColumn" OptionType = optYesNo OptionDefault = False UserPrompt = "Force a new column before printing the Skills block?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "SpellsColumn" OptionType = optYesNo OptionDefault = False UserPrompt = "Force a new column before printing the Spells block?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "PortraitNotesBreak" OptionType = optYesNo OptionDefault = True UserPrompt = "Force the Portrait, Description, and Notes sections to begin on a new page? (Recommended)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ACaption" OptionType = optCaption UserPrompt = "ONLY set the previous option to No if you have enough room to completely print the Description and Notes items in the amount of space available in the columns being used. This means they must be short. There's currently no way to flow the text correctly below the weapon mode blocks, so text that wraps to a new column will print over the top of the existing weapon information." DisplayFormat = "|" & Red 'a text string in the form of "BackColor|ForeColor|Bold|Italic|LeadSpace|FollowSpace|CaptionBackColor" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt, DisplayFormat OptionName = "PortraitPageOne" OptionType = optYesNo OptionDefault = False UserPrompt = "Print the Portrait on Page 1? (It'll squish to fit under the last text printed in the last column printed.)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt '* Show Bonuses * OptionName = "Section_Bonuses" OptionType = -1 UserPrompt = "Options for Displaying Bonuses" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "UseFootnotes" OptionType = optYesNo OptionDefault = True UserPrompt = "Use footnotes to list bonuses? (If you select Yes, you'll generally want to turn off the options to print bonuses under applicable traits, or you'll get both listings.)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "FootnoteBlock" OptionType = optYesNo OptionDefault = True UserPrompt = "If using footnotes, do you want to print all the footnotes in a single block? (If No, footnotes will start over for each trait section on the sheet.)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowLanguageBonuses" OptionType = optYesNo OptionDefault = False UserPrompt = "Show any applicable bonuses under each language?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowStatBonuses" OptionType = optYesNo OptionDefault = False UserPrompt = "Show any applicable bonuses under each stat? (Applies only to the Additional Stats block.)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowAdBonuses" OptionType = optYesNo OptionDefault = False UserPrompt = "Show any applicable bonuses under each advantage?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowDisadBonuses" OptionType = optYesNo OptionDefault = False UserPrompt = "Show any applicable bonuses under each disadvantage?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowSkillBonuses" OptionType = optYesNo OptionDefault = False UserPrompt = "Show any applicable bonuses under each skill?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt '* Show Conditionals * OptionName = "Section_Conditionals" OptionType = -1 UserPrompt = "Options for Displaying Conditional Bonuses" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "ShowLanguageConditionals" OptionType = optYesNo OptionDefault = True UserPrompt = "Show any applicable conditional bonuses under each language?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowStatConditionals" OptionType = optYesNo OptionDefault = True UserPrompt = "Show any applicable conditional bonuses under each additional stat? (Applies only to the Additional Stats block.)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowAdConditionals" OptionType = optYesNo OptionDefault = True UserPrompt = "Show any applicable conditional bonuses under each advantage?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowDisadConditionals" OptionType = optYesNo OptionDefault = True UserPrompt = "Show any applicable conditional bonuses under each disadvantage?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ShowSkillConditionals" OptionType = optYesNo OptionDefault = True UserPrompt = "Show any applicable conditional bonuses under each skill?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt '* Misc * OptionName = "Section_Misc" OptionType = -1 UserPrompt = "Miscellaneous Options" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "ShowModValues" OptionType = optYesNo OptionDefault = False UserPrompt = "Show the values for modifiers applied to traits?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "GroupChildren" OptionType = optYesNo OptionDefault = True UserPrompt = "Group child items under their parent items?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "EncWeights" OptionType = optText OptionDefault = "lbs" UserPrompt = "Weight abbreviation for encumbrance values?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt '* Template Item Options * OptionName = "Section_TemplateItems" OptionType = -1 UserPrompt = "Template/Meta-Trait Item Options" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "ShowComponents" OptionType = optYesNo OptionDefault = False UserPrompt = "List the component traits under the template/meta-trait listing?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "ParagraphComponents" OptionType = optYesNo OptionDefault = True UserPrompt = "If yes for the above option, use a paragraph format instead of a line-by-line format?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt '* Skill Item Options * OptionName = "Section_SkillItems" OptionType = -1 UserPrompt = "Skill Item Options" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "ShowParry" OptionType = optYesNo OptionDefault = False UserPrompt = "Show Parry or Block, if applicable, under the appropriate skills?" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt '* Hidden Items * OptionName = "Section_HiddenItems" OptionType = -1 UserPrompt = "Hidden Trait Options" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "ShowHiddenTemplates" OptionType = optYesNo UserPrompt = "Print hidden templates on the sheet?" Options.AddOption OptionName, OptionType, , False, UserPrompt OptionName = "ShowHiddenAds" OptionType = optYesNo UserPrompt = "Print hidden advantages on the sheet?" Options.AddOption OptionName, OptionType, , False, UserPrompt OptionName = "ShowHiddenDisads" OptionType = optYesNo UserPrompt = "Print hidden disadvantages on the sheet?" Options.AddOption OptionName, OptionType, , False, UserPrompt OptionName = "ShowHiddenSkills" OptionType = optYesNo UserPrompt = "Print hidden skills on the sheet?" Options.AddOption OptionName, OptionType, , False, UserPrompt OptionName = "ShowHiddenSpells" OptionType = optYesNo UserPrompt = "Print hidden spells on the sheet?" Options.AddOption OptionName, OptionType, , False, UserPrompt OptionName = "ShowHiddenEquipment" OptionType = optYesNo UserPrompt = "Print hidden equipment on the sheet?" Options.AddOption OptionName, OptionType, , False, UserPrompt '* Colors * OptionName = "Section_Colors" OptionType = -1 UserPrompt = "Box and Shading Colors" Options.AddOption OptionName, OptionType, , , UserPrompt OptionName = "StatsBoxColor" OptionType = optColor OptionDefault = Black UserPrompt = "Color for the Attribute box" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "StatsShadeColor" OptionType = optColor OptionDefault = Grey UserPrompt = "Color for shading alternate items in the Attribute box (set to white for no shading)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "AdsBoxColor" OptionType = optColor OptionDefault = Green UserPrompt = "Color for the Advantages (plus Languages and Cultural Familiarities) box" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "AdsShadeColor" OptionType = optColor OptionDefault = LightGreen UserPrompt = "Color for shading alternate items in the Advantages box (set to white for no shading)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "TemplatesBoxColor" OptionType = optColor OptionDefault = Yellow UserPrompt = "Color for the Templates box" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "TemplatesShadeColor" OptionType = optColor OptionDefault = LightYellow UserPrompt = "Color for shading alternate items in the Templates box (set to white for no shading)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "DisadsBoxColor" OptionType = optColor OptionDefault = Red UserPrompt = "Color for the Disadvantages box" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "DisadsShadeColor" OptionType = optColor OptionDefault = LightRed UserPrompt = "Color for shading alternate items in the Disadvantages box (set to white for no shading)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "SkillsBoxColor" OptionType = optColor OptionDefault = Blue UserPrompt = "Color for the Skills box" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "SkillsShadeColor" OptionType = optColor OptionDefault = LightBlue UserPrompt = "Color for shading alternate items in the Skills box (set to white for no shading)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "SpellsBoxColor" OptionType = optColor OptionDefault = Cyan UserPrompt = "Color for the Spells box" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "SpellsShadeColor" OptionType = optColor OptionDefault = LightCyan UserPrompt = "Color for shading alternate items in the Spells box (set to white for no shading)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "EquipmentBoxColor" OptionType = optColor OptionDefault = Magenta UserPrompt = "Color for the Equipment box" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt OptionName = "EquipmentShadeColor" OptionType = optColor OptionDefault = LightMagenta UserPrompt = "Color for shading alternate items in the Equipment box (set to white for no shading)" Options.AddOption OptionName, OptionType, , OptionDefault, UserPrompt End Sub '**************************************** 'The Main Module, where the form starts '**************************************** Sub Main() if not InQuickView then DebugLog "Armin's_Color_Flow_Sheet.GCS (" & LastUpdated & ")" scalemode = 0 'inches IndentTab = 0.25 headerfont="Arial" headerfontsize=8 'get the font options optionFont = Options.Value("FormFont") FormFont = ReturnFontName(optionFont) FormFontSize = ReturnFontSize(optionFont) if FormFontSize > 50 then 'work around a bug in regional setting support FormFontSize = FormFontSize/100 end if optionFont = Options.Value("UserFont") UserFont = ReturnFontName(optionFont) UserFontSize = ReturnFontSize(optionFont) if UserFontSize > 50 then 'work around a bug in regional setting support UserFontSize = UserFontSize/100 end if FormFontColor = Options.Value("FormFontColor") UserFontColor = Options.Value("UserFontColor") GroupChildren = Options.Value("GroupChildren") ShowModValues = Options.Value("ShowModValues") UseFootnotes = Options.Value("UseFootnotes") FootnoteBlock = Options.Value("FootnoteBlock") Redim BoxColor(Packages) BoxColor(Stats) = Options.Value("StatsBoxColor") BoxColor(Packages) = Options.Value("TemplatesBoxColor") BoxColor(Ads) = Options.Value("AdsBoxColor") BoxColor(Perks) = Options.Value("AdsBoxColor") BoxColor(Disads) = Options.Value("DisadsBoxColor") BoxColor(Quirks) = Options.Value("DisadsBoxColor") BoxColor(Skills) = Options.Value("SkillsBoxColor") BoxColor(Spells) = Options.Value("SpellsBoxColor") BoxColor(Equipment) = Options.Value("EquipmentBoxColor") Redim ShadeColor(Packages) ShadeColor(Stats) = Options.Value("StatsShadeColor") ShadeColor(Packages) = Options.Value("TemplatesShadeColor") ShadeColor(Ads) = Options.Value("AdsShadeColor") ShadeColor(Perks) = Options.Value("AdsShadeColor") ShadeColor(Disads) = Options.Value("DisadsShadeColor") ShadeColor(Quirks) = Options.Value("DisadsShadeColor") ShadeColor(Skills) = Options.Value("SkillsShadeColor") ShadeColor(Spells) = Options.Value("SpellsShadeColor") ShadeColor(Equipment) = Options.Value("EquipmentShadeColor") ClearFootnotes FootnoteStyle = 0 'SJGames standard; 1 = Numbers Columns = 3 if PageWidth <= 7.25 then Columns = 2 if PageWidth <= 5 then Columns = 1 if PageWidth >= 11 then Columns = 4 if PageWidth >= 13 then Columns = 5 if PageWidth >= 16 then Columns = 6 MaxCols = Columns Call SetMargins Call SetHeader Call SetFooter ColumnHeight = PageHeight - MarginBottom '10.5 SetFormFont printer.CalcText = "a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z " ColumnWidth = TextWid CurrentY = margintop Call PrintStats if Options.Value("ShowScratchStatsBlock") then Call PrintScratchStats Call PrintEncumbrance if Options.Value("ShowMovementBlock") then Call PrintMovement if Options.Value("ShowBodyPartsBlock") then Call PrintBodyParts if Options.Value("ShowProtectionBlock") then Call PrintProtection if Options.Value("ShowPointSummaryBlock") then Call PrintPointSummary If Options.Value("ShowAllAdditionalStats") then Call PrintAdditionalStats Call PrintReaction If Options.Value("ShowAllAdditionalStats2") then Call PrintAdditionalStats Call PrintLanguages Call PrintCultures Call PrintAdvantages Call PrintPackages Call PrintDisadvantages Call PrintSkills if Options.Value("ShowSpells") then Call PrintSpells if UseFootnotes and FootnoteBlock then Call PrintFootnoteBlock if Options.Value("PortraitPageOne") then Call PrintPortraitSquish end if NewPage Columns = 1 Call PrintHandWeapons Call PrintRangedWeapons Columns = MaxCols Call PrintEquipment If Len(Char.portrait) = 0 Then If Len(Char.Description) = 0 Then If Len(Char.Notes) = 0 Then Exit Sub End If End If End If if Options.Value("PortraitNotesBreak") then NewPage if MaxCols > 2 then Columns = MaxCols - 1 if not Options.Value("PortraitPageOne") then Call PrintPortrait Call PrintDescription Call PrintNotes else if not Options.Value("PortraitPageOne") then Call PrintPortraitSquish end if NewColumn Paragraph = "" 'needed to reset CurrentX to column left position CurrentY = PseudoTop 'needed to restore position at top of column after paragraph above Call PrintDescriptionSquish NewColumn Paragraph = "" 'needed to reset CurrentX to column left position CurrentY = PseudoTop 'needed to restore position at top of column after paragraph above Call PrintNotesSquish end if End Sub '**************************************** 'Set Font to the User Prefs '**************************************** Sub SetUserFont() FontName = UserFont FontSize = UserFontSize TextColor = UserFontColor End Sub '**************************************** 'Set Font to the Form Prefs '**************************************** Sub SetFormFont() FontName = FormFont FontSize = FormFontSize TextColor = FormFontColor End Sub '**************************************** 'set the margins for the character sheets '**************************************** Sub SetMargins() MarginLeft = 0.75 marginright = 0.75 margintop = 0.75 marginbottom = 0.75 pageborder = 3 End Sub '**************************************** 'Create the header for the character sheets '**************************************** Sub SetHeader() header = "GCA|" & Char.Name & "|Race: " & Char.Race End Sub '**************************************** 'Create the footer for the character sheets '**************************************** Sub SetFooter() footer = "||{GCA\line\b %d}" End Sub '**************************************** 'Check if we're too close to the bottom 'of the page to comfortably start a new 'section. '**************************************** Sub CheckNewColumn(distance) Dim curPos, chkPos curPos = CurrentY chkPos = pageheight - marginbottom - distance If curPos >= chkPos Then NewColumn Paragraph = "" 'needed to reset CurrentX to column left position CurrentY = MarginTop 'needed to restore position at top of column after paragraph above End If End Sub 'Squish Version Sub CheckNewColumnSquish(distance) Dim curPos, chkPos curPos = CurrentY chkPos = pageheight - marginbottom - distance If curPos >= chkPos Then NewColumn Paragraph = "" 'needed to reset CurrentX to column left position CurrentY = PseudoTop 'needed to restore position at top of column after paragraph above End If End Sub '******************************************************************************** '* '* Print the stats '* '******************************************************************************** '**************************************** 'Change Columns For Stats '**************************************** Sub NewStatColumn(BoxTop, ColLeft, ColRight, NewTop, NameLeft, ScoreLeft, ScoreRight, CostColRight, LeftIndent) 'ran out of room tH = TextHeight("DX") 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, ColumnHeight, True, BoxColor(Stats), -1 'create a new column NewColumn BoxTop = MarginTop ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CurrentX = ColLeft CurrentY = MarginTop NewTop = CurrentY CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace ScoreRight = ColRight - 0.5 ScoreLeft = ScoreRight - 0.375 End Sub '**************************************** 'Print One Item '**************************************** Function PrintStatType(curItem, LeftIndent, BoxTop, ColLeft, ColRight) NewTop = CurrentY SetUserFont tW = TextWidth("DX") tH = TextHeight("DX") CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace ScoreRight = ColRight - 0.5 ScoreLeft = ScoreRight - 0.375 'create the long-form name of the item tmp = Char.Items(curItem).FullName if UseFootnotes then fn = "" tmpF = Char.Items(curItem).TagItem("bonuslist") If tmpF <> "" Then tmpF = "Includes: " & tmpF fn = AddFootnote(tmpF) End If if fn <> "" then if FootnoteStyle = 1 then tmp = tmp & "[" & trim(fn) & "]" else tmp = tmp & fn end if end if end if 'calc size of area needed SetFormFont TextBox tmp, NameLeft, CurrentY, ScoreLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewStatColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, ScoreLeft, ScoreRight, CostColRight, LeftIndent end if 'draw the flag pic CurrentY = NewTop CurrentX = ColLeft 'DrawTraitFlagPic newfield 'print the name if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(Stats), ShadeColor(Stats) end if CurrentY = NewTop TextBox tmp, NameLeft, CurrentY, ScoreLeft - NameLeft, NameHeight, True 'print the score SetUserFont CurrentY = NewTop Field.Clear Field.Page = CurrentPage Field.Top = CurrentY * 1440 Field.Left = (ScoreRight - 0.375) * 1440 Field.Bottom = (CurrentY + tH) * 1440 Field.Right = ScoreRight * 1440 Field.Trait = Char.Items(curItem) Field.FieldType = 4 'settable calced tag Field.Tag = "score" Field.AddCopyTo Fields printer.BrushColor = RGB(255, 128, 164) printer.PenColor = RGB(255, 128, 164) printer.drawrectangle field.left, field.top, field.right, field.bottom PrintAtRight Char.Items(curitem).TagItem("score"), ScoreRight 'print the points CurrentY = NewTop PrintAtRight Char.Items(curitem).TagItem("points"), CostColRight SetFormFont CurrentX = ColLeft CurrentY = NewTop + NameHeight 'print bonuses DoIt = False 'if Options.Value("ShowAdBonuses") then DoIt = True If DoIt Then FontSize = CInt(FormFontSize / 2 + 2.5) tmp = Char.Items(curitem).TagItem("bonuslist") If tmp <> "" Then NewTop = CurrentY tmp = "Includes: " & tmp TextBox tmp, NameLeft, CurrentY, ScoreLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewStatColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, ScoreLeft, ScoreRight, CostColRight, LeftIndent end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(Stats), ShadeColor(Stats) end if TextBox tmp, NameLeft, CurrentY, ScoreLeft - NameLeft, NameHeight, True CurrentY = NewTop + NameHeight End If End If 'print conditionals DoIt = False 'if Options.Value("ShowAdConditionals") then DoIt = True If DoIt Then tmp = Char.Items(curitem).TagItem("conditionallist") If tmp <> "" Then FontSize = CInt(FormFontSize / 2 + 2.5) NewTop = CurrentY tmp = "Conditional: " & tmp TextBox tmp, NameLeft, CurrentY, ScoreLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewStatColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, ScoreLeft, ScoreRight, CostColRight, LeftIndent end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(Stats), ShadeColor(Stats) end if TextBox tmp, NameLeft, CurrentY, ScoreLeft - NameLeft, NameHeight, True CurrentY = NewTop + NameHeight End If End If SetFormFont Shade = Not Shade PrintStatType = True End Function '**************************************** 'Print Whole List '**************************************** Sub PrintStats() CheckNewColumn 0.5 ShadeAll = False Shade = True SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace ScoreRight = ColRight - 0.5 ScoreLeft = ScoreRight - 0.375 curTop = CurrentY FontBold = True PrintCentered "Attributes", ColLeft, ColRight FontBold = False paragraph = "" curTop = CurrentY FontUnderline = True CurrentY = curTop PrintAtRight "Pts", CostColRight CurrentY = curTop PrintAtLeft "Name", NameLeft CurrentY = curTop PrintAtRight "Score", ScoreRight CurrentY = curTop PrintAtRight "Current", ColRight FontUnderline = False CurrentY = curTop + tH '***** '* Print Stats '***** CurStat = "ST" ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if CurStat = "DX" ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if CurStat = "IQ" ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if CurStat = "HT" ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if CurStat = "Hit Points" ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if CurStat = "Fatigue Points" ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if CurStat = "Will" ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if CurStat = "Perception" ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if CurStat = "Basic Speed" ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if CurStat = "Basic Move" ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if 'handle AdditionalAttributes AddAttsOption = Options.Value("AdditionalAttributes") MoreStats = Split(AddAttsOption, ",") For i = LBound(MoreStats) To UBound(MoreStats) CurStat = Trim(MoreStats(i)) if CurStat = "-" then 'Spacer Paragraph = "" elseif CurStat = "--" then DrawLine ColLeft, CurrentY, ColRight, CurrentY, BoxColor(Stats) else ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintStatType(ListLoc, 0, BoxTop, ColLeft, ColRight) end if end if next if UseFootnotes and not FootnoteBlock then ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace ScoreRight = ColRight - 0.5 ScoreLeft = ScoreRight - 0.375 CurrentY = CurrentY + tH/2 FontSize = CInt(FormFontSize / 2 + 2.5) for i = 1 to FootnoteCount NewTop = CurrentY if FootnoteStyle = 1 then fn = "[" & Trim(FootnoteSymbol(i)) & "]" else fn = FootnoteSymbol(i) end if tmp = fn & " " & Footnote(i) TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewStatColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, ScoreLeft, ScoreRight, CostColRight, LeftIndent end if 'PrintAtLeft fn, NameLeft TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, NameHeight, True CurrentY = NewTop + NameHeight next SetFormFont end if 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Stats), -1 Paragraph = "" End Sub '**************************************** 'Print Scratch Stats '**************************************** '**************************************** 'Print One Item '**************************************** Function PrintScratchStat(curItem, LeftIndent, BoxTop, ColLeft, ColRight) NewTop = CurrentY SetUserFont tW = TextWidth("DX") tH = TextHeight("DX") NumLines = CInt(Options.Value("ScratchStatLines")) if NumLines < 1 then NumLines = 1 if NumLines > 10 then NumLines = 10 LineHeight = NumLines * tH NameLeft = ColLeft + MinSpace 'create the long-form name of the item tmp = Char.Items(curItem).FullName & ": " & Char.Items(curitem).TagItem("score") 'calc size of area needed SetFormFont TextBox tmp, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei if NameHeight > LineHeight then LineHeight = NameHeight if NewTop + LineHeight > ColumnHeight then 'ran out of room NewStatColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, ScoreLeft, ScoreRight, CostColRight, LeftIndent NameLeft = ColLeft + MinSpace end if 'print the name if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + LineHeight, False, ShadeColor(Stats), ShadeColor(Stats) end if CurrentY = NewTop TextBox tmp, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True SetFormFont CurrentX = ColLeft CurrentY = NewTop + LineHeight Shade = Not Shade PrintScratchStat = True End Function '**************************************** 'Print Scratch Stats '**************************************** Sub PrintScratchStats() CheckNewColumn 0.5 ShadeAll = False Shade = True SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing curTop = CurrentY FontBold = True PrintCentered "Attributes Scratch Space", ColLeft, ColRight FontBold = False paragraph = "" curTop = CurrentY 'handle ScratchStats AddAttsOption = Options.Value("ScratchStats") MoreStats = Split(AddAttsOption, ",") For i = LBound(MoreStats) To UBound(MoreStats) CurStat = Trim(MoreStats(i)) if CurStat = "-" then 'Spacer Paragraph = "" elseif CurStat = "--" then DrawLine ColLeft, CurrentY, ColRight, CurrentY, BoxColor(Stats) else ListLoc = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc > 0 then okay = PrintScratchStat(ListLoc, 0, BoxTop, ColLeft, ColRight) end if end if next 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Stats), -1 Paragraph = "" End Sub '**************************************** 'Print Encumbrance info '**************************************** Sub PrintEncumbrance() CheckNewColumn 1.5 BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing SetUserFont txtHgt = textheight("None") SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") curTop = CurrentY FontBold = True PrintCentered "Encumbrance", ColLeft, ColRight FontBold = False paragraph = "" chkBoxLeft = ColLeft + MinSpace chkBoxRight = chkBoxLeft + txtHgt EncCol = chkBoxRight + MinSpace dgCol = ColRight - MinSpace mvCol = dgCol - 0.5 lbCol = mvCol - 0.375 if Columnwidth < 2 then lbCol = mvCol - 0.275 end if FontUnderline = True PrintAtLeft "Encumbrance", ColLeft + MinSpace PrintAtRight "Move", mvCol PrintAtRight "Dodge", dgCol FontUnderline = False ReDim EncText(5) ReDim EncScore(5) ReDim EncMove(5) ReDim ListLoc(5) EncText(1) = "None" EncText(2) = "Light" EncText(3) = "Med" EncText(4) = "Hvy" EncText(5) = "XHvy" EncWeights = Options.Value("EncWeights") ListLoc(1) = Char.ItemPositionByNameAndExt("No Encumbrance", Stats) ListLoc(2) = Char.ItemPositionByNameAndExt("Light Encumbrance", Stats) ListLoc(3) = Char.ItemPositionByNameAndExt("Medium Encumbrance", Stats) ListLoc(4) = Char.ItemPositionByNameAndExt("Heavy Encumbrance", Stats) ListLoc(5) = Char.ItemPositionByNameAndExt("X-Heavy Encumbrance", Stats) EncScore(1) = Char.Items(ListLoc(1)).TagItem("score") & " " & EncWeights EncScore(2) = Char.Items(ListLoc(2)).TagItem("score") & " " & EncWeights EncScore(3) = Char.Items(ListLoc(3)).TagItem("score") & " " & EncWeights EncScore(4) = Char.Items(ListLoc(4)).TagItem("score") & " " & EncWeights EncScore(5) = Char.Items(ListLoc(5)).TagItem("score") & " " & EncWeights ListLoc(1) = Char.ItemPositionByNameAndExt("No Encumbrance Move", Stats) ListLoc(2) = Char.ItemPositionByNameAndExt("Light Encumbrance Move", Stats) ListLoc(3) = Char.ItemPositionByNameAndExt("Medium Encumbrance Move", Stats) ListLoc(4) = Char.ItemPositionByNameAndExt("Heavy Encumbrance Move", Stats) ListLoc(5) = Char.ItemPositionByNameAndExt("X-Heavy Encumbrance Move", Stats) EncMove(1) = Char.Items(ListLoc(1)).TagItem("score") EncMove(2) = Char.Items(ListLoc(2)).TagItem("score") EncMove(3) = Char.Items(ListLoc(3)).TagItem("score") EncMove(4) = Char.Items(ListLoc(4)).TagItem("score") EncMove(5) = Char.Items(ListLoc(5)).TagItem("score") CurStat = "Dodge" ListLoc(1) = Char.ItemPositionByNameAndExt(CurStat, Stats) if ListLoc(1) > 0 then Dodge = Char.Items(ListLoc(1)).TagItem("score") Else Dodge = 0 end if txtHgt = textheight("None (0)") For i = 1 To 5 CurrentX = ColLeft + 0.125 CurrentY = BoxTop + 0.125 + (i * txtHgt * 1.2) if char.encumbrancelevel = i - 1 then FontBold = True else FontBold = False 'make a checkbox chkBoxTop = CurrentY chkBoxBottom = chkBoxTop + txtHgt DrawBox chkBoxLeft, chkBoxTop, chkBoxRight, chkBoxBottom, False if char.encumbrancelevel +1 = i then SetUserFont PrintCentered "X", chkBoxLeft, chkBoxRight SetFormFont end if PrintAtLeft EncText(i), EncCol SetUserFont PrintAtRight EncScore(i), lbCol PrintAtRight EncMove(i), mvCol PrintAtRight Dodge - i + 1, dgCol SetFormFont Next FontBold = False CurrentY = BoxTop + 0.125 + (i * txtHgt * 1.2) 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Stats), -1 Paragraph = "" End Sub '**************************************** 'Print movement info '**************************************** Sub PrintMovement() CheckNewColumn 0.5 ShadeAll = False Shade = True BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") NameLeft = ColLeft + MinSpace Redim EL(3) EL(3) = ColRight EL(2) = EL(3) - .375 EL(1) = EL(2) - .375 EL(0) = EL(1) - .375 curTop = CurrentY FontBold = True PrintCentered "Movement", ColLeft, ColRight FontBold = False paragraph = "" curTop = CurrentY Redim LevelNames(4) LevelNames(0) = "None" LevelNames(1) = "Lgt" LevelNames(2) = "Med" LevelNames(3) = "Hvy" LevelNames(4) = "XHvy" select case char.EncumbranceLevel case 0, 1 StartAt = 0 case 2 'med StartAt = 1 case else 'hvy StartAt = 2 end select FontUnderline = True PrintAtLeft "Type", NameLeft CurrentY = curTop For p = StartAt to StartAt + 2 c = p - StartAt if p = char.EncumbranceLevel then FontBold = True else FontBold = False PrintCentered LevelNames(p), EL(c), EL(c+1) Next FontBold = False FontUnderline = False 'print the moves CurrentY = CurTop + tH For i = 1 to 5 select case i case 1 curStat = "Air Move" case 2 curStat = "Ground Move" case 3 curStat = "Space Move" case 4 curStat = "Tunneling Move" case 5 curStat = "Water Move" end select NewTop = CurrentY ListLoc = Char.ItemPositionByNameAndExt(curStat, Stats) if ListLoc > 0 then BaseScore = Char.Items(ListLoc).TagItem("basescore") Score = Char.Items(ListLoc).TagItem("score") if Score <> 0 then 'calc size of area needed SetFormFont TextBox curStat, NameLeft, CurTop, EL(0) - NameLeft, 0, True, True, False NameHeight = TextHei if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(Stats), ShadeColor(Stats) end if 'print the name CurrentY = NewTop TextBox curStat, NameLeft, CurrentY, EL(0) - NameLeft, NameHeight, True SetUserFont Redim S(4) if BaseScore = Score then S(0) = Score S(1) = int(Score * 0.8) S(2) = int(Score * 0.6) S(3) = int(Score * 0.4) S(4) = int(Score * 0.2) else S(0) = BaseScore & "/" & Score S(1) = int(BaseScore * 0.8) & "/" & int(Score * 0.8) S(2) = int(BaseScore * 0.6) & "/" & int(Score * 0.6) S(3) = int(BaseScore * 0.4) & "/" & int(Score * 0.4) S(4) = int(BaseScore * 0.2) & "/" & int(Score * 0.2) end if 'print the scores For p = StartAt to StartAt + 2 c = p - StartAt if p = char.EncumbranceLevel then FontBold = True else FontBold = False CurrentY = NewTop PrintCentered S(p), EL(c), EL(c+1) Next FontBold = False CurrentY = NewTop + NameHeight Shade = Not Shade end if end if Next SetFormFont 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Stats), -1 Paragraph = "" End Sub '**************************************** 'Print Body Parts image '**************************************** Sub PrintBodyParts() ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY BoxLeft = ColLeft BoxRight = ColRight FontBold = True PrintCentered "Protection", ColLeft, ColRight FontBold = False CurrentY = CurrentY + tH + MinSpace PicLeft = ColLeft PicTop = CurrentY BodyFormat.InitializeBody Char if Options.Value("ShowBodyPartsDB") then BodyFormat.PrintDBValues = True else BodyFormat.PrintDBValues = False Dim PicHeight, PicWidth dim PicLeft, PicTop, picScale BodyPartsPictureOptimalSize PicWidth, PicHeight picScale = ColumnWidth / PicWidth PicWidth = ColumnWidth PicHeight = PicHeight * PicScale DrawBodyPartsPicture Char, PicLeft, PicTop, PicWidth, PicHeight NameRight = ColLeft + 0.675 ScoreRight = NameRight + .25 SkillLeft = ScoreRight + MinSpace CurrentY = PicTop + PicHeight paragraph = "" CurTop = CurrentY PrintAtRight "Other DR:", NameRight SetUserFont TextBox Char.OtherDR, NameRight + MinSpace, CurTop, BoxRight - NameRight - MinSpace, CurTop + tH SetFormFont CurrentY = CurrentY + MinSpace DrawLine ColLeft, CurrentY, ColRight, CurrentY, BoxColor(Stats) CurrentY = CurrentY + MinSpace CurTop = CurrentY PrintAtRight "Parry:", NameRight SetUserFont PrintAtRight Char.ParryScore, ScoreRight if Char.ParryUsing <> "" Then 'PrintAtLeft "(" & Char.ParryUsing & ")", SkillLeft TextBox "(" & Char.ParryUsing & ")", SkillLeft, CurTop, BoxRight - SkillLeft, CurTop + tH end if SetFormFont CurTop = CurTop + tH PrintAtRight "Block:", NameRight SetUserFont PrintAtRight Char.BlockScore, ScoreRight if Char.BlockUsing <> "" Then TextBox "(" & Char.ParryUsing & ")", SkillLeft, CurTop, BoxRight - SkillLeft, CurTop + tH end if SetFormFont CurTop = CurTop + tH 'print the box around what we've finished CurrentY = CurTop + MinSpace DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Stats), -1 Paragraph = "" End Sub '**************************************** 'Print Protection '**************************************** Sub PrintProtection() CheckNewColumn 1.5 ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing NameLeft = ColLeft + MinSpace ScoreRight = NameLeft + .675 SkillLeft = ScoreRight + MinSpace SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") 'BoxLeft = MarginLeft BoxTop = CurrentY BoxBottom = BoxTop + 1.5 BoxLeft = CurrentX BoxRight = ColRight'BoxLeft + 2.15 DRTop = BoxTop + tH + MinSpace MidLine1 = BoxLeft + ((BoxRight - BoxLeft) / 8 * 1) MidLine2 = BoxLeft + ((BoxRight - BoxLeft) / 8 * 2) MidLine3 = BoxLeft + ((BoxRight - BoxLeft) / 8 * 3) MidLine4 = BoxLeft + ((BoxRight - BoxLeft) / 8 * 4) MidLine5 = BoxLeft + ((BoxRight - BoxLeft) / 8 * 5) MidLine6 = BoxLeft + ((BoxRight - BoxLeft) / 8 * 6) MidLine7 = BoxLeft + ((BoxRight - BoxLeft) / 8 * 7) DrawBox BoxLeft, BoxTop, BoxRight, BoxBottom, True, BoxColor(Stats), -1 ' put in SplitLines DrawLine BoxLeft, DRTop + 0.4, BoxRight, DRTop + 0.4, BoxColor(Stats) DrawLine BoxLeft, DRTop + 0.65, BoxRight, DRTop + 0.65, BoxColor(Stats) ' divide into armor sections DrawLine MidLine1, DRTop + 0.4, MidLine1, DRTop + 0.65, BoxColor(Stats) DrawLine MidLine2, DRTop + 0.4, MidLine2, DRTop + 0.65, BoxColor(Stats) DrawLine MidLine3, DRTop + 0.4, MidLine3, DRTop + 0.65, BoxColor(Stats) DrawLine MidLine4, DRTop + 0.4, MidLine4, DRTop + 0.65, BoxColor(Stats) DrawLine MidLine5, DRTop + 0.4, MidLine5, DRTop + 0.65, BoxColor(Stats) DrawLine MidLine6, DRTop + 0.4, MidLine6, DRTop + 0.65, BoxColor(Stats) DrawLine MidLine7, DRTop + 0.4, MidLine7, DRTop + 0.65, BoxColor(Stats) ' fill it CurrentY = BoxTop + 0.03 FontBold = True PrintCentered "Protection", ColLeft, ColRight FontBold = False CurrentY = CurrentY + tH CurTop = CurrentY PrintAtLeft "Parry", NameLeft SetUserFont PrintAtRight Char.ParryScore, ScoreRight if Char.ParryUsing <> "" Then 'PrintAtLeft "(" & Char.ParryUsing & ")", SkillLeft TextBox "(" & Char.ParryUsing & ")", SkillLeft, CurTop, BoxRight - SkillLeft, CurTop + tH end if SetFormFont CurTop = CurTop + tH PrintAtLeft "Block", NameLeft SetUserFont PrintAtRight Char.BlockScore, ScoreRight if Char.BlockUsing <> "" Then TextBox "(" & Char.ParryUsing & ")", SkillLeft, CurTop, BoxRight - SkillLeft, CurTop + tH end if SetFormFont fontbold = False fontsize = 6 CurrentY = DRTop + 0.28 PrintCentered "Head", MidLine1, MidLine2 PrintCentered "Body", MidLine2, MidLine3 PrintCentered "Arms", MidLine3, MidLine4 PrintCentered "Legs", MidLine4, MidLine5 PrintCentered "Hands", MidLine5, MidLine6 PrintCentered "Feet", MidLine6, MidLine7 PrintCentered "ALL", MidLine7, BoxRight fontsize = 9 CurrentY = ReturnCenterY("10", DRTop + 0.4, DRTop + 0.65) PrintCentered "DR", BoxLeft, MidLine1 SetUserFont PrintCentered Char.DR(0), MidLine1, MidLine2 PrintCentered Char.DR(1), MidLine2, MidLine3 PrintCentered Char.DR(2), MidLine3, MidLine4 PrintCentered Char.DR(3), MidLine4, MidLine5 PrintCentered Char.DR(4), MidLine5, MidLine6 PrintCentered Char.DR(5), MidLine6, MidLine7 ListLoc = Char.ItemPositionByNameAndExt("DR", Stats) PrintCentered Char.Items(ListLoc).TagItem("score"), MidLine7, BoxRight SetFormFont CurrentY = DRTop + 0.65 '0.9 fontunderline = True PrintAtLeft "Other DR", NameLeft fontunderline = False curTop = DRTop + 0.65 + textheight("DR") '0.9 + textheight("DR") SetUserFont TextBox Char.OtherDR, NameLeft, curTop, BoxRight - NameLeft, BoxBottom - curTop SetFormFont fontsize = 10 fontbold = False CurrentY = BoxBottom paragraph = "" End Sub '**************************************** 'Print Reaction '**************************************** Sub PrintReaction() If Options.Value("ReactionColumn") then NewColumn else CheckNewColumn 1 end if SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing NameLeft = ColLeft + MinSpace FontBold = True PrintCentered "Reaction Modifiers", ColLeft, ColRight FontBold = False CurrentY = CurrentY + tH * 1.5 '***** '* APPEARANCE '***** 'print appearance reaction tmpLine = "" tmp = "Unappealing" l1 = char.ItemPositionByNameAndExt(tmp, Stats) If l1 > 0 Then 'see if it has a value If Char.Items(l1).TagItem("bonuslist") <> "" Then curVal = Char.Items(l1).TagItem("syslevels") If curVal >= 0 Then tmpLine = tmpLine & "+" & curVal Else tmpLine = tmpLine & curVal End If End If End If tmp = "Appealing" l2 = char.ItemPositionByNameAndExt(tmp, Stats) If l2 > 0 Then 'see if it has a value If Char.Items(l2).TagItem("bonuslist") <> "" Then curVal = Char.Items(l2).TagItem("syslevels") If curVal >= 0 Then tmpLine = tmpLine & "/+" & curVal Else tmpLine = tmpLine & "/" & curVal End If End If End If If tmpLine <> "" Then tmpLine = "{{\b Appearance: }" & tmpLine & "}" curTop = CurrentY TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True CurrentY = curTop + NameHeight Else tmpLine = "{\b Appearance: }" curTop = CurrentY TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True CurrentY = curTop + NameHeight End If FontSize = CInt(FormFontSize / 2 + 2.5) 'print bonuses for Unappealing If l1 > 0 Then tmp = Char.Items(l1).TagItem("bonuslist") tmpLine = "" If tmp <> "" Then tmpLine = "{\i Unappealing Includes: }" & tmp End If tmp = Char.Items(l1).TagItem("conditionallist") If tmp <> "" Then If tmpLine <> "" Then tmpLine = tmpLine & ". {\i Conditional: }" & tmp Else tmpLine = "{\i Unappealing Conditional: }" & tmp End If End If End If If tmpLine <> "" Then curTop = CurrentY tmpLine = "{" & tmpLine & "}" TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True CurrentY = curTop + NameHeight End If 'print bonuses for Appealing If l2 > 0 Then tmp = Char.Items(l2).TagItem("bonuslist") tmpLine = "" If tmp <> "" Then tmpLine = "{\i Appealing Includes: }" & tmp End If tmp = Char.Items(l2).TagItem("conditionallist") If tmp <> "" Then If tmpLine <> "" Then tmpLine = tmpLine & ". {\i Conditional: }" & tmp Else tmpLine = "{\i Appealing Conditional: }" & tmp End If End If End If If tmpLine <> "" Then curTop = CurrentY tmpLine = "{" & tmpLine & "}" TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True CurrentY = curTop + NameHeight End If FontSize = FormFontSize '***** '* Status Reaction Items '***** tmpLine = "{{\b Status: }" tmp = "Status" l1 = Char.ItemPositionByNameAndExt(tmp, Stats) If l1 > 0 Then tmp = Char.Items(l1).TagItem("score") If tmp >= 0 Then tmp = "+" & tmp End If tmpLine = tmpLine & tmp tmp = Char.Items(l1).TagItem("bonuslist") If tmp <> "" Then tmpLine = tmpLine & "; {\i Includes: }" & tmp End If tmpLine = tmpLine & "}" curTop = CurrentY TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True CurrentY = curTop + NameHeight 'print conditionals for Reaction FontSize = CInt(FormFontSize / 2 + 2.5) tmp = Char.Items(l1).TagItem("conditionallist") tmpLine = "" If tmp <> "" Then tmpLine = "Conditional: " & tmp End If If tmpLine <> "" Then curTop = CurrentY TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True CurrentY = curTop + NameHeight End If FontSize = FormFontSize End If '***** '* Other Reaction Items '***** tmpLine = "{{\b Other: }" tmp = "Reaction" l1 = Char.ItemPositionByNameAndExt(tmp, Stats) If l1 > 0 Then tmp = Char.Items(l1).TagItem("score") If tmp >= 0 Then tmp = "+" & tmp End If tmpLine = tmpLine & tmp tmp = Char.Items(l1).TagItem("bonuslist") If tmp <> "" Then tmpLine = tmpLine & "; {\i Includes: }" & tmp End If tmpLine = tmpLine & "}" curTop = CurrentY TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True CurrentY = curTop + NameHeight 'print conditionals for Reaction FontSize = CInt(FormFontSize / 2 + 2.5) tmp = Char.Items(l1).TagItem("conditionallist") tmpLine = "" If tmp <> "" Then tmpLine = "Conditional: " & tmp End If If tmpLine <> "" Then curTop = CurrentY TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True CurrentY = curTop + NameHeight End If FontSize = FormFontSize End If 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Stats), -1 Paragraph = "" End Sub '******************************************************************************** '* '* Print the Languages & Cultural Familiarities '* '******************************************************************************** '**************************************** 'Change Columns For Languages '**************************************** Sub NewLanguageColumn(BoxTop, ColLeft, ColRight, NewTop, NameLeft, SpokenLeft, WrittenLeft, CostColLeft, CostColRight) 'ran out of room, so create a new column 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, ColumnHeight, True, BoxColor(Ads), -1 'create a new column NewColumn BoxTop = MarginTop ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CurrentX = ColLeft CurrentY = MarginTop NewTop = CurrentY CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.25 WrittenLeft = CostColLeft - .325 SpokenLeft = WrittenLeft - .325 NameLeft = ColLeft + MinSpace End Sub '**************************************** 'Print the Languages '**************************************** Sub PrintLanguages() If Options.Value("LanguagesColumn") then NewColumn else CheckNewColumn 0.5 end if ShadeAll = False Shade = True if UseFootnotes and not FootnoteBlock then ClearFootnotes SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.25 WrittenLeft = CostColLeft - .325 SpokenLeft = WrittenLeft - .325 NameLeft = ColLeft + MinSpace FontBold = True PrintCentered "Languages", ColLeft, ColRight FontBold = False paragraph = "" Field.Clear Field.Page = CurrentPage Field.Top = CurrentY * 1440 Field.Left = ColLeft * 1440 Field.Bottom = (CurrentY + tH) * 1440 Field.Right = ColRight * 1440 Field.Trait = Char Field.FieldType = 2 'button Field.Tag = "ads|language" Field.Caption = "Languages" Field.AddCopyTo Fields paragraph = "" FontUnderline = True PrintAtLeft "Name", NameLeft PrintAtLeft "Spk", SpokenLeft PrintAtLeft "Wrt", WrittenLeft PrintAtRight "Pts", CostColRight FontUnderline = False curTop = CurrentY CurrentY = CurrentY + tH 'Print them For i = 1 To Char.Items.Count If Char.Items(i).ItemType = Ads or Char.Items(i).ItemType = Disads Then If Char.Items(i).TagItem("hide") = "" or Options.Value("ShowHiddenAds") = True or Options.Value("ShowHiddenDisads") = True Then 'not hidden tmp = char.items(i).tagitem("cat") if incatlist("language", tmp) then LangPair = False NewTop = CurrentY SetUserFont 'Print Name and Level tmpName = trim(char.items(i).name) if i < char.items.count then if lcase(tmpName) = lcase(char.items(i+1).name) then LangPair = True end if end if if LangPair then work = left(Char.Items(i).LevelName,3) 'tmp2 = "(" & work & ")" tmp2 = work work = left(Char.Items(i+1).LevelName,3) 'tmp3 = "(" & work & ")" tmp3 = work 'the False on the line below tells GCA not to include 'the values of the mods, True means it will. tmpName = tmpName & Char.Items(i).ExpandedModCaptions(False) if UseFootnotes then fn = "" tmp = Char.Items(i).TagItem("bonuslist") If tmp <> "" Then tmp = "Includes: " & tmp fn = AddFootnote(tmp) End If if LangPair then work = Char.Items(i+1).TagItem("bonuslist") If work <> "" Then work = "Includes: " & work if work <> tmp then fn = fn & AddFootnote(work) end if End If end if if fn <> "" then if FootnoteStyle = 1 then tmpname = tmpname & "[" & trim(fn) & "]" else tmpname = tmpname & fn end if end if end if 'calc size of area needed CurrentY = NewTop TextBox tmpName, NameLeft, CurrentY, SpokenLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewLanguageColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, SpokenLeft, WrittenLeft, CostColLeft, CostColRight end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(Ads), ShadeColor(Ads) end if CurrentY = NewTop TextBox tmpName, NameLeft, CurrentY, SpokenLeft - NameLeft, NameHeight, True CurrentY = NewTop TextBox tmp2, SpokenLeft, CurrentY, WrittenLeft - SpokenLeft, NameHeight, False CurrentY = NewTop TextBox tmp3, WrittenLeft, CurrentY, CostColLeft - WrittenLeft, NameHeight, False else 'a single language may be either a full, or a spoken/written only Partial = False tmpExt = lcase(trim(char.items(i).nameext)) if tmpExt = "spoken" or tmpExt = "written" then Partial = True tmpName = tmpName & Char.Items(i).ExpandedModCaptions(False) work = left(Char.Items(i).LevelName,3) 'tmp2 = "(" & work & ")" 'tmp3 = "(" & work & ")" tmp2 = work tmp3 = work else 'Print it with values in both columns tmpName = tmpName & Char.Items(i).ExpandedModCaptions(False) work = left(Char.Items(i).LevelName,3) 'tmp2 = "(" & work & ")" 'tmp3 = "(" & work & ")" tmp2 = work tmp3 = work end if fn = "" if UseFootnotes then tmp = Char.Items(i).TagItem("bonuslist") If tmp <> "" Then tmp = "Includes: " & tmp fn = AddFootnote(tmp) End If if LangPair then work = Char.Items(i+1).TagItem("bonuslist") If work <> "" Then work = "Includes: " & work if work <> tmp then fn = fn & AddFootnote(work) end if End If end if if fn <> "" then if FootnoteStyle = 1 then tmpname = tmpname & "[" & trim(fn) & "]" else tmpname = tmpname & fn end if end if end if 'calc size of area needed CurrentY = NewTop if Partial then TextBox tmpName, NameLeft, CurrentY, SpokenLeft - NameLeft, 0, True, True, False else TextBox tmpName, NameLeft, CurrentY, SpokenLeft - NameLeft, 0, True, True, False end if NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewLanguageColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, SpokenLeft, WrittenLeft, CostColLeft, CostColRight end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(Ads), ShadeColor(Ads) end if CurrentY = NewTop if Partial then TextBox tmpName, NameLeft, CurrentY, SpokenLeft - NameLeft, NameHeight, True if tmpExt = "spoken" then CurrentY = NewTop TextBox tmp2, SpokenLeft, CurrentY, WrittenLeft - SpokenLeft, NameHeight, False elseif tmpExt = "written" then CurrentY = NewTop TextBox tmp3, WrittenLeft, CurrentY, CostColLeft - WrittenLeft, NameHeight, False end if else TextBox tmpName, NameLeft, CurrentY, SpokenLeft - NameLeft, NameHeight, True CurrentY = NewTop TextBox tmp2, SpokenLeft, CurrentY, WrittenLeft - SpokenLeft, NameHeight, False CurrentY = NewTop TextBox tmp3, WrittenLeft, CurrentY, CostColLeft - WrittenLeft, NameHeight, False end if end if 'Get Points if LangPair then tmp = cint(Char.Items(i).TagItem("points")) + cint(Char.Items(i+1).TagItem("points")) else tmp = Char.Items(i).TagItem("points") end if 'Print Points SetFormFont CurrentY = NewTop 'PrintAtLeft "[", CostColLeft 'PrintAtRight "]", CostColRight SetUserFont PrintAtRight tmp, CostColRight '- MinSpace * 1.5 SetFormFont CurrentX = ColLeft CurrentY = NewTop + NameHeight 'print bonuses If Options.Value("ShowLanguageBonuses") Then FontSize = CInt(FormFontSize / 2 + 2.5) tmp = Char.Items(i).TagItem("bonuslist") If tmp <> "" Then tmp = "Includes: " & tmp End If if LangPair then work = Char.Items(i+1).TagItem("bonuslist") If work <> "" Then if tmp <> "" then tmp = tmp & "; Includes: " & work else tmp = "Includes: " & work end if End If end if if tmp <> "" then NewTop = CurrentY TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewLanguageColumn ColLeft, ColRight, NewTop, NameLeft, SpokenLeft, WrittenLeft, CostColLeft, CostColRight end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(Ads), ShadeColor(Ads) end if TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True CurrentX = ColLeft CurrentY = NewTop + NameHeight end if End If If Options.Value("ShowLanguageConditionals") Then 'print conditionals tmp = Char.Items(i).TagItem("conditionallist") If tmp <> "" Then tmp = "Conditional: " & tmp End If if LangPair then work = Char.Items(i+1).TagItem("conditionallist") If work <> "" Then if tmp <> "" then tmp = tmp & "; Conditional: " & work else tmp = "Conditional: " & work end if End If end if if tmp <> "" then NewTop = CurrentY TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewLanguageColumn ColLeft, ColRight, NewTop, NameLeft, SpokenLeft, WrittenLeft, CostColLeft, CostColRight end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(Ads), ShadeColor(Ads) end if TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True CurrentX = ColLeft CurrentY = NewTop + NameHeight end if End If Shade = Not Shade SetFormFont if LangPair then i = i + 1 end if end if end if end if Next if UseFootnotes and not FootnoteBlock then CurrentY = CurrentY + tH/2 FontSize = CInt(FormFontSize / 2 + 2.5) for i = 1 to FootnoteCount NewTop = CurrentY if FootnoteStyle = 1 then fn = "[" & Trim(FootnoteSymbol(i)) & "]" else fn = FootnoteSymbol(i) end if tmp = fn & " " & Footnote(i) TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewLanguageColumn ColLeft, ColRight, NewTop, NameLeft, SpokenLeft, WrittenLeft, CostColLeft, CostColRight end if 'PrintAtLeft fn, NameLeft TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, NameHeight, True CurrentY = NewTop + NameHeight next SetFormFont end if 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Ads), -1 Paragraph = "" End Sub '**************************************** 'Print the Cultural Familiarities '**************************************** Sub PrintCultures() CheckNewColumn 0.5 ShadeAll = False Shade = True SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing NameLeft = ColLeft + MinSpace CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 FontBold = True PrintCentered "Cultural Familiarities", ColLeft, ColRight FontBold = False paragraph = "" Field.Clear Field.Page = CurrentPage Field.Top = CurrentY * 1440 Field.Left = ColLeft * 1440 Field.Bottom = (CurrentY + tH) * 1440 Field.Right = ColRight * 1440 Field.Trait = Char Field.FieldType = 2 'button Field.Tag = "ads|cultural familiarity" Field.Caption = "Cultural Familiarities" Field.AddCopyTo Fields curTop = CurrentY CurrentY = curTop + tH FontUnderline = True PrintAtLeft "Name", NameLeft PrintAtRight "Pts", CostColRight FontUnderline = False curTop = CurrentY CurrentY = curTop + tH For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Ads or Char.Items(curItem).ItemType = Disads Then If Char.Items(curItem).TagItem("hide") = "" or Options.Value("ShowHiddenAds") = True or Options.Value("ShowHiddenDisads") = True Then 'not hidden tmp = char.items(curItem).tagitem("cat") if incatlist("cultural familiarity", tmp) then Okay = True 'if it's a child, and GroupChildren is True, 'don't consider it printable here. if GroupChildren then if Char.Items(curItem).ParentKey <> "" then 'it has a parent Okay = False end if end if if Okay then okay = PrintAdType(Ads, curItem, 0, BoxTop, ColLeft, ColRight) end if end if End If End If Next 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Ads), -1 Paragraph = "" End Sub '******************************************************************************** '* '* Print the Additional Stats '* '******************************************************************************** '**************************************** 'Change Columns For Add Stats '**************************************** Sub NewAddStatColumn(BoxTop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, curList, LeftIndent) 'ran out of room tH = TextHeight("DX") 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, ColumnHeight, True, BoxColor(curList), -1 'create a new column NewColumn BoxTop = MarginTop ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CurrentX = ColLeft CurrentY = MarginTop NewTop = CurrentY NameLeft = ColLeft + MinSpace + LeftIndent CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 End Sub '**************************************** 'Print One Item '**************************************** Function PrintAddStatType(curList, curItem, LeftIndent, BoxTop, ColLeft, ColRight) NewTop = CurrentY SetUserFont tW = TextWidth("DX") tH = TextHeight("DX") NameLeft = ColLeft + MinSpace + LeftIndent CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 'create the long-form name of the item tmp = Char.Items(curItem).FullName 'show mods tmp = tmp & Char.Items(curItem).ExpandedModCaptions(ShowModValues) if UseFootnotes then fn = "" tmpF = Char.Items(curItem).TagItem("bonuslist") If tmpF <> "" Then tmpF = "Includes: " & tmpF fn = AddFootnote(tmpF) End If if fn <> "" then if FootnoteStyle = 1 then tmp = tmp & "[" & trim(fn) & "]" else tmp = tmp & fn end if end if end if 'calc size of area needed TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewAddStatColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, curList, LeftIndent end if 'print the name if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if CurrentY = NewTop TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True 'SetFormFont CurrentY = NewTop SetUserFont PrintAtRight Char.Items(curitem).TagItem("score"), CostColRight '- MinSpace * 1.5 SetFormFont CurrentX = ColLeft CurrentY = NewTop + NameHeight 'print bonuses DoIt = False if Options.Value("ShowStatBonuses") then DoIt = True If DoIt Then FontSize = CInt(FormFontSize / 2 + 2.5) tmp = Char.Items(curitem).TagItem("bonuslist") If tmp <> "" Then NewTop = CurrentY tmp = "Includes: " & tmp TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewAddStatColumn Boxtop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, curList, LeftIndent end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True CurrentY = NewTop + NameHeight End If End If 'print conditionals DoIt = False if Options.Value("ShowStatConditionals") then DoIt = True If DoIt Then tmp = Char.Items(curitem).TagItem("conditionallist") If tmp <> "" Then FontSize = CInt(FormFontSize / 2 + 2.5) NewTop = CurrentY tmp = "Conditional: " & tmp TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewAddStatColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, curList, LeftIndent end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True CurrentY = NewTop + NameHeight End If End If SetFormFont Shade = Not Shade PrintAddStatType = True End Function '**************************************** 'Print the Additional Stats '**************************************** Sub PrintAdditionalStats() CheckNewColumn 0.5 ShadeAll = False Shade = True SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing NameLeft = ColLeft + MinSpace CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 FontBold = True PrintCentered "Additional Stats", ColLeft, ColRight FontBold = False curTop = CurrentY CurrentY = curTop + tH FontUnderline = True PrintAtLeft "Name", NameLeft PrintAtRight "Score", CostColRight FontUnderline = False curTop = CurrentY CurrentY = curTop + tH For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Stats Then 'a stat Okay = False If LCase(Char.Items(curItem).TagItem("display")) <> "no" Then Okay = True if Okay then If Char.Items(curItem).TagItem("hide") = "" Then 'not hidden okay = PrintAddStatType(Stats, curItem, 0, BoxTop, ColLeft, ColRight) End If end if End If Next 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Stats), -1 Paragraph = "" End Sub '******************************************************************************** '* '* Print the Ads/Disads '* '******************************************************************************** '**************************************** 'Change Columns For Ads '**************************************** Sub NewAdColumn(BoxTop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, curList, LeftIndent) 'ran out of room tH = TextHeight("DX") 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, ColumnHeight, True, BoxColor(curList), -1 'create a new column NewColumn BoxTop = MarginTop ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CurrentX = ColLeft CurrentY = MarginTop NewTop = CurrentY NameLeft = ColLeft + MinSpace + LeftIndent CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 End Sub '**************************************** 'Print One Item '**************************************** Function PrintAdType(curList, curItem, LeftIndent, BoxTop, ColLeft, ColRight) NewTop = CurrentY SetUserFont tW = TextWidth("DX") tH = TextHeight("DX") NameLeft = ColLeft + MinSpace + LeftIndent CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 'create the long-form name of the item tmp = Char.Items(curItem).FullName work = Char.Items(curItem).LevelName If work <> "" Then If Char.Items(curItem).TagItem("levelnames") <> "" Then tmp = tmp & " (" & work & ")" Else tmp = tmp & " " & work End If End If 'show mods tmp = tmp & Char.Items(curItem).ExpandedModCaptions(ShowModValues) if UseFootnotes then fn = "" tmpF = Char.Items(curItem).TagItem("bonuslist") If tmpF <> "" Then tmpF = "Includes: " & tmpF fn = AddFootnote(tmpF) End If if fn <> "" then if FootnoteStyle = 1 then tmp = tmp & "[" & trim(fn) & "]" else tmp = tmp & fn end if end if end if 'calc size of area needed TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewAdColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, curList, LeftIndent end if 'draw the flag pic CurrentY = NewTop CurrentX = ColLeft 'DrawTraitFlagPic newfield 'print the name if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if CurrentY = NewTop TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True 'SetFormFont CurrentY = NewTop 'PrintAtLeft "[", CostColLeft 'PrintAtRight "]", CostColRight SetUserFont PrintAtRight Char.Items(curitem).TagItem("points"), CostColRight '- MinSpace * 1.5 SetFormFont Field.Clear Field.Page = CurrentPage Field.Top = NewTop * 1440 Field.Left = ColLeft * 1440 Field.Bottom = (NewTop + NameHeight) * 1440 Field.Right = ColRight * 1440 Field.Trait = Char.Items(curItem) Field.Tag = "*ad" Field.AddCopyTo Fields 'printer.BrushColor = RGB(255, 128, 164) 'printer.PenColor = RGB(255, 128, 164) 'printer.drawrectangle field.left, field.top, field.right, field.bottom CurrentX = ColLeft CurrentY = NewTop + NameHeight 'print bonuses DoIt = False select case curList case Ads, Perks if Options.Value("ShowAdBonuses") then DoIt = True case Disads, Quirks if Options.Value("ShowDisadBonuses") then DoIt = True end select If DoIt Then FontSize = CInt(FormFontSize / 2 + 2.5) tmp = Char.Items(curitem).TagItem("bonuslist") If tmp <> "" Then NewTop = CurrentY tmp = "Includes: " & tmp TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewAdColumn Boxtop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, curList, LeftIndent end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True CurrentY = NewTop + NameHeight End If End If 'print conditionals DoIt = False select case curList case Ads, Perks if Options.Value("ShowAdConditionals") then DoIt = True case Disads, Quirks if Options.Value("ShowDisadConditionals") then DoIt = True end select If DoIt Then tmp = Char.Items(curitem).TagItem("conditionallist") If tmp <> "" Then FontSize = CInt(FormFontSize / 2 + 2.5) NewTop = CurrentY tmp = "Conditional: " & tmp TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewAdColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, curList, LeftIndent end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True CurrentY = NewTop + NameHeight End If End If SetFormFont 'if PrintComponents, print any child items if Options.Value("ShowComponents") then tmp = Char.Items(curitem).TagItem("pkids") if tmp <> "" then 'it has components KeyList = Split(tmp, ",") if Options.Value("ParagraphComponents") then 'Paragraph Format CList = "" For i = LBound(KeyList) To UBound(KeyList) childItem = "k" & trim(KeyList(i)) childType = Char.Items(childItem).ItemType select case childType case Ads, Perks, Disads, Quirks, Packages tmp = Char.Items(childItem).FullName work = Char.Items(childItem).LevelName If work <> "" Then If Char.Items(childItem).TagItem("levelnames") <> "" Then tmp = tmp & " (" & work & ")" Else tmp = tmp & " " & work End If End If 'the False on the line below tells GCA not to include 'the values of the mods, True means it will. tmp = tmp & Char.Items(childItem).ExpandedModCaptions(False) if CList = "" then CList = tmp else CList = CList & "; " & tmp end if CList = CList & " [" & Char.Items(childItem).TagItem("points") & "]" case Skills, Spells tmp = Char.Items(childItem).FullNameTL 'print the level tmp = tmp & "-" & Char.Items(childItem).level 'print the rel level tmp = tmp & " (" & Char.Items(childItem).TagItem("stepoff") & Char.Items(childItem).TagItem("step") & ")" tmp = tmp & " [" & Char.Items(childItem).TagItem("points") & "]" if CList = "" then CList = tmp else CList = CList & "; " & tmp end if end select Next if CList <> "" then CList = CList & "." end if NewTop = CurrentY TextBox CList, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewAdColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, curList, LeftIndent end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if TextBox CList, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True CurrentY = NewTop + NameHeight else 'Line by Line Format For i = LBound(KeyList) To UBound(KeyList) childItem = "k" & trim(KeyList(i)) childType = Char.Items(childItem).ItemType select case childType case Ads, Perks, Disads, Quirks, Packages Okay = PrintAdType(childType, childItem, LeftIndent + ChildIndentLeft, BoxTop, ColLeft, ColRight) case Skills, Spells Okay = PrintSkillType(childType, childItem, LeftIndent + ChildIndentLeft, BoxTop, ColLeft, ColRight) end select if Okay = False then PrintAdType = False exit function end if Next end if end if End If Shade = Not Shade 'if GroupChildren, print any child items If GroupChildren then if Char.Items(curItem).ChildKeyList <> "" then 'it has children KeyList = Split(Char.Items(curItem).ChildKeyList, ",") For i = LBound(KeyList) To UBound(KeyList) childItem = trim(KeyList(i)) Okay = PrintAdType(curList, childItem, LeftIndent + ChildIndentLeft, BoxTop, ColLeft, ColRight) if Okay = False then PrintAdType = False exit function end if Next end if End If PrintAdType = True End Function '**************************************** 'Print the Packages '**************************************** Sub PrintPackages() if char.count(Packages) <= 0 then Exit Sub CheckNewColumn 0.5 ShadeAll = True Shade = True SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing NameLeft = ColLeft + MinSpace CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 FontBold = True PrintCentered "Templates & Metatraits", ColLeft, ColRight FontBold = False curTop = CurrentY CurrentY = curTop + tH FontUnderline = True PrintAtLeft "Name", NameLeft PrintAtRight "Pts", CostColRight FontUnderline = False curTop = CurrentY CurrentY = curTop + tH For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Packages Then 'a package Okay = True 'if it's a child, and GroupChildren is True, 'don't consider it printable here. if GroupChildren then if Char.Items(curItem).ParentKey <> "" then 'it has a parent Okay = False end if end if if Okay then If Char.Items(curItem).TagItem("hide") = "" or Options.Value("ShowHiddenAds") = True Then 'not hidden okay = PrintAdType(Packages, curItem, 0, BoxTop, ColLeft, ColRight) End If end if End If Next 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Packages), -1 Paragraph = "" End Sub '**************************************** 'Print the Advantages '**************************************** Sub PrintAdvantages() If Options.Value("AdvantagesColumn") then NewColumn else CheckNewColumn 0.5 end if ShadeAll = False Shade = True if UseFootnotes and not FootnoteBlock then ClearFootnotes SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing NameLeft = ColLeft + MinSpace CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 FontBold = True PrintCentered "Advantages & Perks", ColLeft, ColRight FontBold = False Paragraph = "" Field.Clear Field.Page = CurrentPage Field.Top = CurrentY * 1440 Field.Left = ColLeft * 1440 Field.Bottom = (CurrentY + tH) * 1440 Field.Right = (ColLeft + (ColRight - ColLeft) / 2) * 1440 Field.Trait = Char Field.FieldType = 2 'button Field.Tag = "ads" Field.Caption = "Advantages" Field.AddCopyTo Fields 'Field.Clear Field.Page = CurrentPage Field.Top = CurrentY * 1440 Field.Left = (ColLeft + (ColRight - ColLeft) / 2) * 1440 Field.Bottom = (CurrentY + tH) * 1440 Field.Right = ColRight * 1440 Field.Trait = Char Field.FieldType = 2 'button Field.Tag = "perks" Field.Caption = "Perks" Field.AddCopyTo Fields 'printer.BrushColor = RGB(255, 128, 164) 'printer.PenColor = RGB(255, 128, 164) 'printer.drawrectangle field.left, field.top, field.right, field.bottom curTop = CurrentY CurrentY = curTop + tH FontUnderline = True PrintAtLeft "Name", NameLeft PrintAtRight "Pts", CostColRight FontUnderline = False curTop = CurrentY CurrentY = curTop + tH For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Ads Then 'an ad Okay = True tmp = char.items(curItem).tagitem("cat") if incatlist("language", tmp) then 'a language, don't print it here Okay = False elseif incatlist("cultural familiarity", tmp) then 'a cultural familiarity, don't print it here Okay = False end if 'if it's a child, and GroupChildren is True, 'don't consider it printable here. if GroupChildren then if Char.Items(curItem).ParentKey <> "" then 'it has a parent Okay = False end if end if if Okay then If Char.Items(curItem).TagItem("hide") = "" or Options.Value("ShowHiddenAds") = True Then 'not hidden okay = PrintAdType(Ads, curItem, 0, BoxTop, ColLeft, ColRight) End If end if End If Next 'PERKS For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Perks Then 'a perk Okay = True 'if it's a child, and GroupChildren is True, 'don't consider it printable here. if GroupChildren then if Char.Items(curItem).ParentKey <> "" then 'it has a parent Okay = False end if end if if Okay then If Char.Items(curItem).TagItem("hide") = "" or Options.Value("ShowHiddenAds") = True Then 'not hidden okay = PrintAdType(Perks, curItem, 0, BoxTop, ColLeft, ColRight) End If end if End If Next if UseFootnotes and not FootnoteBlock then ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing NameLeft = ColLeft + MinSpace CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 CurrentY = CurrentY + tH/2 FontSize = CInt(FormFontSize / 2 + 2.5) for i = 1 to FootnoteCount NewTop = CurrentY if FootnoteStyle = 1 then fn = "[" & Trim(FootnoteSymbol(i)) & "]" else fn = FootnoteSymbol(i) end if tmp = fn & " " & Footnote(i) TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewAdColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, Ads, LeftIndent end if 'PrintAtLeft fn, NameLeft TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, NameHeight, True CurrentY = NewTop + NameHeight next SetFormFont end if 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Ads), -1 Paragraph = "" End Sub '**************************************** 'Print the Disadvantages '**************************************** Sub PrintDisadvantages() If Options.Value("DisadvantagesColumn") then NewColumn else CheckNewColumn 0.5 end if ShadeAll = False Shade = True if UseFootnotes and not FootnoteBlock then ClearFootnotes SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing NameLeft = ColLeft + MinSpace CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 FontBold = True PrintCentered "Disadvantages & Quirks", ColLeft, ColRight FontBold = False Paragraph = "" Field.Clear Field.Page = CurrentPage Field.Top = CurrentY * 1440 Field.Left = ColLeft * 1440 Field.Bottom = (CurrentY + tH) * 1440 Field.Right = (ColLeft + (ColRight - ColLeft) / 2) * 1440 Field.Trait = Char Field.FieldType = 2 'button Field.Tag = "disads" Field.Caption = "Disadvantages" Field.AddCopyTo Fields 'Field.Clear Field.Page = CurrentPage Field.Top = CurrentY * 1440 Field.Left = (ColLeft + (ColRight - ColLeft) / 2) * 1440 Field.Bottom = (CurrentY + tH) * 1440 Field.Right = ColRight * 1440 Field.Trait = Char Field.FieldType = 2 'button Field.Tag = "quirks" Field.Caption = "Quirks" Field.AddCopyTo Fields 'printer.BrushColor = RGB(255, 128, 164) 'printer.PenColor = RGB(255, 128, 164) 'printer.drawrectangle field.left, field.top, field.right, field.bottom curTop = CurrentY CurrentY = curTop + tH FontUnderline = True PrintAtLeft "Name", NameLeft PrintAtRight "Pts", CostColRight FontUnderline = False curTop = CurrentY CurrentY = curTop + tH For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Disads Then 'a disad Okay = True 'if it's a child, and GroupChildren is True, 'don't consider it printable here. if GroupChildren then if Char.Items(curItem).ParentKey <> "" then 'it has a parent Okay = False end if end if if Okay then If Char.Items(curItem).TagItem("hide") = "" or Options.Value("ShowHiddenDisads") = True Then 'not hidden okay = PrintAdType(Disads, curItem, 0, BoxTop, ColLeft, ColRight) End If end if End If Next 'QUIRKS For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Quirks Then 'a quirk Okay = True 'if it's a child, and GroupChildren is True, 'don't consider it printable here. if GroupChildren then if Char.Items(curItem).ParentKey <> "" then 'it has a parent Okay = False end if end if if Okay then If Char.Items(curItem).TagItem("hide") = "" or Options.Value("ShowHiddenDisads") = True Then 'not hidden okay = PrintAdType(Quirks, curItem, 0, BoxTop, ColLeft, ColRight) End If end if End If Next if UseFootnotes and not FootnoteBlock then ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing NameLeft = ColLeft + MinSpace CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 CurrentY = CurrentY + tH/2 FontSize = CInt(FormFontSize / 2 + 2.5) for i = 1 to FootnoteCount NewTop = CurrentY if FootnoteStyle = 1 then fn = "[" & Trim(FootnoteSymbol(i)) & "]" else fn = FootnoteSymbol(i) end if tmp = fn & " " & Footnote(i) TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewAdColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, Disads, LeftIndent end if 'PrintAtLeft fn, NameLeft TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, NameHeight, True CurrentY = NewTop + NameHeight next SetFormFont end if 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Disads), -1 Paragraph = "" End Sub '******************************************************************************** '* '* Print the Skills '* '******************************************************************************** '**************************************** 'Change Columns For Skills '**************************************** Sub NewSkillColumn(BoxTop, ColLeft, ColRight, NewTop, NameLeft, LevelLeft, RelLevelLeft, CostColLeft, CostColRight, curList) 'ran out of room 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, ColumnHeight, True, BoxColor(curList), -1 'create a new column NewColumn BoxTop = MarginTop ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CurrentX = ColLeft CurrentY = MarginTop NewTop = CurrentY CostColLeft = ColLeft CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace LevelLeft = ColRight - MinSpace RelLevelLeft = LevelLeft - 0.25 End Sub '**************************************** 'Print One Item '**************************************** Function PrintSkillType(curList, curItem, LeftIndent, BoxTop, ColLeft, ColRight) SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") NewTop = CurrentY SetUserFont CostColLeft = ColLeft CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace LevelLeft = ColRight - MinSpace RelLevelLeft = LevelLeft - 0.25 'calc size of area needed tmpName = Char.Items(curItem).FullNameTL if UseFootnotes then fn = "" tmpF = Char.Items(curItem).TagItem("bonuslist") If tmpF <> "" Then tmpF = "Includes: " & tmpF fn = AddFootnote(tmpF) End If if fn <> "" then if FootnoteStyle = 1 then tmpName = tmpName & "[" & trim(fn) & "]" else tmpName = tmpName & fn end if end if end if 'TextBox Char.Items(curItem).FullNameTL, NameLeft, CurrentY, LevelLeft - NameLeft, 0, True, True, False TextBox tmpName, NameLeft, CurrentY, RelLevelLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewSkillColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, LevelLeft, RelLevelLeft, CostColLeft, CostColRight, curList SetFormFont FontUnderline = True CurrentY = newTop PrintAtLeft "Name", NameLeft - LeftIndent CurrentY = newTop PrintAtRight "Level", ColRight - MinSpace CurrentY = newTop PrintAtRight "Pts", CostColRight FontUnderline = False SetUserFont NewTop = NewTop + tH end if 'draw the flag pic CurrentY = NewTop CurrentX = ColLeft 'DrawTraitFlagPic newfield 'print the name if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if CurrentY = NewTop 'TextBox Char.Items(curItem).FullNameTL, NameLeft, CurrentY, LevelLeft - NameLeft, NameHeight, True TextBox tmpName, NameLeft, CurrentY, RelLevelLeft - NameLeft, NameHeight, True 'print the level CurrentY = NewTop 'PrintAtLeft Char.Items(curItem).level, LevelLeft PrintAtRight Char.Items(curItem).level, LevelLeft 'print the rel level 'If Char.Items(curItem).TagItem("sd") = "0" and curList = Skills Then ' 'a technique ' CurrentY = NewTop ' tmp = Char.Items(curItem).TagItem("stepoff") & Char.Items(curItem).TagItem("step") ' PrintAtLeft tmp, RelLevelLeft 'end if CurrentY = NewTop 'SetFormFont 'PrintAtLeft "[", CostColLeft 'PrintAtRight "]", CostColRight 'SetUserFont PrintAtRight Char.Items(curitem).TagItem("points"), CostColRight '- MinSpace * 1.5 SetFormFont Field.Clear Field.Page = CurrentPage Field.Top = NewTop * 1440 Field.Left = ColLeft * 1440 Field.Bottom = (NewTop + NameHeight) * 1440 Field.Right = ColRight * 1440 Field.Trait = Char.Items(curItem) Field.Tag = "*skill" Field.AddCopyTo Fields CurrentX = ColLeft CurrentY = NewTop + NameHeight 'print bonuses if curList = Skills then NewTop = CurrentY FontSize = CInt(FormFontSize / 2 + 2.5) tmp = "" if options.value("ShowParry") then tmp2 = Char.Items(curitem).TagItem("parrylevel") if tmp2 <> "" then tmp = "Parry: " & tmp2 end if tmp2 = Char.Items(curitem).TagItem("blocklevel") if tmp2 <> "" then tmp2 = "Block: " & tmp2 if tmp = "" then tmp = tmp2 else tmp = tmp & " " & tmp2 end if end if end if if options.value("ShowSkillBonuses") then tmp2 = Char.Items(curitem).TagItem("bonuslist") If tmp2 <> "" Then tmp2 = "Includes: " & tmp2 if tmp = "" then tmp = tmp2 else tmp = tmp & " Level " & tmp2 end if end if end if 'tmp = Char.Items(curitem).TagItem("bonuslist") If tmp <> "" Then 'tmp = "Includes: " & tmp TextBox tmp, NameLeft, CurrentY, LevelLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewSkillColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, LevelLeft, RelLevelLeft, CostColLeft, CostColRight, curList end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if TextBox tmp, NameLeft, CurrentY, LevelLeft - NameLeft, NameHeight, True CurrentY = NewTop + NameHeight End If end if 'print conditionals if options.value("ShowSkillConditionals") then NewTop = CurrentY tmp = Char.Items(curitem).TagItem("conditionallist") If tmp <> "" Then tmp = "Conditional: " & tmp TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewSkillColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, LevelLeft, RelLevelLeft, CostColLeft, CostColRight, curList end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True CurrentY = NewTop + NameHeight End If end if SetFormFont Shade = Not Shade PrintSkillType = True End Function '**************************************** 'Print the Skills '**************************************** Sub PrintSkills() If Options.Value("SkillsColumn") then NewColumn else CheckNewColumn 0.5 end if ShadeAll = False Shade = True if UseFootnotes and not FootnoteBlock then ClearFootnotes SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CostColLeft = ColLeft CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace LevelLeft = ColRight - MinSpace RelLevelLeft = LevelLeft - 0.25 FontBold = True PrintCentered "Skills", ColLeft, ColRight FontBold = False paragraph = "" Field.Clear Field.Page = CurrentPage Field.Top = CurrentY * 1440 Field.Left = ColLeft * 1440 Field.Bottom = (CurrentY + tH) * 1440 Field.Right = ColRight * 1440 Field.Trait = Char Field.FieldType = 2 'button Field.Tag = "skills" Field.Caption = "Skills" Field.AddCopyTo Fields paragraph = "" curTop = CurrentY FontUnderline = True CurrentY = curTop PrintAtLeft "Name", NameLeft CurrentY = curTop PrintAtRight "Level", ColRight - MinSpace CurrentY = curTop PrintAtRight "Pts", CostColRight FontUnderline = False '***** '* Print Skills '***** CurrentY = curTop + tH For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Skills Then 'a skill If Char.Items(curItem).TagItem("hide") = "" or Options.Value("ShowHiddenSkills") = True Then 'not hidden If Char.Items(curItem).TagItem("sd") = "0" Then 'not a technique Okay = PrintSkillType(Skills, curItem, 0, BoxTop, ColLeft, ColRight) End If End If End If Next '***** '* Print Techniques '***** CostColLeft = ColLeft CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace LevelLeft = ColRight - MinSpace RelLevelLeft = LevelLeft - 0.25 Found = False curTop = CurrentY For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Skills Then 'a skill If Char.Items(curItem).TagItem("hide") = "" or Options.Value("ShowHiddenSkills") = True Then 'not hidden If Char.Items(curItem).TagItem("sd") <> "0" Then 'a technique if not Found then 'first one found Found = True if curTop + tH > ColumnHeight then 'ran out of room NewSkillColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, LevelLeft, RelLevelLeft, CostColLeft, CostColRight, curList end if 'print the name FontBold = True PrintAtLeft "Techniques", NameLeft FontBold = False CurrentY = CurrentY + tH end if Okay = PrintSkillType(Skills, curItem, 0, BoxTop, ColLeft, ColRight) End If End If End If Next if UseFootnotes and not FootnoteBlock then ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CostColLeft = ColLeft CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace LevelLeft = ColRight - MinSpace RelLevelLeft = LevelLeft - 0.25 CurrentY = CurrentY + tH/2 FontSize = CInt(FormFontSize / 2 + 2.5) for i = 1 to FootnoteCount NewTop = CurrentY if FootnoteStyle = 1 then fn = "[" & Trim(FootnoteSymbol(i)) & "]" else fn = FootnoteSymbol(i) end if tmp = fn & " " & Footnote(i) TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewSkillColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, LevelLeft, RelLevelLeft, CostColLeft, CostColRight, Skills end if 'PrintAtLeft fn, NameLeft TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, NameHeight, True CurrentY = NewTop + NameHeight next SetFormFont end if 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Skills), -1 Paragraph = "" End Sub '**************************************** 'Print the Spells '**************************************** Sub PrintSpells() If Char.Count(Spells) <= 0 Then Exit Sub If Options.Value("SpellsColumn") then NewColumn else CheckNewColumn 0.5 end if ShadeAll = False Shade = True if UseFootnotes and not FootnoteBlock then ClearFootnotes SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CostColLeft = ColLeft CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace LevelLeft = ColRight - MinSpace RelLevelLeft = LevelLeft - 0.25 curTop = CurrentY FontBold = True PrintCentered "Spells", ColLeft, ColRight FontBold = False paragraph = "" Field.Clear Field.Page = CurrentPage Field.Top = CurrentY * 1440 Field.Left = ColLeft * 1440 Field.Bottom = (CurrentY + tH) * 1440 Field.Right = ColRight * 1440 Field.Trait = Char Field.FieldType = 2 'button Field.Tag = "spells" Field.Caption = "Spells" Field.AddCopyTo Fields paragraph = "" curTop = CurrentY FontUnderline = True CurrentY = curTop PrintAtLeft "Name", NameLeft CurrentY = curTop PrintAtRight "Level", ColRight - MinSpace CurrentY = curTop PrintAtRight "Pts", CostColRight CurrentY = curTop 'PrintAtLeft "Relative Level", RelLevelLeft FontUnderline = False '***** '* Print Spells '***** CurrentY = curTop + tH For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Spells Then 'a spell If Char.Items(curItem).TagItem("hide") = "" or Options.Value("ShowHiddenSpells") = True Then 'not hidden Okay = PrintSkillType(Spells, curItem, 0, BoxTop, ColLeft, ColRight) End If End If Next if UseFootnotes and not FootnoteBlock then ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CostColLeft = ColLeft CostColRight = ColLeft + MinSpace + 0.25 NameLeft = CostColRight + MinSpace LevelLeft = ColRight - MinSpace RelLevelLeft = LevelLeft - 0.25 CurrentY = CurrentY + tH/2 FontSize = CInt(FormFontSize / 2 + 2.5) for i = 1 to FootnoteCount NewTop = CurrentY if FootnoteStyle = 1 then fn = "[" & Trim(FootnoteSymbol(i)) & "]" else fn = FootnoteSymbol(i) end if tmp = fn & " " & Footnote(i) TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewSkillColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, LevelLeft, RelLevelLeft, CostColLeft, CostColRight, Spells end if 'PrintAtLeft fn, NameLeft TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, NameHeight, True CurrentY = NewTop + NameHeight next SetFormFont end if 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Spells), -1 Paragraph = "" End Sub '**************************************** 'Print the Point Summary '**************************************** Sub PrintPointSummary() CheckNewColumn 0.5 ShadeAll = False Shade = True if UseFootnotes and not FootnoteBlock then ClearFootnotes SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing NameLeft = ColLeft + MinSpace CostColRight = ColRight - MinSpace CostColLeft = CostColRight - 0.375 FontBold = True PrintCentered "Points Summary", ColLeft, ColRight FontBold = False curTop = CurrentY CurrentY = curTop + tH FontUnderline = True PrintAtLeft "Traits", NameLeft PrintAtRight "Total", CostColRight FontUnderline = False curTop = CurrentY CurrentY = curTop + tH for i = 1 to 7 NewTop = CurrentY select case i case 1 'tmp = "Attributes/Secondary Characteristics" tmp = "Attributes" cost = Char.Cost(Stats) case 2 'tmp = "Advantages/Perks/TL/" & vbcrlf & "Languages/Cultural Familiarities" tmp = "Languages/Cultures/" & vbcrlf & "Advantages/Templates" cost = Char.Cost(Ads) + Char.Cost(Perks) + Char.Cost(Packages) case 3 tmp = "Disadvantages" cost = Char.Cost(Disads) + Char.Cost(Quirks) case 4 tmp = "Skills" cost = Char.Cost(Skills) case 5 tmp = "Spells" cost = Char.Cost(Spells) case 6 tmp = "Total Points" cost = Char.TotalPoints case 7 tmp = "Unspent" cost = Char.UnspentPoints end select if i = 6 then FontBold = True if i = 7 then FontItalic = True 'calc size of area needed TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewAdColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, CostColLeft, CostColRight, Stats, LeftIndent end if 'draw the flag pic CurrentY = NewTop CurrentX = ColLeft 'DrawTraitFlagPic newfield 'print the name if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(Stats), ShadeColor(Stats) end if CurrentY = NewTop TextBox tmp, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True 'print the points CurrentY = NewTop SetUserFont if i = 6 then FontBold = True if i = 7 then FontItalic = True PrintAtRight cost, CostColRight SetFormFont CurrentX = ColLeft CurrentY = NewTop + NameHeight Shade = Not Shade FontBold = False FontItalic = False next 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Stats), -1 Paragraph = "" End Sub '**************************************** 'Print the Footnote Block '**************************************** Sub PrintFootnoteBlock() CheckNewColumn 0.5 SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing curTop = CurrentY FontBold = True PrintCentered "Applied Bonuses", ColLeft, ColRight FontBold = False paragraph = "" CurrentY = CurrentY + tH/2 FontSize = CInt(FormFontSize / 2 + 2.5) for i = 1 to FootnoteCount NewTop = CurrentY if FootnoteStyle = 1 then fn = "[" & Trim(FootnoteSymbol(i)) & "]" else fn = FootnoteSymbol(i) end if tmp = fn & " " & Footnote(i) TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewSkillColumn BoxTop, ColLeft, ColRight, NewTop, NameLeft, LevelLeft, RelLevelLeft, CostColLeft, CostColRight, Skills end if 'PrintAtLeft fn, NameLeft TextBox tmp, ColLeft + MinSpace, CurrentY, ColRight - ColLeft - MinSpace*2, NameHeight, True CurrentY = NewTop + NameHeight next SetFormFont 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, Black, -1 Paragraph = "" End Sub '******************************************************************************** '* '* Print the Equipment '* '******************************************************************************** '**************************************** 'Change Columns For Equipment '**************************************** Sub NewEquipmentColumn(BoxTop, ColLeft, ColRight, NewTop, CountLeft, NameLeft, CostColLeft, CostColRight, WeightLeft, curList, LeftIndent) 'ran out of room 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, ColumnHeight, True, BoxColor(curList), -1 'create a new column NewColumn BoxTop = MarginTop if CurrentColumn <> 1 then if PseudoTop <> 0 then BoxTop = PseudoTop end if else PseudoTop = 0 end if ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CurrentX = ColLeft CurrentY = BoxTop NewTop = CurrentY CountLeft = ColLeft + MinSpace NameLeft = CountLeft + 0.25 + LeftIndent WeightLeft = ColRight - .375 CostColRight = WeightLeft - MinSpace CostColLeft = CostColRight - 0.375 End Sub '**************************************** 'Print One Equipment Item '**************************************** Function PrintEquipmentType(curList, curItem, LeftIndent, BoxTop, ColLeft, ColRight) SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") NewTop = CurrentY SetUserFont CountLeft = ColLeft + MinSpace NameLeft = CountLeft + 0.25 + LeftIndent WeightLeft = ColRight - .375 CostColRight = WeightLeft - MinSpace CostColLeft = CostColRight - 0.375 'msgbox "CountLeft = " & CountLeft & " NameLeft = " & NameLeft & " WeightLeft = " & WeightLeft 'calc size of area needed TextBox Char.Items(curItem).FullNameTL, NameLeft, CurrentY, CostColLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewEquipmentColumn BoxTop, ColLeft, ColRight, NewTop, CountLeft, NameLeft, CostColLeft, CostColRight, WeightLeft, Equipment, LeftIndent SetFormFont FontUnderline = True CurrentY = newTop PrintAtLeft "Qty", CountLeft CurrentY = newTop PrintAtLeft "Item", NameLeft - LeftIndent CurrentY = newTop CurrentY = newTop PrintAtRight "Cost", CostColRight PrintAtRight "Wgt", ColRight - MinSpace FontUnderline = False SetUserFont NewTop = NewTop + tH end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if 'print the qty CurrentY = NewTop PrintAtLeft Char.Items(curItem).tagitem("count"), CountLeft 'print the name CurrentY = NewTop TextBox Char.Items(curItem).FullNameTL, NameLeft, CurrentY, CostColLeft - NameLeft, NameHeight, True 'print the cost CurrentY = NewTop PrintAtRight Char.Items(curItem).tagitem("cost"), CostColRight 'print the weight CurrentY = NewTop PrintAtRight Char.Items(curItem).tagitem("weight"), ColRight - MinSpace tmp = Trim(Char.Items(curItem).tagitem("location")) if tmp <> "" then 'print the other info CurrentY = NewTop + NameHeight NewTop = CurrentY FontSize = CInt(FormFontSize / 2 + 2.5) 'location tmpLine = "Location: " tmpLine = tmpLine & tmp TextBox tmpLine, NameLeft, CurrentY, WeightLeft - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewEquipmentColumn BoxTop, ColLeft, ColRight, NewTop, CountLeft, NameLeft, CostColLeft, CostColRight, WeightLeft, Equipment, LeftIndent SetFormFont FontUnderline = True CurrentY = newTop PrintAtLeft "Qty", CountLeft CurrentY = newTop PrintAtLeft "Item", NameLeft - LeftIndent CurrentY = newTop PrintAtRight "Cost", CostColRight CurrentY = newTop PrintAtRight "Wgt", ColRight - MinSpace FontUnderline = False SetUserFont FontSize = CInt(FormFontSize / 2 + 2.5) NewTop = NewTop + tH end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if CurrentY = NewTop TextBox tmpLine, NameLeft, CurrentY, WeightLeft - NameLeft, NameHeight, True end if Field.Clear Field.Page = CurrentPage Field.Top = NewTop * 1440 Field.Left = ColLeft * 1440 Field.Bottom = (NewTop + NameHeight) * 1440 Field.Right = ColRight * 1440 Field.Trait = Char.Items(curItem) Field.Tag = "*equipment" Field.AddCopyTo Fields CurrentX = ColLeft CurrentY = NewTop + NameHeight SetFormFont Shade = Not Shade 'if GroupChildren, print any child items If GroupChildren then if Char.Items(curItem).ChildKeyList <> "" then 'it has children KeyList = Split(Char.Items(curItem).ChildKeyList, ",") For i = LBound(KeyList) To UBound(KeyList) childItem = trim(KeyList(i)) Okay = PrintEquipmentType(curList, childItem, LeftIndent + ChildIndentLeft, BoxTop, ColLeft, ColRight) if Okay = False then PrintEquipmentType = False exit function end if Next end if End If PrintEquipmentType = True End Function '**************************************** 'Print Equipment '**************************************** Sub PrintEquipment() if CurrentY = MarginTop then PseudoTop = 0 else PseudoTop = CurrentY If PseudoTop + 0.75 >= ColumnHeight Then NewPage PseudoTop = 0 End If CheckNewColumn 0.5 ShadeAll = False Shade = True if UseFootnotes and not FootnoteBlock then ClearFootnotes SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing CountLeft = ColLeft + MinSpace NameLeft = CountLeft + 0.25 WeightLeft = ColRight - .375 CostColRight = WeightLeft - MinSpace CostColLeft = CostColRight - 0.375 FontBold = True PrintCentered "Armor & Possessions", ColLeft, ColRight FontBold = False paragraph = "" Field.Clear Field.Page = CurrentPage Field.Top = CurrentY * 1440 Field.Left = ColLeft * 1440 Field.Bottom = (CurrentY + tH) * 1440 Field.Right = ColRight * 1440 Field.Trait = Char Field.FieldType = 2 'button Field.Tag = "equipment" Field.Caption = "Equipment" Field.AddCopyTo Fields paragraph = "" curTop = CurrentY FontUnderline = True CurrentY = curTop PrintAtLeft "Qty", CountLeft CurrentY = curTop PrintAtLeft "Item", NameLeft CurrentY = curTop PrintAtRight "Cost", CostColRight CurrentY = curTop PrintAtRight "Wgt", ColRight - MinSpace FontUnderline = False '***** '* Print Equipment '***** CurrentY = curTop + tH For curItem = 1 To Char.Items.Count If Char.Items(curItem).ItemType = Equipment Then 'we only want to include non-weapons here okay = True 'I want to include *Everything* so that containers like 'packs can be shown to be storing weapons 'if char.items(curItem).tagitem("reach") <> "" then ' okay = False 'end if 'if char.items(curItem).tagitem("rangemax") <> "" then ' okay = False 'end if 'if it's a child, and GroupChildren is True, 'don't consider it printable here. if GroupChildren then if Char.Items(curItem).ParentKey <> "" then 'it has a parent Okay = False end if end if if okay then If Char.Items(curItem).TagItem("hide") = "" or Options.Value("ShowHiddenEquipment") = True Then 'not hidden Okay = PrintEquipmentType(Equipment, curItem, 0, BoxTop, ColLeft, ColRight) if Okay = False then 'this shouldn't happen! Exit Sub end if End If End If End If Next 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Equipment), -1 Paragraph = "" End Sub '******************************************************************************** '* '* Print the Weapons '* '******************************************************************************** '**************************************** 'Change Columns For Weapons '**************************************** Sub NewWeaponColumn(BoxTop, ColLeft, ColRight, NewTop) 'ran out of room 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, ColumnHeight, True, BoxColor(Equipment), -1 'create a new column NewPage BoxTop = MarginTop ColLeft = MarginLeft ColRight = PageWidth - MarginRight CurrentX = ColLeft CurrentY = BoxTop NewTop = CurrentY End Sub '**************************************** 'Print One Hand Weapon Item '**************************************** Function PrintHandWeaponType(curList, curItem, LeftIndent, BoxTop, ColLeft, ColRight) SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") NameLeft = ColLeft + MinSpace NotesLeft = ColRight - 0.4375 MinSTLeft = NotesLeft - TextWidth("ST") - MinSpace ParryLeft = MinSTLeft - TextWidth("Lvl (Pry)") - MinSpace ReachLeft = ParryLeft - TextWidth("Reach") - MinSpace DamageLeft = ReachLeft - 0.75 AltMode = False If DamageLeft < 2 then AltMode = True DamageLeft = ColRight - 1 end if ModeCount = Char.Items(curItem).DamageModeTagItemCount("charreach") CurMode = Char.Items(curItem).DamageModeTagItemAt("charreach") Do SetUserFont NewTop = CurrentY 'get Name and Damage, since both might end up multi-line if ModeCount = 1 then tmpName = Char.Items(curItem).FullNameTL else tmpName = Char.Items(curItem).FullNameTL & ": " & Char.Items(curItem).DamageModeName(CurMode) end if DamageText = Char.Items(curItem).DamageModeTagItem(CurMode, "chardamage") if Char.Items(curItem).DamageModeTagItem(CurMode, "chararmordivisor") <> "" then DamageText = DamageText & " (" & Char.Items(curItem).DamageModeTagItem(CurMode, "chararmordivisor") & ")" end if DamageText = DamageText & " " & Char.Items(curItem).DamageModeTagItem(CurMode, "chardamtype") 'calc size of area needed TextBox tmpName, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei if AltMode then TextBox DamageText, DamageLeft, CurrentY, ColRight - DamageLeft, 0, True, True, False else TextBox DamageText, DamageLeft, CurrentY, ReachLeft - DamageLeft, 0, True, True, False end if tmpHeight = TextHei if tmpHeight > NameHeight then NameHeight = tmpHeight if NewTop + NameHeight > ColumnHeight then 'ran out of room NewWeaponColumn BoxTop, ColLeft, ColRight, NewTop end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if 'print the name CurrentY = NewTop TextBox tmpName, NameLeft, CurrentY, DamageLeft - NameLeft, NameHeight, True 'print the damage CurrentY = NewTop if AltMode then TextBox DamageText, DamageLeft, CurrentY, ColRight - DamageLeft, NameHeight, True else TextBox DamageText, DamageLeft, CurrentY, ReachLeft - DamageLeft, NameHeight, True end if if AltMode then CurrentX = ColLeft CurrentY = NewTop + NameHeight NewTop = CurrentY FontSize = CInt(FormFontSize / 2 + 2) tmpLine = "Reach:" & Char.Items(curItem).DamageModeTagItem(CurMode, "charreach") tmpLine = tmpLine & " • " & "Level (Parry):" & Char.Items(curItem).DamageModeTagItem(CurMode, "charskillscore") & " (" & Char.Items(curItem).DamageModeTagItem(CurMode, "charparryscore") & ")" tmpLine = tmpLine & " • " & "ST:" & Char.Items(curItem).DamageModeTagItem(CurMode, "charminst") tmpLine = tmpLine & " • " & "Notes:" & Char.Items(curItem).DamageModeTagItem(CurMode, "notes") TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewWeaponColumn BoxTop, ColLeft, ColRight, NewTop end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True FontSize = UserFontSize else 'print the reach CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "charreach"), ReachLeft 'print the level & parry CurrentY = NewTop tmp = Char.Items(curItem).DamageModeTagItem(CurMode, "charskillscore") & " (" & Char.Items(curItem).DamageModeTagItem(CurMode, "charparryscore") & ")" PrintAtLeft tmp, ParryLeft 'min st CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "charminst"), MinSTLeft 'print the notes CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "notes"), NotesLeft end if CurrentX = ColLeft CurrentY = NewTop + NameHeight SetFormFont CurMode = Char.Items(curItem).DamageModeTagItemAt("charreach", CurMode+1) Shade = Not Shade Loop while CurMode > 0 SetFormFont PrintHandWeaponType = True End Function '**************************************** 'Print Hand Weapons '**************************************** Sub PrintHandWeapons() CheckNewColumn 0.5 ShadeAll = False Shade = True if UseFootnotes and not FootnoteBlock then ClearFootnotes SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft ColRight = PageWidth - MarginRight NameLeft = ColLeft + MinSpace NotesLeft = ColRight - 0.4375 MinSTLeft = NotesLeft - TextWidth("ST") - MinSpace ParryLeft = MinSTLeft - TextWidth("Lvl (Pry)") - MinSpace ReachLeft = ParryLeft - TextWidth("Reach") - MinSpace DamageLeft = ReachLeft - 0.75 AltMode = False If DamageLeft < 2 then AltMode = True DamageLeft = ColRight - 1 end if FontBold = True PrintCentered "Hand Weapon Modes", ColLeft, ColRight FontBold = False paragraph = "" curTop = CurrentY FontUnderline = True CurrentY = curTop PrintAtLeft "Weapon Mode", NameLeft CurrentY = curTop PrintAtLeft "Damage", DamageLeft if Not AltMode then CurrentY = curTop PrintAtLeft "Reach", ReachLeft CurrentY = curTop PrintAtLeft "Lvl (Pry)", ParryLeft CurrentY = curTop PrintAtLeft "ST", MinSTLeft CurrentY = curTop PrintAtLeft "Notes", NotesLeft end if FontUnderline = False '***** '* Print Hand Weapons '***** CurrentY = curTop + tH For curItem = 1 To Char.Items.Count '20070807 any trait with the correct tags should be okay! 'If Char.Items(curItem).ItemType = Equipment Then 'we only want to include hand weapons here okay = False if char.items(curItem).tagitem("charreach") <> "" then okay = True end if if Char.Items(curItem).TagItem("hide") <> "" then 'hidden, okay for non-stats, non-equipment if Char.Items(curItem).ItemType = Equipment or Char.Items(curItem).ItemType = Stats then okay = False end if end if if okay then Okay = PrintHandWeaponType(Equipment, curItem, 0, BoxTop, ColLeft, ColRight) if Okay = False then 'this shouldn't happen! Exit Sub end if End If 'End If Next 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Equipment), -1 Paragraph = "" End Sub '**************************************** 'Print One Ranged Weapon Item '**************************************** Function PrintRangedWeaponType(curList, curItem, LeftIndent, BoxTop, ColLeft, ColRight) SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") NameLeft = ColLeft + MinSpace NotesLeft = ColRight - 0.4375 LCLeft = NotesLeft - TextWidth("LC") - MinSpace RclLeft = LCLeft - TextWidth("Rcl") - MinSpace BulkLeft = RclLeft - TextWidth("Bulk") - MinSpace STLeft = BulkLeft - 0.375 LevelLeft = STLeft - 0.375 ShotsLeft = LevelLeft - 0.625 ROFLeft = ShotsLeft - TextWidth("RoF") - MinSpace RangeLeft = ROFLeft - 1 AccLeft = RangeLeft - TextWidth("Acc") - MinSpace DamageLeft = AccLeft - .75 AltMode = False If DamageLeft < 2 then AltMode = True DamageLeft = ColRight - 1 end if ModeCount = Char.Items(curItem).DamageModeTagItemCount("charrangemax") CurMode = Char.Items(curItem).DamageModeTagItemAt("charrangemax") Do SetUserFont NewTop = CurrentY 'Get Name, Damage, and Range text, since all might end up multi-line if ModeCount = 1 then tmpName = Char.Items(curItem).FullNameTL else tmpName = Char.Items(curItem).FullNameTL & ": " & Char.Items(curItem).DamageModeName(CurMode) end if DamageText = Char.Items(curItem).DamageModeTagItem(CurMode, "chardamage") if Char.Items(curItem).DamageModeTagItem(CurMode, "chararmordivisor") <> "" then DamageText = DamageText & " (" & Char.Items(curItem).DamageModeTagItem(CurMode, "chararmordivisor") & ")" end if DamageText = DamageText & " " & Char.Items(curItem).DamageModeTagItem(CurMode, "chardamtype") RangeText = Char.Items(curItem).DamageModeTagItem(CurMode, "charrangehalfdam") if RangeText = "" then RangeText = Char.Items(curItem).DamageModeTagItem(CurMode, "charrangemax") else RangeText = RangeText & " / " & Char.Items(curItem).DamageModeTagItem(CurMode, "charrangemax") end if 'Calc size of area needed TextBox tmpName, NameLeft, CurrentY, DamageLeft - NameLeft, 0, True, True, False NameHeight = TextHei if AltMode then TextBox DamageText, DamageLeft, CurrentY, ColRight - DamageLeft, 0, True, True, False else TextBox DamageText, DamageLeft, CurrentY, AccLeft - DamageLeft, 0, True, True, False end if tmpHeight = TextHei if tmpHeight > NameHeight then NameHeight = tmpHeight if Not AltMode then TextBox RangeText, RangeLeft, CurrentY, ROFLeft - RangeLeft, 0, True, True, False tmpHeight = TextHei if tmpHeight > NameHeight then NameHeight = tmpHeight end if if NewTop + NameHeight > ColumnHeight then 'ran out of room NewWeaponColumn BoxTop, ColLeft, ColRight, NewTop end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if 'print the name CurrentY = NewTop TextBox tmpName, NameLeft, CurrentY, DamageLeft - NameLeft, NameHeight, True 'print the damage CurrentY = NewTop if AltMode then TextBox DamageText, DamageLeft, CurrentY, ColRight - DamageLeft, NameHeight, True else TextBox DamageText, DamageLeft, CurrentY, AccLeft - DamageLeft, NameHeight, True end if if AltMode then CurrentX = ColLeft CurrentY = NewTop + NameHeight NewTop = CurrentY FontSize = CInt(FormFontSize / 2 + 2) tmpLine = "Acc:" & Char.Items(curItem).DamageModeTagItem(CurMode, "characc") tmpLine = tmpLine & " • " & "Range:" & RangeText tmpLine = tmpLine & " • " & "RoF:" & Char.Items(curItem).DamageModeTagItem(CurMode, "charrof") tmpLine = tmpLine & " • " & "Shots:" & Char.Items(curItem).DamageModeTagItem(CurMode, "charshots") tmpLine = tmpLine & " • " & "Level:" & Char.Items(curItem).DamageModeTagItem(CurMode, "charskillscore") tmpLine = tmpLine & " • " & "ST:" & Char.Items(curItem).DamageModeTagItem(CurMode, "charminst") tmpLine = tmpLine & " • " & "Bulk:" & Char.Items(curItem).DamageModeTagItem(CurMode, "bulk") tmpLine = tmpLine & " • " & "Rcl:" & Char.Items(curItem).DamageModeTagItem(CurMode, "charrcl") tmpLine = tmpLine & " • " & "LC:" & Char.Items(curItem).DamageModeTagItem(CurMode, "lc") tmpLine = tmpLine & " • " & "Notes:" & Char.Items(curItem).DamageModeTagItem(CurMode, "notes") TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, 0, True, True, False NameHeight = TextHei if NewTop + NameHeight > ColumnHeight then 'ran out of room NewWeaponColumn BoxTop, ColLeft, ColRight, NewTop end if if ShadeAll or Shade then DrawBox ColLeft, NewTop, ColRight, NewTop + NameHeight, False, ShadeColor(curList), ShadeColor(curList) end if TextBox tmpLine, NameLeft, CurrentY, ColRight - NameLeft, NameHeight, True FontSize = UserFontSize else 'print the acc CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "characc"), AccLeft 'print the range CurrentY = NewTop TextBox RangeText, RangeLeft, CurrentY, ROFLeft - RangeLeft, NameHeight, True 'print the rof CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "charrof"), ROFLeft 'print the shots CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "charshots"), ShotsLeft 'print the st CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "charskillscore"), LevelLeft 'print the st CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "charminst"), STLeft 'print the bulk CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "bulk"), BulkLeft 'print the rcl CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "charrcl"), RclLeft 'print the lc CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "lc"), LCLeft 'print the notes CurrentY = NewTop PrintAtLeft Char.Items(curItem).DamageModeTagItem(CurMode, "notes"), NotesLeft end if CurrentX = ColLeft CurrentY = NewTop + NameHeight SetFormFont CurMode = Char.Items(curItem).DamageModeTagItemAt("charrangemax", CurMode+1) Shade = Not Shade Loop while CurMode > 0 SetFormFont PrintRangedWeaponType = True End Function '**************************************** 'Print Ranged Weapons '**************************************** Sub PrintRangedWeapons() CheckNewColumn 0.5 ShadeAll = False Shade = True if UseFootnotes and not FootnoteBlock then ClearFootnotes SetFormFont tW = TextWidth("DX") tH = TextHeight("DX") BoxTop = CurrentY ColLeft = MarginLeft ColRight = PageWidth - MarginRight NameLeft = ColLeft + MinSpace NotesLeft = ColRight - 0.4375 LCLeft = NotesLeft - TextWidth("LC") - MinSpace RclLeft = LCLeft - TextWidth("Rcl") - MinSpace BulkLeft = RclLeft - TextWidth("Bulk") - MinSpace STLeft = BulkLeft - 0.375 LevelLeft = STLeft - 0.375 ShotsLeft = LevelLeft - 0.625 ROFLeft = ShotsLeft - TextWidth("RoF") - MinSpace RangeLeft = ROFLeft - 1 AccLeft = RangeLeft - TextWidth("Acc") - MinSpace DamageLeft = AccLeft - .75 AltMode = False If DamageLeft < 2 then AltMode = True DamageLeft = ColRight - 1 end if FontBold = True PrintCentered "Ranged Weapon Modes", ColLeft, ColRight FontBold = False paragraph = "" curTop = CurrentY FontUnderline = True CurrentY = curTop PrintAtLeft "Weapon Mode", NameLeft CurrentY = curTop PrintAtLeft "Damage", DamageLeft if Not AltMode then CurrentY = curTop PrintAtLeft "Acc", AccLeft CurrentY = curTop PrintAtLeft "Range", RangeLeft CurrentY = curTop PrintAtLeft "RoF", ROFLeft CurrentY = curTop PrintAtLeft "Shots", ShotsLeft CurrentY = curTop PrintAtLeft "Level", LevelLeft CurrentY = curTop PrintAtLeft "ST", STLeft CurrentY = curTop PrintAtLeft "Bulk", BulkLeft CurrentY = curTop PrintAtLeft "Rcl", RclLeft CurrentY = curTop PrintAtLeft "LC", LCLeft CurrentY = curTop PrintAtLeft "Notes", NotesLeft end if FontUnderline = False '***** '* Print Ranged Weapons '***** CurrentY = curTop + tH For curItem = 1 To Char.Items.Count '20070807 any trait with the correct tags should be okay! 'If Char.Items(curItem).ItemType = Equipment Then 'we only want to include hand weapons here okay = False if char.items(curItem).tagitem("charrangemax") <> "" then okay = True end if if Char.Items(curItem).TagItem("hide") <> "" then 'hidden, okay for non-stats, non-equipment if Char.Items(curItem).ItemType = Equipment or Char.Items(curItem).ItemType = Stats then okay = False end if end if if okay then Okay = PrintRangedWeaponType(Equipment, curItem, 0, BoxTop, ColLeft, ColRight) if Okay = False then 'this shouldn't happen! Exit Sub end if End If 'End If Next 'print the box around what we've finished DrawBox ColLeft, BoxTop, ColRight, CurrentY, True, BoxColor(Equipment), -1 Paragraph = "" End Sub '**************************************** 'Print the Description '**************************************** Sub PrintDescription() CheckNewColumn 0.5 printer.CalcText = "a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z " ColumnWidth = TextWid tH = TextHeight("DX") fontsize = 10 fontbold = True fontunderline = True paragraph = "Appearance" fontbold = False fontunderline = False curTop = CurrentY Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = (MarginLeft + TextWidth("Race: ")) * 1440 Field.Right = (MarginLeft + ColumnWidth) * 1440 Field.Bottom = (curTop + tH) * 1440 Field.FieldType = 1 'text Field.Trait = Char Field.Tag = "race" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Race: " & Char.Race curTop = CurrentY Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = (MarginLeft + TextWidth("Hgt: ")) * 1440 Field.Right = (MarginLeft + ColumnWidth) * 1440 Field.Bottom = (curTop + tH) * 1440 Field.FieldType = 1 'text Field.Trait = Char Field.Tag = "height" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Hgt: " & Char.Height curTop = CurrentY Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = (MarginLeft + TextWidth("Wgt: ")) * 1440 Field.Right = (MarginLeft + ColumnWidth) * 1440 Field.Bottom = (curTop + tH) * 1440 Field.FieldType = 1 'text Field.Trait = Char Field.Tag = "weight" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Wgt: " & Char.Weight curTop = CurrentY Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = (MarginLeft + TextWidth("Age: ")) * 1440 Field.Right = (MarginLeft + ColumnWidth) * 1440 Field.Bottom = (curTop + tH) * 1440 Field.FieldType = 1 'text Field.Trait = Char Field.Tag = "age" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Age: " & Char.Age curTop = CurrentY Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = (MarginLeft + TextWidth("Appearance: ")) * 1440 Field.Right = (MarginLeft + ColumnWidth) * 1440 Field.Bottom = (curTop + tH) * 1440 Field.FieldType = 1 'text Field.Trait = Char Field.Tag = "appearance" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Appearance: " & Char.Appearance paragraph = "" If Len(Char.Description) = 0 Then Exit Sub CheckNewColumn 0.5 fontsize = 10 fontbold = True fontunderline = True paragraph = "Description" fontbold = False fontunderline = False curTop = CurrentY printer.CalcText = Char.Description bW = TextWid bH = TextHei Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = MarginLeft * 1440 Field.Right = (MarginLeft + ColumnWidth) * 1440 Field.Bottom = (curTop + bH + tH) * 1440 Field.FieldType = 3 'multi-line text Field.Trait = Char Field.Tag = "description" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = Char.Description paragraph = "" End Sub 'Squish Version Sub PrintDescriptionSquish() CheckNewColumn 0.5 printer.CalcText = "a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z " ColumnWidth = TextWid tH = TextHeight("DX") ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing fontsize = 10 fontbold = True fontunderline = True paragraph = "Appearance" fontbold = False fontunderline = False curTop = CurrentY Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = (ColLeft + TextWidth("Race: ")) * 1440 Field.Right = ColRight * 1440 Field.Bottom = (curTop + tH) * 1440 Field.FieldType = 1 'text Field.Trait = Char Field.Tag = "race" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Race: " & Char.Race curTop = CurrentY Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = (ColLeft + TextWidth("Hgt: ")) * 1440 Field.Right = ColRight * 1440 Field.Bottom = (curTop + tH) * 1440 Field.FieldType = 1 'text Field.Trait = Char Field.Tag = "height" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Hgt: " & Char.Height curTop = CurrentY Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = (ColLeft + TextWidth("Wgt: ")) * 1440 Field.Right = ColRight * 1440 Field.Bottom = (curTop + tH) * 1440 Field.FieldType = 1 'text Field.Trait = Char Field.Tag = "weight" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Wgt: " & Char.Weight curTop = CurrentY Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = (ColLeft + TextWidth("Age: ")) * 1440 Field.Right = ColRight * 1440 Field.Bottom = (curTop + tH) * 1440 Field.FieldType = 1 'text Field.Trait = Char Field.Tag = "age" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Age: " & Char.Age curTop = CurrentY Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = (ColLeft + TextWidth("Appearance: ")) * 1440 Field.Right = ColRight * 1440 Field.Bottom = (curTop + tH) * 1440 Field.FieldType = 1 'text Field.Trait = Char Field.Tag = "appearance" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Appearance: " & Char.Appearance paragraph = "" If Len(Char.Description) = 0 Then Exit Sub CheckNewColumnSquish 0.5 fontsize = 10 fontbold = True fontunderline = True paragraph = "Description" fontbold = False fontunderline = False curTop = CurrentY printer.CalcText = Char.Description bW = TextWid bH = TextHei Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = ColLeft * 1440 Field.Right = ColRight * 1440 Field.Bottom = (curTop + bH + tH) * 1440 Field.FieldType = 3 'multi-line text Field.Trait = Char Field.Tag = "description" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = Char.Description paragraph = "" End Sub '**************************************** 'Print the Notes '**************************************** Sub PrintNotes() If Len(Char.Notes) = 0 Then Exit Sub CheckNewColumn 0.5 printer.CalcText = "a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z " ColumnWidth = TextWid tH = TextHeight("DX") fontsize = 10 fontbold = True fontunderline = True paragraph = "Notes" fontbold = False fontunderline = False curTop = CurrentY printer.CalcText = Char.Notes bW = TextWid bH = TextHei Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = MarginLeft * 1440 Field.Right = (MarginLeft + ColumnWidth) * 1440 Field.Bottom = (curTop + bH + tH) * 1440 Field.FieldType = 3 'multi-line text Field.Trait = Char Field.Tag = "notes" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = Char.Notes paragraph = "" End Sub 'Squish Version Sub PrintNotesSquish() If Len(Char.Notes) = 0 Then Exit Sub CheckNewColumnSquish 0.5 printer.CalcText = "a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z " ColumnWidth = TextWid tH = TextHeight("DX") ColLeft = MarginLeft + (CurrentColumn - 1) * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing ColRight = MarginLeft + CurrentColumn * ColumnWidth + (CurrentColumn - 1) * ColumnSpacing fontsize = 10 fontbold = True fontunderline = True curTop = CurrentY printer.CalcText = Char.Notes bW = TextWid bH = TextHei Field.Clear Field.Page = CurrentPage Field.Top = curTop * 1440 Field.Left = ColLeft * 1440 Field.Right = ColRight * 1440 Field.Bottom = (curTop + bH + tH) * 1440 Field.FieldType = 3 'multi-line text Field.Trait = Char Field.Tag = "notes" Field.AddCopyTo Fields DrawBox field.left/1440, field.top/1440, field.right/1440, field.bottom/1440, False, RGB(255, 128, 164), RGB(255, 128, 164) paragraph = "Notes" fontbold = False fontunderline = False paragraph = Char.Notes paragraph = "" End Sub '**************************************** 'Print the Portrait '**************************************** Sub PrintPortrait() If Len(Char.portrait) = 0 Then Exit Sub CurTop = CurrentY Paragraph = " " printer.CalcText = "a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z " w = TextWid h = pageheight - marginbottom - margintop picture Char.portrait, MarginLeft, CurTop, w, h paragraph = "" End Sub 'Squished Version Sub PrintPortraitSquish() If Len(Char.portrait) = 0 Then Exit Sub CurTop = CurrentY Paragraph = " " printer.CalcText = "a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z " w = TextWid h = columnheight - CurTop picture Char.portrait, CurrentX, CurTop, w, h paragraph = "" End Sub