Thursday, March 8, 2012

Events Part 4 - Checks

Checks are probably the simplest thing to explain and the one of the most important parts. It lets the game know which event to run if mulitple events of the same name exists. As stated previously always make sure that even if nothing happens and event is still there to handle nothing happens or an error will be thrown.

All event conditions must pass before the event fires and the conditions are all run at the same level.

The checks are:

Variable Check -- Basic Checks
Key Event Check -- key item in game checks... very rare mainly used for class change
Item Check -- Item check does the item exist on the player?
Effect Check -- effect check does the girl have an effect?

Variable Checks:

Check ether an on the fly made variable or an in game variable.


evecheck -- Tell it that its a check
label = "#rand3" -- is it a variable from var replace or from on the fly?
check = "eq" -- the check it self "eq" = ==, "lt" = <, "gt" = >
vvar = "2" -- checking against this number or variable

Boolean are a bit different they are just always compared equal so compare false to false and true to true no check syntax required.

evecheck label = "#asJobSuccess"  vvar = "false" if you want to compare false

Pretty simple. Please note that if your doing an on the fly and an in game variable label should always be the in game variable. Think it will crash the other way.

Key Event Check:

Right now there is only one key check in the game. That's to see if a class has been passed. I'll add more as needed but these are more the exception to the rule.

label = "checkpassedclass" -- the key word... this is the only one so far
arg1 = "girl class" -- what ever is required by the key check

label = "furniture" -- check the furniture in the room of the girl who's event is being called
arg1 = "pottedplantfurniture" -- all lower case truncated and with furniture at the end

label = "missing" -- returns true if ANY GIRLS are missing

label = "asdefault" -- sets the assistant on deck as the current assistant useful for running events where the assistant talks to the player for help

Another evekeycheck is "checkallclass" this will check all girls and see if ANY has a class skill over a certain point.  Notes it only checks greater then or equal and will return false if the girl is missing.

label = "checkallclass"
arg1 = "cooking" - the class that is checked against
arg2 = "20" the stat that is checked against if you just wan the class do -1000 or so.

Another is if a class is know.

label = "checkclassexist"
arg1 = "class" -- The class that is checked

That's it more the oddity but they do exist.


has it owns section


**effect removed go to effect **

That's enough of that.

3/10/12 Added feature for girls to be checked for items
4/21/12 Effects takes name or label
8/12/12 Boolean
10/20/12 Furniture
1/4/13 removed effect
1/12/13 added missing
1/24/13 added asdefault
2/2//13 added checkallclass
2/4/13 added checkclassexist


No comments:

Post a Comment