09-16-2009, 10:20 AM
Awesome job, very clean coding and looks easy as hell to use! I'm definately gonna add your XP version to my lib because I could get alot of good use out of this too!
One thing I'm gonna pick on though is it appears that the system is only used to handle Numeric data, while $game_variables can handle other data types like Strings and Arrays and the such (even though they weren't designed to either anyway). Still, I believe some of the math methods should still work on them (+ and * at least, never tried using other math operators directly on String/Array/etc classes)
And also, self switches require map_id, event_id, key (ie, $game_self_switches[[1, 5, "A"]]). I would make the arguments interchangable, where if the 1st and 2nd argument are Integers it'll look up Map ID and Event ID, otherwise it would just look up Event ID. Alternatively, you could just use Key ("A") and not specify Map/Event ID and it would do it for whatever event is running atm.
self_variables(1, 5, "A") # Map ID, Event ID, Var Key (for any event on any map)
self_variables(5, "A") # Event ID, Var Key (used for the current map)
self_variables("A") # Var Key (used directly from event call script)
One thing I'm gonna pick on though is it appears that the system is only used to handle Numeric data, while $game_variables can handle other data types like Strings and Arrays and the such (even though they weren't designed to either anyway). Still, I believe some of the math methods should still work on them (+ and * at least, never tried using other math operators directly on String/Array/etc classes)
And also, self switches require map_id, event_id, key (ie, $game_self_switches[[1, 5, "A"]]). I would make the arguments interchangable, where if the 1st and 2nd argument are Integers it'll look up Map ID and Event ID, otherwise it would just look up Event ID. Alternatively, you could just use Key ("A") and not specify Map/Event ID and it would do it for whatever event is running atm.
self_variables(1, 5, "A") # Map ID, Event ID, Var Key (for any event on any map)
self_variables(5, "A") # Event ID, Var Key (used for the current map)
self_variables("A") # Var Key (used directly from event call script)