Battle Reports

From BattleMaster Wiki
Revision as of 21:50, 31 July 2018 by J.Reumerman (talk | contribs) (→‎Code to paste in module:)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Addendum by Gabanus

The below pieces have formed the inspiration of what I will share here, but were already outdated again. Nonetheless respect and thanks to Peter Kolak in particular for posting the original piece.

If you want to take a battle report and post it on a website (or the wiki), here's what you have to do:

A. Open a new Microsoft Word File

B. Make sure you have developer mode enabled and preferably added to your ribbon site on how to do this

  1. Click on the developer tab
  2. Click on Visual Basics
  3. Click on insert - Module
  4. Copy following code inside the module
  5. File - Save document -> As File type below the name, pick 'Word Macro - Enabled Content' (both file and the Macro code will be saved together)

C. To make the battle report

  1. you must view a battle report via your scribe report
  2. Click on "View Source" (Paginabron for you Dutchies)
  3. Select the entire source by mouse or use "Ctrl A"
  4. Copy the source by either right clicking and pressing "Copy" or using "Ctrl C"
  5. Open the word document you created earlier
  6. Right click and select "Paste text only" --DON'T JUST NORMALLY PASTE IT, HAVEN'T FIXED THAT PART YET--

  7. Click on the 'Developer tab' in the word document
  8. Click on Macros (next to Visual Basics)
  9. Select the 'BattleConverter' Macro (should be your only one anyway) and click on run

  10. Select all text in the document by mouse or use "Ctrl A"
  11. Open the Wiki page where you want to show the battle report
  12. Copy the text by either right clicking and pressing "Copy" or using "Ctrl C"

Code to paste in module:

Sub BattleConverter()

Application.ScreenUpdating = False
'----------------------------------------------------------------------------------------------------------------------------------------------------
'----------------------------------------------Part I: Converting layout from HTML to wiki friendly code---------------------------------------------
'----------------------------------------------------------------------------------------------------------------------------------------------------

' Remove first section of the text
Dim s
s = ActiveDocument.Content              ' Selects everything (ctrl 'a' basically)

Dim SearchWord1 As String               ' Sets/Defines variables needed for the indexOfThey formula. Easier to change when needed
SearchWord1 = "</center>"

Dim IndexOfSW As Long                ' Returns the location (as number) where the SearchWord1 is first seen
IndexOfSW = InStr(1, s, SearchWord1)

' Deletes everything from start untill first letter of search word + length of word (which includes a potential space after the word)_
' _ + 3 because the 4 characters after the words must be removed as well
ActiveDocument.Range(Start:=0, End:=IndexOfSW + Len(SearchWord1) + 3).Delete

' Remove the last section of text that's not needed
s = ActiveDocument.Content                  ' Resets s to include only the content that remained

Dim SearchWord2 As String
SearchWord2 = "<script"

IndexOfSW = InStr(1, s, SearchWord2)        ' Returns the location (as number) where the SearchWord2 is first seen

If IndexOfSW <> 0 Then
' Deletes everything from first letter of search word (- the first letter and <br/> before it) untill the end of the document
ActiveDocument.Range(Start:=IndexOfSW - 6, End:=Len(ActiveDocument.Content)).Delete
End If

' Create a 2 dimensional Array which holds all values which needs_
' _ to be replaced + their replacement values
Dim ReplaceArray(0 To 15, 0 To 1)
ReplaceArray(0, 0) = "<Char"
ReplaceArray(0, 1) = "<"

ReplaceArray(1, 0) = "</Char"
ReplaceArray(1, 1) = "<"

ReplaceArray(2, 0) = "< "
ReplaceArray(2, 1) = "<"

ReplaceArray(3, 0) = "<p>"
ReplaceArray(3, 1) = "<br>"

ReplaceArray(4, 0) = "#000032"  ' Background First table with general overview from dark blue to light gray
ReplaceArray(4, 1) = "#DEDEEA"

ReplaceArray(5, 0) = "#FFFFFF"  ' White text to black (note to self: If you highlight own char as white, it's also changed making it harder to read)
ReplaceArray(5, 1) = "#000000"             '#9696FF blue

ReplaceArray(6, 0) = "color: white" ' Some text color wasn't assigned by Hex colors, but through this code (mixed within the code)
ReplaceArray(6, 1) = "color: black"

ReplaceArray(7, 0) = "<P>"
ReplaceArray(7, 1) = "<br>"

ReplaceArray(8, 0) = "<>"
ReplaceArray(8, 1) = ""

ReplaceArray(9, 0) = "</FONT<"
ReplaceArray(9, 1) = "</FONT><"

ReplaceArray(10, 0) = "> "          ' Some sentences started with a space because there was a space after certain parts of the code. Looked weird
ReplaceArray(10, 1) = ">"

ReplaceArray(11, 0) = "#004000"     ' Background color of the combat tables (the green, making it lighter)
ReplaceArray(11, 1) = "#116811"

ReplaceArray(12, 0) = "#DDDDDD"      ' Change the light color for woundings/captures to bright red
ReplaceArray(12, 1) = "#FF0000"

ReplaceArray(13, 0) = "#E0E0FF"      ' Change the light color for 'banners visible' to darker readable color that's not exactly black
ReplaceArray(13, 1) = "#AD6557"

ReplaceArray(14, 0) = "#C0FFC0"      ' Change the light green for defenders victory to bright green
ReplaceArray(14, 1) = "#00FF00"

ReplaceArray(15, 0) = "  "
ReplaceArray(15, 1) = " "

' For each Value loop through it and replace it with it's replacement text
Dim i As Long, j As Long

    For i = LBound(ReplaceArray) To UBound(ReplaceArray)

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting

    With Selection.Find
        .Text = ReplaceArray(i, 0)
        .Replacement.Text = ReplaceArray(i, 1)
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False

    End With
    Selection.Find.Execute Replace:=wdReplaceAll


    Next i
    
'----------------------------------------------------------------------------------------------------------------------------------------------------
'----------------------------------------------------------Part II.a: InfoBox basic filling----------------------------------------------------------
'----------------------------------------------------------------------------------------------------------------------------------------------------


s = ActiveDocument.Content
    
'The following segment searches and stores the data needed to fill in an InfoBox to automatically be added to the cleaned up _
'Source Code text so it automatically shows the military InfoBox next to the battle report when posting on the wiki
Dim FindRange As Range
Dim Find1
Dim Find2
Dim ffind1
Dim ffind2
'Image; Caption;  = N/A

'0 = Conflict; 1 = partof;
'conflict
Dim Conflict As String
Find1 = InStr(s, "<hr>") + 13
Find2 = InStr(s, "<br>") - 1
If Find1 <> 13 Then
    Conflict = ActiveDocument.Range(Start:=Find1, End:=Find2).Text
End If

'PartOf
Dim PartOf As String
ffind1 = InStr(s, "The region owner") + 16
ffind2 = InStr(s, "and their allies") - 1
If ffind1 <> 16 Then
    If ffind2 <> -1 Then
        PartOf = ActiveDocument.Range(Start:=ffind1, End:=ffind2).Text
    End If
End If

'place
Dim Place As String
Place = "[[" + Conflict + "]]"

'Date
Dim DateToday As Date
DateToday = Date

'Weather
Dim Weather As String
If InStr(s, "There is almost no wind today, archers will be deadly") <> 0 Then
    Weather = "No wind"
ElseIf InStr(s, "A calm wind blows, to the joy of the archers") <> 0 Then
    Weather = "Calm wind"
ElseIf InStr(s, "It is quite windy and the archers will have to aim very carefully") <> 0 Then
    Weather = "Quite windy"
ElseIf InStr(s, "Strong winds and gusts are making ranged combat a game of luck") <> 0 Then
    Weather = "Strong wind"
ElseIf InStr(s, "The battle takes place in the middle of a storm, archers will be almost worthless") <> 0 Then
    Weather = "Storm"
Else: Weather = "Error"
End If

'Territory
Dim Territory
Territory = "None"

'Result
Dim result
If InStr(s, "Attacker Victory") <> 0 Then
    result = "Attacker Victory"
ElseIf InStr(s, "Defender Victory") <> 0 Then
    result = "Defender Victory"
Else: result = "Draw"
End If

'Commander1
Dim CommanderAttack
' *Commander name*, titles, titles, takes command...
' When searching from begin document to turn no. 1, add this to the personal info array (NobleStats) so it can also be checked if he's attack or defender

'strength1 (attackers)
Dim StrengthAttack As String

Find1 = InStr(s, "attackers (") + Len("attackers")                          '"attackers (" is uniquely found only just before all the strength of attacking army
Find2 = InStr(ActiveDocument.Range(Start:=Find1, End:=Find1 + 58), ")")     '+58 because that's the max additional chars possible in between brackets

StrengthAttack = ActiveDocument.Range(Start:=Find1, End:=Find1 + Find2)     ' _of "attackers (# of characters max 48 + margin)"

Find1 = InStr(s, "Total combat strengths:") + Len("Total combat strengths:") '"Total combat strengths:" is unique like 'Total combat strengths x vs. x'
Find2 = InStr(s, " vs. ")

StrengthAttack = ActiveDocument.Range(Start:=Find1, End:=Find2) & "cs " & StrengthAttack

'strength2 (defenders)
Dim StrengthDefense As String

Find1 = InStr(s, "defenders (") + Len("defenders")                          '"defenders (" is uniquely found only just before all the strength of defending army
Find2 = InStr(ActiveDocument.Range(Start:=Find1, End:=Find1 + 58), ")")     '+58 because that's the max additional chars possible in between brackets

StrengthDefense = ActiveDocument.Range(Start:=Find1, End:=Find1 + Find2)    ' _of "attackers (# of characters max 48 + margin)"

Find1 = InStr(s, " vs. ") + Len(" vs.")                                    '" vs. " is unique like 'Total combat strengths x vs. x'
Find2 = InStr(ActiveDocument.Range(Start:=Find1, End:=Find1 + 20), "<br>") - 1 'Find first <br> which comes after the defenders' cs number

StrengthDefense = ActiveDocument.Range(Start:=Find1, End:=Find1 + Find2) & " cs " & StrengthDefense

'rounds
Dim NrTurns As Integer
NrTurns = (Len(s) - Len(Replace(s, "Turn No.", ""))) / 8  'Counts the number of battle turns (/8 because Turn No. has 8 letters).


s = ActiveDocument.Content                              ' Resets s to include all remaining text in document

'The next segment deals with the casulties dealt per turn and adds them to a total casulties per battle
Dim CasualtiesAttack As Integer
Dim CasualtiesDefense As Integer

Dim Turn1 As Long
Dim Turn2 As Long

Dim TurnRange As Range

Dim Find3 As Long
Dim Find4 As Long

Dim b As Integer

CasualtiesAttack = 0
CasualtiesDefense = 0

'Main loop -> deals with # of turns
For b = 1 To 2000
    Turn1 = InStr(s, "Turn No. " & b)                   'Returns the location (as number) where the Turn No. x is first seen
    Turn2 = InStr(s, "Turn No. " & b + 1)               'Returns the next one, so we can select text in between these two
    If Turn2 = 0 Then
        Turn2 = ActiveDocument.Range.End        ' Sets the upperbound of the range to the end of the document
    End If
    
    If Turn1 = 0 Then                            ' If the search in InStr can't be found you get a value of 0;
        Exit For                                        ' Once there's no more higher number, stop the loop
    End If
    
    Set TurnRange = ActiveDocument.Range(Start:=Turn1, End:=Turn2)                                         'Sets range between two turns
    
    'casulties1 (attackers)
    Find1 = InStr(TurnRange, "Total casualties:") + Len("Total casualties:")                               'Searches for the beginning of the number needed
    Find2 = InStr(ActiveDocument.Range(Start:=Turn1 + Find1, End:=Turn1 + Find1 + 20), "attackers") - 1    'Searches for the end of the number needed
    
    CasualtiesAttack = CasualtiesAttack + CInt(ActiveDocument.Range(Start:=Turn1 + Find1, _
                                                End:=Turn1 + Find1 + Find2).Text)                          'Converts the range into text and then to integer. This way they can be added up
      
    'casulties2 (defenders)
    Find3 = Find2 + Len("attackers,")                                                                      'Starts where the other ended + 10 for "attackers,"
    Find4 = InStr(ActiveDocument.Range(Start:=Turn1 + Find1, End:=Turn1 + Find1 + 40), "defenders") - 1    'Searches for the end of the number needed
    
    CasualtiesDefense = CasualtiesDefense + CInt(ActiveDocument.Range(Start:=Turn1 + Find1 + Find3, _
                                                    End:=Turn1 + Find1 + Find4).Text)                      'Converts the range into text and then to integer. This way they can be added up

Next b

'----------------------------------------------------------------------------------------------------------------------------
'-------------------------------------Part II.b: Fill unit stats from beginning table----------------------------------------
'----------------------------------------------------------------------------------------------------------------------------

s = ActiveDocument.Content                  ' Resets s to include all remaining text in document

Dim NobleCount As Integer
Dim LocationUnit As Long
Dim LocationUnit2 As Long
Dim NobleStats()                            ' Will end up holding all the info
                                            'Number in battle = 0;
Dim FindTDRange As Range                    'Attacker or defender = 1;
Dim FindTD As Long                          'Army logo = 2;
Dim FindTDSub As Long                       'Unit Name = 3;
Dim TrimText As Range                       'Noble Name = 4;
Dim TrimText2 As Range                      'Realm = 5;
Dim TrimText3 As Range                      'Unit Type = 6;
Dim TrimText4 As Range                      'Unit Setting = 7;
                                            'CS = 8

For i = 1 To 2000
    LocationUnit = InStr(s, ">" & i & "<")              'Returns the location (as number) where the >i< is first seen
    LocationUnit2 = InStr(s, ">" & i + 1 & "<")         'Returns the next one, so we can select text in between these two
    If LocationUnit2 = 0 Then
        LocationUnit2 = InStr(s, "</table>")            ' Sets the upperbound of the range to the end of the Table once we reach the last noble
    End If
    
    If LocationUnit = 0 Then                            ' If the search in InStr can't be found you get a value of 0;
        Exit For                                        ' Once there's no more higher number, stop the loop
    End If
    
    NobleCount = i - 1                                  ' Adds the highest number in between "> <" which is the number of nobles in the battle
    ReDim Preserve NobleStats(0 To 8, 0 To NobleCount)
    
    For j = 1 To 9                                      'Starts a loop to go through the table <td> and trims all the different elements per noble
        Set FindTDRange = ActiveDocument.Range(Start:=LocationUnit, End:=LocationUnit2)     'Sets FindTDRange to total in between the first and second noble
        FindTD = InStr(FindTDRange, "<td*>")                                                ' Searches for "<td*>" in that range
        FindTDSub = InStr(FindTDRange, "</td>")                                             ' Searches for "</td>" in that range
        Set Test1 = ActiveDocument.Range(Start:=LocationUnit + FindTD, End:=LocationUnit + FindTDSub - 1)   'Sets range to start after "<td*>"
        
        ' 4x trimming of the text which is found. Removing the "td>" part; the "img>" for banners which remained; then ";" which ends spaces twice
        Set TrimText = ActiveDocument.Range(Start:=LocationUnit + FindTD + InStr(5, Test1, ">"), End:=LocationUnit + FindTDSub - 1)
        Set TrimText2 = ActiveDocument.Range(Start:=LocationUnit + FindTD + InStr(5, Test1, ">") + InStr(TrimText, ">"), End:=LocationUnit + FindTDSub - 1)
        Set TrimText3 = ActiveDocument.Range(Start:=LocationUnit + FindTD + InStr(5, Test1, ">") + InStr(TrimText, ">") + InStr(TrimText2, ";"), End:=LocationUnit + FindTDSub - 1)
        Set TrimText4 = ActiveDocument.Range(Start:=LocationUnit + FindTD + InStr(5, Test1, ">") + InStr(TrimText, ">") + InStr(TrimText2, ";") + InStr(TrimText3, ";"), End:=LocationUnit + FindTDSub - 1)
    
        NobleStats(j - 1, i - 1) = TrimText4
        LocationUnit = LocationUnit + FindTDSub
    Next j
Next i

Dim Commander1              'Marshals of attacker
Dim Commander2              'Marshals of defender
Dim Formation1              'Formations for attackers
Dim Formation2              'Formations for defenders


s = ActiveDocument.Content

'This part creates a double loop that first checks for the start of the marshals taking command of their armies and then checks their names_
'in the table loop created above to see if the marshal is an attacker or a defender and then places them in the correct commander1 vs commander 2_
'the same then goes for formation1 and formation2 which is the formations of attackers and defenders respectively so they end well in the infobox
Dim CommanderRange As Long
CommanderRange = InStr(s, "Total combat strengths: ")

Dim CommanderRange2 As Long
CommanderRange2 = InStr(s, "Turn No. 1")

Dim FinalRange As Range
Dim FinalRange2 As Range
Dim NameCommander As Range

For i = 1 To 30
    Set FinalRange = ActiveDocument.Range(Start:=CommanderRange, End:=CommanderRange2)

    LocationUnit = InStr(FinalRange, " />") + 2
    If LocationUnit = 2 Then
    Exit For
    Else
        CommanderRange = CommanderRange + LocationUnit
        Set FinalRange2 = ActiveDocument.Range(Start:=CommanderRange, End:=CommanderRange2)
        LocationUnit2 = InStr(FinalRange2, ",") - 1
        
        Set NameCommander = ActiveDocument.Range(Start:=CommanderRange, End:=CommanderRange + LocationUnit2)
                
        FormationUnit = InStr(FinalRange2, "They deploy in") + Len("They deploy in")
        FormationUnit2 = InStr(FinalRange2, "formation.<br") - 1
        
        Set NameFormation = ActiveDocument.Range(Start:=CommanderRange + FormationUnit, End:=CommanderRange + FormationUnit2)
        
        CommanderRange = CommanderRange + LocationUnit2
       
        'This second and third loop are to loop through a 2 dimensional array (NobleStats)
        For j = 4 To 4
            For y = LBound(NobleStats, 2) To UBound(NobleStats, 2)
                If InStr(NameCommander, NobleStats(4, y) & " ") <> 0 Then  'Checks if the noblename as given in the table above corresponds with the marshal name
                    If NobleStats(1, y) = "A" Then                         'Checks if the noble name is an attacker or defender to place it accordingly
                        If Commander1 = "" Then                            'Otherwise we get "" <br> before the first commander. This handles the first occurance
                            Commander1 = NameCommander
                            Formation1 = NameFormation
                        Else
                            Commander1 = Commander1 + "<br>" + NameCommander 'Adds all marshals of attackers together and "<br>" so they appear on a new line_
                            Formation1 = Formation1 + "<br>" + NameFormation '_on the wiki, same for marshals of defenders
                        End If
                    Else
                        If Commander2 = "" Then
                            Commander2 = NameCommander
                            Formation2 = NameFormation
                        Else
                            Commander2 = Commander2 + "<br>" + NameCommander
                            Formation2 = Formation2 + "<br>" + NameFormation
                        End If
                    End If
                End If
            Next y
        Next j
    End If
Next i


Dim RealmList
Dim Combatant1
Dim Combatant2

'This part loops through the realm collumns in the NobleStats array and will make a list of all unique realm names and add them to the appropriate_
'_attacking and defending side of things
For j = 5 To 5
            For y = LBound(NobleStats, 2) To UBound(NobleStats, 2)
                If InStr(RealmList, NobleStats(5, y)) = 0 Then             'Checks if the realmname has been dealt with before
                    RealmList = RealmList + "," + NobleStats(5, y)
                    If NobleStats(1, y) = "A" Then                         'Checks if the noble name is an attacker or defender to place it accordingly
                        If Combatant1 = "" Then                            'Otherwise we get "" <br> before the first realm. This handles the first occurance
                            Combatant1 = NobleStats(5, y)
                        Else
                            Combatant1 = Combatant1 + "; " + NobleStats(5, y) 'Adds all realms of attackers together
                        End If
                    Else
                        If Combatant2 = "" Then
                            Combatant2 = NobleStats(5, y)
                        Else
                            Combatant2 = Combatant2 + "; " + NobleStats(5, y)
                        End If
                    End If
                End If
            Next y
        Next j
'----------------------------------------------------------------------------------------------------------------------------
'----------------------------------------------Part II.c: Fill out the actual infobox----------------------------------------
'----------------------------------------------------------------------------------------------------------------------------

'Fills out an infobox. Structure of infobox comes from the battlemaster wiki. This code only takes the variables as defined above and fills them in _
'In the correct places. Kept the general layout of the infobox itself to make it nicer on the eyes.
Dim InfoBox As String
InfoBox = "{{Infobox Military Conflict" & _
"|conflict=" & "Battle of " & Conflict & _
"|partof=" & PartOf & _
"|image=" & _
"|caption=" & _
"|date=" & Date & _
"|place=" & Place & _
"|weather=" & Weather & _
"|territory=none" & _
"|result=" & result & _
"|combatant1=" & Combatant1 & _
"|combatant2=" & Combatant2 & _
"|commander1=" & Commander1 & _
"|commander2=" & Commander2 & _
"|strength1=" & StrengthAttack & _
"|strength2=" & StrengthDefense & _
"|formation1=" & Formation1 & _
"|formation2=" & Formation2 & _
"|rounds=" & NrTurns & _
"|casualties1=" & CasualtiesAttack & _
"|casualties2=" & CasualtiesDefense & _
"}}" & _
"__NOTOC__"

Dim InfoBoxRange As Range
Set InfoBoxRange = ActiveDocument.Range(Start:=0, End:=0)
InfoBoxRange.Text = InfoBox

End Sub

By: Peter Kolak


If you want to take a battle report and post it on a website, here's what you have to do:

A. Taking the scribe report and putting it in Word.

  1. First, you must view a battle report via your scribe report.
  2. Click on "View Source".
  3. Copy the source by either right clicking and pressing "Copy" or using "Ctrl P".
  4. Open up a Word Document.
  5. Right click and select "Paste" or simply type "Ctrl V".


B. Editing the text for the web page. Use "Find and Replace" and follow the next 13 steps.

  1. Replace "<Char" with "<".
  2. Replace "</Char" with "<".
  3. Replace "<_" with "<". (Where as "_" is equal to ONE blank space.)
  4. Replace "<^#^#^#^#^#>" with "". (Meaning, don't replace it with anything, just leave the replace section blank.
  5. Replace "<^#^#^#^#>" with "".
  6. Replace "<^#^#^#>" with "".
  7. Replace "<^#^#>" with "".
  8. Replace "< p >" with "< br >" (There are no spaces between the "<" and the "p".
  9. Replace "#DDDDDD" with "#00FFFF".
  10. Replace "#FFFFFF" with "#FFDD11".
  11. Replace "#E0E0FF" with "#FF00DD".
  12. Delete top several rows that contains header information.
  13. Delete very last info: "</Body></HTML>".

C. Preview and make sure it looks good.

Peter Kolak

Addendum by RubyDragon

Having used these steps quite often in the Falasan Inquirer, I found them to be incredibly useful, but here are some modifications which will help fix some of the bugs I found.

A. -no change

B. Editing the text for the web page. Use "Find and Replace" and follow the next 13 steps.

  1. Replace "<Char" with "<".
  2. Replace "</Char" with "<".
  3. Replace "<_" with "<". (Where as "_" is equal to ONE blank space.)
  4. Replace "<^#^#^#^#^#>" with "". (Meaning, don't replace it with anything, just leave the replace section blank.
  5. Replace "<^#^#^#^#>" with "".
  6. Replace "<^#^#^#>" with "".
  7. Replace "<^#^#>" with "". (never found any of these myself)
  8. Replace "< p >" with "< br >" (There are no spaces between the "<" and the "p".
  9. Replace "#DDDDDD" with "#00FFFF".
  10. Replace "#FFFFFF" with "#FFDD11".
  11. Replace "#E0E0FF" with "#FF00DD".
  12. Delete top several rows that contains header information. Delete everything above and including the following phrase found near the beginning "Scribe Note, X turns old:"
  13. Delete very last info: "</Body></HTML>".
"
</BODY>
</HTML><script language='javascript'>postamble();</script>"

RubyDragon's Additions
After doing B (with modifications, carry out the following:

  1. Replace "<>" with "".This removes all those odd "<>" speckling the report
  2. Replace "</FONT<" with "<" I noticed that if this weren't done, after a certain point all writing became yellow)
  3. Preview the battle report. You should notice a near the top. It is located after the "Scribe Note: Battle in XXXYYY", immediately behind "FormationCS"

C. Preview, make sure it looks good, and edit out anything that looks weird.

Addendum by Ceorl

  1. Replace "</FONT<" with "<".
  2. Replace "< p >" with "< br >". (There are no spaces between the "<" and the "p".
  3. Replace "< /p >" with "". (There are no spaces between the "<" and the "/p".
  4. Replace "<Char" with "<".
  5. Replace "</Char" with "<".
  6. Replace "<_" with "<". (Where as "_" is equal to ONE blank space.)
  7. Replace "<>" with "".
  8. Replace "white" with "black".
  9. Replace "#DDDDDD" with "#DC143C"
  10. Replace "#FFFFFF" with "#00008B"
  11. Replace "#E0E0FF" with "#A52A2A"
  12. Replace "#C0FFC0" with "#00008B" (This is for Defender Victory)
  13. Replace "#FFC0C0" with "#DC143C" (This is for Attacker Victory)
  14. Replace "#E0FFFF" with "#00008B"