>>30813
>In a game there's more to interaction than moving through entries in a book via singular decisions. You get shit layered atop of each other: dialogue options, environmental changes that have weak correlation with the plot but erode the narrative if you don't address them...
Well the thing about that is that most games really don't have much branching in the storyline. In Ocarina of Time, you're either and adult or a child, and say you're at Kokiri Forest, there's a flag to check if the Deku Tree is dead, and another flag to check if you beat the Forest Temple. That's about as complex as it gets in most RPGs, and a couple of if statements are more than enough to get the job done:
if (defeatedDekuTree)
{
person.say("Hey the Deku Tree is dead")
}
else
{
person.say("You should visit the Deku Tree")
}
Really that's how 99% of games handle descisions and branching storylines. There's no dynamic approach because you need to hand-craft the dialogue anyway, therefore you still need to manually account for all possibilities.
MM is a more complex take on this system, but at the end of the day it's still a bunch of if statements, and it's generally compartmentalised. You won't hear an NPC in Clock Town mention something you did in Stone Tower. The complexity of branching storylines grows exponentially. Adding one branch to your story doubles the amount of potential conditions, adding another branch doubles it again, and so on.
> I need some sort of conditional checking, to see if player meets the stats, if there is some global trigger or something of the kind right?
Yeah it's called global state variables and if statements.
The only other approach I am aware of is to make your game world fully dynamic. Consider Sim City. Raise taxes, people move out of the city, the tax income drops, the fire department is underfunded, the city catches fire.
The problem is that humans are complex, and I am not aware of any game which takes a dynamic approach to NPC interaction. When you make a system dynamic, almost by its own definition it can become unpredictable. It would kinda suck if you're playing some RPG and the king decides to have you executed because his corrupt advisor said you were trying to overthrow his rule. Game over. When you create a dynamic system, you can end up creating a system which behaves in a way which is not 'fun', or might even put the player in unwinnable situations.
So yeah, those are your choices. A bunch of if statements and global state variables, or you can vanish into a cave for a decade trying to make a dynamic system which works.