Jump to content


Photo

Victor's Animated Battles - A Tutorial!


  • This topic is locked This topic is locked
156 replies to this topic

#1 Lyson

Lyson

    Resident Victor Animated Battlers expert.

  • Ace Member
  • 102 posts
  • RM Skill - Designer

Posted 02 April 2012 - 10:38 PM

Greetings, my fellow RPG Maker fanatics!

It's been a long time since I've done an RPG Maker tutorial, and it's about time that I sit down and write one up. With all the talk about side-view battle this, and side-view battle that, and considering how popular Victor's Animated Battles script is, I've decided to put together a little tutorial to give you a step by step walk through for creating your own actions for your characters in your RPG Maker VX Ace Project.

But first things first:

Question 1: "What is an Action?"

For anyone who decides to try out Victor's Animated Battle Script, this is a very good question. And the answer is relatively simple. An action is the result of the segment of code that you put together in order to make your actors or enemies move and attack across the battlefield. Using the various built in functions that Victor has provided, you can use Actions to make your character or enemy do....pretty much whatever you tell them to.

Question 2: "Awesome! Tell me how to do that!"

Woah, woah, woah. Slow down there a second, bucko. You can't just jump right in and start making actions. For starters, you don't even know how to make them yet! If you really want to learn how to use Victor's Animated Battles, then we have to start from the beginning. And by the beginning, I mean the beginning of his script. Let's take a look at the parts of the script BEFORE we get to the part where we start creating Actions


Victor's Animated Battles - The Opening Section

#--------------------------------------------------------------------------
  # * Initialize Variables
  #--------------------------------------------------------------------------
  VE_ACTION_SETTINGS = {} # Don't remove or change
  #--------------------------------------------------------------------------
  # * Animated battler sufix
  #   When using sprites, add this to the animated sprite sheet of the battler,
  #   that way you can keep the original battler a single sprite and make
  #   easier to setup their position on the troop
  #--------------------------------------------------------------------------
  VE_SPRITE_SUFIX = "[anim]"
  #--------------------------------------------------------------------------
  # * Intro fade
  #   When true, there will be a small fade effect on the battlers during
  #   the battle start (like RMXP default battle)
  #--------------------------------------------------------------------------
  VE_BATTLE_INTRO_FADE = true
  #--------------------------------------------------------------------------
  # * Default sprite settings
  #   This is the settings for all battler graphics that doesn't have
  #   their own custom setting
  #--------------------------------------------------------------------------
  VE_DEFAULT_SPRITE = {
  # Basic Settings
  # name:   value,
	frames: 3,		# Number of frames
	rows:   4,	   # Number of rows
	mirror: false,	# Mirror battler when facing right
	invert: false,	# Invert the battler graphic
	mode:   :charset,  # Graphic style (:sprite or :chasert)
	action: nil,	  # Action settings
  # Main Poses
  # name:	   row,
	idle:	  1,   # Idle pose
	guard:	 2,   # Guard pose
	evade:	 2,   # Evade pose
	danger:	3,   # Low HP pose
	hurt:	  4,   # Damage pose
	attack:	5,   # Physical attack pose
	use:	   6,   # No type use pose
	item:	  6,   # Item use pose
	skill:	 7,   # Skill use pose
	magic:	 8,   # Magic use pose
	advance:   nil,   # Advance pose
	retreat:   10,  # Retreat pose
	escape:	10,  # Escape pose
	victory:   11,  # Victory pose
	intro:	 12,  # Battle start pose
	dead:	  13,  # Incapacited pose
	ready:	 nil, # Ready pose
	itemcast:  nil, # Item cast pose
	skillcast: nil, # Skill cast pose
	magiccast: nil, # Magic cast pose
	command:   nil, # Command pose
	input:	 nil, # Input pose
	cancel:	nil, # Cancel pose
	# You can add other pose names and call them within the action settings
	# use only lowcase letters
  } # Don't remove
  #--------------------------------------------------------------------------
  # * Custom sprite settings
  #   Theses settings are set individually based on the battler graphic
  #   filename (even if using the charset mode, the setting will be based
  #   on the battler name, so it's suggested to use the same name for
  #   the battler and charset graphic when using charset mode)
  #   Any value from the default setting can be used, if a value is not set
  #   it's automatically uses the value from basic setting
  #--------------------------------------------------------------------------
  VE_SPRITE_SETTINGS = {
  # 'Filename' => {settings},
  #
  # 'Sample 1' => {frames: 4, rows: 14, mirror: true, mode: :sprite,
  #				action: nil},
  # 'Sample 2' => {frames: 3, rows: 4, mirror: true, invert: false,
  #				mode: :charset, action: :charset},
  # 'Sample 3' => {frames: 3, rows: 4, mirror: false, invert: false,
  #				mode: :charset, action: :kaduki},


Wow, look at all that coding. It's a lot to take in, I know. What the heck does all that mean?! Well, no worries, your buddy Lyson is here to help you out! By the time we get done here today, you'll be making your own Actions in no time! But for now, let's look at the important parts of the code I posted above.

  VE_ACTION_SETTINGS = {} # Don't remove or change

This one is pretty self explanatory. Don't touch it. Like....ever. OK? You remember when you were in third grade, and your teacher caught you playing with your willie, and she told you "Hey, don't touch that!" Yeah, it's kinda like that. Just don't.

VE_SPRITE_SUFIX = "[anim]"

Ok, this is a very important part of the code. Basically, if you decide you want to use sprites for your battlers (Look up Holder's Animated Battlers if you don't know what I mean), this little line of code let's the script know which battler image is the static image, and which one is the animated one. You're free to change the insides of the quotations to say whatever you want, but it's easier to just let it be.

Example: Let's say I'm using Holder's Scorpion Battler. I would have two image files: $scorpion.png, and $scorpion[anim].png That [anim] tells the script to use $scorpion[anim].png when it comes to performing the Actions.

VE_BATTLE_INTRO_FADE = true

This is, perhaps, the least most important line of code in the entire script. It basically allows you to choose whether or not you want a little nifty "fade in" effect at the start of battle. Totally a cosmetic design decision. True turns it on, False turns it off. Moving on.

  VE_DEFAULT_SPRITE = {
  # Basic Settings
  # name:   value,
	frames: 4,		# Number of frames
	rows:   14,	   # Number of rows
	mirror: false,	# Mirror battler when facing right
	invert: false,	# Invert the battler graphic
	mode:   :sprite,  # Graphic style (:sprite or :chasert)
	action: nil,	  # Action settings


Alright, now we're moving on to some of the heavy duty stuff. This section of coding sets the values for the default battlers which don't have custom graphics. The fact that you're using this script is pretty indicative that you'll be using custom battler graphics, but for posterity's sake, let's go over what some of this code means.


	frames: 4,		# Number of frames
	rows:   14,	   # Number of rows




Ok, take a look at this picture:

Posted Image

Now, granted, this is a kaduki sprite (more on that later), but for now it serves the purpose of explaining frames and rows. Can you tell me how many frames and rows are in the above picture?

If you answered 3 frames, and 4 rows, congratulations! You know how frames and rows work! If you answered something different, or didn't answer at all, allow me to elaborate.

Each individual graphic in the above image is considered a frame. Each line of images is considered a row. These two terms are vital to creating your own custom Actions, so if you're not comfortable with them, start studying up!

	mirror: false,	# Mirror battler when facing right
	invert: false,	# Invert the battler graphic

I'm lumping these two together because they serve fairly similar purposes. And they're pretty self explantory. I can't say more than what Victor has already said above in his comments. Just know that you can turn those values to true to activate them, and that mirror and invert are good to use when creating enemy sprites.

  # Main Poses
  # name:	   row,
	idle:	  1,   # Idle pose
	guard:	 2,   # Guard pose
	evade:	 2,   # Evade pose
	danger:	3,   # Low HP pose
	hurt:	  4,   # Damage pose
	attack:	5,   # Physical attack pose
	use:	   6,   # No type use pose
	item:	  6,   # Item use pose
	skill:	 7,   # Skill use pose
	magic:	 8,   # Magic use pose
	advance:   9,   # Advance pose
	retreat:   10,  # Retreat pose
	escape:	10,  # Escape pose
	victory:   11,  # Victory pose
	intro:	 12,  # Battle start pose
	dead:	  13,  # Incapacited pose
	ready:	 nil, # Ready pose
	itemcast:  nil, # Item cast pose
	skillcast: nil, # Skill cast pose
	magiccast: nil, # Magic cast pose
	command:   nil, # Command pose
	input:	 nil, # Input pose
	cancel:	nil, # Cancel pose


Take a look at the above code. Keep it in the back of your mind, we're gonna come back to this in a little bit.


  VE_SPRITE_SETTINGS = {
  # 'Filename' => {settings},
  #
  # 'Sample 1' => {frames: 4, rows: 14, mirror: true, mode: :sprite,
  #				action: nil},
  # 'Sample 2' => {frames: 3, rows: 4, mirror: true, invert: false,
  #				mode: :charset, action: :charset},
  # 'Sample 3' => {frames: 3, rows: 4, mirror: false, invert: false,
  #				mode: :charset, action: :kaduki},
	'Scorpion'  => {frames: 4, rows: 14, mirror: true, mode: :sprite,
					action: nil},
	'Warrior_m' => {frames: 4, rows: 14, mirror: false, mode: :sprite,
					action: :default},
	'Actor1'	=> {frames: 3, rows: 4, mirror: false, invert: false,
					mode: :charset, action: :charset},
	'$Actor4'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
  } # Don't remove

Ok, this is a very important section of the script. This is where you tell the script the name of the battler you want to use, how many frames it has, how many rows it has, whether you want to invert or mirror it, the type of mode you wish to use, and the type of actions you wish to use. If you've been following along with the tutorial, you're already familiar with frames, rows, mirror, and invert. The other two terms are new, and we'll discuss them here.

Modeis basically where you tell the script how you want it to treat the image you programmed in there. For example, using the code above, the Script knows to treat Scorpion as a Sprite, Actor 1 as a Character Set, and $Actor 4 as a Character Set.

Action works the same way. It tells the script which pool of Action commands you want associated with that image. For Warrior_m, the script will assign the default action pool, For Actor1, the charset action pool, and for $Actor 4, the kaduki action pool.

This is also where you tell the code how many rows and frames your image has. Now that you know what Frames, Rows, Mode, and Action does, you can start programming in the image names of your battlers. Here's the code I use for the image I posted earlier:

	'$Lyson_1'   => {frames: 3, rows: 4, mirror: false, invert: false,
					mode: :charset, action: :kaduki},

We already stated earlier that that image had 3 frames per row, and 4 total rows. I don't want to mirror it, or inverse it. It is definitely a character set, and since it is a kaduki style character set, I want to use the kaduki action pool.

It is important to note here that if you set the incorrect number of frames (say for example I put 4 instead of 3), once you enter aa battle, the character will look as if it's blinking. We don't want that. So make sure you have set your frames right! Now, you need to do this for every character and every enemy you plan on making a pose for. Here's just a tiny section of what I have in my game project:

	'$Hornet_1'  => {frames: 4, rows: 4, mirror: true, invert: true, mode: :charset,
					action: :charset},
	'$Wolfie'  => {frames: 4, rows: 4, mirror: true, invert: true, mode: :charset,
					action: :charset},
	'$Lyson'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Lyson_1'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Lyson_2'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Lyson_3'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Lyson_5'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Elania'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Elania_1'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Elania_2'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Elania_3'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Elania_5'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Raelan'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Raelan_1'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Raelan_2'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},
	'$Raelan_3'   => {frames: 3, rows: 4, mirror: true, invert: false,
					mode: :charset, action: :kaduki},

And that's just a tiny portion, for two enemies and 3 playable party members. But, now that we've gone over the means for telling the script how to treat your images, we can finally get into the nitty gritty of creating Actions. You think the stuff above was complicated and time consuming? You ain't seen nothing yet!

I Like to Move It, Move It

Ok, so, there's two things you need to know about the next section of the script.

(1) It's really long, and there's no way in hell I'd post it all here. That's just too much.

and more importantly,

(2) it's divided into 3 distinct sections.

Remember how we mentioned above that you can set what action pool the script assigns to each image? This is where you'll find the pools. They are listed in this order:

Default, Charset, Kaduki.

Default begins at this line of code:

VE_DEFAULT_ACTION = "

Charset begins at this line of code:

VE_ACTION_SETTINGS[:charset] = "

And kaduki begins at this line of code:

  VE_ACTION_SETTINGS[:kaduki] = "

And inbetween those three important lines, you'll like see a lot of purple letters and numbers, get a dumbfounded look on your face, and promptly turn away, never to touch Victor's Animated Battle script ever again. And I'm here to tell you, it's easier to use than you might think! And we're finally gonna get to the question you asked at the very beginning, "How do I use what I now know to create really awesome, super cool moves for my characters to use in battle?" Well, this is where we learn how to do that. But first, we need to go over what you see after those three lines of codes I just mentioned.

Ok, well, let me tell you the mindset I go into when I start creating Action poses. I treat this section of the script very much like how I would treat creating an event on the map editor. It literally works about the same way. Let's look at the first action defined in the default action pool:

	# Pose displayed when idle
	<action: idle, loop>
	pose: self, row idle, all frames, wait 8;
	wait: 32;
	</action>

The comment line practically tells you what you're looking at. But I'll go into a little more detail. This is the action that defines how the script portrays the default idle pose.

	<action: idle, loop>

This line here does two things. The first part after action give the action it's name. This action is called idle. The second word, loop, does exactly what you might think it does. It tells the script to loop this action.

Now, this is part where you need to start thinking like an eventer. Speaking of which, let's remind ourselves, shall we?

Posted Image

If you're even somewhat familiar with how eventing works, then you can practically picture how the above appears while running the game. And it's a really simple process. The game follows the event step by step. 1 line at a time, until it reaches the end. Creating actions work the exact same way, except you're using code instead of premade event options. So let's go back and look at that line of code again for the Action called Idle

	# Pose displayed when idle
	<action: idle, loop>
	pose: self, row idle, all frames, wait 8;
	wait: 32;
	</action>

After we defined the action, and tell it to loop, we now how to event the action. Look at the 3 line, or technically the second line of code.

	pose: self, row idle, all frames, wait 8;

If you're thinking like an eventer, this is the first line of the event. This is the first thing this Action does when you execute it. Now we're going to go over what this line of code is actually saying.

Pose is how you define which frames you want that action to display on screen when you activate it. Ok, remember that little bit of code I posted above and told you to keep in the back of your mind? Right, well, this is where that comes into play. I'll post it again as a refresher:

  # Main Poses
  # name:	   row,
	idle:	  1,   # Idle pose
	guard:	 2,   # Guard pose
	evade:	 2,   # Evade pose
	danger:	3,   # Low HP pose
	hurt:	  4,   # Damage pose
	attack:	5,   # Physical attack pose
	use:	   6,   # No type use pose
	item:	  6,   # Item use pose
	skill:	 7,   # Skill use pose
	magic:	 8,   # Magic use pose
	advance:   9,   # Advance pose
	retreat:   10,  # Retreat pose
	escape:	10,  # Escape pose
	victory:   11,  # Victory pose
	intro:	 12,  # Battle start pose
	dead:	  13,  # Incapacited pose
	ready:	 nil, # Ready pose
	itemcast:  nil, # Item cast pose
	skillcast: nil, # Skill cast pose
	magiccast: nil, # Magic cast pose
	command:   nil, # Command pose
	input:	 nil, # Input pose
	cancel:	nil, # Cancel pose

That comes into play here:

	pose: self, row idle, all frames, wait 8;

Let's go over the parts here. The first thing you see is the word self. This just tells the script that this pose you're about to define is for the image that invoked this pose. User can also be used here, but for all intents and purposes, they mean the same thing.

The next part of the code is row idle. This tells the script which row to pull which frame from. Now, the default action pool is unique because all of it's actions have already had their pose rows defined. In that long bit of code I told you to keep in the back of your head, the idle row was defined as row 1. So for this action, idle, row idle is telling the script to use row 1.

All frames, this is the second part of the code that involves how the script will display that pose. There are a couple of different ways you can have to code deal with frames. All frames does exactly what it says, it tells that pose command to display all frames from row 1. But, you can also tell the pose to display a specific frame using the terms Frame 1, Frame 2, Frame 3, etc. etc. If you just specify 1 frame, then that is the only frame the script will display.

Wait 8 does exactly what you think it does. Are you still thinking like an eventer? Then you should know what the Wait Command does. It works the same way here. You're telling the code to wait 8 frames.

Now, how does all the above work together here?

	pose: self, row idle, all frames, wait 8;

You just set a pose, that uses all the frames from row 1, with a 8 frame wait inbetween each frame.

Posted Image

Even though this is kaduki, the effect is still the same. Row 1 is the idle pose in this case, and the pose command will cycle through all three frames at 8 frame intervals.

And that's the basic gist of pose. There are a few more commands you can add to it, such as invert, return, loop, and revert, just to name a few.

For all intents and purposes, you can interchange return and revert, which basically is a way of telling the pose command to go backwards after reaching the last frame. So it would go frame 1 > frame 2 > frame 3 > frame 2 > frame 1. Loop makes the pose loops indefinitely until you set a new pose.

Now that you know how pose works, let's go back and look at the Default Action for Idle:

	# Pose displayed when idle
	<action: idle, loop>
	pose: self, row idle, all frames, wait 8;
	wait: 32;
	</action>

The only other thing that this action does is wait for 32 frames before looping all over again. And there you go, you've dissected your first action.

Ready to move on to some more complicated things? If you answered HELL YEAH! proceed to the next section

Creating your own custom Actions

Alright, I'm gonna break one of my own rules here: I'm gonna to reveal to you my custom Action for a skill in my upcoming RPG Maker project, Whispers of Eternity. You should feel priviledged. But hey, anything to benefit the community right? First, let's look at that action in...well, action:






Alright, so, what we're looking at here is how I coded the Action for Spear Dive. Now that you've seen what it looks like in game, let's see what it looks like in code!

	#Lyson Skill - Spear Dive -
	<action: Spear Dive, reset>
	wait: animation;
	pose: self, sufix _3, row 1, frame 3, wait 3;
	direction: targets;
	icon: weapon 1, angle 220, x +20, y +5;
	wait: 60;
	anim: id 81;
	wait: 140;
	anim: id 113;
	pose: self, sufix _3, row 1, frame 2, wait 3;
	move: self, move to, x -20, y +250, speed 30;
	wait: 40;
	icon: weapon 1, angle 130, x +5, y +5 z +1;
	wait: 160;
	pose: self, sufix _1, row 3, all frames, wait 3, loop;
	move: self, move to, x -0, y -150, speed 15;
	wait: 20;
	anim: id 112;
	move: self, move to, x -0, y +30, speed 15;
	wait: 20;
	anim: id 114;
	anim: targets, effect;
	effect: 100%;
	wait: 20;
	move: retreat;
	direction: targets;
	wait: 10;
	</action>

Heh, there's a lot to it, eh? Well, not really. Let's break it down. Remember to look at it like you're looking at an event!


The first thing I did was define the action. The action is called Spear Dive, and it resets after being used.

Next, there's a wait command. Remember how Lyson pauses before activating the skill and you see that little aura around him? That's what this line here does. It tells the action to wait until after the animation as completed for continuing.

The 3 line of the action is where I tell the Action to set a pose. It's self, and sufix_3 just means that it's changing out the $Lyson.png that I defined for $Lyson_3.png. I then tell it to use Row 1, Frame 3, with a wait of 3 frames.

Direction: Targets; is self explanatory. I want to face the target.

Okay, the icon: line is how you can display your currently equipped weapons in battle. weapon 1 just tells the action to display your currently equipped action. The rest of the icon command is...well, self explanatory. Angle tells the action what angle to display it at, and the X and Y values are changes to the positioning of the icon. You'll also see further down a Z, as well. Z values determine if the icon is displayed in front of or behind your character.

Anim: id 81; This is the Animation command. It tells the Action to display the animation at ID 81;

Some more wait commmands, another pose...

Ah, Move.

Move is the command that tells the action how to move your image on the screen. Think about how you use the Move Picture command in eventing, it works the same way. Move to is me telling the action to move me towards the target, but at x - 20 and y +250 of the target. Speed is how fast you move to there. 15 is default. I use 30 here to emulate leaping up into the air.

Everything else is pretty much the same stuff until you get to Anim: Targets, Effect. and Effect: 100%. This is how your action tells the game to preform whatever skill, or item, or regular attack, or guard that you have set to it.

Now that the damage has been dealt, I need to get Lyson back to his original position.

Move: retreat; does that, and with direction: targets; he continues facing the targets while he does it.


And that's all there is to Spear Dive. But you've only coded it, now you have to attach it to your skill. And that's simple enough.

Under the skills menu of your database, go to the notebox for whatever skill you want to attach this action to, and type this in the box:

<action pose: Spear Dive>

And whenever you use that skill in battle, the Action you created for Spear Dive will be displayed.


--------------------

And that's really all there is to it. Granted, all I've gone over here are the basics for setting up an Action, but hopefully in a way in which you can understand it. There are many, many, many more commands you can use to define how an Action operates, such as

jump, throw, hide, plane, flash, shake, movie, picture, etc. etc.

But once you understand the basics of how the command works (and Victor provides sample Actions that invoke many of these commands), you'll be figuring out how to implement them in no time!

I'll leave you with a pop quiz: Tell me how you think the following action will appear when used in game:

	<action: I'm Not Telling You, reset>
	wait: animation;
	pose: self, sufix _1, row 1, all frames, return, wait 3;
	direction: targets;
	wait: 60;
	pose: self, sufix _3, row 1, frame 2, wait 3;
	icon: weapon 1, angle 330, x +0, y -10;
	anim: id 131;
	wait: 60;
	pose: self, sufix _3, row 2, frame 2, wait 3;
	icon: weapon 1, angle 25, x -12, y -0;
	pose: self, sufix _3, row 2, frame 3, wait 3;
	icon: weapon 1, angle 330, x -5, y -10;
	anim: id 132;
	anim: targets, effect;
	effect: 100%;
	pose: self, sufix _3, row 2, frame 2, wait 3;
	icon: weapon 1, angle 25, x -12, y -0;
	pose: self, sufix _3, row 2, frame 3, wait 3;
	icon: weapon 1, angle 330, x -5, y -10;
	anim: id 132;
	anim: targets, effect;
	effect: 100%;
	pose: self, sufix _3, row 2, frame 2, wait 3;
	icon: weapon 1, angle 25, x -12, y -0;
	pose: self, sufix _3, row 2, frame 3, wait 3;
	icon: weapon 1, angle 330, x -5, y -10;
	anim: id 132;
	anim: targets, effect;
	effect: 100%;
	pose: self, sufix _3, row 2, frame 2, wait 3;
	icon: weapon 1, angle 25, x -12, y -0;
	pose: self, sufix _3, row 2, frame 3, wait 3;
	icon: weapon 1, angle 330, x -5, y -10;
	anim: id 132;
	anim: targets, effect;
	effect: 100%;
	pose: self, sufix _3, row 2, frame 2, wait 3;
	icon: weapon 1, angle 25, x -12, y -0;
	pose: self, sufix _3, row 2, frame 3, wait 3;
	icon: weapon 1, angle 330, x -5, y -10;
	anim: id 132;
	anim: targets, effect;
	effect: 100%;
	pose: self, sufix _3, row 2, frame 2, wait 3;
	icon: weapon 1, angle 25, x -12, y -0;
	pose: self, sufix _3, row 2, frame 3, wait 3;
	icon: weapon 1, angle 330, x -5, y -10;
	anim: id 132;
	anim: targets, effect;
	effect: 100%;
	pose: self, sufix _3, row 1, frame 2, wait 3;
	icon: weapon 1, angle 25, x -12, y -0;
	pose: self, sufix _1, row 1, all frames, return, wait 3;
	move: retreat;
	direction: targets;
	wait: 10;
	</action>

Feel free to post your answer in a topic reply, or send me a PM!

And that's all for the basic tutorial for Victor's Animated Battles! I hope this helps shed some light on how the script works, and I hope to see some really awesome custom actions in the near future!!!

Lyson Out!

Edited by Lyson, 02 April 2012 - 10:48 PM.

Posted Image


Erythia: Shattered Dreams - Coming Soon -

Link to E:SD development page: http://whispersofete....wordpress.com/

---

Erythia: Shattered Dreams development topic updates


Updated: 03/27/12 - Updated video to show changes made since original posting. The characters reveal a little bit more of their personalities!


Story: |||||||||||||||||||| 90%

Battle System: |||||||||||||||||||| 50%

Mapping: |||||||||||||||||||| 25%


Looking For: Parallax Mapper, Assistant Story and Battle Designer


#2 Ehren Rivers

Ehren Rivers

    Advanced Member

  • Ace Member
  • 152 posts
  • LocationEugene, Oregon [USA]
  • RM Skill - Writer

Posted 02 April 2012 - 11:15 PM

But Lyson!

Say a person wants to use this script, but doesn't have custom graphics? Let's assume the person is at an early stage in their game project, but wants to be able to set up their test fights (for items, equipment, monster stats) to be closer to the side-view paradise they're envisioning for the full game. Actual animated sprites will be made by them or for them in the future, but they don't want to wait till then to get their scripts installed and optimized and all that hootnany. Is there an option to turn all of the animations off, rendering it a static sideview while you get everything else worked up? Assume that the person is using something such as the Yanfly Battle Engine, which is incompatible with most simple sideview scripts.

#3 Lyson

Lyson

    Resident Victor Animated Battlers expert.

  • Ace Member
  • 102 posts
  • RM Skill - Designer

Posted 02 April 2012 - 11:26 PM

Good question, and Victor provides a solution.

Until you get your own custom graphics, Victor's script allows you to use your character sets for your battlers. In fact, the entire character set action pool has already been filled out with pre-made actions for various commands in battle.

To use your character sets, just make sure you have a copy of them in both Graphic/Battlers/ and Graphic/Characters. Then, when you're defining the list of graphics that the script pulls from, do this:

    'Lyson'   => {frames: 3, rows: 4, mirror: true, invert: false,
				    mode: :charset, action: :charset},

Let's imagine that the Lyson character I posted above is just your average, run of the mill RTP character graphic. You still set it up the same way. (Noticed I took the $ off of the graphic name, as default RTP character graphics have no need for $)

The frames, rows, mirror, and invert, all remain the same. Mode is still charset (this tells the script to pull the image from your /Characters/ folder), but action as now been changed to charset.

As long as you don't have any custom actions made for your skills to call forth, you can use your character sets at side view battlers with which to test items, enemy strengths, and what have you.


And reading your post made me remember something very important I forgot to include in the first post: How to tell the game which graphic to use at your default side view graphic for each character. There's nothing to it, really.

You just go to your actors tab, and under the note tag, put:

<battler name: Name of Battler here>

so in the case of Lyson above, it would be

<battler name: $Lyson_1>

or

<battler name: Actor1> for a default RTP character

Posted Image


Erythia: Shattered Dreams - Coming Soon -

Link to E:SD development page: http://whispersofete....wordpress.com/

---

Erythia: Shattered Dreams development topic updates


Updated: 03/27/12 - Updated video to show changes made since original posting. The characters reveal a little bit more of their personalities!


Story: |||||||||||||||||||| 90%

Battle System: |||||||||||||||||||| 50%

Mapping: |||||||||||||||||||| 25%


Looking For: Parallax Mapper, Assistant Story and Battle Designer


#4 Ehren Rivers

Ehren Rivers

    Advanced Member

  • Ace Member
  • 152 posts
  • LocationEugene, Oregon [USA]
  • RM Skill - Writer

Posted 02 April 2012 - 11:32 PM

Sounds easy!

But wait, what about monsters? Unlike characters, default RM RTP doesn't give them charsets or animation frames that you can use like those hand-dandy character graphics. Will VAB accept a static image, or will the user have to make dummy animation frames until they can get their own personal animated foes?

#5 Lyson

Lyson

    Resident Victor Animated Battlers expert.

  • Ace Member
  • 102 posts
  • RM Skill - Designer

Posted 03 April 2012 - 07:24 AM

Again, the first thing you need to remember is that anything you want to be used by Victor's script has the be defined in the script. So, like how in the video I posted, my characters were fighting a hornet.

	    '$Hornet_1'  => {frames: 4, rows: 4, mirror: true, invert: true, mode: :charset,
									    action: :charset},

I had to define it inside that section of code. Because my hornet is a character set, I have to make sure I have that image inside my character set folder. If I wanted to use the traditional battlers instead, or if you're using holder's battlers, you would set mode and action to :sprite instead, and put the image inside your battlers folder. Either way, before Victor's script can use it, you have to define the image and how the script should interpret it.

Posted Image


Erythia: Shattered Dreams - Coming Soon -

Link to E:SD development page: http://whispersofete....wordpress.com/

---

Erythia: Shattered Dreams development topic updates


Updated: 03/27/12 - Updated video to show changes made since original posting. The characters reveal a little bit more of their personalities!


Story: |||||||||||||||||||| 90%

Battle System: |||||||||||||||||||| 50%

Mapping: |||||||||||||||||||| 25%


Looking For: Parallax Mapper, Assistant Story and Battle Designer


#6 Ehren Rivers

Ehren Rivers

    Advanced Member

  • Ace Member
  • 152 posts
  • LocationEugene, Oregon [USA]
  • RM Skill - Writer

Posted 03 April 2012 - 02:12 PM

So, to make an unanimated image, all you'd have to do would be set the number of frames and rows to one?

'Snake'  => {frames: 1, rows: 1, mirror: true, invert: true, mode: :sprite,
                                                                            action: :sprite},

So the line of code for a static snake battler would look like this, and the script would only have a single image to move through. Is the correct?

#7 Lyson

Lyson

    Resident Victor Animated Battlers expert.

  • Ace Member
  • 102 posts
  • RM Skill - Designer

Posted 03 April 2012 - 02:30 PM

Posted Image

    'Assassin'  => {frames: 1, rows: 1, mirror: true, invert: true, mode: :sprite,
				    action: :sprite},

That is correct.

Posted Image


Erythia: Shattered Dreams - Coming Soon -

Link to E:SD development page: http://whispersofete....wordpress.com/

---

Erythia: Shattered Dreams development topic updates


Updated: 03/27/12 - Updated video to show changes made since original posting. The characters reveal a little bit more of their personalities!


Story: |||||||||||||||||||| 90%

Battle System: |||||||||||||||||||| 50%

Mapping: |||||||||||||||||||| 25%


Looking For: Parallax Mapper, Assistant Story and Battle Designer


#8 Ehren Rivers

Ehren Rivers

    Advanced Member

  • Ace Member
  • 152 posts
  • LocationEugene, Oregon [USA]
  • RM Skill - Writer

Posted 03 April 2012 - 02:54 PM

Wonderful!
Posted Image
I hope that answers some of people's more basic questions.

Now, you mentioned that there was a lot more you could do with this script. I noticed from my own perusal of it that there are a LOT of notetags you can use! I guess what I want to know is: Are the notetags any kind of useful to someone just starting out on learning this script, should they be left to those that have a more advanced knowledge, or can knowing about them actually make the learning process easier?

Edited by Ehren Rivers, 03 April 2012 - 02:54 PM.


#9 Lyson

Lyson

    Resident Victor Animated Battlers expert.

  • Ace Member
  • 102 posts
  • RM Skill - Designer

Posted 03 April 2012 - 03:08 PM

The note tags are useful, but it really depends on what kind of action pose you're trying to do. For most people, the simple <action pose:> will suffice for much of what they want to do.

This kind of falls outside of the scope of the basics of Victor's Animated Battles, but I'll cover it since you asked.

Spoiler


These are commands you can put inside your weapon note tags. They do pretty much what the comments say, but let's take one and look at it as an example:

<item pose: action>
  Changes the item pose when using a weapon with this tag
    action : action name

Whenever you equip a weapon that has this code in their note tags, it changes whatever action you have set as your <action pose: item> to whatever action you've defined in the note tag. It acts as an overwrite.

I won't go in detail over the Actor note tags because they're pretty much self explanatory.

The Enemies note tag options are largely the same as the Actor, but also has
<weapon x: y> and <armor x: y>
which allows you display a weapon or an armor on an enemy.

Posted Image


Erythia: Shattered Dreams - Coming Soon -

Link to E:SD development page: http://whispersofete....wordpress.com/

---

Erythia: Shattered Dreams development topic updates


Updated: 03/27/12 - Updated video to show changes made since original posting. The characters reveal a little bit more of their personalities!


Story: |||||||||||||||||||| 90%

Battle System: |||||||||||||||||||| 50%

Mapping: |||||||||||||||||||| 25%


Looking For: Parallax Mapper, Assistant Story and Battle Designer


#10 Ehren Rivers

Ehren Rivers

    Advanced Member

  • Ace Member
  • 152 posts
  • LocationEugene, Oregon [USA]
  • RM Skill - Writer

Posted 04 April 2012 - 12:58 AM

All right, I seem to be having some troubles. I installed VAB and set up my animations, but I don't seem to be appearing in a sideview in actual battle. Instead, it's normal Yanfly fighting and my Scorpion enemy keeps jumping off the top left corner of the screen to attack! Obviously I've done something wrong, or there must be a step I missed. Does the order of the scripts matter? As in, should the Victor Engine be ABOVE the Yanfly Engine?

Well actually, now that I've test it, it seems the Victor Engine will crash if it's placed above the Yanfly Core script. However, whether I placed VE above or below the Yanfly Battle, I still get the same screen. Are the systems somehow incompatible with each other, or is there a specific script that can be removed to fix this? I'm currently using the entire Yanfly Engine, and there are a lot of things (like Elemental Damage popups) which appear to NEED Yanfly's battle script.

Edited by Ehren Rivers, 04 April 2012 - 01:03 AM.


#11 Rafael Black

Rafael Black

    The Azure Cat

  • Ace Member
  • 37 posts
  • LocationIn the Middle of Nowhere
  • RM Skill - Jack of All Trades

Posted 04 April 2012 - 08:23 AM

@Ehren Rivers
you need to download the Yanfly Patch on Victor Sant's website.
Anyhow, I'm having a problem here. I have no experience in these kinds of complex things, but I want to learn. I need to destroy this laziness of mine.
These are my current Sprite settings

  VE_SPRITE_SETTINGS = {
  # 'Filename' => {settings},
  #
  # 'Sample 1' => {frames: 4, rows: 14, mirror: true, mode: :charset,
  #                action: charset},
    '$rafael' => {frames: 3, rows: 4, mirror: true, invert: false,
                   mode: :charset, action: :charset},
  # 'Sample 3' => {frames: 3, rows: 4, mirror: false, invert: false,
  #                mode: :charset, action: :kaduki},
    'Scorpion'  => {frames: 4, rows: 14, mirror: true, mode: :sprite,
                    action: nil},
    'Warrior_m' => {frames: 4, rows: 14, mirror: false, mode: :sprite,
                    action: :default},
    '$Enemy'  => {frames: 1, rows: 1, mirror: true, invert: true,
                    mode: :charset, action: :charset},
    '$Actor4'   => {frames: 3, rows: 4, mirror: true, invert: false,
                    mode: :charset, action: :kaduki},

I want the enemy to be a charset as well. In my Actors tab, Rafael has a battler notetag indicated: <battler name: $rafael> and I also have both charsets on Characters and Battlers folder.
I did so for another sprite, but I want him to be my enemy. I tried putting :<battler name: $Enemy> on the notetag as well, under the Enemies tab. So I made an event, Enemy on the map. I started next to him and wanted to fight him. So after I start the battle, this error comes out:
Script 'Victor Animated Battle' Line 3646: NoMethodError occured.
undefined method 'hidden?' for nil:NilClass.

Sorry, I'm a total noob at this.

#12 N B

N B

    Someone Mysterious

  • Ace Member
  • 1 posts
  • RM Skill - Jack of All Trades

Posted 04 April 2012 - 08:23 AM

Victor's blog has a patch for Yanfly's scripts here. Get it and arrange your custom scripts as follows:

[All Victor Scripts]

[All Yanfly Scripts]

[Victor's Yanfly Patch]

That should work.

#13 Lyson

Lyson

    Resident Victor Animated Battlers expert.

  • Ace Member
  • 102 posts
  • RM Skill - Designer

Posted 04 April 2012 - 09:05 AM

@ Rafael - I'll try to answer your question, but I'm at work right now and subsequently can't look at the program or the script. But hopefully this will help you out.

If you look at my original post, you'll see that I'm using a hornet as an enemy, and it's being represented on the screen by a character set. So for yours, you would need to define it in the script similarly to mine, with both mode and action as :charset.

The next thing you need to do is make sure the graphic for that characterset is in both your Charsets folder and your Battlers folder.

After that, you still need to set up the Enemy information in the Database, like you would if you were doing an enemy without any special battle scripts.

And of course, you still need to set up the Troop information, and manuever the position of your enemy to where you want it to appear on the field.

There's no need to define the battler graphic for you enemy in the note tag, because you're already doing that in both the database and the script.

Hope this helps. If you still can't figure it out, I'll try to go into more depth when I get home from work.

Posted Image


Erythia: Shattered Dreams - Coming Soon -

Link to E:SD development page: http://whispersofete....wordpress.com/

---

Erythia: Shattered Dreams development topic updates


Updated: 03/27/12 - Updated video to show changes made since original posting. The characters reveal a little bit more of their personalities!


Story: |||||||||||||||||||| 90%

Battle System: |||||||||||||||||||| 50%

Mapping: |||||||||||||||||||| 25%


Looking For: Parallax Mapper, Assistant Story and Battle Designer


#14 Ehren Rivers

Ehren Rivers

    Advanced Member

  • Ace Member
  • 152 posts
  • LocationEugene, Oregon [USA]
  • RM Skill - Writer

Posted 04 April 2012 - 02:03 PM

Welp, I went and tried what you suggested. However, it doesn't appear to have worked at all. I apparently already had the patch, albeit in the wrong place, and when I put everything in the proper order the battle system still didn't change. Moreover, I noticed the the Mirror and Invert commands seem to be doing absolutely nothing when I change them. I decided to add Victor's Actor Battlers just in case it was required and he forgot to mention it, but all it does is make my character's charset appear underneath the command windows, facing upwards toward the monster. You can't even see it except when you click the window and it briefly disappears. I'm rather frustrated with this, I don't understand what I'm doing wrong. I've followed every set of instructions I can find to the letter.

#15 Lyson

Lyson

    Resident Victor Animated Battlers expert.

  • Ace Member
  • 102 posts
  • RM Skill - Designer

Posted 04 April 2012 - 02:07 PM

Well, I will clarify something for you: Victor's Actor Battlers is REQUIRED for showing and animating your playable party on the screen.

I'm still at work, but if you would paste here or PM your version of the script, I can try to get your problem figured out.

EDIT:

I was reading your post pretty fast, and I noticed you said your characters are appearing under the command window. That means Actor Battlers IS working, but you have to go into the script and find the line that says:

VE_BATTLE_FORMATION = :front

and change it to

VE_BATTLE_FORMATION = :side

that should help you with that issue

Edited by Lyson, 04 April 2012 - 02:14 PM.

Posted Image


Erythia: Shattered Dreams - Coming Soon -

Link to E:SD development page: http://whispersofete....wordpress.com/

---

Erythia: Shattered Dreams development topic updates


Updated: 03/27/12 - Updated video to show changes made since original posting. The characters reveal a little bit more of their personalities!


Story: |||||||||||||||||||| 90%

Battle System: |||||||||||||||||||| 50%

Mapping: |||||||||||||||||||| 25%


Looking For: Parallax Mapper, Assistant Story and Battle Designer


#16 Ehren Rivers

Ehren Rivers

    Advanced Member

  • Ace Member
  • 152 posts
  • LocationEugene, Oregon [USA]
  • RM Skill - Writer

Posted 04 April 2012 - 02:19 PM

Well, I just figured out what was wrong. In Actor Battlers there is a setting which changes which view you're using; The options are Front, Side, Isometric, and Custom. I had changed to side view, but I accidentally made side a comment (That is to say, #:side instead of :side) so it was still using front view. I hope that helps anybody else out who might goof up the same way.

This, my friends, is why every project should have a coder to explain things to you. :P Or at least someone familiar with the particular script you're using.

#17 Rafael Black

Rafael Black

    The Azure Cat

  • Ace Member
  • 37 posts
  • LocationIn the Middle of Nowhere
  • RM Skill - Jack of All Trades

Posted 05 April 2012 - 02:12 AM

As I said, this error comes out:

Script 'Victor Animated Battle' Line 3646: NoMethodError occured.
undefined method 'hidden?' for nil:NilClass.

Whatever I do, it persists. I've configured everything, my ACTOR, the enemy battler as well with the mode:charset and action:charset thing. The battle itself does not even start.

Edited by Rafael Black, 05 April 2012 - 02:14 AM.


#18 Ehren Rivers

Ehren Rivers

    Advanced Member

  • Ace Member
  • 152 posts
  • LocationEugene, Oregon [USA]
  • RM Skill - Writer

Posted 05 April 2012 - 03:14 AM

Hmm, well, I seem to have run into another funny little issue. These are best explained with the images below:
Posted Image
Posted Image
Posted Image
I've tried the image a number of different ways, including creating one row of nine frames, and attempted in both charset and sprite modes. In charset, no matter what format the image is in only that little blip appears. If I do it in sprite mode, the full image of whatever I used (like the last image above) appears in the screen in its entirety. This also occures regardless of whether invert/mirror are true or false. For reference, the below image is what the creature is supposed to look like animated.
Posted Image

#19 Lyson

Lyson

    Resident Victor Animated Battlers expert.

  • Ace Member
  • 102 posts
  • RM Skill - Designer

Posted 05 April 2012 - 07:09 AM

Well, off the top of my head, I can think of a few issues you may want to address to see if they are the problem.

First, are you trying to use the scorpion as a character set? Because if you are, it seems a little bigger than your standard character set. Try renaming the graphic file to $Scorpion. There's a reason why kaduki battlers and the default RTP BigMonster graphics have $ in front of their names, is all I'm saying.

And second, if you're trying to use it as a sprite, you need 2 copies of the image, the first one being your static image, and the second being the one with the [anim] tag. Either way, just have "Scorpion" isn't going to cut it.

Posted Image


Erythia: Shattered Dreams - Coming Soon -

Link to E:SD development page: http://whispersofete....wordpress.com/

---

Erythia: Shattered Dreams development topic updates


Updated: 03/27/12 - Updated video to show changes made since original posting. The characters reveal a little bit more of their personalities!


Story: |||||||||||||||||||| 90%

Battle System: |||||||||||||||||||| 50%

Mapping: |||||||||||||||||||| 25%


Looking For: Parallax Mapper, Assistant Story and Battle Designer


#20 Lyson

Lyson

    Resident Victor Animated Battlers expert.

  • Ace Member
  • 102 posts
  • RM Skill - Designer

Posted 05 April 2012 - 11:01 AM

As I said, this error comes out:

Script 'Victor Animated Battle' Line 3646: NoMethodError occured.
undefined method 'hidden?' for nil:NilClass.

Whatever I do, it persists. I've configured everything, my ACTOR, the enemy battler as well with the mode:charset and action:charset thing. The battle itself does not even start.


Before I address your issue, I have to stress:

I am in no means a scripter. The only thing I can do is look at the line of code that your error points to and speculate.

That being said,

  def pose_exist?(pose, note = "")
    value  = "ACTION: #{make_string(pose)}"
    regexp = /<#{value}(?<img src='http://www.rpgmakervxace.net/public/style_emoticons/<#EMO_DIR#>/sad.png' class='bbc_emoticon' alt=':(' />?: *, *[\w ]+)+)?>(?:[^<]|<[^\/])*<\/ACTION>/im
    get_all_poses(note) =~ regexp
  end

is the section of the script is that is giving you an error. Like I said, I can't read code very well, but it looks like to me that you've put in a pose: somewhere incorrectly.

If I were you, I'd go back and look back at all your poses. make sure they start with pose: and end in a ;

Posted Image


Erythia: Shattered Dreams - Coming Soon -

Link to E:SD development page: http://whispersofete....wordpress.com/

---

Erythia: Shattered Dreams development topic updates


Updated: 03/27/12 - Updated video to show changes made since original posting. The characters reveal a little bit more of their personalities!


Story: |||||||||||||||||||| 90%

Battle System: |||||||||||||||||||| 50%

Mapping: |||||||||||||||||||| 25%


Looking For: Parallax Mapper, Assistant Story and Battle Designer





1 user(s) are reading this topic

1 members, 0 guests, 0 anonymous users