Jump to content
DoubleX

DoubleX RMVXA Confusion Edit

Recommended Posts

Script name

DoubleX RMVXA Confusion Edit

 

Author

DoubleX

 

Terms of use

None other than not claiming this script as created by anyone except DoubleX or his alias

 

Introduction

If a battler has inflicted states with restrictions "attack an enemy", "attack anyone" or "attack an ally", he/she/it'll attack the respective targets via autobattle like actions with the autobattle flag unchanged.

This is done by reversing his/her/its identifications of allies and enemies(allies are identified as enemies and vice versa) with 50% and 100% chance with "attack anyone" and "attack an ally" respectively.

The battler won't just use "Attack"(skill #1), but instead will use all available skills. Actors will randomly pick actions as if they've autobattle flags; Enemies will pick actions according to their action patterns.

 

 

#==============================================================================|
#  ** You only need to edit this part as it's about what this script does      |
#------------------------------------------------------------------------------|

#------------------------------------------------------------------------------|
#  * (v1.01a+)Notetag <confusion edit> for states                              |
#    To make a state with those restrictions have edited confusion effects, put|
#    the above notetag into that state's notebox in the database.              |
#------------------------------------------------------------------------------|
#  * (v1.02a+)Notetag <exclude self> for states                                |
#    To make battlers with an edited confusion state never target themselves,  |
#    put the above notetag into that state's notebox in the database.          |
#    This noteag only works on skills picking a single non-random target       |
#------------------------------------------------------------------------------|

module DoubleX_RMVXA
  module Confusion_Edit

#------------------------------------------------------------------------------|
#  * (v1.01a+)Always_Confusion_Edit, default = false                           |
#    Notetags will be ignored and all states with those restrictions will have |
#    the edited confusion effects if Always_Confusion_Edit is true             |
#------------------------------------------------------------------------------|
  Always_Confusion_Edit = false

#------------------------------------------------------------------------------|
#  * (v1.02a+)Always_Exclude_Self, default = false                             |
#    Notetags will be ignored and all states with those restrictions will stop |
#    the battlers from targeting themselves if Always_Exclude_Self is true     |
#    This setting only works on skills picking a single non-random target      |
#------------------------------------------------------------------------------|
  Always_Exclude_Self = false

  end # Confusion_Edit
end # DoubleX_RMVXA

#==============================================================================|

 

 

 

Screenshots

 

 

bandicam2014-01-0212-30-18-453.jpg

 

bandicam2014-01-0212-30-28-750.jpg

 

 

 

Features

Use of notetags(requires knowledge of notetag usage) to set specific states with those restrictions to have the edited confusion effects

A way to set all states with those restrictions to have edited confusion effects without using notetags(and ignoring them)

 

Instructions

Open the script editor and put this script into an open slot between Materials and Main. Save to take effect.

 

Compatibility

Scripts aliasing or rewriting method:

- evaluate_item_with_target, friends_unit, opponents_unit, prepare, valid?, make_targets, confusion_target, targets_for_opponents or targets_for_friends under class Game_Action

- make_actions under class Game_Actor

may have compatibility issues with this script

Place this script above those aliasing any of these methods if possible

 

FAQ

None

 

Changelog

v1.02e(GMT 0100 13-8-2015):

- Fixed some syntax errors and typos

v1.02d(GMT 1400 7-7-2015):

- Improved this script's efficiency and readability

v1.02c(GMT 0000 2-6-2014):

- Fixed bugs on adding stuff other than damage in custom damage formula

v1.02b(GMT 0300 22-3-2014):

- Fixed bugs on <exclude self> notetag implementations

v1.02a(GMT 0600 21-3-2014):

- Added <exclude self> notetag

v1.01b (GMT 0000 17-1-2014):

- Methods are aliased rather than rewritten

v1.01a (GMT 0000 3-1-2014):

- Added <confusion edit> notetag to enable confusion edit for states

v1.00a (GMT 1600 1-1-2014):
 - 1st version of this script finished

 

(DoubleX)Confusion Edit v1.02e.txt

Edited by DoubleX

Share this post


Link to post
Share on other sites

Nice script!

 

 

Would it be possible to make this script only work on specific "Confusion" States?

Say via note togging?

 

I'd like to have one traditional "Confuse" state where an actor will only use skill 1: Attack on any battler

and

another confusion state (Charmed) where the actor can use any available attack skills on allies or healing skills on enemies.

 

 

Thanks in advance for the assist.

Share this post


Link to post
Share on other sites

Error - target of repeat operator /+/ not specified. (line 120)

This bug should be a syntax error and is about loading confusion notetags, and it happens when you start a new game or run a battle test right? May you please describe your situation more elaborately, such as other custom scripts you used if any, your usage of confusion notetags if any, the edits on my script if any, the value of Always_Confusion_Edit, and other useful information you can think of? I didn't get this error according to my test, and I checked the regular expressions I used which should be working.

If I fail to figure out the causes, you can try to update the script to v1.01b as your version should be v1.01a. I don't think it'll make any difference to your situation, but sometimes miracles might happen XD

Edited by DoubleX

Share this post


Link to post
Share on other sites

Hi, I was wondering if this only affects the Attack Anyone + AutoBattle combination? All my tests with this script trying to create an auto-battle character that uses skills and targets normally have thus far failed.

 

I create my state with Attack an Enemy restriction, Special Flag: Auto Battle and <confusion edit> in the Note... but all my guy does is Attack... I tried removing the Attack an Enemy restriction and just having Special Flag: Auto Battle with <confusion edit> in the Note and still I only get Attack. Finally I tried just having Attack an Enemy restriction with <confusion edit> in the Note and again, only Attack is every used.

 

I tried Sealing Attack in all those scenarios afterwards and the character no longer does anything. This character has between 1 and 3 skills alongside Attack (normally) so I figured that he would at least have a 1/4 chance of using one of the other skills.

 

It works fine using the Attack Anyone  restriction though.

Share this post


Link to post
Share on other sites

Hi, I was wondering if this only affects the Attack Anyone + AutoBattle combination? All my tests with this script trying to create an auto-battle character that uses skills and targets normally have thus far failed.

 

I create my state with Attack an Enemy restriction, Special Flag: Auto Battle and <confusion edit> in the Note... but all my guy does is Attack... I tried removing the Attack an Enemy restriction and just having Special Flag: Auto Battle with <confusion edit> in the Note and still I only get Attack. Finally I tried just having Attack an Enemy restriction with <confusion edit> in the Note and again, only Attack is every used.

 

I tried Sealing Attack in all those scenarios afterwards and the character no longer does anything. This character has between 1 and 3 skills alongside Attack (normally) so I figured that he would at least have a 1/4 chance of using one of the other skills.

 

It works fine using the Attack Anyone  restriction though.

First, this script only works on states with Attack Enemy, Attack Anyone or Attack An Ally restriction and AutoBattle special flag isn't needed for these states to work.

Second, Attack Enemy here is exactly the same as AutoBattle special flag for actors, Attack Anyone causes battlers to have 50% chance to treat friends as enemies and vice versa, and Attack An Ally always treat friends as enemies and vice versa.

 

According to my test in a project having only this custom script, things work as they're supposed to be with Attack Enemy, Attack Anyone and Attack An Ally restrictions, with or without AutoBattle special flag, and with or without setting Always_Confusion_Edit as true if there's <confusion edit> notetag in the states' notebox.

 

I wonder if you've used any other custom scripts when the problem occured. If there's any, listing all custom scripts following the exact order in your project may help me guess better :)

Share this post


Link to post
Share on other sites

 

I wonder if you've used any other custom scripts when the problem occured. If there's any, listing all custom scripts following the exact order in your project may help me guess better :)

 

Well that's a tall order... though the order of the scripts is probably not very good, here goes:

 

 

 

Yami Battle Symphony 1.16b

Selchar Battler Attack Manager 1.01

Tsukihime Effect Manager 2.6

Tsukihime Feature Manager 2.0

 

Yanfly Engine Ace - Battle Command List 1.09b

Yanfly Engine Ace - Ace Equip Engine 1.06

 
DoubleX Confusion Edit 1.01b
 
CDR - Rows Symphony Plugin 1.0 (for link refer to CDR Rows 1.4)
 
 
 

 
Now I'm currently looking to see if I can narrow down an incompatibility from my end, one script at a time.
 
Edit: I tried moving Confusion Edit in different locations (top, bottom, various places inbetween) without any success... still trying to see which script it breaking it though.
 
Update: Well I tried finding what was wrong by starting a new project and bringing the scripts in one at a time... my new project however doesn't seem to have any problems. This script works as described in my new project but not my old one (despite all the scripts being the same and in the same order)... Odd but whatever, I'll just transfer all my stuff to the new project and hopefully there won't be any more issues.
Edited by sartha

Share this post


Link to post
Share on other sites

Hey DoubleX!

 

Thanks for the script. I am hoping to use it in a project but with one edit... that I am not sure how to implement in your code.

 

Is there a way to define the friends_unit as all party battle members EXCEPT the user?

Basically I am hoping to make confusion use random skills on anyone in battle except the caster (actor who is confused).

 

If DoubleX or anyone else familiar withe script could point me in the right direction or let me know what code snippet I need to insert, it would be much appreciated <3

 

~ Dinhbat

Share this post


Link to post
Share on other sites

Hey DoubleX!

 

Thanks for the script. I am hoping to use it in a project but with one edit... that I am not sure how to implement in your code.

 

Is there a way to define the friends_unit as all party battle members EXCEPT the user?

Basically I am hoping to make confusion use random skills on anyone in battle except the caster (actor who is confused).

 

If DoubleX or anyone else familiar withe script could point me in the right direction or let me know what code snippet I need to insert, it would be much appreciated <3

 

~ Dinhbat

I can upgrade my script for this but first I need to know how the below situation should be handled:

If a battler has a confusion state with attack ally but not self and that battler has no ally or all of them can't be targeted due to some reasons(like death), should that battler target him/her/itself or just do nothing(or other actions)?

Edited by DoubleX

Share this post


Link to post
Share on other sites

Hey DoubleX!

 

Thanks for the quick response! And a thanks in advance for taking the time to help =D

 

For my specific situation, I had planned the confusion state to always target both sides, not just allies, but I suppose if I had to pick...

I would suggest that the enemy would do nothing and a pop up would say something along the lines of "The enemy looks confused."

 

~ Dinhbat

Share this post


Link to post
Share on other sites

Updates

v1.02a(GMT 0600 21-3-2014):

- Added <exclude self> notetag

 

Hey DoubleX!

 

Thanks for the quick response! And a thanks in advance for taking the time to help =D

 

For my specific situation, I had planned the confusion state to always target both sides, not just allies, but I suppose if I had to pick...

I would suggest that the enemy would do nothing and a pop up would say something along the lines of "The enemy looks confused."

 

~ Dinhbat

Right now the notetag <exclude self> only works on skills targeting a single non-random target and it doesn't prevent battlers from selecting skills having other targeting scopes.

Share this post


Link to post
Share on other sites

Thanks for the quick update DoubleX.

 

Unfortunately the note tag didn't seem to prevent the targetting of self.

I tried to apply it to the normal confusion state on the data base and the actor was still attacking himself =\.

 

~ Dinhbat

Share this post


Link to post
Share on other sites

Thanks for the quick update DoubleX.

 

Unfortunately the note tag didn't seem to prevent the targetting of self.

I tried to apply it to the normal confusion state on the data base and the actor was still attacking himself =\.

 

~ Dinhbat

What's the targeting scope of every skill that actor used? I've tested in a project without any other custom script and it seems to me that the <exclude self> notetag works on skills with targeting scope being a single non-randon target :)

Share this post


Link to post
Share on other sites

Thanks again for the quick response!

 

I also did it on an empty game file with only your script. The class & confusion state I used is shown in the spoiler below.

 

 

 

Monk_Class_zps26c14497.png

Confusion_State_zpsaa95c95b.png

 

 

 

These are the scenarios I tested on an UberSlime with no atk skill and 99999 life xD

 

1. Normal Confusion - Only Attack was used on any target: Ally, Enemy & Self

2. Confusion Edit Only - All skills and Attack were used on any target: Ally, Enemy & Self

3. Exclude Self Only - Only Attack was used on any target: Ally, Enemy & Self (just like normal confusion)

4. Confusion Edit & Exclude Self - All skills and Attack were used on any target: Ally, Enemy & Self

When the actor targeted self, the action just didn't carry out and caused no damage.

There were also instances where the actor didn't do anything at all and was just simply skipped their turn. (There was no text showing any action was taken.)

 

So the following questions are in regards to scenario 3 and 4:

- Does the <exclude self> tag only work in conjunction with <confusion edit>?

- If so, can <exclude self> work without <confusion edit>?

- Can <exclude self> completely take out the possibility of targetting self, instead of targetting self but not carrying out the action? Or is this the function?

- Why were there instances of no action at all when the 2 tags were used together?

 

Thanks again for all the support so far and advanced thanks for anymore you can provide! I hope I am not too much of a bother. I really do appreciate the hard work and help from individuals such as yourself in the community!

 

~ Dinhbat

 

*Edit: used the wrong slash mark for Spoiler xD*

Edited by dinhbat3

Share this post


Link to post
Share on other sites

Thanks again for the quick response!

 

I also did it on an empty game file with only your script. The class & confusion state I used is shown in the spoiler below.

 

 

 

Monk_Class_zps26c14497.png

Confusion_State_zpsaa95c95b.png

 

 

 

These are the scenarios I tested on an UberSlime with no atk skill and 99999 life xD

 

1. Normal Confusion - Only Attack was used on any target: Ally, Enemy & Self

2. Confusion Edit Only - All skills and Attack were used on any target: Ally, Enemy & Self

3. Exclude Self Only - Only Attack was used on any target: Ally, Enemy & Self (just like normal confusion)

4. Confusion Edit & Exclude Self - All skills and Attack were used on any target: Ally, Enemy & Self

When the actor targeted self, the action just didn't carry out and caused no damage.

There were also instances where the actor didn't do anything at all and was just simply skipped their turn. (There was no text showing any action was taken.)

 

