Could someone explain this script for me? Victor Character Control

jimfalcon

Veteran
Veteran
Joined
Oct 14, 2013
Messages
44
Reaction score
2
Primarily Uses
Victor Sant is undoubtedly good with scripts, but I think he explains things as if everyone is just as good as he is.

This is his Character Control Script, it's supposed to make it so that when your character runs, walks, or is idle you can have an animation trigger for each event. This is exactly what I've been looking for, and I hope that maybe this post helps others. 

When you're walking, a specific sprite sheet with walking animations will trigger. When running, a sprite sheet with running animations will trigger, etc. At least I think that's how it works.

I've tried asking victor himself for clarifications, but it's as if he's insulted that I cant understand using only his instructions, which is ridiculous. 

What I'm pretty much wondering is, after you make the running, walking and idle sprite sheets, how in the world do you enable them in game? The only thing that makes sense to me here is adding the [wlk] suffix and the like to your sprite sheet name. That makes sense, but I know that I need to do more to activate them.

Can anyone give me some step by step instructions like: After you make your sprite sheets, do this/enable this/type this, whatever. If anyone can take the time to do this thank you so much. 

Here it is.   

#==============================================================================# ** Victor Engine - Character Control

#------------------------------------------------------------------------------

# Author : Victor Sant

#

# Version History:

#  v 1.00 - 2012.01.04 > First release

#  v 1.01 - 2012.01.07 > Added Compatibility with Visual Equipment

#  v 1.02 - 2012.01.14 > Fixed the positive sign on some Regular Expressions

#  v 1.03 - 2012.01.15 > Fixed the Regular Expressions problem with "" and “”

#  v 1.04 - 2012.07.25 > Fixed Compatibility with Visual Equipment and

#                      > Diagonal Movement

#  v 1.05 - 2012.08.02 > Compatibility with Basic Module 1.27

#------------------------------------------------------------------------------

#  This script allows to control character chaset animations. You can set

# different graphis for walking, dashing and jumping, also you can display

# pose animations with simple comment call. This allows to animate characters

# on the map without the need of long Move Route event commands.

#------------------------------------------------------------------------------

# Compatibility

#   Requires the script 'Victor Engine - Basic Module' v 1.27 or higher

#   If used with 'Victor Engine - Multi Frames' place this bellow it.

#   If used with 'Victor Engine - Visual Equip' place this bellow it.

#   If used with 'Victor Engine - Diagonal Movement' place this bellow it.

#

# * Overwrite methods

#   class Game_CharacterBase

#     def update_animation

#

# * Alias methods

#   class Game_CharacterBase

#     def update_animation

#     def init_public_members

#     def init_private_members

#     def update_anime_count

#     def update_anime_pattern

#     def move_straight(d, turn_ok = true)

#     def move_diagonal(horz, vert)

#     def update_move

#     def update_jump

#     def update_stop

#

#   class Game_Interpreter

#     def comment_call

#

#   class Sprite_Character < Sprite_Base

#     def graphic_changed?

#     def update_character_info

#     def set_bitmap_name

#     def set_bitmap_position

#

#------------------------------------------------------------------------------

# Comment calls note tags:

#  Tags to be used in events comment box, works like a script call.

#

#  <actor change pose>      <event change pose>

#  settings                 settings    

#  </actor change pose>     </event change pose>

#   Display a custom pose, the pose overide any other pose being currently

#   played, add the following values to the settings. The ID must be added, 

#   other values are optional. 

#     id: x     : actor index or event ID

#     name: "x" : pose sufix name. ("sufix")

#     loop      : pose animation loop, if added the pose will repeat.

#     lock      : position lock, can't move while playing the pose.

#     walk      : walking pose, if not set the pose will stop if walk.

#     speed: x  : pose animation speed, higher values makes the animation slow.

#     frame: x  : number of frams, can't exceed the max frames of the charset.

#

#  <actor add pose>      <event add pose>

#  settings              settings    

#  </actor add pose>     </event add pose>

#   Display a custom pose, the pose won't be displayed immediately, if there is

#   another pose being displayed, it will wait it finish before, you can

#   add multiple poses at once to make a long animation, add the following

#   values to the settings. The ID must be added, other values are optional. 

#     id: x     : actor index or event ID

#     name: "x" : pose sufix name. ("sufix")

#     loop      : pose animation loop, if added the pose will repeat.

#     lock      : position lock, can't move while playing the pose.

#     walk      : walking pose, if not set the pose will stop if walk.

#     speed: x  : pose animation speed, higher values makes the animation slow.

#     frame: x  : number of frams, can't exceed the max frames of the charset.

#

#  <actor idle stance i: "x">   <event idle stance i: "x">

#  <actor walk stance i: "x">   <event walk stance i: "x">

#  <actor dash stance i: "x">   <event dash stance i: "x">

#  <actor jump stance i: "x">   <event jump stance i: "x">

#   Change the stance for one of the default pose for the actor or event.

#     i : actor index or event ID

#     x : pose sufix name ("sufix")

#

#  <actor clear stances: i>   <event clear stances: i>

#   Clear all changed stances for the actor or event

#     i : actor index or event ID

#

#  <actor clear pose: i>   <event clear pose: i>

#   Clear halts the current pose exhibition and clear all pose waiting to be

#   played.

#     i : actor index or event ID

#

#------------------------------------------------------------------------------

# Additional instructions:

#  

#  To properly display the poses you will need a character with the poses.

#  You will need to make a new charset, with the same filename + the sufix.

#

#  So if you have a chaset named "Actor1", you will need a charset named

#  "Actor1[wlk]" (or whatever you set as the Walk sufix) if you want

#  a custom walking pose.

#

#  If a pose graphic don't exist, it will use the default graphic.



#  If you make a pose loops, it will be displayed continuously until something

#  force it to stop. It may be a movement (only if the settings doesn't include

#  the 'walk' option), a pose change, or clear pose.

#

#  Due to the animated frame, the charset may be off the tile center, you

#  can solve that by adding [x*] or [y*] to the filename, where * is a number

#  positive or negative,that way the position will be adjusted. it must be

#  added before any other sufix

#

#  if used with 'Victor Engine - Diagonal Movement' the diagonal movement

#  sufix must come before the pose sufix.

#

#  The general order for the sufixes is: filename[x*][y*][diag][pose]

#

#==============================================================================

 

#==============================================================================

# ** Victor Engine

#------------------------------------------------------------------------------

#   Setting module for the Victor Engine

#==============================================================================

 

module Victor_Engine

  #--------------------------------------------------------------------------

  # * Default waling pose sufix

  #--------------------------------------------------------------------------

  VE_DEFAULT_WALK_SUFIX = "[wlk]"

  #--------------------------------------------------------------------------

  # * Default dashing pose sufix

  #--------------------------------------------------------------------------

  VE_DEFAULT_DASH_SUFIX = "[dsh]"

  #--------------------------------------------------------------------------

  # * Default jumping pose sufix

  #--------------------------------------------------------------------------

  VE_DEFAULT_JUMP_SUFIX = "[jmp]"

  #--------------------------------------------------------------------------

  # * required

  #   This method checks for the existance of the basic module and other

  #   VE scripts required for this script to work, don't edit this

  #--------------------------------------------------------------------------

  def self.required(name, req, version, type = nil)

    if !$imported[:ve_basic_module]

      msg = "The script '%s' requires the script\n"

      msg += "'VE - Basic Module' v%s or higher above it to work properly\n"

      msg += "Go to http://victorscripts.wordpress.com/ to download this script."

      msgbox(sprintf(msg, self.script_name(name), version))

      exit

    else

      self.required_script(name, req, version, type)

    end

  end

  #--------------------------------------------------------------------------

  # * script_name

  #   Get the script name base on the imported value, don't edit this

  #--------------------------------------------------------------------------

  def self.script_name(name, ext = "VE")

    name = name.to_s.gsub("_", " ").upcase.split

    name.collect! {|char| char == ext ? "#{char} -" : char.capitalize }

    name.join(" ")

  end

end

 

$imported ||= {}

$imported[:ve_character_control] = 1.05

Victor_Engine.required:)ve_character_control, :ve_basic_module, 1.27, :above)

 

#==============================================================================

# ** Game_CharacterBase

#------------------------------------------------------------------------------

#  This class deals with characters. Common to all characters, stores basic

# data, such as coordinates and graphics. It's used as a superclass of the

# Game_Character class.

#==============================================================================

 

class Game_CharacterBase

  #--------------------------------------------------------------------------

  # * Public Instance Variables

  #--------------------------------------------------------------------------

  attr_reader   :pose_sufix

  attr_accessor :pose_list

  attr_accessor :idle_stance

  attr_accessor :walk_stance

  attr_accessor :dash_stance

  attr_accessor :jump_stance

  #--------------------------------------------------------------------------

  # * Overwrite method: update_animation

  #--------------------------------------------------------------------------

  def update_animation

    update_anime_count

    if (@pose_speed != 0 && @anime_count > @pose_speed) ||

       (@pose_speed == 0 && @anime_count > 18 - real_move_speed * 2)

      update_anime_pattern

      @anime_count = 0

      change_pose(idle_stance) if @pattern == 0 && @playing_pose && !@pose_loop

    end

  end

  #--------------------------------------------------------------------------

  # * Alias method: init_public_members

  #--------------------------------------------------------------------------

  alias :init_public_members_ve_character_control :init_public_members

  def init_public_members

    init_public_members_ve_character_control

    @pose_list  = []

    @pose_sufix = ""

    clear_stances

  end

  #--------------------------------------------------------------------------

  # * Alias method: init_private_members

  #--------------------------------------------------------------------------

  alias :init_private_members_ve_character_control :init_private_members

  def init_private_members

    init_private_members_ve_character_control

    change_pose(idle_stance)

  end

  #--------------------------------------------------------------------------

  # * Alias method: update_anime_count

  #--------------------------------------------------------------------------

  alias :update_anime_count_ve_character_control :update_anime_count

  def update_anime_count

    if @playing_pose

      @anime_count += 1.5

    else

      update_anime_count_ve_character_control

    end

  end

  #--------------------------------------------------------------------------

  # * Alias method: update_anime_pattern

  #--------------------------------------------------------------------------

  alias :update_anime_pattern_ve_character_control :update_anime_pattern

  def update_anime_pattern

    if @playing_pose

      @pattern = (@pattern + 1) % [frames, @pose_frame].min

    else

      update_anime_pattern_ve_character_control

    end

  end

  #--------------------------------------------------------------------------

  # * Alias method: move_straight

  #--------------------------------------------------------------------------

  alias :move_straight_ve_character_control :move_straight

  def move_straight(d, turn_ok = true)

    return if @pose_lock

    move_straight_ve_character_control(d, turn_ok)

    set_fixed_direction if @pose_direction

  end

  #--------------------------------------------------------------------------

  # * Alias method: move_diagonal

  #--------------------------------------------------------------------------

  alias :move_diagonal_ve_character_control :move_diagonal

  def move_diagonal(horz, vert)

    return if @pose_lock

    move_diagonal_ve_character_control(horz, vert)

    set_fixed_direction if @pose_direction

  end

  #--------------------------------------------------------------------------

  # * Alias method: update_move

  #--------------------------------------------------------------------------

  alias :update_move_ve_character_control :update_move

  def update_move

    moving_pose

    update_move_ve_character_control

  end

  #--------------------------------------------------------------------------

  # * Alias method: update_jump

  #--------------------------------------------------------------------------

  alias :update_jump_ve_character_control :update_jump

  def update_jump

    jumping_pose

    update_jump_ve_character_control

  end

  #--------------------------------------------------------------------------

  # * Alias method: update_stop

  #--------------------------------------------------------------------------

  alias :update_stop_ve_character_control :update_stop

  def update_stop

    update_stop_ve_character_control

    resting_pose

  end

  #--------------------------------------------------------------------------

  # * New method: resting_pose

  #--------------------------------------------------------------------------

  def resting_pose

    return if @stop_count <= 1 || @playing_pose

    change_pose(idle_stance) if pose_sufix != idle_stance

  end

  #--------------------------------------------------------------------------

  # * New method: jumping_pose

  #--------------------------------------------------------------------------

  def jumping_pose

    return if @pose_lock || @pose_walk

    change_pose(jump_stance) if pose_sufix != jump_stance

  end

  #--------------------------------------------------------------------------

  # * New method: moving_pose

  #--------------------------------------------------------------------------

  def moving_pose

    return if @pose_lock || @pose_walk

    @pose_list.clear

    change_pose(walk_stance) if pose_sufix != walk_stance && !dash?

    change_pose(dash_stance) if pose_sufix != dash_stance && dash?

  end

  #--------------------------------------------------------------------------

  # * New method: change_pose

  #--------------------------------------------------------------------------

  def change_pose(sufix)

    @playing_pose = false 

    reset_fixed_pose if @pose_direction

    value = {sufix: sufix, anim: 0, speed: 0, frame: frames}

    update_pose(value)

  end

  #--------------------------------------------------------------------------

  # * New method: reset_pose_index

  #--------------------------------------------------------------------------

  def reset_pose_index

    @character_index = @real_index

    @pose_index = nil

  end

  #--------------------------------------------------------------------------

  # * New method: reset_fixed_pose

  #--------------------------------------------------------------------------

  def reset_fixed_pose

    @direction = @real_direction

    @diagonal  = @real_diagonal if $imported[:ve_diagonal_move]

    @current_direction = @direction - 2 if $imported[:ve_roatation_turn]

    @final_direction   = @direction - 2 if $imported[:ve_roatation_turn]

    update_direction if $imported[:ve_roatation_turn]

    @pose_direction = nil

  end

  #--------------------------------------------------------------------------

  # * New method: update_pose

  #--------------------------------------------------------------------------

  def update_pose(pose = default_pose.dup)

    pose = get_next_pose(pose)

    @pose_sufix = pose[:sufix]

    @pose_speed = pose[:speed]

    @pose_frame = pose[:frame]

    @pose_walk  = pose[:walk]

    @pose_loop  = pose[:loop]

    @pose_lock  = pose[:lock] && @playing_pose

    @pose_direction = pose[:line] * 2 if pose[:line]

    @real_direction = @direction

    @real_diagonal  = @diagonal if $imported[:ve_diagonal_move]

    @anime_count    = 0 unless move_pose?

    @pattern        = @playing_pose ? 0 : @original_pattern

    set_fixed_direction if @pose_direction

  end

  #--------------------------------------------------------------------------

  # * New method: set_fixed_direction

  #--------------------------------------------------------------------------

  def set_fixed_direction

    @direction = @pose_direction

    @diagonal  = 0 if $imported[:ve_diagonal_move]

    @current_direction = @direction - 2 if $imported[:ve_roatation_turn]

    @final_direction   = @direction - 2 if $imported[:ve_roatation_turn]

  end

  #--------------------------------------------------------------------------

  # * New method: get_next_pose

  #--------------------------------------------------------------------------

  def get_next_pose(pose)

    if pose == default_pose && !@pose_list.empty?

      pose = @pose_list.shift

      @playing_pose = true

    end

    pose

  end

  #--------------------------------------------------------------------------

  # * New method: move_pose?

  #--------------------------------------------------------------------------

  def move_pose?

    [walk_stance, dash_stance, jump_stance].include?(pose_sufix)

  end

  #--------------------------------------------------------------------------

  # * New method: default_pose

  #--------------------------------------------------------------------------

  def default_pose

    {sufix: @idle_stance, anim: 0, speed: 0, frame: frames}

  end

  #--------------------------------------------------------------------------

  # * New method: start_pose

  #--------------------------------------------------------------------------

  def start_pose(pose)

    clear_poses

    @pose_list.push(pose)

    update_pose

  end 

  #--------------------------------------------------------------------------

  # * New method: add_pose

  #--------------------------------------------------------------------------

  def add_pose(pose)

    @pose_list.push(pose)

    update_pose unless @playing_pose

  end

  #--------------------------------------------------------------------------

  # * New method: clear_poses

  #--------------------------------------------------------------------------

  def clear_poses

    @pose_list.clear

    change_pose(idle_stance)

  end

  #--------------------------------------------------------------------------

  # * New method: clear_stances

  #--------------------------------------------------------------------------

  def clear_stances

    @idle_stance = ""

    @walk_stance = VE_DEFAULT_WALK_SUFIX

    @dash_stance = VE_DEFAULT_DASH_SUFIX

    @jump_stance = VE_DEFAULT_JUMP_SUFIX

  end

end

 

#==============================================================================

# ** Game_Interpreter

#------------------------------------------------------------------------------

#  An interpreter for executing event commands. This class is used within the

# Game_Map, Game_Troop, and Game_Event classes.

#==============================================================================

 

class Game_Interpreter

  #--------------------------------------------------------------------------

  # * Alias method: comment_call

  #--------------------------------------------------------------------------

  alias :comment_call_ve_character_control :comment_call

  def comment_call

    call_clear_pose("EVENT")

    call_clear_pose("ACTOR")

    call_change_stance("EVENT")

    call_change_stance("ACTOR")

    call_change_pose("EVENT", "ADD POSE")

    call_change_pose("ACTOR", "ADD POSE")

    call_change_pose("EVENT", "CHANGE POSE")

    call_change_pose("ACTOR", "CHANGE POSE")

    comment_call_ve_character_control

  end

  #--------------------------------------------------------------------------

  # * New method: call_clear_pose

  #--------------------------------------------------------------------------

  def call_clear_pose(type)

    note.scan(/<#{type} CLEAR POSE: (\d+)>/i) do

      subject = $game_map.events[$1.to_i] if type == "EVENT"

      subject = $game_map.actors[$1.to_i] if type == "ACTOR"

      next unless subject

      subject.clear_poses

    end

  end

  #--------------------------------------------------------------------------

  # * New method: call_clear_stances

  #--------------------------------------------------------------------------

  def call_clear_stances(type)

    note.scan(/<#{type} CLEAR STANCES: (\d+)>/i) do

      subject = $game_map.events[$1.to_i] if type == "EVENT"

      subject = $game_map.actors[$1.to_i] if type == "ACTOR"

      next unless subject

      subject.clear_stances

    end

  end

  #--------------------------------------------------------------------------

  # * New method: call_change_stance

  #--------------------------------------------------------------------------

  def call_change_stance(type)

    regexp = /<#{type} (\w+) STANCE (\d+): #{get_filename}>/i

    note.scan(regexp) do |move, id, value|

      subject = $game_map.events[id.to_i] if type == "EVENT"

      subject = $game_map.actors[id.to_i] if type == "ACTOR"

      next unless subject

      subject.idle_stance = value if move.upcase == "IDLE"

      subject.walk_stance = value if move.upcase == "WALK"

      subject.dash_stance = value if move.upcase == "DASH"

      subject.jump_stance = value if move.upcase == "JUMP"

    end

  end

  #--------------------------------------------------------------------------

  # * New method: call_change_pose

  #--------------------------------------------------------------------------

  def call_change_pose(type, add)

    note.scan(get_all_values("#{type} #{add}")) do

      value = $1.dup

      if value =~ /ID: (\d+)/i

        subject = $game_map.events[$1.to_i] if type == "EVENT"

        subject = $game_map.actors[$1.to_i] if type == "ACTOR"

        next unless subject

        stance = subject.idle_stance

        pose   = {}

        pose[:sufix] = value =~ /NAME: #{get_filename}/i ? $1 : stance

        pose[:loop]  = value =~ /LOOP/i

        pose[:lock]  = value =~ /LOCK/i

        pose[:walk]  = value =~ /WALK/i

        pose[:speed] = value =~ /SPEED: (\d+)/i   ? $1.to_i : 0

        pose[:line]  = value =~ /LINE: ([1234])/i ? $1.to_i : nil

        pose[:frame] = value =~ /FRAMES: (\d+)/i  ? $1.to_i : subject.frames

        subject.start_pose(pose) if add.upcase == "CHANGE POSE"

        subject.add_pose(pose)   if add.upcase == "ADD POSE"

      end

    end

  end

end

 

#==============================================================================

# ** Sprite_Character

#------------------------------------------------------------------------------

#  This sprite is used to display characters. It observes a instance of the

# Game_Character class and automatically changes sprite conditions.

#==============================================================================

 

class Sprite_Character < Sprite_Base

  #--------------------------------------------------------------------------

  # * Alias method: graphic_changed?

  #--------------------------------------------------------------------------

  alias :graphic_changed_ve_character_control? :graphic_changed?

  def graphic_changed?

    graphic_changed_ve_character_control? ||

    @pose_sufix != @character.pose_sufix

  end

  #--------------------------------------------------------------------------

  # * Alias method: update_character_info

  #--------------------------------------------------------------------------

  alias :update_character_info_ve_character_control :update_character_info

  def update_character_info

    update_character_info_ve_character_control

    @pose_sufix = @character.pose_sufix

  end

  #--------------------------------------------------------------------------

  # * Alias method: set_bitmap_name

  #--------------------------------------------------------------------------

  alias :set_bitmap_name_ve_character_control :set_bitmap_name

  def set_bitmap_name

    sufix = ($imported[:ve_diagonal_move] ? diagonal_sufix : "") + @pose_sufix

    if $imported[:ve_visual_equip]

      return set_bitmap_name_ve_character_control

    elsif character_exist?(@character_name + sufix)

      return @character_name + sufix

    elsif character_exist?(@character_name + @pose_sufix)

      return @character_name + @pose_sufix

    else

      return set_bitmap_name_ve_character_control

    end

  end

  #--------------------------------------------------------------------------

  # * Alias method: set_bitmap_position

  #--------------------------------------------------------------------------

  alias :set_bitmap_position_ve_character_control :set_bitmap_position

  def set_bitmap_position

    set_bitmap_position_ve_character_control

    self.ox -= (@character_name[/\[x([+-]?\d+)\]/i] ? $1.to_i : 0)

    self.oy -= (@character_name[/\[y([+-]?\d+)\]/i] ? $1.to_i : 0)

  end

end

 

#==============================================================================

# ** Window_Base

#------------------------------------------------------------------------------

#  This is a superclass of all windows in the game.

#==============================================================================

 

class Window_Base < Window

  #--------------------------------------------------------------------------

  # * Alias method: draw_character

  #--------------------------------------------------------------------------

  alias :draw_character_ve_character_control :draw_character

  def draw_character(character_name, character_index, x, y, parts = nil)

    return unless character_name

    x += (character_name[/\[x([+-]?\d+)\]/i] ? $1.to_i : 0)

    y += (character_name[/\[y([+-]?\d+)\]/i] ? $1.to_i : 0)

    args = [character_name, character_index, x, y]

    args.push(parts) if $imported[:ve_visual_equip]

    draw_character_ve_character_control(*args)

  end

end
 

 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
There's nothing more to do with the walk, dash and jump codes. You just add the suffix to it in this format:

spritesheetname[suffix].png

so if your character is

$mainhero.png

then its
$mainhero[dsh].png  or $mainhero[wlk].png

for I'm not sure about idle as I don't use it. I believe there is no default prefix for it so you'll have to make your own. Just use [idle] all the time. After you make that one, you'd have to use a comment call to set it as their idle stance.

<actor idle stance 0: "idle">

for that actors ID. Play around with the ID, his scripts either start at 0 or 1 for the ID, It's hit or miss with his scripts.
 

jimfalcon

Veteran
Veteran
Joined
Oct 14, 2013
Messages
44
Reaction score
2
Primarily Uses
Thanks for moving this thread, after I posted it I saw the sticky saying it was for completed scripts only  :distrust:

Thanks Donn. I'm wondering though, every time I assign a spritesheet to a character I have to goto Database>Actor> click on Graphic and assign a spritesheet. How will this work with multiple spritesheets?
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
What do you mean? Are you going to be changing how the actor looks all the time? In that case you'd just make versions of those in the Character folder with the same suffixes as the first one.
 

jimfalcon

Veteran
Veteran
Joined
Oct 14, 2013
Messages
44
Reaction score
2
Primarily Uses
What I mean is this.

You know how when you assign sprite sheets you have to go into Database, click on the actor graphic box?

Then you select a (one) sprite sheet for use with the actor.

Now if I am going to use victor's script, I will be using not one but about three sprite sheets: a walking sprite sheet, a running sprite sheet, and maybe an idle sprite sheet.

I'm wondering this, if you only select one sprite sheet in RPG maker, how are the others supposed to activate when the corresponding movements are triggered? If I have three sprite sheets named Actor[wlk], Actor[dsh], Actor[idle], which one do I select in the graphic box? Do I just select a random one and the script will automatically link the rest together? Do I just select Actor[wlk], and expect Actor[dsh] to be displayed when I'm dashing in game? Do you group them together in the same folder or something?



I'm reading the script up and down... all it says is that "you can set different graphics for walking running", etc. But that's it, and aside from adding suffixes to sprite sheets it gives no other details about how everything will tie together, unless its in the script code that I can't understand yet. 

Thanks for your time. I swear if I ever learn to script I'm going to write paragraphs full of detailed instructions for people.
 
Last edited by a moderator:

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
That's what the script is for, it does the switching for you. You just make sure that the spritesheets have the same name before the suffixes. So you have the default one set as their sprite, and the rest will be activated at the right times by the script.

Just make sure they're all in the Character folder. For the idle stance, look at my instructions from before. I believe you have to set it before it ever triggers.
 

jimfalcon

Veteran
Veteran
Joined
Oct 14, 2013
Messages
44
Reaction score
2
Primarily Uses
Okay then.

So, I've never used comment calls before (learning from the ground up here). What are they and where do you enter them? Gonna continue the rpgmaker tutorial today, the events section is next.
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
ah I see. comment calls are specific to certain scripts, not all of them use it, but victor uses them all the time. It works the same as a script call. Basically, the script is giving you extra event commands by using comments. In this case, you type in what I had in arrow brackets in a Comment and when the event is activated and gets to that action, it will activate however the script intends to.
 

jimfalcon

Veteran
Veteran
Joined
Oct 14, 2013
Messages
44
Reaction score
2
Primarily Uses
Where exactly do I type a comment call? In victor's script? Somewhere else? I mean it when I say I don't know anything about the structure of RGSS3's scripts. I won't be offended if you say things like. "open this tab and type this here," I need that type of detail. 

On that note do you know of any good scripting tutorials? RPG Maker VX ACe uses the Ruby scripting language right? How did you, and whoever else reading this, learn to script?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
There is a comment in the event commands list. At the bottom of the first column of the first tab.
 

jimfalcon

Veteran
Veteran
Joined
Oct 14, 2013
Messages
44
Reaction score
2
Primarily Uses
Could you start from the beginning? Thanks for bearing with me.

When I open the program, where do I go from the main menu (yes, this is how new I am to the software).

I only have experience opening up the script editor, the resource manager, and the database. I don't know where the event commands list is.

Hah, I'm serious guys. I've only been messing with this software for a few weeks, and all I've done is create a parallax map, a new actor, copy and paste scripts into the script editor, and make some sprite sheets. that's all. 

One day I might be a pro and breeze through your explanations and maybe work with you to build upon them, but I'm a serious noob right now. 

From the main menu, what do I click on, where do I go? Assume that I don't what all the common terms mean as well.

If I read 'go to the event commands list' I'm going to open up rpg maker vx ace and search everything from File to Help because I don't know where to start.
 
Last edited by a moderator:

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
 I don't know where the event commands list is.
While you have event-mode on. (The one next to the Map button on the toolbar, or F6), double-click on any tile on your map to open it's window, and then double-click on a blank @> in the Content section (another window appears). Those are your three tabs worth of Event Commands.

The usage of this particular script says to write the specified command in an event Comment, which there is a button for that on the bottom of the first tab of events. (The previous posters already mentioned the specifics)
 
Last edited by a moderator:

jimfalcon

Veteran
Veteran
Joined
Oct 14, 2013
Messages
44
Reaction score
2
Primarily Uses
Thanks for your help kerbonklin.

Allright I clicked on a random tile in Event Mode, created a new comment with the comment call seita told me to use.

seita told me this: "for I'm not sure about idle as I don't use it. I believe there is no default prefix for it so you'll have to make your own. Just use [idle] all the time. After you make that one, you'd have to use a comment call to set it as their idle stance.

<actor idle stance 0: "idle">

The idle sprite didnt trigger though, I set the actor graphic to my walking animation because apparently it doesnt matter which sprite sheet you choose.. but when my character stands still it just shows the first frame of the walking animation, like a character paused mid walk.

This is what my comment call looks like 



I get the feeling that I need to do more than that. I also tried <actor idle stance 0:> with no success.

I keep looking over the instructions and I still think they are pretty much "after A comes D", instead of saying, "after A comes B, then C, and then D."

Comment calls note tags:#  Tags to be used in events comment box, works like a script call.

#

#  <actor change pose>      <event change pose>

#  settings                 settings    

#  </actor change pose>     </event change pose>

#   Display a custom pose, the pose overide any other pose being currently

#   played, add the following values to the settings. The ID must be added, 

#   other values are optional. 

#     id: x     : actor index or event ID

#     name: "x" : pose sufix name. ("sufix")

#     loop      : pose animation loop, if added the pose will repeat.

#     lock      : position lock, can't move while playing the pose.

#     walk      : walking pose, if not set the pose will stop if walk.

#     speed: x  : pose animation speed, higher values makes the animation slow.

#     frame: x  : number of frams, can't exceed the max frames of the charset.

#

#  <actor add pose>      <event add pose>

#  settings              settings    

#  </actor add pose>     </event add pose>

#   Display a custom pose, the pose won't be displayed immediately, if there is

#   another pose being displayed, it will wait it finish before, you can

#   add multiple poses at once to make a long animation, add the following

#   values to the settings. The ID must be added, other values are optional. 

#     id: x     : actor index or event ID

#     name: "x" : pose sufix name. ("sufix")

#     loop      : pose animation loop, if added the pose will repeat.

#     lock      : position lock, can't move while playing the pose.

#     walk      : walking pose, if not set the pose will stop if walk.

#     speed: x  : pose animation speed, higher values makes the animation slow.

#     frame: x  : number of frams, can't exceed the max frames of the charset.

#

#  <actor idle stance i: "x">   <event idle stance i: "x">

#  <actor walk stance i: "x">   <event walk stance i: "x">

#  <actor dash stance i: "x">   <event dash stance i: "x">

#  <actor jump stance i: "x">   <event jump stance i: "x">

#   Change the stance for one of the default pose for the actor or event.

#     i : actor index or event ID

#     x : pose sufix name ("sufix")

#

#  <actor clear stances: i>   <event clear stances: i>

#   Clear all changed stances for the actor or event

#     i : actor index or event ID

#

#  <actor clear pose: i>   <event clear pose: i>

#   Clear halts the current pose exhibition and clear all pose waiting to be

#   played.

#     i : actor index or event ID

#
 
Last edited by a moderator:

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Well since the event trigger (at the bottom) is set to Action Button, it won't trigger unless you press Z on it. Give the event some random NPC graphic and then talk to it.
 

jimfalcon

Veteran
Veteran
Joined
Oct 14, 2013
Messages
44
Reaction score
2
Primarily Uses
Oh, looks like action was set. hmm the npc just flinched when i activated it.. just changed a sprite frame for a split second.

Still brings me no closer to making this work.  Tried setting the trigger to parallel process with no result, tried setting it to autorun and my game would respond to any keyboard commands at all. 

 which brings up another question. Which trigger should I set it to? Seems like this is all bringing up more and more questions.

And when victor says "actor ID", what exactly does he mean?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This is a standard game term. In your actor's tab, the number to the left of the actor name in the list, is the actor id.
 

jimfalcon

Veteran
Veteran
Joined
Oct 14, 2013
Messages
44
Reaction score
2
Primarily Uses
Even using an actual correct actor ID it still isn't working.

Has anyone even ever used this script and gotten it to work?

I might just discard it, since so far no forum has been able to give me a straight working answer.

Hopefully I'll learn enough about scripting soon to be able to do this from the ground up. If and when I do I'll be sure to throw a dumptruck full of instructions in people's faces. Screw you arrogant scripters. 
 
Last edited by a moderator:

burntable

Veteran
Veteran
Joined
Oct 16, 2013
Messages
63
Reaction score
9
First Language
German
I don't know if you already figured it out or discarded it. But your idle pose = your normal charset.

So let's say you have a charset called $actor1.png, then this is also your charset for the idle pose. No need for a "$actor1[idle]" or any comment calls.

The only thing you have to do is, set an event on autostart at your start map.

Then create a moveroute -> target player and enable stepping animation.

After the moveroute command put a "erase event" command...

Even better: control self switch A and make a second tab with condition self switch A on (nothing else in it).

IdleAnimation.png
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top