- Joined
- Jul 16, 2013
- Messages
- 10
- Reaction score
- 2
- First Language
- Greek
- Primarily Uses
Ok, I really hate it when I can't do something on my own but this one seems much more complicated than I imagined it..
Anyway, what I want is a way to check a Skill or Item's scope to use it in damage formula.
Here's the deal: Although Tsukihime's "Action Target" is working perfectly, I assumed that the same targeting system will apply even outside the battle.
So by using Yanfly's Lunatic Damage I managed to create a damage formula that divides the damage among the targets (With the help of Tsukihime's Action Targets Script):
value /= a.current_action.targets.size;
It worked perfect in battle. The next day I tested the game to check if everything was working correctly and I wanted to heal my Party member before entering the dungeon. So I when to the Cure skill, and changed it's scope from the Tsukihime's Scope Change script.
Then I pressed Z to heal and boom! An error. Apparently the game handles differently the in battle and out of battle objects.
Annyway after some searching, I found a usefull condition to check if I'm in battle or out of battle. So I put it in the damage formula.
if $game_party.in_battle;
value /= a.current_action.targets.size;
end;
As expected then the division works only while in battle leaving the Cure's Heal unaffected while using it out of battle (From the menu.)
So there is no point, not using it on all Party members if you have more than one. Not only it heals all party members the same amount as it would heal a single party member but it also consumes the MP once, meaning that the game is actually rewarding the player for Healing all party members at once rather than healing one party members, which makes the Skill useless if being used from the Menu on only one Party member, the only time the player would need to heal one party member (that is in a party with more that one member.) with a skill from the menu,
is when before he learns that he can heal them all at once.
So I went ahead a little further and tried to fix this as well so that the healing will be divided among the party members when used on more than one:
when /Distribute Damage/i
if $game_party.in_battle;
value /= a.current_action.targets.size;
else;
if $scene_itembase.item.for_all;
value /= $game_party.members.size;
end;
end;
But unfortunatelly the " if $scene_itembase.item.for_all;" part isn't working... I spend countless hours trying to find these words
I assumed that a Class's name can be referenced in ruby as a global variable like $game_party class for example, that's how I came up with $scene_itembase (Even though I never saw any "This class can be referenced as '$scene_itembase' on top of the description of the class.")
Anyway, that thing has happened to me really often and generally the fact that I can't find any way to reference something from one script to another.
I admit I'm not a good scripter but I want to believe that at least I know the basics.
However when comming to reference things from one point to another, that's nearly imposible for me unless we talk about straightforward things.
Anyway, long story short, I need to find a way to reference the scope of the skill that being used from the menu to change the
'if $scene_itembase.item.for_all;' part into that.
Anyway, what I want is a way to check a Skill or Item's scope to use it in damage formula.
Here's the deal: Although Tsukihime's "Action Target" is working perfectly, I assumed that the same targeting system will apply even outside the battle.
So by using Yanfly's Lunatic Damage I managed to create a damage formula that divides the damage among the targets (With the help of Tsukihime's Action Targets Script):
value /= a.current_action.targets.size;
It worked perfect in battle. The next day I tested the game to check if everything was working correctly and I wanted to heal my Party member before entering the dungeon. So I when to the Cure skill, and changed it's scope from the Tsukihime's Scope Change script.
Then I pressed Z to heal and boom! An error. Apparently the game handles differently the in battle and out of battle objects.
Annyway after some searching, I found a usefull condition to check if I'm in battle or out of battle. So I put it in the damage formula.
if $game_party.in_battle;
value /= a.current_action.targets.size;
end;
As expected then the division works only while in battle leaving the Cure's Heal unaffected while using it out of battle (From the menu.)
So there is no point, not using it on all Party members if you have more than one. Not only it heals all party members the same amount as it would heal a single party member but it also consumes the MP once, meaning that the game is actually rewarding the player for Healing all party members at once rather than healing one party members, which makes the Skill useless if being used from the Menu on only one Party member, the only time the player would need to heal one party member (that is in a party with more that one member.) with a skill from the menu,
is when before he learns that he can heal them all at once.
So I went ahead a little further and tried to fix this as well so that the healing will be divided among the party members when used on more than one:
when /Distribute Damage/i
if $game_party.in_battle;
value /= a.current_action.targets.size;
else;
if $scene_itembase.item.for_all;
value /= $game_party.members.size;
end;
end;
But unfortunatelly the " if $scene_itembase.item.for_all;" part isn't working... I spend countless hours trying to find these words
I assumed that a Class's name can be referenced in ruby as a global variable like $game_party class for example, that's how I came up with $scene_itembase (Even though I never saw any "This class can be referenced as '$scene_itembase' on top of the description of the class.")
Anyway, that thing has happened to me really often and generally the fact that I can't find any way to reference something from one script to another.
I admit I'm not a good scripter but I want to believe that at least I know the basics.
However when comming to reference things from one point to another, that's nearly imposible for me unless we talk about straightforward things.
Anyway, long story short, I need to find a way to reference the scope of the skill that being used from the menu to change the
'if $scene_itembase.item.for_all;' part into that.
Last edited by a moderator:

