Part 12: How to structure the Match report segments
Yeah, I am indeed finally about to tackle the match reports. I am still not simulating anything, even though that should be one of the next parts. What I am going to write about now is how to actually write each match report entry.
If you consider reading at least 38 match reports for your team alone in a league with 20 teams, you notice really fast that you need to have quite a bit of variety to keep these match reports interesting or surprising. One way of ensuring that is to have many different random events possibly taking place so that even after your first 38 matches you wont have seen every outcome and action the game has to offer. One easy example would be the penalty kicks.
There are 3 basic outcomes:
- He scores a goal.
- The goalkeeper clears the ball.
- He misses.
This means, there are 3 possible ways for this outcome, which is already a nice variety. However, since 3 isn't too terrible much the player might soon be tired of reading "He scores a goal!", after the 10th penalty kick. If the player already knows any given result by heart, he won't bother with the game for too long, so what to do? Easy! Include simple "Flavor" text.
Here a few "flavor" text examples for the different outcomes:
He scores a goal.
- "He shot it right under the bar!"
- "He pounded it into the the corner of the goal!"
- "The shot went straight by the goalkeeper who was only able to touch the ball lightly."
The goalkeeper clears the ball.
- "The goalkeeper catches the ball!"
- "The goalkeeper managed to direct the ball over the goal!"
- "The ball went directly to the goalkeeper who was easily able to catch it."
He misses.
- "He hit the crossbar! What a chance!"
- "Oh no, he hit it way above the goal."
- "He slipped and barely shot the ball, what a wasted chance."
Out of 3 possible outcomes you get 9 different texts that make the text feel different, even though it did the same calculations. This is very important to catch the imagination of the player. Of course some of those might be even calculated as well, as for example with an accuracy stat to measure whether the players shooting will hit the post, straight in, or from the post into the goal. I'll probably even do that, but this was just for the sake of showing what I am talking about.
Synonym System:
And nooow, we come to the most interesting part. We already got quite a few possible flavor texts, but they are still a bit static. As soon as you read a certain flavor text the 3rd time, it will get old as well, so what can you do to counter that? My solution is a Synonym System. What I did was creating small databases inside my program which will get triggered by the function Syn("word"). To use it, of course I actually need to program a list with synonyms for the chose word. So what Syn("word") does, is the following:
- It will check my mini database whether I have an entry for that specific word, for example "teams".
Code:
if (c == "teams")
{
word.Add("teams");
word.Add("sides");
word.Add("squads");
word.Add("clubs");
}
... and then will randomly select one of those words. On top of that, if I ever need it, I programmed it in a way that will automatically give me the random corresponding word with the same capitalization, which means Syn("teams") might give me "sides", while Syn("Teams"), could give me "Sides". That way I dont need to bother about 2 making databases for different capitalized input. It automatically capitalizes the words how I want them. This leads to a whole lot of variety in the wording of the reports, making it way less static. Look at the following example for the sentence "The game is about to start":
Code:
" The " + [U][I][B]Syn("match")[/B][/I][/U] + " is about to start."
" The " + [B][I][U]Syn("match")[/U][/I][/B] + " will start " + [B][I][U]Syn("soon")[/U][/I][/B] + "."
" The " + [B][I][U]Syn("referee")[/U][/I][/B] + " "+[B][I][U]Syn("intents")[/U][/I][/B]+" to start the " + [B][I][U]Syn("match")[/U][/I][/B] + " " + [B][I][U]Syn("soon")[/U][/I][/B] + "."
" "+[B][I][U]Syn("Both")[/U][/I][/B]+" " + [B][I][U]Syn("teams")[/U][/I][/B] + " "+[B][I][U]Syn("cannot wait")[/U][/I][/B]+" to start playing."
" The kickoff will be " + [B][I][U]Syn("soon")[/U][/I][/B] + "."
I included 5 different sentences, which all have different possibilities for the exact wording. This will hopefully minimize the Deja-Vu's the player of my game will have during his playtime if I can keep this structure up. In this example it means there are already
165 different varieties of this one "The game is about to start"-sentence , 120 different possibilities in the third sentence alone. Of course I know that simply exchanging a few words doesnt make the text interesting on itself, but its a good way to start having a less static report, which hopefully doesnt feel like the last one the player has read. Couple this with a pool of sentences which might not appear at all and there should be quite a variety of things to happen and read over the course of a league season.
Colorcoding the Team actions:
One other thing I am really glad I was able to implement is an easy way for me to color the teams and players. If you read a match report, you immediately want to know to which team the player actually belongs to and for this I wouldnt want to edit the RTF (rich text format) code every time I include something that needs to be colored, so I wrote a short check to search for everything in <> and [] brackets, color it green or red, and then delete the brackets afterwards. The sentence "Team A and Team B play today", would look like "<Team A> and [Team B] play today." within my program and then colored accordingly.
And now after the wall of text, 3 random intro paragraphs, currently created in the game: