Demo – Version 1.7 (Demo uses older version)
#------------------------------------------------------------------------------# # Galv's Character Animations #------------------------------------------------------------------------------# # For: RPGMAKER VX ACE # Version 2.0 #------------------------------------------------------------------------------# # 2017-03-11 - Version 2.1 - Don't update idle time while event running # 2013-01-24 - Version 2.0 - Significant changes for performance increase. # 2013-01-07 - Version 1.7 - Slight tweaks # 2012-10-06 - Version 1.6 - Updated alias names for compatibility # 2012-10-06 - Version 1.5 - Added dash speed option. Fixed some code # 2012-09-21 - Version 1.4 - Optimised the code significantly (to my ability) # - Some bug fixes # 2012-09-21 - Version 1.3 - Added ability to repeat common event # - Added follower animations # 2012-09-20 - Version 1.2 - fixed compatibility with Galv's Region Effects # 2012-09-20 - Version 1.1 - added idle common event, removed unnecessary code # 2012-09-20 - Version 1.0 - release #------------------------------------------------------------------------------# # Designed to give actors additional animations such as: # - Idle # - Walking # - Dashing # - Custom (run a common event if you've been idle for a period of time) # # INSTRUCTIONS: # 1. Copy this script below materials and above main # 2. Create your charsets to use one characterset per actor. (This is where # version 2 differs from version 1 greatly. # The first character in the charset is the Idle animation # The second character in the charset is the Walk animation # The third character in the charset is the Dash animation # # (See demo if you don't understand) This change was done to reduce processing # significantly and prevent lag when doing too much at once) # #------------------------------------------------------------------------------# # KNOWN ISSUES: # - Move Route Change graphic commands only work when the switch is on. # Then if you turn it off again, the graphic changes back to the original. # Use "Set Actor Graphic" event command to change instead. #------------------------------------------------------------------------------# ($imported ||= {})["Chara_Anims"] = true module Chara_Anims #------------------------------------------------------------------------------# # SETUP OPTIONS #------------------------------------------------------------------------------# ANIM_SWITCH = 1 # ID of a switch to disable this effect. # Turn switch ON in order to use change graphic # move route commands. Turn off to restore anims. DASH_SPEED = 1.2 # 1 is RMVX default dash speed. COMMON_EVENT = 1 # Common event ID that plays after a certain time COMMON_EVENT_TIME = 100 # Frames idle before common event called. REPEAT_EVENT = false # Repeat this common event if player remains idle? # (restarts the common event time) true or false. #------------------------------------------------------------------------------# # END SETUP OPTIONS #------------------------------------------------------------------------------# end # Chara_Anims class Sprite_Character < Sprite_Base alias galv_charanim_initialize initialize def initialize(viewport, character = nil) @idletime = 0 galv_charanim_initialize(viewport, character) end alias galv_charanim_update update def update galv_charanim_update return if $game_switches[Chara_Anims::ANIM_SWITCH] return move_anim if $game_player.moving? @idletime += 1 if !$game_map.interpreter.running? idle_anim if @idletime == 5 idle_event if @idletime == Chara_Anims::COMMON_EVENT_TIME end def idle_anim $game_player.step_anime = true if $game_party.leader.character_index != 0 $game_party.battle_members.each { |m| m.set_g(0) } $game_player.refresh end @idletime += 1 end def move_anim if $game_player.dash? if $game_party.leader.character_index != 2 $game_party.battle_members.each { |m| m.set_g(2) } $game_player.refresh end else if $game_party.leader.character_index != 1 $game_party.battle_members.each { |m| m.set_g(1) } $game_player.refresh end end @idletime = 0 end def idle_event return @idletime = 0 if $game_map.interpreter.running? $game_temp.reserve_common_event(Chara_Anims::COMMON_EVENT) @idletime = 0 if Chara_Anims::REPEAT_EVENT end end # Sprite_Character < Sprite_Base class Game_CharacterBase alias galv_charanim_init_public_members init_public_members def init_public_members galv_charanim_init_public_members @step_anime = true end # OVERWRITE FOR PERFORMANCE PURPOSES def real_move_speed @move_speed + (dash? ? Chara_Anims::DASH_SPEED : 0) end end # Game_CharacterBase class Game_Actor < Game_Battler def set_g(i) @character_index = i end end # Game_Actor < Game_Battler class Game_Player < Game_Character attr_accessor :step_anime end # class Game_Player < Game_Character
I get the following error: “Script ‘Galv Character Animations’ line 86: NoMethodError occured.
undefined method ‘character_index’ for nil:NilClass”
Do you have an actor in your party?
Other things to check.
https://galvs-scripts.com/errors-using-scripts/
This script is really easy to use and it works great! I just have one little bug? Whenever I use a switch in a map, as long as the switch is turned on, only the idle animation will display (also while moving). As soon as the switch is turned off, everything works fine again. Is this normal, or is there a way to work around it or prevent it?
You set a switch in the settings and use that switch to enable/disable the script. Don’t use that switch or change the number in the settings to use a different one…
The script is awesome but I’d like to know how to change the speed of idle animation because I want to make my character breathing when he is idle and he is breathing too fast. Thanks for creating this script, keep up the good work!
That functionality it not part of the script, I recommend you ask in rpgmaker forums
I don’t think anyone in the forums would know more about your script than you do, would it be possible to modify it so you can change the speed of stepping animation, like you did with the dash animation?
Yes it is possible but I just don’t have time to modify my scripts every time someone asks (which is a lot). I’m sorry. Which is why I recommended ask someone else.
Maybe you can combine this script with Modern Algebra’s “Extra Movement Frames”, and simply repeat some frames in a big charset sprite sheet with various frames… ?
(I don’t know if it will work, but I’m trying to do this at my project right now)
That is true, I am sorry for asking…
Thank you for the reply, have a nice day!
Hello, thank you for sharing the script. I only have to put it into Materials, right? As for the future, can I also assume that you put these scripts into materials unless said otherwise?
Yeah, all scripts go under materials and above main in the script list
Is there a way to make it so that it only works on certain characters? Because my main character uses the “$” symbol so the character set has only one as opposed to eight.
Sorry, no.
Great script! It’s possible set a little distance from party members? They are so close each others…
It must be great!
Best
This script doesn’t relate to party member position. I recommend requesting in a forum for that functionality :)
Hi Galv! Thanks for your awesome scripts, I mostly use only yours since I’ve started working on my game. Just wanted to know if you know of any compatibility issue between the older version of this script and the character effects. I need to use the older version since I haven’t found a way to make Raizen’s multi-frames script with the new all-in-one charset of version 2. I get an error line 720 of character effects script every time I’ve got the older version of your character animation script in the game; if I take the animation script off the game, the error is gone but of course, I lose all my charset anims! Hope you can give me a hint of where to look for a tweak on your older version. Thanks a lot! (even if you can’t! hahaha)
Unfortunately I dont have time to fix this issue – I am not sure why it would be happening, though. Try putting the character effects below this one
No problem! Thanks for offering me a solution, I’ll check it out as soon as I get back on my making computer!
I managed to get a good result for the shadows of NPC events, and I thinking I can get something for the main player, but I realized with the NPC event graphics that it doesn’t fit my charset (bigger and really 2-legged animation characters) But I keep this option on the side for now, and will come back to it later! Thanks again for your time!!! =))
Hi! I try use it with other your script Galv’s Character Effects, but its give me error line 33. Is impossible use together? (Sorry, Im russian. My english is not so good ).
Try changing the order they appear in your script list.
Thank you for idea, but is will not work. Because, for example I take your demo Galv’s Character Effects, and put inside it Animations from here… Of course I was try change position of it in script list, but is not work together yet. All the time similar problem. I also was started new project (just for test), was try in mine project, and in your demo with Character Effect. Dont work together :)
A bit more… If I delete line “Delete event” in your demo Galv’s Character Effects, then game started correct.
I might have created an error working together with my last update. Glad you got it working though
No no :) Is not work correct. I was mean its work if I delete line “Delete event”. Means as if its impossible use events… Btw maybe you can fix it? Really so good scripts, and so sad is dont work correct. I understand, you busy with your own project (I was read comments lol), but if you will have free time…
Unfortunately I don’t have time to fix or see what’s wrong with it right now
Hello, I am using your scripts in a game I have been working on for two years now; and I just wanted to let you know that I will be going to kickstarter sometime soon.
When that day comes I wanted to give you a free copy of the game, your name in the credits, plus any other plugs you would like in the credits, and other goodies for your scripting work, and for allowing me to use it in my game.
Here is the list of your scripts I am using:
Character Animations 2
Variable Timer Functions – I am just using this for the graphic not all the other stuff
If for some reason there is an issue with me using any of these scripts in my commercial game let me know.
No issues at all, you can use them as you like. Thank you and good luck with your project :)
I found a bug. When the player becomes idle for more than a few seconds, the save menu appears. This kind of ruined my project being its save feature disabled to let the player save in certain points. I have also tried making another copy of my project and then deleting script. The bug is gone. Is there a way to fix this?
It’s not a bug, you need to read the script settings.
COMMON_EVENT = 1 # Common event ID that plays after a certain time
I am guessing that your common event #1 calls the save command. Change this to a different common event or make it 0 if you dont want to use it.
OH, that makes sense. Alright, thank you.
Hey, Galv, Do you Need to Name the Charater Sets a Certin Name? Cos i Just Found this Script and i REALLY wanna use it,
Have a read of the text at the top of the script, it will explain what you need. Also check out the demo for a working example.
I keep getting these errors saying:”Dispossed Sprite” any suggestions?
Try error trapping that this checklist suggests:
https://galvs-scripts.com/errors-using-scripts/
I love the script! There is one thing that i dont like though. I dont like how the charcter bobs from side to side in the animations, is there any way to fix this? (btw i tried without the script and its not my sprite sheet it is the script)
I recommend doing some more tests as it’s not the script.
Test the demo (link is at the top above the script code). If you test your sprite sheet in the demo and it still happens, I think it is your spritesheet.
If it only happens in your project it might be a script conflict
Hi, its me again, and i was wondering if you know a way to make battle animations for the characters! Thanks for the help
if you figure it out!
Not sure what you mean. Sideview plugins usually allow using different frames for battle animations.
if its any help to answering this question im using jets side view system.
Unfortunately no help – I’m not sure what you mean by ‘battle animations’.
Jets side view can show a row for animation depending on skill used. Or you could use the database animations and set up animation sheets with your characters.
Hello Galv!
Fristly, i’m sorry for my bad english.
I found a bug.
When you are reading a dialog box for a long time after the Idle Common Event is activated, is there any way to avoid it without doing without it? I am interested in the Common Event function.
Thanks! :D
I just noticed after checking that the demo download still had version 1.7. Grab the script from the page, it is the latest version 2.0 which should fix that issue.
Okay, thank you very much, I’ll check it out. :D
And what about the Script’s Terms of Use? This in particular.
Free to use in any project with credit :) (donations welcome!)
Oh, great … Thank you, count with the credits! :)
By the way, the problem of the Common Event after long dialogues continues happening: /
Seemed the idle timer kept ticking but reset if it was reached while an event was active. I updated to 2.1 to make the idle timer not tick during events. Hopefully that fixed it.
Amazing!
It’s already working. ^^
Thank you so much and sorry for the inconvenience :)
Hey Galv I hope you see this. my name is Jak I make YouTube videos mainly but I some times work on small time RPG maker vx ace games. I constantly have ideas for new projects but I have a few that I think could be something. So I would like to make these games but to be honest I’m very bad at maker tilesets, animations, graphics, ect for RPG maker. So I was wondering if you could help me out with that. I can give you more info, so if your interested contact me. Maybe we can create a great game.
Sorry, I have a lot of work of my own and cannot commit to any other projects right now.
That’s alright, but by any chance do you know anyone else who might be free to do this. I’m new to this and don’t know where too look for people who are skilled with this type of thing.
I don’t know anyone personally but you could try posting on rpgmaker forums
Alright thanks m8. Good luck on your projects.
Is there a way to make it so that the character sprite does not loop its running animation when interacting with an event? It’s really distracting
Does that happen in the demo?
Hi Galv!
It’s been a long time, isn’t it?
Well, I’m using your script in my rmvxa project alongside with Modern Algebra’s Eight dir movement, but I’m fine with only the 4 sprites rmvxa standard.
My problem is with another bug… when I am running or walking with my character and interact with any event (input key, automatic or parallel process) the sprite doesn’t go back to the idle sprite, in absolutely any event that I try to interact…
This seems to be a bug in your script, but I haven’t read anyone complaining about this, so I guess maybe this problem is a bug that only I am having…
Do you think you can help me to solve this problem? I tried to solve it by events but had no success…
(Oh also there is no playable demo for the 2.1 version script, it will be of great use if you create one)
I would guess the bug has something to do with compatibility with another plugin you are using – such as the modern algebra’s. They might not work together.
It works with my diagonal movement script, however:
https://galvs-scripts.com/2015/12/12/mv-diagonal-movement/
Oh, maybe it can be this the problem
But your diagonal movement posted is a Plugin for RMMV
Do you have a similar script for RMVXA?
Oh, oops – I keep getting them mixed up! haha. I thought I did a diagonal for Ace, but maybe I didn’t…
Haha xD
No problem, something happened (and I don’t know what) but seems that the bug miraculously fixed itself, I did some alterations on other scripts, maybe the problem was indeed an incompatibility bug and I fixed it accidentally xD
In any case, thank you so much for the quick replies, I wasn’t so confident about being replied too soon when I posted this at first, but after seeing so many good scripters abandoning the RM engine, knowing that a good scripter/plugin maker like you remain active plus quickly replying to users after so many time is really, really motivating. :)
Hello, I think that I have found a bug. When I am running or walking with my character and interact with any event (input key, automatic or parallel process), the sprite doesn’t go back to the idle sprite, in absolutely any event that I try to interact. Others also seemed to have this problem. I checked if it was a problem with script incompadebility. This was not the case, and the 1.7 version from the demo didn’t have this bug when I placed it in my game materials. I think something in the newer version is causing this bug. When I placed the newer version in the demo, it still had the same bug.
Can you replicate that in the demo project itself? Or only in your project?
In both the demo and my own game. I tested this by creating an event on the map of the demo, set it to ‘player touch’ for activation, and let it display text. I copied the newer version of the script and pasted it in the demo. Then when I tested it and walked over the event, the character kept repeating the walk cycle while the text appeared on the screen.
Oh, this is the VX Ace version, I didn’t realize. Continue to use the old version if the newer one has issues.
This was my first thought as well. But sadly, the previous version has a bug that’s even worse to my game than this one. Maybe I’ll ask on a forum if anyone knows how to fix it. With your consent of course. If yes, and I do find a solution, I’ll post it here too.
Sure, go ahead. I haven’t touched VX Ace in many years now.
(This was my first thought as well. But sadly, the previous version has a bug that’s even worse to my game than this one. Maybe I’ll ask on a forum if anyone knows how to fix it. With your consent of course. If yes, and I do find a solution, I’ll post it here too.)
Update: I think I figured it out!
In line 80, your have: @idletime += 1 if !$game_map.interpreter.running?
Turn this into: @idletime += 1
It all seems to work fine now. No idea why, but it does. Fingers crossed that this will continue to work.
Thanks, that’s good to know. I can look into it and know where to look when I do.
Hello! Im having a bit trouble with the common event running when the character is standing for a certain amount of time. The change graphic command for the common event only works for one specific character when Im getting that right. Is there any way to get that to work for different characters with different graphics? Thanks in advance!
I recommend asking in a forum for assistance with what you are trying to do.
Okay thanks!
game crashes suddenly when I go afk for about a second, do you know what’s causing it?
error : https://cdn.discordapp.com/attachments/823705117386997760/974564016292790272/unknown.png
code line : https://cdn.discordapp.com/attachments/823705117386997760/974563641464598538/unknown.png
Not sure of the cause of the error, but the script runs a common event after being idle for a certain time. Make sure to start a new game and check the common event. Make the common event 0 if you don’t want to use one.