So the following questions are in regards to scenario 3 and 4:

- Does the <exclude self> tag only work in conjunction with <confusion edit>?

- If so, can <exclude self> work without <confusion edit>?

- Can <exclude self> completely take out the possibility of targetting self, instead of targetting self but not carrying out the action? Or is this the function?

- Why were there instances of no action at all when the 2 tags were used together?

 

Thanks again for all the support so far and advanced thanks for anymore you can provide! I hope I am not too much of a bother. I really do appreciate the hard work and help from individuals such as yourself in the community!

 

~ Dinhbat

 

*Edit: used the wrong slash mark for Spoiler xD*

Right now <exclude self> needs <confusion edit> to work, and I can fix something to make it work alone.

If <exclude self> works and there's no valid target before or after excluding self, no action will be carried out. It's conforming to the default RMVXA setting(No action will be carried out if there's no valid target).

Edited by DoubleX

Share this post


Link to post
Share on other sites

Thanks again DoubleX!

A stand alone <exclude self> would be great, this would allow a non skill using confuse state to target all but self.

 

I am not sure I understand your statement about there being no valid target. In my test, I had 2 enemies, the confused actor and another actor in party. There were still many instances where the actor selected self as target (creating an action that did nothing) despite the other targets being available.

 

From my testing of the <exclude self> tag thus far, it seems that the tag does not actually exclude the selection of self. Rather it just prevents the action to result in damage.

 

~ Dinhbat

Share this post


Link to post
Share on other sites

Updates

v1.02b(GMT 0300 22-3-2014):

- Fixed bugs on <exclude self> notetag implementations

 

Thanks again DoubleX!

A stand alone <exclude self> would be great, this would allow a non skill using confuse state to target all but self.

 

I am not sure I understand your statement about there being no valid target. In my test, I had 2 enemies, the confused actor and another actor in party. There were still many instances where the actor selected self as target (creating an action that did nothing) despite the other targets being available.

 

From my testing of the <exclude self> tag thus far, it seems that the tag does not actually exclude the selection of self. Rather it just prevents the action to result in damage.

 

~ Dinhbat

<exclude self> should work probably now, even when used alone. Now the confused actor should just do absolutely nothing if there's no valid target at all, and no message should be displayed.

Edited by DoubleX

Share this post


Link to post
Share on other sites

Thanks for the update DoubleX.

 

Redid all the test and everything looks good, with the exception of one minor detail (which for my purposes isnt necessary). I figured I should let you know!

When <exclude self> is used alone. Base attacks that usually hit 2x (like monk or dual wielders) only hit once instead of their usual base attack of hitting twice.

 

Other than that everything is working great! You have been so helpful. Thanks again for all the hard work.

 

~ Dinhbat

Share this post


Link to post
Share on other sites

Thanks for the update DoubleX.

 

Redid all the test and everything looks good, with the exception of one minor detail (which for my purposes isnt necessary). I figured I should let you know!

When <exclude self> is used alone. Base attacks that usually hit 2x (like monk or dual wielders) only hit once instead of their usual base attack of hitting twice.

 

Other than that everything is working great! You have been so helpful. Thanks again for all the hard work.

 

~ Dinhbat

In the default RMVXA setting, when a battler is confused, his/her/its attacks always only hit once. I can change that in my script but I want to make sure if you really want me to do this :)

Share this post


Link to post
Share on other sites

So generous with your hard work DoubleX! 

 

There is really no need to update for this, at least not for my purposes =D

I just like to offer feedback and suggestions to the wonderful scripters who I get to work with here, its the least I can offer for all of your hard work.

 

~ Dinhbat

Share this post


Link to post
Share on other sites

Ok there is a weird confliction with custom damage formulas, and Yanfly's Lunatic Damage with the Critical Package addon.  Any time I have a confused character who applies buffs, debuffs, or states through a custom damage formula, they throw those states at everything onscreen, enemy and player alike, even if they don't attack.

 

In the case of Lunatic Damage, I have a character who uses a notetag to give her 100% Critical Hit chance when she is at HP Crisis.  If she gets low HP and Confused, everything onscreen flashes big red CRITICAL! over their heads, with no damage, and no attack on her part.

 

The first is easy enough to work around, just don't apply anything through custom damage formulas.  But I don't know any way to resolve the notetag issue.

 

(Edit: Yanfly's downloads are currently all on GitHub, so here's some current links)

 

Lunatic Damage

Lunatic Critical Package

Edited by XPhater

Share this post


Link to post
Share on other sites

It would be killer to have compatibility with Victor Engine ATB and Victor Engine Animated Battle. When a character is confused with <confuse edit>, they repeatedly take actions over and over again, without anyone else ever getting a turn afterwards until everything is dead (if an attack was chosen as the random skill).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×