1. Make a causality map.
This is a graph that shows you how the different chunks (or modules) affect one another and whether it is possible for them to occur in any order. It will also allow you to see nested dependencies that you might have missed at first (e.g. to light a fire in the romantic dinner scene you need wood, and to get wood during the outdoor trip scene you need an axe, and you get the axe during the visit to the uncle scene.)
2. Break each narrative module in static and dynamic
Static is the part of the narrative that is unaffected by other narrative modules. For instance, ordering a drink at the bar may always occur in the same manner (static), but the news on the tv may change depending on the progression of the game (dynamic).
Static parts are easy to write.
3. Consider writing the dynamic parts in the modules that affect them and include them in the target module
It may not work for you, but for this has worked for me.
If module A determines what happens in module B, then I write the dynamic part of B that depends on A in the module A and dynamically import it in B.
It is like writing a flash-forward. Cleaner, simpler to edit.
Also, time-saving advices:
- set the default for each dynamic scene as if nothing else has occurred and update the scene when the causal event occurs.
- save the progression status in some global and easily accessible format to enable you to include and exclude the correct items. You don't need to store every decision, but only the ones that would lead to mutually exclusive outcomes.