Throwing Axe

Axe mod to Bow scriptVersion: 0.0.1a
By: SoloDev

Ok, so we can have Bows that animate on side view battle systems, but no throwing Axes?

This is quite possible the simplest mod ever made, i just used the Bow (yumi) animation, copies it, pasted it in to a new slow, changed out the animation image, and put the Axe image in to the Graphics\Characters folder.


Screenshots

Image
Axe Chunking fun!

Script
Here are the images...
Image
The animation image. put in Graphics\Animations.
Image
The single image. put in Graphics\Characters.



script Spoiler
  1. #==============================================================================
  2. # ■ Axe Attack Animation Sequence for RPG Tankentai SBS (Any version)
  3. #------------------------------------------------------------------------------
  4. #  Script by Mr. Bubble with basis from Kylock's Bow Addon
  5. #  Modded by SoloDev to be an Axe animation
  6. #==============================================================================
  7. #   Adds a new bow animation which allows for a much smoother arrow animation
  8. # compared to Kylock's Bow Addon.  This script is designed not to have conflicts
  9. # with Kylock's Bow Addon in case you want to use both.
  10. #
  11. # Modded by SoloDev to allow the player to throw Axes.
  12. #==============================================================================
  13. # ■ How to Install
  14. #------------------------------------------------------------------------------
  15. # - Requires that you have the "Bow" animation for ease of modding.
  16. # - Requires "axe.png" in .Graphics\Characters. (available below)
  17. # - Requires the Axe animation. (available below)
  18. #==============================================================================
  19.  
  20. module N01
  21.   # Weapon element that grants a bow animation.  Default is 7.
  22.   BOW_WEAPON_ELEMENT = 7
  23.   # Skill IDs you want a bow animation for.
  24.   BOW_SKILLS = []
  25.   # Animation ID for Bow.
  26.   BOW_ANIMATION = 86
  27. #------------------------------------------------------------------------------
  28.   # Attack Animation Actions
  29.   BOW_ANIME = {    
  30.   # Action Name     No. Row Speed Loop Wait Fixed  Z Shadow  Weapon
  31.     "FACE"      => [ 3,  1,  3,   2,   0,  -1,   0, true,"" ],
  32.    
  33.     "DRAW_BOW"  => ["anime", BOW_ANIMATION,  0, false, false, false],
  34.     "ARROW_ANGLE"     => [ 30, 60,  11],
  35.   #                    Type  ID Object Pass Time Arc  Xp Yp Start Z Weapon
  36.     "SHOOT_ARROW"  => ["m_a", 0,  0,   0, 15,  -10,  0, 0, 0,false,"ARROW_ANGLE"],
  37.    
  38.     # Back attack ANIME objects.
  39.     "SHOOT_ARROW(BA)"  => ["m_a", 0,  0,   0, 15,  -10,  0, 0, 0,false,"ARROW_ANGLE(BA)"],
  40.     "ARROW_ANGLE(BA)"     => [ 330, 300,  11],
  41.     }
  42.   ANIME.merge!(BOW_ANIME)
  43.   # Action Sequence
  44.   BOW_ATTACK_ACTION = {
  45.     # Normal sequence
  46.     "NEW_BOW_ATTACK" => ["BEFORE_MOVE","DRAW_BOW", "FACE", "16",
  47.                         "SHOOT_ARROW", "12","OBJ_ANIM","16",
  48.                         "Can Collapse","FLEE_RESET"],
  49.                        
  50.     # Back attack sequence
  51.     "NEW_BOW_ATTACK(BA)" => ["BEFORE_MOVE","DRAW_BOW", "FACE", "16",
  52.                         "SHOOT_ARROW(BA)", "12","OBJ_ANIM","16",
  53.                         "Can Collapse","FLEE_RESET"],
  54. }
  55.   ACTION.merge!(BOW_ATTACK_ACTION)
  56. end
  57.  
  58. module RPG
  59.   class Weapon
  60.     alias bubs_bow_base_action base_action
  61.     def base_action
  62.       # If "Mind" Element is checked on the weapons tab in the database,
  63.       #  the new ranged attack action sequence is used.
  64.       if $data_weapons[@id].element_set.include?(N01::BOW_WEAPON_ELEMENT) && $back_attack
  65.         return "NEW_BOW_ATTACK(BA)" # Back attack
  66.       elsif $data_weapons[@id].element_set.include?(N01::BOW_WEAPON_ELEMENT)
  67.         return "NEW_BOW_ATTACK" # Normal
  68.       end
  69.       bubs_bow_base_action
  70.     end
  71.     alias bubs_bow_flying_graphic flying_graphic
  72.     def flying_graphic
  73.       if $data_weapons[@id].element_set.include?(N01::BOW_WEAPON_ELEMENT)
  74.         return "axe" # Arrow graphic in Characters folder
  75.       end
  76.       bubs_bow_flying_graphic
  77.     end
  78.   end
  79.   class Skill
  80.     alias bubs_bow_skill_base_action base_action
  81.     def base_action
  82.       for x in N01::BOW_SKILLS
  83.         return "NEW_BOW_ATTACK(BA)" if @id == x && $back_attack # Back attack
  84.         return "NEW_BOW_ATTACK" if @id == x # Normal
  85.       end
  86.       bubs_bow_skill_base_action
  87.     end
  88.   end
  89. end
Expand to see the code.


Instructions

Make sure that you have the original Bow animation, or one of the re-done ones. your going to need it, along with the database entries.

Increase the maximum # entry slots by one is you need to.
On the list to the left, click the Bow animation, then right click > Copy

Go to the new entry spot that you did, click, right click > Paste.

Save the two graphics from down below, the long animation to the Graphics\Animations, the single axe to Graphics\Characters.

So on the new bow animation, change out the Box animation picture for the new Axe animation pic. You can leave pretty much every thing else alone. Save / Apply/ whatever.

Put the new script below the side view system somewhere, but above main.

now I have changed the stat to monitor for to be the "mind" attribute. the game needs more attributes, if you ask me.

My animation # is 59, you will probably have to change this to fit your game, what ever # your Axe animation is, make that number correspond.
Compatibility

No known problems, but i have only tested this on my current game...

Credits and Thanks

Thanks to the original Bow animation system, and the Side view battle system!

Author's Notes

My first script, hope that some one enjoys it.

Terms and Conditions

None. Free like in Beer. have fun.
And as I said earlier on, first mod. let me know what you think. i tried to make sure to tell everyone everything that i did to get it to work, but it seems to be less work when you do it than when you read what i have here.

ah well. hope some one likes it and uses it.
can easily be modded for other thrown weapons like shuriken, boomerangs, etc...

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=67010