Graphics States

● ARCHIVED · READ-ONLY
Started by Neon Black 20 posts View original ↗
  1. State Graphics Script v1.3
    Created by Neon Black

    What is it?
    This script allows states to change an actor's or an enemy's graphic while a state is applied to the battler.  This change lasts while the state is applied.  You can make changes to a battler's battle graphic, character sprite, or face as well as changing the character's name.  While multiple states are active that change graphic, the highest priority state with a type of change is the one to take effect.

    How can I use it?
    Insert this below materials and above main.  This script works using several different tags.

    • battler gfx["name" 0] -or- enemy battler gfx["name" 0 1,2,3] -or- actor battler gfx["name" 0 1,2,3] - Changes the in battle graphics of a battler applied with the state.  The short version (battler gfx["name" 0]) will change both actors and enemies while it is applied.  The long version only works on either actors or enemies and requires you to add the IDs of the actors or enemies whose graphics you want to change, each separated by commas.  For this tag, "name" is the name of the file and MUST be surrounded in quotes.  0 in this case is the hue, which must be a number from 0-255.  1,2,3 are the IDs of the actors or enemies whose graphics will be changed by the state.  These can be changed to reflect the desired graphic, hue, or battler IDs as needed.
    • face gfx["name" 3] -or- character gfx["name" 3] -etc- - Work exactly like the tags above only on faces and walking sprites.  In this case the "3" is the index of the graphic to use from a sheet.  These can also be prefixed with "actor" or "enemy" such as "actor face gfx["name" 3, 1,2,3]".
    • name change["name"] -or- actor name change["name" 1,2,3] -or- enemy name change["name" 1,2,3] - changes the name of the battler with the state applied.  Can be used for a character in disguise or a shape shifting enemy that you don't want to completely transform.
       
    • stack gfx[1] - Adding this tag after any other tag will cause the change to only take effect while a state is at a certain stack level.  The 1 can be any number from 1 or above.
    What does it work with?
    This script should be compatible with most other script, but it assumes that enemies do not have face or character sets.  If you find another script that this is incompatible with, first try place this script ABOVE the other script.  If you still note issues with it, follow the instructions in the compatibility section in the script and then move the script BELOW the other script.  If you are still having problems, leave a message with your issue here.

    How can I get the code?
    Version 1.3 (base script, 8.17.2013) is available from my pastebin account here.

    I would like to use this code.

    This work is licensed under a Creative Commons Attribution 3.0 Unported License and is available for commercial and non-commercial use.

    Author's Disclaimer:
    Since it seemed a few people really wanted a script like this, I took the time to make it.  While working on it I got a lot of interesting ideas with transforming which led to one or two other scripts being developed to go along with it.  Overall it makes states a little bit more interesting to work with.  As always, enjoy!
  2. another nice script... good for transformation skills I think... :)
  3. ^  Look at the shapeshifter idea I had over in Starting States. :D
  4. ^ yeah... I saw it just about now... XD...

    btw, what's the IDs after the hue for? are they for setting which actors or enemies the transformation will work for?

    if yes, then can we specify several gfx for a single state? 
  5. The IDs after the hue/index are the IDs of the actors/enemies that get their graphics changed.  In most cases you probably just want to stick to the short tag, but if you're say... using it for "frog" or "mini" type skills, you may want to change the graphic differently for each actor.  Like, suppose you have a special mini graphic for Eric.  You might do "actor character gfx["EricFrog" 0 1]".  This tells the program that the state changes only actor ID 1 to character name "EricFrog" with an index of 0.  Make sense?

    (Thanks, you helped me catch a mistake)
  6. so that also means we can have multiple of the tags per state right? its really nice... :)

    this script is perfect for the idea that I have in mind for my next project...
  7. This is really cool. Dunno how difficult it would be to implement, but being able to add pictures onto the actor's face graphic would be a neat idea (obviously there'd need to be a tag for the pixel location of each picture). As in, imagine a regular RTP face - the state 'bleed' adds some cuts to the actor's face via a picture. Poison adds a picture of bags under the eyes, or something. That way you could stack pictures for each kind of state rather than changing the face each time, if that makes sense. Just brainstormin'.
  8. Already found and fixed a bug.  Version updated to 1.1.

    • Fixed a bug where dying and reviving enemies do not display properly.
  9. Does this work with Victor Actor Battlers, i.e. if the actors use battler pictures like the enemies rather than Yanfly face portraits?
  10. Both actors an enemies can use all the tags, so I don't see why not.  Unless Victor did something weird.

    EDIT: Updated this script again.  Version 1.2 is now available from the main post.

    • Adds the ability to have different graphics stacking states.
    • Reordered a few functions in the script.
  11. Don't have a comma after the first number.  I know where it's probably getting the error, so I'll see if I can't do a bit to prevent it from occurring again, but yeah, that's probably what the issue is.
  12. Am I the only one unable to show a sprite change for actors outside of battle? Or is this script only meant for sprites to change during battle?

    When I give an actor a graphic state change on the map, it will update their face, but not their character sprite no matter what I do. Similarly, will this script properly update the graphic on the map if the state is lost from an event removal? I was planning to allow the actors to carry their changed state in and out of battle.
  13. Nope, you are correct.  It's not changing them.  Sorry, I'll fix that up asap.
  14. Where do I have to put the tags? in the state's notebox?

    Also, if i put the script and launch a battle i get this error line 102 undefined method ' >= '

    I got what the problem was, the stacking states script is required for this to work.
  15. Hi this is exactly what I've been looking for but I have a slight issue that is occurring. When the state is applied to my actor, the original battler remains behind as well as the new one appearing. I'm using Yanfly visual battlers and I've tried placing this script above and below it to no avail. I'm not sure if it's a compatibility problem but  I have two battlers now instead of one :) Any ideas?   
  16. This...I've wanted this kind of script for like, ever! I'm so surprised to just see it appear like this (I know it didn't just appear, you had to work to make it!)

    Maybe I just like transformations too much...Nah. Time to go crazy!
  17. I was wondering how would i change my character's sprite with your script. I put the tags in like it stated in the forum but my character doesn't transform.

    Character after state is applied.JPG

    Character before state is applied.JPG

    Transforming state.JPG
  18. Thanks a ton, Neon Black.  I really appreciate your work!  I used your script to allow one of the main characters to use a skill as a buff and change the face graphic along with it.  Together with Yanfly's battle engine, it works exactly how I hoped it would... Brlliant work!

    Cheers!
  19. Updated to v1.3.

    • Fixed a crash related to $imported hash and stacking states.
    • Fixed an issue where characters walking sprites would not change on the map when applied with a state.
    You can get the updated version of the script in the main post.