Monday, March 30, 2015

Validator for events

Hello,

in these days I made a great improvement in event creation that should make event creation a little simpler for me and for anyone that in the future might like to try and create one.

I made a validator that can tell you major errors.
What errors can it find at the moment:
It find undefined EventStep for example <SetText> is defined while <SetTxt> or <ABCD> is not. This should prevent mistakes in writing event steps names.

  • It find undefined EventStep for example <SetText> is defined while <SetTxt> or <ABCD> is not. This should prevent mistakes in writing event steps names.
  • It tells whether an event step is formed correctly, for example event steps that require attributes or inner elements will fail validation if they're not defined. And will fail too if they have attributes that are not used.
  • It tells if a given quest id exist or not.
  • Most important it will validate expressions (hopefully if there are not bug on that side :3) for example an expression like [Trainee.Mind.Happiness.VeryHaRpy] will fail since that parameter does not exist, while the correct one [Trainee.Mind.Happiness.VeryHappy] will pass the validation. In part it even check for correct types if an expression require a bool as a return and the expression return a number it will fail validation.
I'd like to add in the future:
  • Check whether a <DirectReference> point to a correct file/event
  • Check whether a quest is started somewhere or is unused.
  • And maybe whehter events themself are used (not sure I could do this at the moment)
  • Other that at the moment don't come to mind.
Anyway for every error that find it gives the file and line where the error could be finded.
This should reduce a lot event testing (unfortunately it will never be smart enough to tell grammar error but for that there's the button to report typos)

No comments:

Post a Comment