Generated text for letters sent by satisfied visitors #11
Labels
dev-experiment
Exploration of software design
feature
Game feature to be implemented
help wanted
Extra attention is needed
Milestone
Context
After a visitor group leaves a town, it will send a thank you letter and that includes a reward which can be collected. These letters are usually called
reports
in the code.At the moment, the texts for the letters are picked in the frontend, based on the report id, from a static list of possible texts.
Goal
The letter texts should be more diverse and generally more interesting for the players to read.
Probably, we will want to eventually generate a new text for each report, store it in the database and display that instead of a static text. But before implementing any of that, there should be a model for how the texts are generated.
Possible ideas to make texts more interesting:
Implementation Advice
This could be done in different ways and it will probably be a bit of an experiment to see what works best.
It should be kept in mind that the game is available in multiple languages and that it should be possible to generate the texts in all of them. But having it just in one language would be a great start. We can worry about other languages later.
My first idea was to use a list of keywords that are selected based on the specific visitor and town. (E.g. "blue flower", "morning", "happy") Using those keywords, a full sentence could be generated either using some simple concatenation or even with some natural language processing utility. Since the sentences will most likely be formed on the server anyway, the options are quite large.
Relevant Code Sections
Letter text selection in the frontend: reports.rs
The text was updated successfully, but these errors were encountered: