Random Weights and Repeating Levels
Posted: Mon Aug 17, 2020 1:36 pm
Still new so I'm mostly looking for guidance to get me pointed in the right direction.
Scenario is the NPC has random greetings setup with sequence command RandomizeNextEntry()
Next level I've added multiple greetings, the random method works well.
I merge those random greetings into a single node with sequence command Next() to act as a no-delay passthrough.
One response the player has is asking the NPC to repeat themselves.
That links back to the opening node with the RandomizeNextEntry().
Setup like this so far as a simple example:
(my onedrive) https://1drv.ms/u/s!AjLMZMLArtRQ_CWdTVX ... B?e=sdvsK7
This all works as expected, but there are a couple of scenarios I'm not clear on.
I would like the random greetings to be weighted, and likely never repeat the same greeting twice in a row.
I would like priorities to shift based on how many times the player asks to repeat
The idea is the player can be a jerk and keep asking the NPC to repeat. Like most people this will make the NPC annoyed, so I would have additional greeting nodes that only get used when "annoyed > 5" for example. And eventually the dialogue would change to a new branch where the player no longer gets a chance to respond.
Maybe I have groups of greetings, like "Friendly, annoyed < 2", "Annoyed, annoyed between 2-5", "Mad, annoyed > 5" that I branch into based on a condition check of the annoyed var which increments each time the player repeats?
While I believe I can handle all of this with conditions and LUA variables directly in the conversation nodes, I'm thinking it might be easier to just push this all to code to get more sophisticated with it and/or record history/logs etc.
Or, are there built in functions that do most or all of that?
Scenario is the NPC has random greetings setup with sequence command RandomizeNextEntry()
Next level I've added multiple greetings, the random method works well.
I merge those random greetings into a single node with sequence command Next() to act as a no-delay passthrough.
One response the player has is asking the NPC to repeat themselves.
That links back to the opening node with the RandomizeNextEntry().
Setup like this so far as a simple example:
(my onedrive) https://1drv.ms/u/s!AjLMZMLArtRQ_CWdTVX ... B?e=sdvsK7
This all works as expected, but there are a couple of scenarios I'm not clear on.
I would like the random greetings to be weighted, and likely never repeat the same greeting twice in a row.
I would like priorities to shift based on how many times the player asks to repeat
The idea is the player can be a jerk and keep asking the NPC to repeat. Like most people this will make the NPC annoyed, so I would have additional greeting nodes that only get used when "annoyed > 5" for example. And eventually the dialogue would change to a new branch where the player no longer gets a chance to respond.
Maybe I have groups of greetings, like "Friendly, annoyed < 2", "Annoyed, annoyed between 2-5", "Mad, annoyed > 5" that I branch into based on a condition check of the annoyed var which increments each time the player repeats?
While I believe I can handle all of this with conditions and LUA variables directly in the conversation nodes, I'm thinking it might be easier to just push this all to code to get more sophisticated with it and/or record history/logs etc.
Or, are there built in functions that do most or all of that?