Help - Search - Members - Calendar
Full Version: Need help modifying the Enu SBS Tanketai XP script
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS
LaDestitute
I'm trying to modify the Enelvon Bomb Add-On mini-script so that items marked with the bomb ID and given the proper animation will be thrown at the enemy and then show the animation and the whole shebang, but it's not working at as I expected. I use the item, and no errors occur but nothing happens. YES, I know offense items must have an odd damage value to work. Modified script via pastbin in the post. Basically, what I'm trying to do: When item Bomb is thrown, it makes an animation of the bomb icon being thrown at the enemy; bouncing abit as it gets close to the enemy and then explodes when it lands.

http://www.hbgames.tk/paste/426
Fixxxer4153

Hey, bumped into this post, ironically as I was trying to find a 'grenade' script that did pretty much that. For the most part I've got it working, except the icon that it throws is the currently equipped weapon instead of the item used. I don't know how to configure that, im not much of a scripter. I don't know how u have the item set up in the database so I don't know why nothing happens with your version.
Traverse
Fellers, have you tried fooling around with the animations in SBS Config? The bomb add-on script assigns the bomb animation to the actors --primary attack-- so that whatever weapon they're using (presumably a bomb with a bomb icon) has a bomb-like animation. If you want to have an animation that you can use for a skill or for an item (like a grenade), you need to create a stand alone animation that you can assign to the skill or the item. There is a section in SBS config where you can create battle animations by sequencing together actions (throw animation + animation travels in arc to just before enemy + animation travels in much smaller arc + animation explodes). Pay especial attention to the "movement & display of animations" section which one would typically use to create an animated projectile (like an exploding grenade). Read the descriptions for the different elements you can use to create animation sequences, look at some of the examples in the script, and play around.
LaDestitute
On second thought, I need a different edit for this script add-on. Can someone edit the script (the weapon part) so that when an actor that attacks with a weapon tagged with the bomb ID, the bomb weapon will be consumed and reloaded if there are more of the same weapon ID? If no more of the weapon ID are available for reloading, I would instead like it to auto-equip the next weapon with the same ATK or closest next value without going over the bomb weapon's attack stat.

HOWEVER: If possible, if someone could still get the item throwing animation to work; that would be great!

Edit: For clarification, I have four types of bomb items/weapons in the game. So, four IDs.
LaDestitute
bump

CODE
#==============================================================================
# ■ Bomb Weapons 1.0 for RPG Tankentai Sideview Battle System
# 8.23.2008
#------------------------------------------------------------------------------
# Written by Enelvon Siolach
#==============================================================================
# This script makes all weapons with the Bomb element (default Element ID #23)
# have an animation where they throw a bomb at the foe.
#==============================================================================
# ■ Release Notes
#------------------------------------------------------------------------------
# 1.0
# ● Original Release.
#==============================================================================
# ■ Installation Notes
#------------------------------------------------------------------------------
# Plug and play. Set the BOMB_ELEMENT to the Element ID of Sworddash. Add
# BOMB to your Bomb weapons and give them an explosion animation from the
# Database, and you're done!
#==============================================================================

module N01
  # Element used to define a skill as a Bomb skill
  BOMB_ELEMENT = 28
  
  # Action Sequence
  BOMB_ATTACK_ACTION = {
  "BOMB_THROW" => ["BEFORE_MOVE","WPN_SWING_OVER","absorb1","WAIT(FIXED)",
  "START_WEAPON_THROW","12","OBJ_ANIM_WEIGHT","Can Collapse",
  "COORD_RESET"],}
  ACTION.merge!(BOMB_ATTACK_ACTION)
end

class RPG::Skill
  alias enelvon_bomb_base_action base_action
  def base_action
    # If the Bomb Element is checked on the skills tab in the database,
    # the Bomb attack action sequence is used.
    if $data_skills[@id].element_set.include?(N01::BOMB_ELEMENT)
      return "BOMB_THROW"
    end
    enelvon_bomb_base_action
  end
end

class RPG::Weapon
  alias enelvon_bomb_weapon_base_action base_action
  def base_action
    # If the Bomb Element is checked on the skills tab in the database,
    # the Bomb attack action sequence is used.
    if $data_weapons[@id].element_set.include?(N01::BOMB_ELEMENT)
      return "BOMB_THROW"
    end
    enelvon_bomb_weapon_base_action
  end
end
LaDestitute
bump
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.