Feldschlacht IV 1 Posted March 24, 2014 Hey guys. So I'm a big fan of Hime's scripts, but I'm still learning some of the basics of scripting as a whole. A lot of Hime's scripts (like this one for example) refer to the use of these formula variables. a - the enemyp - game partyt - game troops - game switchesv - game variables But I don't really know how to work these. I get the feeling there's a ton of possibilities with combinations of these, but I'm still learning formula's and I don't know what works or what doesn't. Is there an appendix of formulas so I know what I'm doing? Share this post Link to post Share on other sites
Feldschlacht IV 1 Posted March 26, 2014 Okay, so I got some information that tells me this is what the formulas mean a - refers to the enemy's actor instancep - refers to the party's party instancet - refers to the enemy party's troop instances - refers to the switch globalv - refers to the variable global Is there a master table of objects I can reference with that formula? Share this post Link to post Share on other sites
Tsukihime 1,489 Posted March 26, 2014 (edited) Those variables are locally defined and don't really mean anything anywhere else. In a damage formula, for example, "a.atk - b.def" simply means the attacker's atk minus the target's def. The `a` and `b` variables are provided during formula evaluation, and happen to be passed into those two variables. A master list is not available because anyone can define anything they want. If you want to know what is built-in, you can look through the scripts and look at what kind of attributes are available. Someone could compile a list of "frequently used attributes" but it would be difficult to determine what should be on that list. When I say "the enemy" and the script is note-tagging an enemy in your database, it typically refers to a Game_Enemy object which you can look up in the scripts, for example. Edited March 26, 2014 by Tsukihime Share this post Link to post Share on other sites
Feldschlacht IV 1 Posted March 26, 2014 Someone could compile a list of "frequently used attributes" but it would be difficult to determine what should be on that list. Something like that would be very helpful to me, if nothing else than to help me (and others) figure out the pattern to make their own. Share this post Link to post Share on other sites
Shad3 34 Posted March 27, 2014 It is hard to compile because different scripters might define different things for those shorthands. Also, compiling what methods that can be called by each variable is simply tedious. You'll want to look in the default script for the list of call-able methods. For example, a is usually a Game_Battler object. You'll want to see the default Game_Battler script and its parents (Game_BattlerBase), and depending whether it is an actor or enemy, the respective Game_Actor/Enemy class. and note all the methods (def somethings, attr_accessor/reader something). That is what you can use. Share this post Link to post Share on other sites