I'm working on an American Elections Mod where multiple choices over the years can lead to very complex decision trees. I'm looking at using flags as a possible way to ease organization and control event flow, as opposed to just having large numbers of events being slept in event actions.
Does having a few dozen global flags slow down game performance inherently? Does it only slow things down when a search for a flag happens, and if so, is it noticeable? Can you control it by being studious about clearing flags as they're no longer needed? In short, what should be considered Best Practices in the use of event flags?
One other question. This is sheer laziness since it's probably in the docs somewhere, or I could just do a test event, but can the presence or absence of a flag be used as a trigger for an event action? Consider an election in 1948. It might need something like: Action 1: Re-elect Truman(Dem), Action 2: Elect Dewey(Rep), Action 3: Elect Thurmond (States Rights), [IF(NOT(FLAG(_WALLACE_HAS_BEEN_PRES)), Action 4: Elect Wallace (Progressives))]. Is that doable?
And does it say bad things about me that when I need pseudocode for an example I default to something that looks like LISP?
Does having a few dozen global flags slow down game performance inherently? Does it only slow things down when a search for a flag happens, and if so, is it noticeable? Can you control it by being studious about clearing flags as they're no longer needed? In short, what should be considered Best Practices in the use of event flags?
One other question. This is sheer laziness since it's probably in the docs somewhere, or I could just do a test event, but can the presence or absence of a flag be used as a trigger for an event action? Consider an election in 1948. It might need something like: Action 1: Re-elect Truman(Dem), Action 2: Elect Dewey(Rep), Action 3: Elect Thurmond (States Rights), [IF(NOT(FLAG(_WALLACE_HAS_BEEN_PRES)), Action 4: Elect Wallace (Progressives))]. Is that doable?
And does it say bad things about me that when I need pseudocode for an example I default to something that looks like LISP?