Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Seph's Test Bed V.4

Status
Not open for further replies.
It isn't needed.


Like I said, if you want to save the current players location, just use an event with the script function I gave you first.


If you want to make it defined by you, use the second thing I gave you. That's it.
 

Juuhou

Sponsor

Is .4 almost ready for release? I want to use a few scripts that are in the beta but Im not sure if I should until .4 is official. :P

Reason for this is: The MACL that's in the test bed and the MACL thats stickied are 2 different scripts and they conflict with each other when placed in a certain order. Im using the TRTAB and it seems that there are errors with the party switcher script...T_T That wouldve been awesome. With so many scripts that are required for both things, the editor is a mess...:P I can easily try and fix taht but I just decided to say something. Im looking forward to seeing the test bed grow and grow..^_^
 
Once I update the SDK to 2.3 and MACL to 2.1 with Trickster, I will update this to V.4.

Unless I get this done tonight and tomorrow night though, it will be at least a week because I am going on vacation for a week. The good news is when I get back, I should have everything updated and just ready for Trickster to stamp it.
 
Hello Seph, i found this Multiple Animation script a while ago but i don't know how to use it can you help me explain it?
Thank you
Code:
#==============================================================================
# ** Multiple Animations
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1
# 2007-03-06
# SDK : Version 2.0, Part 1
#------------------------------------------------------------------------------
# * Version History :
#
#   Version 1 ---------------------------------------------------- (2007-03-06)
#------------------------------------------------------------------------------
# * Description :
#
#   This script was designed to show multiple animation sprites at the same 
#   time. When an animation sprite is created, it is immediately added to an 
#   array of animation sprites. From there, each animation sprite is handeled 
#   the same way the default animation sprite is handeled. This also delays 
#   animations to prevent multiple damages being displayed at once.
#------------------------------------------------------------------------------
# * Instructions :
#
#   Place The Script Below the SDK and Above Main.
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Multiple Animations', 'SephirothSpawn', 1, '2007-03-06')
SDK.check_requirements(2, [1])

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.enabled?('Multiple Animations')

#==============================================================================
# ** RPG::Sprite
#==============================================================================

class RPG::Sprite < ::Sprite
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  if @seph_multianim_stack.nil?
    alias_method :seph_multianim_rpgs_init, :initialize
    alias_method :seph_multianim_rpgs_disp, :dispose
    alias_method :seph_multianim_rpgs_updt, :update
    @seph_multianim_stack = true
  end
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(viewport = nil)
    # Original Initialization
    seph_multianim_rpgs_init(viewport)
    # Create Animation Sprite Array
    @_multi_animation_sprites  = []
    @_multi_animation_duration = []
    @_multi_animation_data     = [] 
    # Damage Delay Count
    @_animations_delay_count = 0
    @_animations_pops_coming = []
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    # Original Dispose
    seph_multianim_rpgs_disp
    # Pass Through Multi-Animations Sprites
    @_multi_animation_duration.size.times { dispose_multi_animations }
  end
  #--------------------------------------------------------------------------
  # * Dispose Multi Animations
  #--------------------------------------------------------------------------
  def dispose_multi_animations(index = 0)
    # Get Sprites
    sprites = @_multi_animation_sprites[index]
    # If Non-nil sprites
    unless sprites.nil?
      # Get First Sprite
      sprite = sprites[0]
      unless sprite.nil?
        @@_reference_count[sprite.bitmap] -= 1
        sprite.bitmap.dispose if @@_reference_count[sprite.bitmap] == 0
      end
      for sprite in sprites
        sprite.dispose
      end
      @_multi_animation_sprites[index] = nil
      @_multi_animation_duration[index] = 0
      @_multi_animation_data[index] = []
    end    
  end
  #--------------------------------------------------------------------------
  # * Animation
  #--------------------------------------------------------------------------
  def animation(animation, hit)
    # Adds Animation to Pop List
    unless animation.nil? && hit.nil?
      @_animations_pops_coming << [animation, hit]  
    end
    # Return If Animation Delay
    return if @_animations_delay_count > 0
    # Start Animation Count
    @_animations_delay_count = 8
    # Gets Pops Coming
    animation, hit = *@_animations_pops_coming.shift
    # Return if Nil Animation
    return if animation.nil?
    # Sets Animation & Hit Data
    @_multi_animation_data << [animation, hit]
    # Set Animation Duration
    @_multi_animation_duration << animation.frame_max
    # Create Sprites
    animation_name = animation.animation_name
    animation_hue = animation.animation_hue
    bitmap = RPG::Cache.animation(animation_name, animation_hue)
    @@_reference_count[bitmap] = 0 unless @@_reference_count.include?(bitmap)
    @@_reference_count[bitmap] += 1
    sprites = []
    if animation.position != 3 or not @@_animations.include?(animation)
      for i in 0..15
        sprite = ::Sprite.new(self.viewport)
        sprite.bitmap, sprite.visible = bitmap, false
        sprites.push(sprite)
      end
    end
    # Add Animation Sprites
    @_multi_animation_sprites << sprites
    # Update Multi Animation
    update_multi_animation(@_multi_animation_data.size - 1)
  end  
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # If Animation Delaying
    if @_animations_delay_count > 0
      @_animations_delay_count -= 1
    # If Animation Not Delaying
    else
      # If Animation Waiting to Be Popped
      if @_animations_pops_coming.size > 0
        # Create Animation Sprite
        animation(nil, nil)
      end
    end
    # Original Update
    seph_multianim_rpgs_updt
    # If Animation Sprites Exist & Frame Reset
    if @_multi_animation_duration.size > 0 && Graphics.frame_count % 2 == 0
      # Update Multi-animations
      update_multi_animations  
    end    
  end
  #--------------------------------------------------------------------------
  # * Frame Update : Multi-Animations
  #--------------------------------------------------------------------------
  def update_multi_animations
    # Pass Through All Animation Data
    for i in 0...@_multi_animation_duration.size
      # Decrease Animation Duration
      @_multi_animation_duration[i] -= 1 rescue p @_multi_animation_duration, i
      # Update Multi Animation
      update_multi_animation(i)
    end
    # Deletes Nil Elements
    for index in 0...@_multi_animation_duration.size
      if @_multi_animation_sprites[index].nil? && 
         @_multi_animation_duration[index] == 0 &&
         @_multi_animation_data[index] == []
        @_multi_animation_sprites.delete_at(index)
        @_multi_animation_duration.delete_at(index)
        @_multi_animation_data.delete_at(index)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update : Multi-Animation
  #--------------------------------------------------------------------------
  def update_multi_animation(i = 0)
    # If Duraction Greater Than 0
    if @_multi_animation_duration[i] > 0
      # Get Animation Data
      anim, hit = *@_multi_animation_data[i]
      # Get Sprites, Cell Data & Position
      sprites   = @_multi_animation_sprites[i]
      frame_index = anim.frame_max -  @_multi_animation_duration[i]
      cell_data = anim.frames[frame_index].cell_data
      position  = anim.position
      # Processes Animation Sprites
      animation_set_sprites(sprites, cell_data, position)
      # Pass Through Timings
      for timing in anim.timings
        # If Frame Index
        if timing.frame == frame_index
          # Processing Animation Timing
          animation_process_timing(timing, hit)
        end
      end
    # If 0 Duration
    else
      dispose_multi_animations(i)
    end
  end
end
#------------------------------------------------------------------------------
# * End SDK Enable Test
#------------------------------------------------------------------------------
end
 
It's just a script that allows RPG::Sprites to display more than 1 animation on them. You really don't call it, but if you want to test it, just make an event that sets the player animation to some random transition. You will notice they will "layer" on top of each other, instead of one erasing the oldest one. It is similar to the Multiple Damage System, that can play layered damage sprites on top of each other.
 

gamgre

Member

This is in regards to your party script, very nice might i add, but there is a problem i can't seem to figure out here.

When using the main switcher scene, not sure about the quick switcher yet, if you make a character required you get an error, the pic bellow shows the exact error.

http://i178.photobucket.com/albums/w253 ... nSTBV3.jpg[/IMG]

So is this just my no using the correct numbers some place or what?
 
Okay...I'm really sorry, but I can't figure out how to work the party switcher. Could someone just give me an example of how to call it? I don't understand how to enter the parameters.

I want the 1st Actor to be mandatory, minimum party size of 1, and max party size of 4.

Edit: Also, if I have 4 ppl in the party and add one with the event command, will it automatically put it in reserves or whatever? Or do I need to use that a script command?

Edit (again...): Nm...I don't think I can even use this. It interferes with the method of loading data with Moghunter's stuff....unless someone would want to help me with that too ^_^.
 
In the test bed V4 beta, there's the world map teleporter script, is it completed and ready to use? I don't know whether I should play around and try and work it out, I have tried a little but got nowhere without a config area. If you remember it was originally me that requested the alterations from your old version so I'm eager to make it work!
 
@sillypieman: Make sure you are using the switcher in the V.4 beta. The one in the current version has a fatal minor flaw that doesn't allow any arguments.

Here's the basic syntax for opening both forms of switchers:
Code:
#   Open Quick Switcher
#    - $scene.open_partyswitcher({<switcher_parameters>})
#
#   Open Main Switcher
#    - $scene = Scene_Party.new({<switcher_parameters>})
#
#   ** Switcher Parameters
#    - 'clear'         => true or false
#    - 'required'      => [actor_id, ...]
#    - 'restricted'    => [actor_id, ...]
#    - 'allow_globals' => true or false
#    - 'minsize'       => n
#    - 'maxsize'       => n

So let's open the quick switcher on the main map with your specifications.
Code:
p = {}
p['required'] = 1
p['minsize'] = 1
p['maxsize'] = 4
$scene.open_partyswitcher(p)

That's all there is to it. If the Mog Menus aren't working, ask them to be SDKified in the request thread.

@Calibre: Yep, it should be already to work with. I may make some minor alterations when we get the SDK 2.3 and MACL 2.1, but you should be able to just copy and paste out the old script and in the new version with it.

If you need any specific help with it, let me know and I will help (just use this thread if you want).
 
I'm afraid I don't have the configuration from how it used to be anymore, and to be honest I'll really confused about how to set it up in general. In the script I have there are no setup / customisation instructions for us script illiterate fools! When we were discussing the new version you said all the features I suggested would be included, though I don't know how to implement them at all. Could you perhaps show the call script command, I only need a single world for the game.

I know I'm not the only one who hasn't managed to suss out how to use it, there are others I have spoken to that have tried to use it and failed up until now.

Thanks for your support.
 
Yeah, sorry about that. There was a time where I was just frantically updating scripts and never went through the script headings, as I do those last before a big update. If I have some time, I will update it, but I want the V.4 up next weekend at the latest, so I have my work cut out for me.
 
By that, you mean when version 4 is released all the contained scripts will be alot more self explanatory? - if thats the case then I'll hold o for weekend! Hope you can get done and thanks again.
 
SephirothSpawn;236456 said:
Yeah, sorry about that. There was a time where I was just frantically updating scripts and never went through the script headings, as I do those last before a big update. If I have some time, I will update it, but I want the V.4 up next weekend at the latest, so I have my work cut out for me.
Why are you setting yourself a deadline? Not trying to sound like a complete ass, but when people rush the least unexpected things occur. I mean, I'm pretty sure people wouldn't complain if you need to take another week, month, or months in order to make sure everything is perfect. You are the scripter, just saying. And, if you go through the Test Bed V.4, there are a good number of scripts that do not have any instructions at all, and sometimes, not even a description! I think there is one, or maybe two like that. But, as always, keep up the GREAT work. You never cease to amaze me. [And other people too. XD]
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top