I can't actually test this compiles, but this does a few things:
There's old hardcoded variable and flag validation that we can now handle with the rules. I wasn't so sure whether the flags code was completely unnecessary, but if it needs to exist, we'll need to extend it, since there's a lot of new flag effects and triggers now.
I also removed the incorrect error flagging if you use variable effects in certain scopes
…gories
I can't actually test this compiles, but this does a few things: