As we know well, in VX ACE when a battler (hero or enemy) is under a CONFUSED state he will just use (001: Attack) skill rather than all it's skills like Final Fantasy series and other RPGs.
The question is: there's any way to change this? A script? Is it really hard to make a script for this?
Anyway, thanks!
I don't mind battlers just using attack when confused, however, I'd like to see some more diverse skill use when under "charm"
Gotta go do some script hunting!
So, anyone have any idea how to change this behavior?
This issue is prolly linked with the "ATTACK ALLY" option at STATES in the DATABASE.
Theres prolly a bult-in script for that and when modified we could get it to use more skills rather than default "001:Attack"
Maybe adding a behavior similar to auto-battle?
I know we've got very talented scripters here.
I would be very thankful if somebody could fix this "issue" that bothers me a lot.
Update here:
In GAME_ACTION I've found the definition of confusion state:
def set_confusion
set_attack
end
I've managed to change it to:
def set_confusion
set_skill(22)
end
Now, obviously the confused battler uses the skill 22 in the database. If I could make it to use all his default skills like an auto-battler...
I'm tinkering with the script now. Seems fairly straight forward.
Just replace it to grab a random skill from the subject's skill or action list.
For enemies this is easy: it's just the enemy's list of actions.
For actors, you need to add attack and guard to the list.
If you want to execute an arbitrary command such as using items or something...that's a bit more engaged.
This should work. Keep in mind I have not tested the script much, and there may be unforeseen ... complications. This is also an over-write, so other battle-related scripts may run into issues.
class Game_Action #-------------------------------------------------------------------------- # * Set Confusion Action #-------------------------------------------------------------------------- def set_confusion if subject.enemy? == true subject.make_actions else confused_skill = Array.new confused_skill.push($data_skills[subject.attack_skill_id]) if subject.attack_usable? confused_skill.push($data_skills[subject.guard_skill_id]) if subject.guard_usable? confused_skill.concat(subject.usable_skills) confused_skill.concat(subject.usable_items) @item.object = confused_skill[rand(confused_skill.size-1)] end end endclass Game_Actor #-------------------------------------------------------------------------- # * Get Array of Currently Usable Items #-------------------------------------------------------------------------- def usable_items $game_party.items.select {|item| usable?(item) } end endEDIT : Edited for sake of code prettiness.Eeh, and the 'All Enemies' option on a skill is not working the way it should ... I'll tinker with it some more.
And works just great here!
I'm sure this script will also help a lot of ppl besides me!
'bout that "USER ONLY" target issue, not really a problem. In my case this kind of skill just add a state, so make battlers immune to that state 😉
Thanks again, Exhydra!!
Anything just contact me!
Also, thanks to Tsukihime for the support!
I updated my previous message with code that should resolve the 'User Only' issue.