1. Hey Guest! Our new game Wargroove has released! Check out the forums or wiki for more information!
    Dismiss Notice

Event Editor Explanation

Discussion in 'General Discussion' started by Dededelete, Feb 7, 2019.

  1. Dededelete

    Dededelete Space Hobo

    Can anyone explain how the event editor works? I got the basic gist of it but it can become confusing sometimes, especially using flags and counters. I've never attempted anything similar to the event editor, so please excuse me if this is a dumb question.
     
    • SchwaAkari

      SchwaAkari Space Hobo

      You use flags and counters to control the encounters you write.

      First of all, the difference between a flag and a counter is pretty simple: a flag will only ever be 0 or 1 (False or True respectively), while a counter can be any number you want. It is entirely feasible for you to use nothing but counters instead of flags if you wanted, but you might find flags to be easier and less confusing to use than counters for any situation that only needs either a True or False state to check.

      As for how you use flags and counters? It literally all comes down to the limits of your imagination. Programming is AWESOME like that.

      I can give you some examples though.

      Suppose you're making a map, and you want Mercia to say some dialogue the first time she gets attacked by enemies on that map, like "Ouch, I better be careful!" for instance. However, you don't want her to say this every time her HP falls below 100% because that would be super annoying, you only want her to say the line one time during the mission.

      You solve this with a Flag. Label the Flag something easy to remember, like "Mercia injured". Now, when writing the conditions for the dialogue to trigger, you'll want to write two of them: one to check if Mercia's HP is less than 100%, the second one if the flag "Mercia injured" is set to FALSE (i.e. "has not been triggered yet"). If both of those checks pass, cause the dialogue box to pop up that has her say "Ouch, I better be careful!" and set the flag "Mercia injured" to TRUE at the same time. This way, if her HP falls under 100% again for the rest of the mission, that flag will still be set to TRUE and thus the dialogue box will never pop up again, since the event doesn't pass the second check that requires the flag to be FALSE.

      Flags can control any situation like this that can be solved with a TRUE or a FALSE. You don't need your flags to only go one way either, there's nothing stopping you from setting a TRUE flag back to FALSE again for whatever you want to do with it.

      Counters are more interesting, because they can be any number you want. One way you can use Counters is like "multi-tiered Flags" if this makes any sense.

      For instance, suppose you're making a map where Mercia has to visit three villages to win the map, and you want her to say something different every time she visits a village, like "Two more to go!" followed by "Just one left!" and then finally "I got them all!" for some easy examples. You would ideally use a Counter to determine which piece of dialogue Mercia is currently "on", basically. Label the Counter "Mercia village dialogue", have it start at 0, and have it go up by 1 every time she visits one un-visited Village, then have the event check to see what that Counter is set to in order to decide which of her dialogue boxes should be the one to display.

      And yes, you COULD just set the dialogue conditions to be determined on "number of un-visited villages" instead of what the Counter says... however, suppose enemies on the map take one of her villages back? You recapture the same village and she'll say "Two more to go!" again, as if it's her first time visiting that village. This will look silly, and you can avoid it by using a Counter to keep track of her dialogue, since a Counter is super easy to control. You can even use that same Counter to write even more event conditions such as "Mercia already got one village, but that village got recaptured by the Outlaws" i.e the Counter is at "1" but the number of her captured villages is now at "0", causing her to say some bonus dialogue such as "That village got recaptured! I must go help them immediately!". Critics will LOVE your maps if you give little details like this such care.

      Counters are so much more than just fancier Flags, though. You can store every and any statistic you can dream up inside a Counter, and recall it later for anything you like. You can keep track of how many soldiers got killed during a huge battle and then have exactly that many soldiers come back as undead skeletons in a later battle, for instance. Or you can carry over a player's Gold from one map to the next, during a campaign, by storing it in a Campaign Counter first. Or you can make Valder summon one extra skeleton for every time he's used his Groove during the match (so on the fifth use, he summons five skeletons).

      Hopefully I didn't overcomplicate things for you further with this longwinded explanation, but this is the gist of how Flags and Counters work.

      EDIT: Oh I just realized you asked for help with the EVENT editor itself, not just flags and counters. I could describe that for you as well, but read the tutorial on the Wiki first and if you still can't grasp it very well then I'll do so in a sequential post. I don't want to bloat this one even more than it is.

      EDIT 2: Apparently you can't write current game variables such as "player gold", "commander groove charge", etc. to a Counter at the moment, which really sucks. I hope they add that feature in a future update (and that there is enough demand for the feature to expedite such a feature).
       
        Last edited: Feb 9, 2019
        777JackOfBlades likes this.
      • Dededelete

        Dededelete Space Hobo

        Ok, so flags are booleans and counters are... counters. Thanks for the explanation. I'll be sure to use these more often.
         
        • SchwaAkari

          SchwaAkari Space Hobo

          Counters are integers, yes. Sounds like you've got the hang of it ♥
           

          Share This Page