Variable in NPC dialogue

Sorry for the lack of experience. I’ve been trying to figure out a way to make a simple dialogue system, where when a choice is made, a variable is added (ex. Choice one picked, +1 variable is added to social) which will effect dialogue later on.

I’d appreciate any help, since it seems its hard to find an answer on my own.

Consider creating a DataTable (a simple UE4 database) with each row representing a line of dialogue. You can do it in Excel (or OpenOffice), export it as *.csv, and load it into the engine.

In addition to plain text, a row like this can contain extra data - flags, sounds, images, IDs and so on. One of the extra pieces of info you could contain is the social impact; a simple int variable should suffice in this case.

Now whenever you trigger a line of dialogue, you read from a row in a DataTable and check whether this piece of text has any social connotations represented by the associated variable.

If I were you, I’d start by compiling a small (and, ideally, simple) sample of data in an Excel table. Something like that: