Jump to content
Chaos Krux

Advanced Confusion State?

Recommended Posts

Oh boy, back again... If it wasn't apparent how comically inept I am at coding and scripting, here's more proof~ I do feel quite bad continuously asking for so much, but of course you're all quite welcome to just ignore this and go about you day~

I'll get to the point. I'm sure most of you know that Confusion in RPG Maker makes the victim attack any, be it their allies or their enemies, regardless of player input. I have altered my version of confusion so that the victim always targets their allies, and this state works well for a majority of the game. However, I was wondering if there might be away to improve the effect of confusion beyond simply attacking one's allies. More specifically, I would like to create an alternative version of the confusion state (perhaps named something like infatuation) that causes the victim to actually use their abilities instead of simply using their normal attack. Even more specific than that, I'd like the victim to be able to use positive spells, such as buffing or healing spells, and perhaps even items on their enemies. It would be completely fine if this effect replaced the effect of causing victims to attack their allies. Essentially this status would turn its victim into a source of buffs and healing for the enemy team. Think Brainwash from Persona or Confusion in certain Final Fantasy Games. I am almost positive that such an elaborate setup would need a script, but I have been unable to find anything of the sort so far. So I thought I'd try my luck here. As always, any and all help any of you could give me would be very much appreciated~

Edited by Chaos Krux
Examples for Reference

Share this post


Link to post
Share on other sites

Really 'confusion' status usually implies being confused about what is an ally and what isn't and/or scrambling the player's controls. What you are talking about I am pretty sure is usually called 'charm' I think. Actually in my game I have a charm status that petty much works exactly like you describe, but I am using my own battle system/enemy AI system and it doesn't work in the default battle system. Also it only effects enemies right now anyway since I have no AI code on the player's end.

 

I will tell you one thing though: The basic idea about how my charm status worked is that it mostly just swaps the @friends_unit and @opponents_unit when creating a Game_Action object. With the default battle system the status might be able to work by doing that and setting a actor's 'auto battle' flag.

Share this post


Link to post
Share on other sites

Now I've been confused~ This is the problem with asking for help from people smarter than me~ I really have no idea how I would go about swapping those two things or anything like that without breaking the game by accident. I'm sure that probably would work if I knew how to do it, but I'm really quite a novice at anything to do with code. Thanks for your time, though~ Perhaps I might look into it, but I doubt I could get it to work.

Share this post


Link to post
Share on other sites

After much trial and error and a long time of searching, I have managed to find a script that performs quite well. While it's not perfect, it does what I wanted it to do well enough. Thank you for your time anyway~

Share this post


Link to post
Share on other sites

I am curious too!

 

Edit: Also sorry for confusing you... To be honest I find the whole way the battle system works in VX Ace a bit confusing myself. Mostly because everything is scattered about different places and it can be hard to find what you want.

Edited by Kayzee

Share this post


Link to post
Share on other sites

Yikes, this is unfortunate. I hate to beat a dead horse, but it turns out DoubleX's script has a pretty major flaw that I only just noticed... It, for some undetermined reason, causes any combat abilities that use common events to stop working altogether. The game acts as if no action was inputed at all. It doesn't even take any MP or TP away from the user. This is particularly annoying since I have a summoning system that works almost exclusively through common events. I've had to remove the script for now, and the abilities work like normal again. I realise it's been a while since I originally posted this question, but if anyone could find a solution that would allow me to use this script without it breaking the game, that would be very much appreciated. I have saved the script to my computer elsewhere, so I can put it here if anyone needs it.

Share this post


Link to post
Share on other sites
3 hours ago, Chaos Krux said:

Yikes, this is unfortunate. I hate to beat a dead horse, but it turns out DoubleX's script has a pretty major flaw that I only just noticed... It, for some undetermined reason, causes any combat abilities that use common events to stop working altogether. The game acts as if no action was inputed at all. It doesn't even take any MP or TP away from the user. This is particularly annoying since I have a summoning system that works almost exclusively through common events. I've had to remove the script for now, and the abilities work like normal again. I realise it's been a while since I originally posted this question, but if anyone could find a solution that would allow me to use this script without it breaking the game, that would be very much appreciated. I have saved the script to my computer elsewhere, so I can put it here if anyone needs it.

I failed to reproduce this issue using just the confusion edit script and a skill with common events, so I guess that it's a compatibility issue. As I don't know what's the summoning system script you're using, I'd be glad if you mention which or even just send me your project so I can check the issue myself :)

Share this post


Link to post
Share on other sites

I'm actually not using a script for my summoning system, it's all done through common events and troop scene events. I'm far better at using common events than coding, you see. I am unfortunately unable to provide a copy of my game since the laptop I'm currently using is unable to condense it. My apologies for the inconvenience, but the best I would be able to do is provide a list of all the scripts I have in my project. I realise this may not be particularly efficient, but I really have no better alternative at this time.


 

Spoiler

Confusion Edit by DoubleX

Yanfly - 

Ace Core Engine

Ace Message System

Class System

Class Specifics

Party System

Party System Add-On - Command Party

Ace Battle Engine

Battle Engine Add-On - Enemy HP Bars

Combat Log Display

Command Autobattle

Command Equip

Enemy Target Info

Battle Command List

Element Absorb

Victory Aftermath

Ace Equip Engine

Enemy Levels

Enemy Levels Add-On - Doppelganger

Input Combo Skills

Learn Skills Engine

Skill Cost Manager

Skill Restrictions

Target Manager

Steal Items

Ace Item Menu

Ace Save Engine

Save Engine Add-On - New Game +

Active Battle Advantage

Event Chase Player

Ace Shop Options

System Options

Anti-Fail Message

 

Other -

Extend Troops by Hime

Quest Log by Lizzie S, Moonpearl and RGangsta

Jukebox Script by ninjamida

Auto-Life by Mr.Bubble

Invader Mini Game by Galv

Battle Weather Effects by Dekita

 

I also have small snippets of code that aren't full scripts but do change certain things about the game.

Spoiler

Enemy Targeting Snippet:



class Game_Action
  def targets_for_friends
	if item.for_user?
	  [subject]
	elsif item.for_dead_friend?
	  if item.for_one?
		[friends_unit.smooth_dead_target(@target_index)]
	  else
		friends_unit.dead_members
	  end
	elsif item.for_friend?
	  if item.for_one?
		if @target_index < 0
		  [friends_unit.random_target]
		else
		  [friends_unit.smooth_target(@target_index)]
		end
	  else
		friends_unit.alive_members
	  end
	end
  end
end

 

Spoiler

Zombie State Snippet:



class Game_BattlerBase
  def rec; check_for_zombie ? sparam(2) * -1 : sparam(2); end
  def hrg; check_for_zombie ? (check_for_poison ? xparam(7) : xparam(7) * -1) : xparam(7); end
  def check_for_poison; @states.include?(2) || @states.include?(51); end
  def check_for_zombie; @states.any? {|st| $data_states[st].zombie}; end
  #def rec; check_for_zombie ? sparam(2) * -1 : sparam(2); end
  #def hrg; check_for_zombie ? xparam(7) * -1 : xparam(7); end
  #def check_for_zombie; @states.any? {|st| $data_states[st].zombie}; end
end


class RPG::State < RPG::BaseItem
  ZOMB = /\[zombie\]/i
  attr_reader :zombie
  
  def set_zombie
    return if @zombie_check; @zombie_check = true
    @zombie = false
    self.note.split(/[\r\n]+/).each do |line|
      case line
      when ZOMB
        @zombie = true
      end
    end
  end
end

module DataManager
  class << self
    alias load_database_cpz load_database unless $@
  end
  
  def self.load_database
    load_database_cpz
    check_zomb
  end

  def self.check_zomb
    groups = [$data_states]
    for group in groups
      for obj in group
        next if obj == nil
        obj.set_zombie if obj.is_a?(RPG::State)
      end
    end
  end
end

 

 

I imagine a majority of these scripts will have absolutely no impact on yours whatsoever, but I just wanted to be safe and list them all. I apologise again for it being so much at once.

 

I should also say I didn't mean to cause any offence. I'm sure this issue has less to do with your script and more to do with something else.

Edited by Chaos Krux
Spellings

Share this post


Link to post
Share on other sites
5 hours ago, Chaos Krux said:

list of all the scripts

I don't see confusion edit in the list. Which one is it? If you didn't list it, then add it in. It helps to know where in the list it is located.

I assume of course that this is your script order and not just a random list of you scripts.

 

also

5 hours ago, Chaos Krux said:

the ruler on high has graced us with their presence

That does have a rude tone to it. Best to just delete it.

Share this post


Link to post
Share on other sites
1 hour ago, roninator2 said:

I don't see confusion edit in the list. Which one is it? If you didn't list it, then add it in. It helps to know where in the list it is located.

I assume of course that this is your script order and not just a random list of you scripts.

 

also

That does have a rude tone to it. Best to just delete it.

My apologies, it wasn't supposed to be rude~ I just have a habit of using phrases such as that. I'll also at DoubleX's script to the list. Thanks

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.

×