Dynamic description generation

Hey again, here again with another game quest specific question.

So I got to the point where I want to build the actual text of a quest, you know like

“Farmer Tom wants you to kill the wolves in the forest”.

What I want to do, is preferably do something like this:

{Questgiver.Name} wants you to {action.description} {action.targets} in {location}.

What’s the best way to do this type of processing of text, so it can preferably get the string right from a variable? I can of course go ahead and write my own parser, but it would be great if there was some kind of library or even a better way of doing this than splitting up the string and doing loads of if statements.

Thanks in advance 🙂

submitted by /u/gogo199432
[link] [comments]

Leave a Reply