Jump to content
Feldschlacht IV

Formula variables for Hime's scripts.

Recommended Posts

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

Okay, so I got some information that tells me this is what the formulas mean

 

a - refers to the enemy's actor instance
p - refers to the party's party instance
t - refers to the enemy party's troop instance
s - refers to the switch global
v - 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

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 by Tsukihime

Share this post


Link to post
Share on other sites

 

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

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
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted