The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: LoganF on March 27, 2011, 08:12:41 AM

Title: Charm/Manipulation State (v2.1)
Post by: LoganF on March 27, 2011, 08:12:41 AM
Charm/Manipulation State
Version: 2.1
Author: Logan Forrests
Date: April 26, 2011

Version History


Spoiler for Previous Version History:
  • Version 1.0c : 03.29.2011
    - Fixed an issue whereby targets were not being correctly created when executing single target skills.
    - Fixed an issue in which charmed targets could not be attacked.
  • Version 1.0b : 03.27.2011
    - Fixed a couple of bugs whereby ending the battle did not reset charm data variables, and attempting to hit a charmed ally would result in the lead actor always being attacked.
  • Version 1.0 : 03.27.2011
    - Original Release

Planned Future Versions
Because Version 2.0 of this script has removed some of the features present in Version 1.0c, future updates will see these features being reinstalled.

Next update:
Addition of an Attack option to force target to make a standard attack.

Removed from v1.0c:


Description


Spoiler for Description:
Extracts (from the Description and How It Really Works sections from the script):

This script allows player's characters to inflict the Charm status on its enemies.

This essentially works in the same way that the Manipulate Command Materia in Final Fantasy 7 works, much more so than Version 1.0c of this script.

The abilities that the controlling actor normally have are no longer available during the control of an enemy, but are returned once control ends.

In addition to being able to use skills from the enemy's action list, the actor gains 2 other abilities: Skip Turn and Release.

More detailed information can be found within the script as it is quite lengthy.

It is recommended, that the Update Action Order script is also used with this one to ensure this script works as intended. Without it, the effect of Charm will not take effect immediately, meaning that the target will take its intended turn before succumbing to the effect.

The thread can be found here: http://rmrk.net/index.php/topic,42361.0.html

The script can be downloaded at the end of this post also.

Features

Spoiler for Features:
Removed features have a strike through effect over the text.

  • Actors who charm enemies are able to manipulate the skills the affected Enemy performs.
  • Actors can only Charm one enemy at a time. Enemies can Charm multiple enemies.
  • Enemies that are under the effect of Charm are unable to take turns for
    themselves.
  • The use of skills that target all enemies will not effect any enemy under the
    current control of another ally.
  • Conditions to be met by enemies before actions can be used are ignored when used by an actor.
  • Skills that require an MP cost will reduce the MP pool of the enemy under Charm, not the actor's MP pool.
  • Actors who have successfully Charmed an enemy have 3 commands available to them:
      Enemy Skills : Select a skill to use that belongs to the Charmed enemy
      Skip Turn    : Skips the current turn
      Release      : Releases the Charmed enemy from the actor's control
  • All skills belonging to a Charmed enemy can be used unless explicitly restricted via a tag in the Skills database.
  • Skip Turn can be set to work in the same manner as Guard or Do Nothing.
  • Release returns control back the enemy.
  • Most customizable settings relate to the vocabulary used to display certain
    conditions and effects.
  • Added in v2.0: You can define what tag is used in the database within the script.
  • Enemies who charm actors cause affected actors to attack allies other than
    themselves.
  • Actors can attack party members who are under the influence of Charm.
  • Actors under the influence of Charm cannot be targetted by skills that target
    a party member (such as Cure skills and buffing skills).
  • Other enemies in the enemy party will not attack Charmed members of the opposite party - similar to how a player would not necessarily attack Charmed enemies.

Screenshots

The previous screenshots are from v1.0 of this script. New screenshots will be provided at a later date.

Instructions

Spoiler for Instruction:
A Charm state can be achieved by adding the following tag to the Note section of the State you want to be Charm:
        \charm

To prevent a skill from being used by the player (for those over powered boss-like skills that might break the balance of the game if a player used it) simply add the following tag to the Note field of the desired skill:
        \not_charm_usable

The tag definitions can be changed within the script to suit your own needs.

Installation:  Simply place the script in the Materials section of the Script Editor, somewhere above Main. See Known Compatibility Issues section for more info

These instructions are included in the script


Script


Script is attached.

Credit



Thanks


Support


It could well have a few issues that I've not come across. Please let me know if you find any. It performs all the things I intended for it to do, but that doesn't mean it does everything right every time. Please try to provide as much info as possible such as error types and line numbers.

Known Compatibility Issues

No known compatibility issues.

Spoiler for Extra:
The script has been written and tested with no other scripts in place. As such, if you encounted any issues with regards to other scripts, first try to resolve the problem by moving this script around. If you are still unable to resolve the problem, feel free to contact me on rmrk.net under the name LoganForrests (no spaces involved) with the name of the script(s) you find no longer work when this script is included and the nature of the problem(s) so that I can begin to work on the problem(s) being caused.

Demo


I may make a demo that explains how it works, if I can figure the best way to make one. At present, though, there isn't one. There's not many options to change that affect the script in drastic ways so I doubt one is absolutely needed.

Author's Notes


Spoiler for Author's Notes:
These scripts are being written as a means of developing as a scripter. As such, even if they already exist in some other form, I'll continue to write them in order to improve. By sharing them, I hope to develop further as they are used and feedback is given.

Started as part of a series of scripts that intend to add a lot more options to what kind of skills and states can be achieved. This was one of the states that required a lot more work and so was started first.


Spoiler for Known Issues:
There are a couple of things to bear in mind when developing skills that inflict the status effect. These are:

  • Never allow an actor to be able to use a skill that can charm more than 1 enemy.
Thus, never set the scope of a Charm skill to anything other than "One Enemy". Enemies, however, can target all actors with a single spell with no issues.

  • Never allow an actor to be able to use an ability from a Charmed enemy that in turn causes the Charmed status effect.
For example, if Lamia can use Belly Dance a move that causes Charm, you must not allow Belly Dance to be usable by the actor whilst he is able to 'control' the actions of the Lamia.

Breaching the above known issues will have undesirable and unintended effects at the present time.

  • When all party members are inflicted by the Charm state, enemies will appear to not take any turns.

They are designed to be clever with regards to attacking actors that are Charmed by another enemy. They will not making any attacks that would affect a Charmed actor. They will, however, continue to use skills that affect the enemy's party such as curative and enhancing skills.

These intend to be fixed in patch updates.

Restrictions

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.creativecommons.org%2Fl%2Fby-nc-sa%2F3.0%2Fau%2F88x31.png&hash=aa3053dd67b2d9c77a143b86cc1ec6129d8fb971)
Charm/Manipulation State by Logan Forrests is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Australia License. (http://creativecommons.org/licenses/by-nc-sa/3.0/au/)

EDIT: Made the post smaller by spoilering everything.
Title: Re: Charm/Manipulation State
Post by: Organ House on March 27, 2011, 12:39:08 PM
Awesome, I think I'll try this out today!
Title: Re: Charm/Manipulation State
Post by: LoganF on March 27, 2011, 12:53:03 PM
Let me know how that goes for you if you will. Thank you kindly. Particularly, see how well it performs the features I listed. There may be a few other things it does that I've not written, but if any of those bug out or don't appear to work, I'll need to fix them.

Also any suggestions for improvement/making it do better things will be much appreciated.

Oh and how easy it is to use/make sense of? That's something else I'd like to improve if I can.
Title: Re: Charm/Manipulation State
Post by: Organ House on March 28, 2011, 12:05:38 AM
I didn't have any game crashes but the script didn't seem to work at all. The monsters were under the state "mind control", but they kept preforming as normal. :(
Title: Re: Charm/Manipulation State
Post by: LoganF on March 28, 2011, 12:21:05 AM
Are you using any other scripts? Try moving it about if you do, it could be those interfering.

Also, if you are using other scripts, can you tell me which ones so that I can see about fixing potential compatibility issues. With so many scripts out there, it's not to easy to try to anticipate them.
Title: Re: Charm/Manipulation State
Post by: Organ House on March 28, 2011, 01:21:10 AM
Yes, but I have a lot of scripts...

And putting the script all the way at the bottom causes the status effect to affect the caster, not the target (which is weird.) I do have Yanfly's custom skill effects and KGC's custom skill scripts.
Title: Re: Charm/Manipulation State
Post by: LoganF on March 28, 2011, 08:27:00 AM
You'll have to attach those two scripts so that I can check through them and see if they are causing any problems, or provide me with means of getting hold of them.
Title: Re: Charm/Manipulation State
Post by: Organ House on March 28, 2011, 07:57:33 PM
Attached
Title: Re: Charm/Manipulation State
Post by: LoganF on March 29, 2011, 12:16:25 AM
Thanks. I have the KGC one as Passive Skills thus why I didn't recognise it at first. I'll update this post if I can find anything from those two.

EDIT:

After putting my script both above and below those two, I only found one issue: enemies you had charmed wouldn't perform the action you told them to. I'll work on fixing that.

EDIT2: I tried removing each script to work out which one was affecting, and I found out that mine doesn't do what it should. Strange, because I took those screenshots after I finished the post and it worked then. I must have changed something else and not realised. Good news is, I know exactly what the problem is so fixing it should be easy.

EDIT3: I've updated the OP to include v1.0c that fixes that issue. I tried it also with those two other scripts and I was able to make attacks correctly still. So it was my script that caused the issue - it was a logical error that was causing it. At least we know those two scripts work just fine with it though.

Let me know if there's any other issues you find.
Title: Re: Charm/Manipulation State (v1.0c)
Post by: Qu-ko on April 07, 2011, 07:47:37 PM
This script appears to be incompatible with Battle Engine Melody. I haven't tried the other status scripts you've written yet, but I tried this one both on the BEM demo and on a project I'm working on (which utilizes BEM) and both turned out to not work properly, either with game-crashing errors or some sort of bug in play.

It gives an error if you put the script below BEM and go into battle, at line 582, "undefined method 'actor?' for nil:NilClass". If you put it above BEM, it seems to work at first, but then when you command actors to attack without using a skill, nothing happens -- they go forward as if to attack, but then don't. (In the game project I'm working on, using a skill with actor 4 crashes the game entirely, though that's not the case with the Melody demo, since skills still work fine there. The error is at line 327, "undefined method 'is_no_longer_in_control' for nil:NilClass", though I have no idea what's causing it there.) Enemies seem to be working just fine, though.

I think the problem lies somewhere in BEM scripts IV and V, since I tried putting the Charm script above those two in particular after doing a little searching on my own, and it seemed to yield the same results as if it was above all of them.
Title: Re: Charm/Manipulation State (v1.0c)
Post by: LoganF on April 08, 2011, 12:58:23 AM
I expected a giant incompatibility issue with YEM scripts. Any scripts that change the battle system in any way will probably have issues with this too. Especially ones that overwrite methods and change the way the battle process happens like the Melody scripts.

I have the set of BEM scripts, so I'll definitely give it a shot to make something that'll allow it to work with it. I can't promise a finish date, as I may rewrite the script itself (it was on the cards anyway) using BEM to achieve better compatibility, especially if you want such a state to be usable in your project.

The other script (Added State Effects) may also need a smaller sized tweak to make it work - there's not as much aliasing and overwriting involved in that one - but if you want to play around with it too and send me any errors/bugs that'd be appreciated (although I know BEM already incorporates some of the states I've included so far).

Title: Re: Charm/Manipulation State (v1.0c)
Post by: Infinate X on April 10, 2011, 02:29:15 AM
This script is EXTREMELY AWESOME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!         




I will DEFINATLEY use this script in my game Terramon... the only problem is I might forget to include it when I go home...
Title: Re: Charm/Manipulation State (v1.0c)
Post by: jameswhite89 on April 17, 2011, 09:16:55 AM
erm.. this might sound a little stupid but how do i get the attachment? i tried clicking on the paperclip but it does nothing.. this script looks mega want to try it

thanks
Title: Re: Charm/Manipulation State (v1.0c)
Post by: pacdiggity on April 17, 2011, 09:34:42 AM
At the very bottom of the first post, or this convenient link I just happen to have. (http://www.megaupload.com/?d=084ZZESC)
It might not work, just get it from the very bottom of first post.
Title: Re: Charm/Manipulation State (v1.0c)
Post by: jameswhite89 on April 17, 2011, 10:54:25 AM
thanks :)
Title: Re: Charm/Manipulation State (v1.0c)
Post by: LoganF on April 17, 2011, 11:03:05 AM
Just to note, I am in the process of making a rewrite of the way this script actually works, which is why I haven't taken the care to remove the extra bug or two I recently found that is in the latest available version (1.0c). Also in the works is a version that will work alongside the Battle Engine Melody scripts, but that's taking a little more time.

The process of setting up the script, along with the skills and states will remain the same, so feel free to start things off with this version. Just have to put up with the bugs that pop up. Particularly the one that's preventing you from attacking Charmed enemies with allies and telling you said ally is charmed themselves when they aren't. Only other thing; don't make any enemies have a Charm skill - this won't be initially in v2.0 so it won't have any effects until I put it in.
Title: Re: Charm/Manipulation State (v1.0c)
Post by: jameswhite89 on April 17, 2011, 12:05:07 PM
Awsome script m8! Worked like a... dare i say it charm XD
Title: Re: Charm/Manipulation State (v1.0c)
Post by: jameswhite89 on April 17, 2011, 12:22:18 PM
A quick thing i just tried that worked well is changing this line:
VOCAB_UNABLE_TO_ACT = " is " + VOCAB_CHARMED + " and is unable to act."
to this line:
VOCAB_UNABLE_TO_ACT = " Cant attack a Charmed enemy!"
thus elimintating any confusion on the players part...
you rock 4 this script :)
Title: Re: Charm/Manipulation State (v1.0c)
Post by: LoganF on April 17, 2011, 12:42:27 PM
The purpose of that (initially) is to display a message telling the player that that particular enemy is unable to act due to it being charmed/manipulated. If a player wants to attack an enemy that is charmed, that should be there choice so they were designed to be able to make that call. Thus why it's a problem, albeit a small one.

A lot of the vocab is being removed for v2 as, for the most part, the message aren't really needed. They may get thrown in afterwards, but the initial focus is to just get a bug free, much less convoluted version up. I'm about half way there already.

I appreciate the comments though. Good morale makes me want to script some more but it's bed time cos I have to be up at 4:30am for work  :'(  Know what I'd rather do.
Title: Re: Charm/Manipulation State (v1.0c)
Post by: jameswhite89 on April 17, 2011, 12:56:14 PM
I look forward to it, while the script is great as it is attacking a controled enemy sounds like a good addition plus the enemy being able to make use of the state also. I will eagerly await its completion.. I have seen a great many requests for a script such as this so a big thumbs up for doing it  :)
Title: Re: Charm/Manipulation State (v2.0)
Post by: LoganF on April 23, 2011, 04:21:07 PM
Version 2.0 is up and ready for download. Some features from v1.0c have been removed, details in the OP. Also included, and recommended, is the Update Action Order script I wrote. Details on that script can be found in the thread for it (link provided in OP).

Hopefully it all works as it should for now, until I implement the removed stuff and add some extra toppings.
Title: Re: Charm/Manipulation State (v2.0)
Post by: Infinate X on April 24, 2011, 02:57:50 AM
I re-stumbled upon this script and I figure now that version 2.0 is up I might as well download it now. Good job!
Title: Re: Charm/Manipulation State (v2.0)
Post by: Dogurasu on April 25, 2011, 03:32:55 PM
I've started using the script, and while I have no scripting ability of my own, I do have a couple of suggestions.

1) I would like to see the character have the ability to attack with the monster, rather than just use skills. I'm guessing, however, that this is not done because the skills being used are based on the manipulator's stats, so it would be the same as a normal physical attack from the manipulator. Which leads me to...

2) ...while the state is active, if the character can use the skills of the monster, why not use the statistics of that monster? Again, I know this is probably asking a lot more than I really understand, but it's just a set of ideas.

3) Is there any way to make the manipulate menu look like it's selectable? I know it is, but all of the options appear grayed out. Just a cosmetic problem.

4) When the charm effect wears off, the enemy still has the ability to use its turn, even if it has already taken its turn. Is there a way to fix this?

Just throwing some ideas out there. I intend to use the script as it is, unless improvements are made; in that case, I'll use the updated script. Thanks for listening.
Title: Re: Charm/Manipulation State (v2.0)
Post by: LoganF on April 25, 2011, 04:04:57 PM
I will certainly take those suggestions into consideration, as it will definitely make it seem much more solid.

I intend to add in an option to make a standard attack. I'd probably expand the menu to do this with. I just wanted a version up that does things simply and at least somewhat effectively.

As it stands, the effect of the skills (such as damage etc) is based on the stats of the manipulator not the manipulatee, which would lead to some balance issues I would imagine. I hadn't actually thought of this happening, so thanks for bringing that one up. It shouldn't be hard to change that around.

I haven't run into an issue with the options being greyed out. The only time it should do this is when the enemy under manipulate has insufficient MP to use it. I may have had an oversight, so I'll look into it.

I've also not had an issue with the enemy taking it's turn even after being forced to attack. I know it does attack after being charmed if the Update Actor Turn script isn't being used. I intend to fix this dependancy though.
Title: Re: Charm/Manipulation State (v2.1)
Post by: Infinate X on May 06, 2011, 08:03:11 PM
Can you make an option so you can use the manipulor or manipulatees stats? A true or false script option? Maybe even a state option?
Title: Re: Charm/Manipulation State (v2.1)
Post by: LoganF on May 07, 2011, 05:28:27 AM
I can quite easily make it so you can choose which stats to use, though it doesn't make much sense to actually have it that way. But if you want it there, I can do that.
Title: Re: Charm/Manipulation State (v2.1)
Post by: Infinate X on May 08, 2011, 02:36:29 PM
What I ment was so in the script there's an option so when the manipulation state is on if set to true it will use the enemies stats rather then the actors stats
Title: Re: Charm/Manipulation State (v2.1)
Post by: M@pple on May 14, 2011, 10:27:42 PM
i did something wrong?  :(


(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg573.imageshack.us%2Fimg573%2F6427%2Ferroruf.png&hash=7147a54b99f9ae863585ef0d693e581cae41e7c1) (http://imageshack.us/photo/my-images/573/erroruf.png/)

Uploaded with ImageShack.us (http://imageshack.us)

and yes yes i installed both of your scripts ..
Title: Re: Charm/Manipulation State (v2.1)
Post by: ave369 on March 04, 2012, 03:06:11 PM
Is it possible to modify this script to make it Tankentai compatible?