Help - Search - Members - Calendar
Full Version: RMVX Yanfly's Demo Replace Characters with Animations
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS2
Para_Dox0
Hello everyone. I hope I don't sound to noobish or of beat. I've searched around for days and I'm doing my best guys but I don't know where to look. I'm using Yanfly's Melody demo, demonstrating all of those fancy scripts he has, and I noticed I could replace an enemy with animations. Which is really useful, but I was wondering if I could do the same thing for characters. I found a thread: http://www.rpgrevolution.com/forums/index....showtopic=28881
Which seemed to have my question answered, which was answered by Mr. Bubble, link to a thread: http://www.rpgrevolution.com/forums/index....st&p=270790
But when I tried to open the link, it was dead, so maybe someone else can help me. Is there anyway I could replace a characters standing animation with an animation made in the database? I don't think it will be that hard, so any and all help is apperciated. If you need anymore info just let me know and I'll be on my way. Please and thank you! c:
X-M-O
I believe this is the answer you are seeking (credit goes to Mr. Bubble):

QUOTE
Here's the script. The script itself can be inserted below the sideview scripts, but you will need to modify the actual variables in the script to your preferences because I don't know how you made your animations. I left details for you in this script.

CODE
module N01
  single_action_template = {
#~~~~~~~~~~~~ Add single-actions in this section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # Majinken
  # PROJECTILE is the animation that moves to the target from the caster.
  # Change ID to the animation you want to use in your database.  Time is the
  # amount of time the projectile takes before it reaches the target.  Make
  # sure the animation lasts long enough before it reaches the target.
  #                        Type   ID Object Pass Time Arc  Xp Yp Start Z Weapon
  "MAJINKEN_PROJECTILE"    => ["m_a",  4,   0,  0,  24,   0,  0,  0, 0,false,""],
  #
  # CHARVANISH simply makes your battler disappear right before the animation
  # on the character is played.  The character will reappear again if you use
  # another Battler Animation such as "WAIT(FIXED)".
  # Action Name               No. Row Speed Loop Wait Fixed  Z Shadow  Weapon
  "MAJINKEN_CHARVANISH"   => [ 0,  12,  10,   2,   0,   1,   0, true,"" ],
  # Majinken Movement
  # MOVE will move the caster to a certain distance from the target.  Change the
  # X value to whatever you want to your liking.
  #                   Origin  X   Y  Time  Accel Jump Animation
  "MAJINKEN_MOVE"   => [  1, 200, 0, 12,  -1,   0,  "MOVE_TO"],
  # Majinken Animation
  # CHARANIM is the animation that will play on the caster while the actual
  # battler is hopefully still hidden.  Change ID to the animation ID with the
  # character animation.
  #                         Type   ID  Object Invert  Wait  Weapon2
  "MAJINKEN_CHARANIM" => ["anime",  5,  0,   false,  false, false],

#~~~~~~~~~~~~ End of single-action section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  } # <- Do not delete!
  ANIME.merge!(single_action_template)

  action_sequence_template = {
#~~~~~~~~~~~~ Add action sequences in this section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # Because I have no idea how you've made your animations, you will need to
  # adjust the timing of everything in this sequence using wait functions
  # or adjusting the single-actions used above.
  #
  # You will also need to assign this sequence to a Skill ID before you can
  # use it.
  "MAJINKEN"        => ["MAJINKEN_MOVE", "MAJINKEN_CHARVANISH",
                        "MAJINKEN_CHARANIM", "MAJINKEN_PROJECTILE",
                        "28","WAIT(FIXED)",
                        "OBJ_ANIM", "18","Can Collapse", "FLEE_RESET"],

#~~~~~~~~~~~~ End of action sequence section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  } # <- Do not delete!
  ACTION.merge!(action_sequence_template)
end


The sequence right now is actually usable if you assign it to a skill ID. It should give you a visual idea of what you need to adjust with the sequence and single-actions.
Para_Dox0
I'm going to test this and check back with you is that alright? I'll will edit my post with my results. Thank you for the help. c:
EDIT:
Please excuse me but I'm pretty long gone. What does this script allow me to do? I'm reading over the notes now and I'm just a tad bit puzzled.
I have say just an idle animation and I want to replace my characters animation, how would I go about doing that? Making an animation for a skill that does that?
X-M-O
That'll be fine, so long as it doesn't take more than a couple minutes. (I'll be heading off to bed in a moment, now that one of my work-projects is complete.)

EDIT:

QUOTE
Please excuse me but I'm pretty long gone. What does this script allow me to do? I'm reading over the notes now and I'm just a tad bit puzzled.
I have say just an idle animation and I want to replace my characters animation, how would I go about doing that? Making an animation for a skill that does that?


I believe it replaces a character with animations (could be wrong, as I'm not familiar with RGSS2 and didn't look it over - just gave you the answer that Mr. Bubble gave, since you weren't able to see it for whatever reason).

At any rate, I need to head to bed now, so I'll have to revisit this (though I'm not any good with in-depth assistance with RGSS2).
Para_Dox0
Please check my previous post, and I'm sorry to keep you up. =[
EDIT: Thankx for your help. Goodnight. c:
X-M-O
You're welcome, I'm sorry I couldn't be of more help. D=

I just had a good/fresh look over everything and I'm completely lost with RGSS2 - so I'm going to have to let someone else help you from here.
Sorry about that, but learning a new language (without the need to use it commercially) isn't something I can spend my time on.

So whoever has more knowledge in this area... Para_Dox0 is in need of your assistance. ^^
Para_Dox0
It's ok but I apperciate the effort. Does anyone else maybee know anything? I'm just trying to understand the script alittle bit more, I'm lost. I think I inserted it in the right spot, but I'm unsure as to how to use it. I'm reading the notes but I'm still lost. =/
Para_Dox0
Bump. I just need some help operating the script and getting things down. Like what do I do after I've installed the script. Maybe Mr. Bubble could help me? Any and all help appreciated. c:
Twilight
It's already built in do a search for ANIMATION_BATTLER_ACTORS ={ and it list everything already.
Para_Dox0
Just got home and it's late. I will take a look at that 2morro. Thank you. c:
EDITL Where do I find that line of text? Which script specifically? Or is there a search function or something of that nature I could use?
Twilight
Part 1, just do a search for it CTRL F
Para_Dox0
QUOTE (Twilight @ Jul 21 2011, 05:45 AM) *
Part 1, just do a search for it CTRL F

Well I found the script, and I'm sorry that I'm still a little lost. I'm reading over the notes, and I found a template right under the line of text you told me to search. Do I put the name of the character in front of the text you sent me or...? I'm sorry I'm still a little new. Is there a video or is there any way you could maybe sum it up for me please?
Para_Dox0
Um, just need alittle help understanding how to use it as a notebox.
Para_Dox0
Bumpdate: I seem to have it working thankx to you guys. I think I just need help with the animation template. I found one once but I can't find it. I have trouble lining up the sprites in the center and consecutively doing that. Like, when I put it on the sprite sheet, I'm having trouble lining up the sprite in the same spot in each square. Any recommendations?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.