Advertisement
diamondandplatinum3

Fire Emblem/Disgaea Weapon System (Full) ~ RGSS3

Jan 9th, 2013
1,521
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 84.93 KB | None | 0 0
  1. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. #             Fire Emblem/Disgaea Weapon System (Full Version)
  3. #             Version: 1.1
  4. #             Authors: DiamondandPlatinum3
  5. #             Date: January 10, 2013
  6. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. #  Description:
  8. #
  9. #    This script introduces a mixture of both Fire Emblem's and Disgaea's
  10. #    weapon system to your game.
  11. #    With this script you can allow your actors to have access to any weapon
  12. #    (unless you don't want them to, of course), so long as the actor has a
  13. #    high enough weapon skill level to wield it, this is the script mimicking
  14. #    Fire Emblem's weapon system.
  15. #    When improving a weapon rank, you'll also earn parameter bonuses for that
  16. #    weapon type, which can be further improved as your weapon rank increases,
  17. #    mimicking Disgaea's weapon system.
  18. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  19. #------------------------------------------------------------------------------
  20. #  Instructions:
  21. #
  22. #   ~ I have made a video tutorial for this script, it's advised that you take a
  23. #     look at it in case you get confused on what things do.
  24. #     You can find the Video Here: https://www.youtube.com/watch?v=REZyKy900fc
  25. #
  26. #
  27. #   ~ The first thing you need to do is remove all weapon types from any and all actor
  28. #     classes in the database. Due to the way I've made this script, all other weapon
  29. #     take priority, including the default weapon system. Therefore it is important
  30. #     to remove all weapon types from actor classes, so that this script can do it's
  31. #     task without conflicting with the default weapon system.
  32. #       ScreenShot Can Be Found Here:   goo.gl/eXq3X
  33. #    
  34. #    
  35. #
  36. #   ~ With the above done, your actors can now equip absolutely every single weapon
  37. #     type. However you may not want certain actors to be able to use certain
  38. #     weapon types. Example, you may not want actor 1 (Eric) to equip any Bows or
  39. #     Guns, but every other weapon type is just fine. If that's the case, simply
  40. #     add the following notetag to his actor notebox.
  41. #         ~DoNotEquip[ ?, ?, ?, ]
  42. #     Now you can replace the Question Marks with the ID's of the weapon types you
  43. #     do not wish for him to be able to equip. You can have as many or as little as
  44. #     you want.
  45. #       ScreenShots Can Be Found Here:
  46. #             goo.gl/t5IzQ
  47. #               goo.gl/uZZ4X
  48. #             goo.gl/KwxUh    
  49. #             goo.gl/g4WNw    
  50. #             goo.gl/xfYxL
  51. #
  52. #
  53. #  ~  You can restrict some weapons from being equipped until your actor has
  54. #     acquired a specific weapon skill. So your more powerful axes may be
  55. #     be restricted to only being equipped if your actor is a master at
  56. #     wielding axes. To do so you insert the following notetag in a weapon notebox.
  57. #         ~WeaponLevel: ?
  58. #     Now you can replace the Question Mark with a letter corresponding to a
  59. #     Weapon Rank, so a Letter like "D", "C", "B", "A", "S" will restrict
  60. #     that weapon until a certain weapon rank.
  61. #     If you do not use this tag on a weapon or insert any letter besides those,
  62. #     the weapon rank will default to "E".
  63. #       ScreenShot Can Be Found Here:   goo.gl/PWKTl
  64. #      
  65. #
  66. #  ~  If you want skills to help increase your weapon rank when they're used.
  67. #     You can add a notetag in their notebox which will allow this. It is the following:
  68. #         ~EarnWeaponSkillPoints: ?
  69. #     Now you can replace the Question Mark with a number which will add on to
  70. #     your actor's currently equipped weapon type (types if dual wielding).
  71. #       ScreenShot Can Be Found Here:   goo.gl/8z6Gt
  72. #
  73. #
  74. #
  75. #  ~  If you wish to temporarily turn on or off the Level Up Message Display for
  76. #     your weapons, you can do so via a script call:
  77. #         toggle_weapon_level_message_display( on_or_off )
  78. #     Replacing on_or_off with 'true' if you want the box to be displayed or
  79. #     'false' if you wish to temporarily disable it.
  80. #     This is handy for secretly increasing actor weapon ranks in your game.
  81. #
  82. #
  83. #  ~  You can add weapon points to any actor for the weapon they're currently
  84. #     holding by using the following script call:
  85. #         add_weapon_skill_points( actor_id, points )
  86. #     Replacing actor_id with the ID of actor you are giving points to and
  87. #     replacing points with the amount of points you are giving to them.
  88. #
  89. #
  90. #  ~  You can also increase specific weapon types for a player even when they're
  91. #     not equipping that type. Using the following script call:
  92. #         add_specific_weapon_type_skill_points( actor_id, wType, points )
  93. #     Replacing actor_id with the ID of the actor you wish to give points to,
  94. #     wType with the Weapon Type you are assigning points to (ie Sword is weapon type 4),
  95. #     and points with the amount of points you are giving them.
  96. #       This script call is especially useful if you wantto let NPCs give your
  97. #     Actors training in using weapons, because why would an archer help you learn
  98. #     how to use an axe?
  99. #
  100. #
  101. #     A ScreenShot Showing the use of the Above Three ScriptCalls Can Be Found
  102. #     Here:   goo.gl/ETywg
  103. #
  104. #
  105. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  106. module DiamondandPlatinum3
  107.   module WeaponLevels
  108.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  109.     #                                                        -=
  110.     #                 Editable Region        ////            ==
  111.     #                                                        =-
  112.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  113.    
  114.    
  115.     #----------------------------------------------------------------------
  116.     # * Menu Option Information
  117.     #----------------------------------------------------------------------
  118.     # For this Script, a menu option is added to allow players to view their
  119.     # weapon levels. This option allows you to edit what the menu option is
  120.     # called when looking at the menu.
  121.     Menu_Option_Title = "Weapon Level Status"
  122.                                                
  123.    
  124.    
  125.    
  126.    
  127.     #----------------------------------------------------------------------
  128.     # * Message Box Information
  129.     #----------------------------------------------------------------------
  130.     Show_Message_Box = true   # Do you want a message box to be displayed when
  131.                               # Your current weapon rank goes up?
  132.                              
  133.     Rank_Up_SE = "Applause1"  # Sound Effect To Be Played when weapon rank
  134.     SE_Volume  = 80           # increases. If you don't want an SE to play,
  135.     SE_Pitch   = 100          # set to "NO_SOUNDEFFECT".
  136.                               # SE will only play when a MessageBox is displayed.
  137.                        
  138.                              
  139.     # Here You Get To Choose What the Message Box Says.
  140.     # Param Quotes will only be used if that param actually increased.
  141.     # Same for Skills
  142.     Increased_Weapon_Rank_Text    = "has increased their weapon rank!"
  143.     Increased_Attack_Power        = "Attack Power has been increased!"
  144.     Increased_Defence_Power       = "Weapon Defence has been increased!"
  145.     Increased_Magic_Attack_Power  = "Magic Attack Power has been increased!"
  146.     Increased_Magic_Defence_Power = "Magic Defence has been increased!"
  147.     Increased_Agility_Power       = "Agility has been improved!"
  148.     Acquired_New_Skill            = "has aquired a new skill!"
  149.                              
  150.                              
  151.    
  152.    
  153.                              
  154.     #----------------------------------------------------------------------
  155.     # * Weapon Accumulation Information
  156.     #----------------------------------------------------------------------
  157.     # How Many Points do you want to gain for your weapon when you attack
  158.     # with it in battle. 1 by default.
  159.     Attack_Points_Gain = 1
  160.    
  161.    
  162.     # Since we will always start at level E, modify how many times a
  163.     # weapon must be used before you go up to the Next Weapon Level
  164.     #
  165.     # So Basically everytime you attack with that weapon type, your count
  166.     # will increase by one, and once it hits one of the numbers you specified below,
  167.     # your weapon level will go up a rank.
  168.     WeaponAccumulation = {
  169.       # Weapon Type 1,  By Default is 'Weapon Type: Axe'
  170.       1 => {
  171.              #  D,   C,   B,   A,    S,
  172.         1 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor One
  173.         2 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor Two
  174.                                              
  175.       # You Can Add More Actors Just Above This Line
  176.       }, # <= Do Not Delete
  177.      
  178.      
  179.      
  180.      
  181.       # Weapon Type 2,  By Default is 'Weapon Type: Claw'
  182.       2 => {
  183.              #  D,   C,   B,   A,    S,
  184.         1 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor One
  185.         2 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor Two
  186.                                              
  187.       # You Can Add More Actors Just Above This Line
  188.       }, # <= Do Not Delete
  189.      
  190.      
  191.      
  192.      
  193.       # Weapon Type 3,  By Default is 'Weapon Type: Spear'
  194.       3 => {
  195.              #  D,   C,   B,   A,    S,
  196.         1 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor One
  197.         2 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor Two
  198.                                              
  199.       # You Can Add More Actors Just Above This Line
  200.       }, # <= Do Not Delete
  201.      
  202.      
  203.      
  204.      
  205.       # Weapon Type 4,  By Default is 'Weapon Type: Sword'
  206.       4 => {
  207.              #  D,   C,   B,   A,    S,
  208.         1 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor One
  209.         2 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor Two
  210.                                              
  211.       # You Can Add More Actors Just Above This Line
  212.       }, # <= Do Not Delete
  213.      
  214.      
  215.      
  216.      
  217.       # Weapon Type 5,  By Default is 'Weapon Type: Katana'
  218.       5 => {
  219.              #  D,   C,   B,   A,    S,
  220.         1 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor One
  221.         2 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor Two
  222.                                              
  223.       # You Can Add More Actors Just Above This Line
  224.       }, # <= Do Not Delete
  225.      
  226.      
  227.      
  228.      
  229.       # Weapon Type 6,  By Default is 'Weapon Type: Bow'
  230.       6 => {
  231.              #  D,   C,   B,   A,    S,
  232.         1 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor One
  233.         2 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor Two
  234.                                              
  235.       # You Can Add More Actors Just Above This Line
  236.       }, # <= Do Not Delete
  237.      
  238.      
  239.      
  240.      
  241.       # Weapon Type 7,  By Default is 'Weapon Type: Dagger'
  242.       7 => {
  243.              #  D,   C,   B,   A,    S,
  244.         1 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor One
  245.         2 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor Two
  246.                                              
  247.       # You Can Add More Actors Just Above This Line
  248.       }, # <= Do Not Delete
  249.      
  250.      
  251.      
  252.      
  253.       # Weapon Type 8,  By Default is 'Weapon Type: Hammer'
  254.       8 => {
  255.              #  D,   C,   B,   A,    S,
  256.         1 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor One
  257.         2 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor Two
  258.                                              
  259.       # You Can Add More Actors Just Above This Line
  260.       }, # <= Do Not Delete
  261.      
  262.      
  263.      
  264.      
  265.       # Weapon Type 9,  By Default is 'Weapon Type: Staff'
  266.       9 => {
  267.              #  D,   C,   B,   A,    S,
  268.         1 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor One
  269.         2 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor Two
  270.                                              
  271.       # You Can Add More Actors Just Above This Line
  272.       }, # <= Do Not Delete
  273.      
  274.      
  275.      
  276.      
  277.       # Weapon Type 10,  By Default is 'Weapon Type: Gun'
  278.       10 => {
  279.              #  D,   C,   B,   A,    S,
  280.         1 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor One
  281.         2 => [ 100, 250, 550, 1000, 1500, ], # Weapon Accumulation For Actor Two
  282.                                              
  283.       # You Can Add More Actors Just Above This Line
  284.       }, # <= Do Not Delete
  285.      
  286.      
  287.      
  288.      
  289.     # If you have more weapon types than these, you'll need to add them just above.
  290.     # Copy-Paste the above, and I'll leave it to your common sense to change things
  291.     # accordingly. Paste ABOVE this comment
  292.     }
  293.    
  294.    
  295.    
  296.    
  297.    
  298.    
  299.     #----------------------------------------------------------------------
  300.     # * Weapon Bonus Params Information
  301.     #----------------------------------------------------------------------
  302.     # Here You get to decide what bonuses your actors get when they have leveled
  303.     # up a weapon and remain having it equipped. The Abbreviations are as followed:
  304.               # ATK  ATtacK power
  305.               # DEF  DEFense power
  306.               # MAT  Magic ATtack power
  307.               # MDF  Magic DeFense power
  308.               # AGI  AGIlity
  309.     # These are percentages out of 100, meaning that if I had a stat boost of 10%,
  310.     # The actor will receive a 10% bonus of their current stat.
  311.     # In other words, if ATK stat is 90 and weapon bonus for ATK is 10%, the actor
  312.     # will receive 9 extra stat points for their ATK.
  313.     #
  314.     # Effects do not carry on into further levels. So if an actor was to receive
  315.     # a param stat boost of 10% in weapon level "D", and 15% in weapon level "C",
  316.     # The actor will only get 15% during weapon level "C" instead of 25%.
  317.     # Keep this in mind while editing.
  318.     WeaponParamBonuses = {
  319.    
  320.       # Weapon Type 1, By Default is 'Weapon Type: Axe'
  321.       1 => {
  322.              # ATK, DEF, MAT, MDF, AGI,
  323.         1 => [                          # <= Bonuses for Actor One
  324.                 5,   2,   0,   0,   1,  # Bonuses for Axe Level "D"
  325.                 7,   2,   0,   0,   2,  # Bonuses for Axe Level "C"
  326.                 9,   4,   0,   0,   3,  # Bonuses for Axe Level "B"
  327.                 10,  5,   0,   0,   4,  # Bonuses for Axe Level "A"
  328.                 13,  6,   0,   0,   6,  # Bonuses for Axe Level "S"
  329.              ],
  330.              
  331.              
  332.         2 => [                          # <= Bonuses for Actor Two
  333.                 5,   2,   0,   0,   1,  # Bonuses for Axe Level "D"
  334.                 7,   2,   0,   0,   2,  # Bonuses for Axe Level "C"
  335.                 9,   4,   0,   0,   3,  # Bonuses for Axe Level "B"
  336.                 10,  5,   0,   0,   4,  # Bonuses for Axe Level "A"
  337.                 13,  6,   0,   0,   6,  # Bonuses for Axe Level "S"
  338.              ],
  339.              
  340.            
  341.       # If you have more actors, you can add them above this comment.
  342.       }, # <= Do Not Delete
  343.      
  344.      
  345.      
  346.      
  347.       # Weapon Type 2, By Default is 'Weapon Type: Claw'
  348.       2 => {
  349.              # ATK, DEF, MAT, MDF, AGI,
  350.         1 => [                          # <= Bonuses for Actor One
  351.                 5,   2,   0,   0,   1,  # Bonuses for Claw Level "D"
  352.                 7,   2,   0,   0,   2,  # Bonuses for Claw Level "C"
  353.                 9,   4,   0,   0,   3,  # Bonuses for Claw Level "B"
  354.                 10,  5,   0,   0,   4,  # Bonuses for Claw Level "A"
  355.                 13,  6,   0,   0,   6,  # Bonuses for Claw Level "S"
  356.              ],
  357.              
  358.              
  359.         2 => [                          # <= Bonuses for Actor Two
  360.                 5,   2,   0,   0,   1,  # Bonuses for Claw Level "D"
  361.                 7,   2,   0,   0,   2,  # Bonuses for Claw Level "C"
  362.                 9,   4,   0,   0,   3,  # Bonuses for Claw Level "B"
  363.                 10,  5,   0,   0,   4,  # Bonuses for Claw Level "A"
  364.                 13,  6,   0,   0,   6,  # Bonuses for Claw Level "S"
  365.              ],
  366.              
  367.            
  368.       # If you have more actors, you can add them above this comment.
  369.       }, # <= Do Not Delete
  370.      
  371.      
  372.      
  373.      
  374.       # Weapon Type 3, By Default is 'Weapon Type: Spear'
  375.       3 => {
  376.              # ATK, DEF, MAT, MDF, AGI,
  377.         1 => [                          # <= Bonuses for Actor One
  378.                 5,   2,   0,   0,   1,  # Bonuses for Spear Level "D"
  379.                 7,   2,   0,   0,   2,  # Bonuses for Spear Level "C"
  380.                 9,   4,   0,   0,   3,  # Bonuses for Spear Level "B"
  381.                 10,  5,   0,   0,   4,  # Bonuses for Spear Level "A"
  382.                 13,  6,   0,   0,   6,  # Bonuses for Spear Level "S"
  383.              ],
  384.              
  385.              
  386.         2 => [                          # <= Bonuses for Actor Two
  387.                 5,   2,   0,   0,   1,  # Bonuses for Spear Level "D"
  388.                 7,   2,   0,   0,   2,  # Bonuses for Spear Level "C"
  389.                 9,   4,   0,   0,   3,  # Bonuses for Spear Level "B"
  390.                 10,  5,   0,   0,   4,  # Bonuses for Spear Level "A"
  391.                 13,  6,   0,   0,   6,  # Bonuses for Spear Level "S"
  392.              ],
  393.              
  394.            
  395.       # If you have more actors, you can add them above this comment.
  396.       }, # <= Do Not Delete
  397.      
  398.      
  399.      
  400.      
  401.       # Weapon Type 4, By Default is 'Weapon Type: Sword'
  402.       4 => {
  403.              # ATK, DEF, MAT, MDF, AGI,
  404.         1 => [                          # <= Bonuses for Actor One
  405.                 5,   2,   0,   0,   1,  # Bonuses for Sword Level "D"
  406.                 7,   2,   0,   0,   2,  # Bonuses for Sword Level "C"
  407.                 9,   4,   0,   0,   3,  # Bonuses for Sword Level "B"
  408.                 10,  5,   0,   0,   4,  # Bonuses for Sword Level "A"
  409.                 13,  6,   0,   0,   6,  # Bonuses for Sword Level "S"
  410.              ],
  411.              
  412.              
  413.         2 => [                          # <= Bonuses for Actor Two
  414.                 5,   2,   0,   0,   1,  # Bonuses for Sword Level "D"
  415.                 7,   2,   0,   0,   2,  # Bonuses for Sword Level "C"
  416.                 9,   4,   0,   0,   3,  # Bonuses for Sword Level "B"
  417.                 10,  5,   0,   0,   4,  # Bonuses for Sword Level "A"
  418.                 13,  6,   0,   0,   6,  # Bonuses for Sword Level "S"
  419.              ],
  420.              
  421.            
  422.       # If you have more actors, you can add them above this comment.
  423.       }, # <= Do Not Delete
  424.      
  425.      
  426.      
  427.      
  428.       # Weapon Type 5, By Default is 'Weapon Type: Katana'
  429.       5 => {
  430.              # ATK, DEF, MAT, MDF, AGI,
  431.         1 => [                          # <= Bonuses for Actor One
  432.                 5,   2,   0,   0,   1,  # Bonuses for Katana Level "D"
  433.                 7,   2,   0,   0,   2,  # Bonuses for Katana Level "C"
  434.                 9,   4,   0,   0,   3,  # Bonuses for Katana Level "B"
  435.                 10,  5,   0,   0,   4,  # Bonuses for Katana Level "A"
  436.                 13,  6,   0,   0,   6,  # Bonuses for Katana Level "S"
  437.              ],
  438.              
  439.              
  440.         2 => [                          # <= Bonuses for Actor Two
  441.                 5,   2,   0,   0,   1,  # Bonuses for Katana Level "D"
  442.                 7,   2,   0,   0,   2,  # Bonuses for Katana Level "C"
  443.                 9,   4,   0,   0,   3,  # Bonuses for Katana Level "B"
  444.                 10,  5,   0,   0,   4,  # Bonuses for Katana Level "A"
  445.                 13,  6,   0,   0,   6,  # Bonuses for Katana Level "S"
  446.              ],
  447.              
  448.            
  449.       # If you have more actors, you can add them above this comment.
  450.       }, # <= Do Not Delete
  451.      
  452.      
  453.      
  454.      
  455.       # Weapon Type 6, By Default is 'Weapon Type: Bow'
  456.       6 => {
  457.              # ATK, DEF, MAT, MDF, AGI,
  458.         1 => [                          # <= Bonuses for Actor One
  459.                 5,   2,   0,   0,   1,  # Bonuses for Bow Level "D"
  460.                 7,   2,   0,   0,   2,  # Bonuses for Bow Level "C"
  461.                 9,   4,   0,   0,   3,  # Bonuses for Bow Level "B"
  462.                 10,  5,   0,   0,   4,  # Bonuses for Bow Level "A"
  463.                 13,  6,   0,   0,   6,  # Bonuses for Bow Level "S"
  464.              ],
  465.              
  466.              
  467.         2 => [                          # <= Bonuses for Actor Two
  468.                 5,   2,   0,   0,   1,  # Bonuses for Bow Level "D"
  469.                 7,   2,   0,   0,   2,  # Bonuses for Bow Level "C"
  470.                 9,   4,   0,   0,   3,  # Bonuses for Bow Level "B"
  471.                 10,  5,   0,   0,   4,  # Bonuses for Bow Level "A"
  472.                 13,  6,   0,   0,   6,  # Bonuses for Bow Level "S"
  473.              ],
  474.              
  475.            
  476.       # If you have more actors, you can add them above this comment.
  477.       }, # <= Do Not Delete
  478.      
  479.      
  480.      
  481.      
  482.       # Weapon Type 7, By Default is 'Weapon Type: Dagger'
  483.       7 => {
  484.              # ATK, DEF, MAT, MDF, AGI,
  485.         1 => [                          # <= Bonuses for Actor One
  486.                 5,   2,   0,   0,   1,  # Bonuses for Dagger Level "D"
  487.                 7,   2,   0,   0,   2,  # Bonuses for Dagger Level "C"
  488.                 9,   4,   0,   0,   3,  # Bonuses for Dagger Level "B"
  489.                 10,  5,   0,   0,   4,  # Bonuses for Dagger Level "A"
  490.                 13,  6,   0,   0,   6,  # Bonuses for Dagger Level "S"
  491.              ],
  492.              
  493.              
  494.         2 => [                          # <= Bonuses for Actor Two
  495.                 5,   2,   0,   0,   1,  # Bonuses for Dagger Level "D"
  496.                 7,   2,   0,   0,   2,  # Bonuses for Dagger Level "C"
  497.                 9,   4,   0,   0,   3,  # Bonuses for Dagger Level "B"
  498.                 10,  5,   0,   0,   4,  # Bonuses for Dagger Level "A"
  499.                 13,  6,   0,   0,   6,  # Bonuses for Dagger Level "S"
  500.              ],
  501.              
  502.            
  503.       # If you have more actors, you can add them above this comment.
  504.       }, # <= Do Not Delete
  505.      
  506.      
  507.      
  508.      
  509.       # Weapon Type 8, By Default is 'Weapon Type: Hammer'
  510.       8 => {
  511.              # ATK, DEF, MAT, MDF, AGI,
  512.         1 => [                          # <= Bonuses for Actor One
  513.                 5,   2,   0,   0,   1,  # Bonuses for Hammer Level "D"
  514.                 7,   2,   0,   0,   2,  # Bonuses for Hammer Level "C"
  515.                 9,   4,   0,   0,   3,  # Bonuses for Hammer Level "B"
  516.                 10,  5,   0,   0,   4,  # Bonuses for Hammer Level "A"
  517.                 13,  6,   0,   0,   6,  # Bonuses for Hammer Level "S"
  518.              ],
  519.              
  520.              
  521.         2 => [                          # <= Bonuses for Actor Two
  522.                 5,   2,   0,   0,   1,  # Bonuses for Hammer Level "D"
  523.                 7,   2,   0,   0,   2,  # Bonuses for Hammer Level "C"
  524.                 9,   4,   0,   0,   3,  # Bonuses for Hammer Level "B"
  525.                 10,  5,   0,   0,   4,  # Bonuses for Hammer Level "A"
  526.                 13,  6,   0,   0,   6,  # Bonuses for Hammer Level "S"
  527.              ],
  528.              
  529.            
  530.       # If you have more actors, you can add them above this comment.
  531.       }, # <= Do Not Delete
  532.      
  533.      
  534.      
  535.      
  536.       # Weapon Type 9, By Default is 'Weapon Type: Staff'
  537.       9 => {
  538.              # ATK, DEF, MAT, MDF, AGI,
  539.         1 => [                          # <= Bonuses for Actor One
  540.                 5,   2,   0,   0,   1,  # Bonuses for Staff Level "D"
  541.                 7,   2,   0,   0,   2,  # Bonuses for Staff Level "C"
  542.                 9,   4,   0,   0,   3,  # Bonuses for Staff Level "B"
  543.                 10,  5,   0,   0,   4,  # Bonuses for Staff Level "A"
  544.                 13,  6,   0,   0,   6,  # Bonuses for Staff Level "S"
  545.              ],
  546.              
  547.              
  548.         2 => [                          # <= Bonuses for Actor Two
  549.                 5,   2,   0,   0,   1,  # Bonuses for Axe Level "D"
  550.                 7,   2,   0,   0,   2,  # Bonuses for Axe Level "C"
  551.                 9,   4,   0,   0,   3,  # Bonuses for Axe Level "B"
  552.                 10,  5,   0,   0,   4,  # Bonuses for Axe Level "A"
  553.                 13,  6,   0,   0,   6,  # Bonuses for Axe Level "S"
  554.              ],
  555.              
  556.            
  557.       # If you have more actors, you can add them above this comment.
  558.       }, # <= Do Not Delete
  559.      
  560.      
  561.      
  562.      
  563.       # Weapon Type 10, By Default is 'Weapon Type: Gun'
  564.       10 => {
  565.              # ATK, DEF, MAT, MDF, AGI,
  566.         1 => [                          # <= Bonuses for Actor One
  567.                 5,   2,   0,   0,   1,  # Bonuses for Gun Level "D"
  568.                 7,   2,   0,   0,   2,  # Bonuses for Gun Level "C"
  569.                 9,   4,   0,   0,   3,  # Bonuses for Gun Level "B"
  570.                 10,  5,   0,   0,   4,  # Bonuses for Gun Level "A"
  571.                 13,  6,   0,   0,   6,  # Bonuses for Gun Level "S"
  572.              ],
  573.              
  574.              
  575.         2 => [                          # <= Bonuses for Actor Two
  576.                 5,   2,   0,   0,   1,  # Bonuses for Gun Level "D"
  577.                 7,   2,   0,   0,   2,  # Bonuses for Gun Level "C"
  578.                 9,   4,   0,   0,   3,  # Bonuses for Gun Level "B"
  579.                 10,  5,   0,   0,   4,  # Bonuses for Gun Level "A"
  580.                 13,  6,   0,   0,   6,  # Bonuses for Gun Level "S"
  581.              ],
  582.              
  583.            
  584.       # If you have more actors, you can add them above this comment.
  585.       }, # <= Do Not Delete
  586.          
  587.            
  588.      
  589.      
  590.      
  591.      
  592.       # If you have more than 10 weapon types, you can add them by copying the
  593.       # above and changing the weapon type id to the appropriate number.
  594.       # Paste ABOVE this comment
  595.     }
  596.    
  597.    
  598.    
  599.    
  600.    
  601.    
  602.     #----------------------------------------------------------------------
  603.     # * Weapon Bonus Skills Information
  604.     #----------------------------------------------------------------------
  605.     # You can select specific skills that your actor can learn once they have
  606.     # achieved a high enough weapon rank. This skill will only be available
  607.     # whilst the actor has this weapon type equipped and has the required
  608.     # skill level. Therefore if this weapon type is removed, so too are the
  609.     # acquired skills until the conditions for learning those skills are once
  610.     # again satisfied.
  611.     # Basically you can have the same skill be learned by different weapon
  612.     # types and it'll work just fine.
  613.     #
  614.     # Skill Bonuses DO NOT carry over to higher levels. If you have a weapon
  615.     # type that gives you a skill at Rank "D", you must also include that skill
  616.     # in the next rank.
  617.     #
  618.     # If you do not want any skill for a specific rank, remove all skill IDs in
  619.     # that Rank.
  620.     WeaponSkillBonuses = {
  621.    
  622.       # Weapon Type 1, By Default is 'Weapon Type: Axe'
  623.      1 => {    
  624.               #   Skill IDs
  625.         1 => {                          # <= Bonus Skills for Actor One
  626.                 1 => [ 3, ],            # Bonus Skills for: Axe Level "D"
  627.                 2 => [ 3, ],            # Bonus Skills for: Axe Level "C"
  628.                 3 => [ 3, 4, ],         # Bonus Skills for: Axe Level "B"
  629.                 4 => [ 3, 4, ],         # Bonus Skills for: Axe Level "A"
  630.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Axe Level "S"
  631.              },
  632.              
  633.              
  634.         2 => {                          # <= Bonus Skills for Actor Two
  635.                 1 => [ 3, ],            # Bonus Skills for: Axe Level "D"
  636.                 2 => [ 3, ],            # Bonus Skills for: Axe Level "C"
  637.                 3 => [ 3, 4, ],         # Bonus Skills for: Axe Level "B"
  638.                 4 => [ 3, 4, ],         # Bonus Skills for: Axe Level "A"
  639.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Axe Level "S"
  640.              },
  641.      
  642.      # If you have more actors, you can add them Just above this comment
  643.      }, # <= Do Not Delete
  644.      
  645.      
  646.      
  647.      # Weapon Type 2, By Default is 'Weapon Type: Claw'
  648.      2 => {    
  649.               #   Skill IDs
  650.         1 => {                          # <= Bonus Skills for Actor One
  651.                 1 => [ 3, ],            # Bonus Skills for: Claw Level "D"
  652.                 2 => [ 3, ],            # Bonus Skills for: Claw Level "C"
  653.                 3 => [ 3, 4, ],         # Bonus Skills for: Claw Level "B"
  654.                 4 => [ 3, 4, ],         # Bonus Skills for: Claw Level "A"
  655.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Claw Level "S"
  656.              },
  657.              
  658.              
  659.         2 => {                          # <= Bonus Skills for Actor Two
  660.                 1 => [ 3, ],            # Bonus Skills for: Claw Level "D"
  661.                 2 => [ 3, ],            # Bonus Skills for: Claw Level "C"
  662.                 3 => [ 3, 4, ],         # Bonus Skills for: Claw Level "B"
  663.                 4 => [ 3, 4, ],         # Bonus Skills for: Claw Level "A"
  664.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Claw Level "S"
  665.              },
  666.      
  667.      # If you have more actors, you can add them Just above this comment
  668.      }, # <= Do Not Delete
  669.      
  670.      
  671.      
  672.      # Weapon Type 3, By Default is 'Weapon Type: Spear'
  673.      3 => {    
  674.               #   Skill IDs
  675.         1 => {                          # <= Bonus Skills for Actor One
  676.                 1 => [ 3, ],            # Bonus Skills for: Spear Level "D"
  677.                 2 => [ 3, ],            # Bonus Skills for: Spear Level "C"
  678.                 3 => [ 3, 4, ],         # Bonus Skills for: Spear Level "B"
  679.                 4 => [ 3, 4, ],         # Bonus Skills for: Spear Level "A"
  680.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Spear Level "S"
  681.              },
  682.              
  683.              
  684.         2 => {                          # <= Bonus Skills for Actor Two
  685.                 1 => [ 3, ],            # Bonus Skills for: Spear Level "D"
  686.                 2 => [ 3, ],            # Bonus Skills for: Spear Level "C"
  687.                 3 => [ 3, 4, ],         # Bonus Skills for: Spear Level "B"
  688.                 4 => [ 3, 4, ],         # Bonus Skills for: Spear Level "A"
  689.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Spear Level "S"
  690.              },
  691.      
  692.      # If you have more actors, you can add them Just above this comment
  693.      }, # <= Do Not Delete
  694.      
  695.      
  696.      
  697.      # Weapon Type 4, By Default is 'Weapon Type: Sword'
  698.      4 => {    
  699.               #   Skill IDs
  700.         1 => {                          # <= Bonus Skills for Actor One
  701.                 1 => [ 3, ],            # Bonus Skills for: Sword Level "D"
  702.                 2 => [ 3, ],            # Bonus Skills for: Sword Level "C"
  703.                 3 => [ 3, 4, ],         # Bonus Skills for: Sword Level "B"
  704.                 4 => [ 3, 4, ],         # Bonus Skills for: Sword Level "A"
  705.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Sword Level "S"
  706.              },
  707.              
  708.              
  709.         2 => {                          # <= Bonus Skills for Actor Two
  710.                 1 => [ 3, ],            # Bonus Skills for: Sword Level "D"
  711.                 2 => [ 3, ],            # Bonus Skills for: Sword Level "C"
  712.                 3 => [ 3, 4, ],         # Bonus Skills for: Sword Level "B"
  713.                 4 => [ 3, 4, ],         # Bonus Skills for: Sword Level "A"
  714.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Sword Level "S"
  715.              },
  716.      
  717.      # If you have more actors, you can add them Just above this comment
  718.      }, # <= Do Not Delete
  719.      
  720.      
  721.      
  722.      # Weapon Type 5, By Default is 'Weapon Type: Katana'
  723.      5 => {    
  724.               #   Skill IDs
  725.         1 => {                          # <= Bonus Skills for Actor One
  726.                 1 => [ 3, ],            # Bonus Skills for: Katana Level "D"
  727.                 2 => [ 3, ],            # Bonus Skills for: Katana Level "C"
  728.                 3 => [ 3, 4, ],         # Bonus Skills for: Katana Level "B"
  729.                 4 => [ 3, 4, ],         # Bonus Skills for: Katana Level "A"
  730.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Katana Level "S"
  731.              },
  732.              
  733.              
  734.         2 => {                          # <= Bonus Skills for Actor Two
  735.                 1 => [ 3, ],            # Bonus Skills for: Katana Level "D"
  736.                 2 => [ 3, ],            # Bonus Skills for: Katana Level "C"
  737.                 3 => [ 3, 4, ],         # Bonus Skills for: Katana Level "B"
  738.                 4 => [ 3, 4, ],         # Bonus Skills for: Katana Level "A"
  739.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Katana Level "S"
  740.              },
  741.      
  742.      # If you have more actors, you can add them Just above this comment
  743.      }, # <= Do Not Delete
  744.      
  745.      
  746.      
  747.      # Weapon Type 6, By Default is 'Weapon Type: Bow'
  748.      6 => {    
  749.               #   Skill IDs
  750.         1 => {                          # <= Bonus Skills for Actor One
  751.                 1 => [ 3, ],            # Bonus Skills for: Bow Level "D"
  752.                 2 => [ 3, ],            # Bonus Skills for: Bow Level "C"
  753.                 3 => [ 3, 4, ],         # Bonus Skills for: Bow Level "B"
  754.                 4 => [ 3, 4, ],         # Bonus Skills for: Bow Level "A"
  755.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Bow Level "S"
  756.              },
  757.              
  758.              
  759.         2 => {                          # <= Bonus Skills for Actor Two
  760.                 1 => [ 3, ],            # Bonus Skills for: Bow Level "D"
  761.                 2 => [ 3, ],            # Bonus Skills for: Bow Level "C"
  762.                 3 => [ 3, 4, ],         # Bonus Skills for: Bow Level "B"
  763.                 4 => [ 3, 4, ],         # Bonus Skills for: Bow Level "A"
  764.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Bow Level "S"
  765.              },
  766.      
  767.      # If you have more actors, you can add them Just above this comment
  768.      }, # <= Do Not Delete
  769.      
  770.      
  771.      
  772.      # Weapon Type 7, By Default is 'Weapon Type: Dagger'
  773.      7 => {    
  774.               #   Skill IDs
  775.         1 => {                          # <= Bonus Skills for Actor One
  776.                 1 => [ 3, ],            # Bonus Skills for: Dagger Level "D"
  777.                 2 => [ 3, ],            # Bonus Skills for: Dagger Level "C"
  778.                 3 => [ 3, 4, ],         # Bonus Skills for: Dagger Level "B"
  779.                 4 => [ 3, 4, ],         # Bonus Skills for: Dagger Level "A"
  780.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Dagger Level "S"
  781.              },
  782.              
  783.              
  784.         2 => {                          # <= Bonus Skills for Actor Two
  785.                 1 => [ 3, ],            # Bonus Skills for: Dagger Level "D"
  786.                 2 => [ 3, ],            # Bonus Skills for: Dagger Level "C"
  787.                 3 => [ 3, 4, ],         # Bonus Skills for: Dagger Level "B"
  788.                 4 => [ 3, 4, ],         # Bonus Skills for: Dagger Level "A"
  789.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Dagger Level "S"
  790.              },
  791.      
  792.      # If you have more actors, you can add them Just above this comment
  793.      }, # <= Do Not Delete
  794.      
  795.      
  796.      
  797.      # Weapon Type 8, By Default is 'Weapon Type: Hammer'
  798.      8 => {    
  799.               #   Skill IDs
  800.         1 => {                          # <= Bonus Skills for Actor One
  801.                 1 => [ 3, ],            # Bonus Skills for: Hammer Level "D"
  802.                 2 => [ 3, ],            # Bonus Skills for: Hammer Level "C"
  803.                 3 => [ 3, 4, ],         # Bonus Skills for: Hammer Level "B"
  804.                 4 => [ 3, 4, ],         # Bonus Skills for: Hammer Level "A"
  805.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Hammer Level "S"
  806.              },
  807.              
  808.              
  809.         2 => {                          # <= Bonus Skills for Actor Two
  810.                 1 => [ 3, ],            # Bonus Skills for: Hammer Level "D"
  811.                 2 => [ 3, ],            # Bonus Skills for: Hammer Level "C"
  812.                 3 => [ 3, 4, ],         # Bonus Skills for: Hammer Level "B"
  813.                 4 => [ 3, 4, ],         # Bonus Skills for: Hammer Level "A"
  814.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Hammer Level "S"
  815.              },
  816.      
  817.      # If you have more actors, you can add them Just above this comment
  818.      }, # <= Do Not Delete
  819.      
  820.      
  821.      
  822.      # Weapon Type 9, By Default is 'Weapon Type: Staff'
  823.      9 => {    
  824.               #   Skill IDs
  825.         1 => {                          # <= Bonus Skills for Actor One
  826.                 1 => [ 3, ],            # Bonus Skills for: Staff Level "D"
  827.                 2 => [ 3, ],            # Bonus Skills for: Staff Level "C"
  828.                 3 => [ 3, 4, ],         # Bonus Skills for: Staff Level "B"
  829.                 4 => [ 3, 4, ],         # Bonus Skills for: Staff Level "A"
  830.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Staff Level "S"
  831.              },
  832.              
  833.              
  834.         2 => {                          # <= Bonus Skills for Actor Two
  835.                 1 => [ 3, ],            # Bonus Skills for: Staff Level "D"
  836.                 2 => [ 3, ],            # Bonus Skills for: Staff Level "C"
  837.                 3 => [ 3, 4, ],         # Bonus Skills for: Staff Level "B"
  838.                 4 => [ 3, 4, ],         # Bonus Skills for: Staff Level "A"
  839.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Staff Level "S"
  840.              },
  841.      
  842.      # If you have more actors, you can add them Just above this comment
  843.      }, # <= Do Not Delete
  844.      
  845.      
  846.      
  847.      # Weapon Type 10, By Default is 'Weapon Type: Gun'
  848.      10 => {    
  849.               #   Skill IDs
  850.         1 => {                          # <= Bonus Skills for Actor One
  851.                 1 => [ 3, ],            # Bonus Skills for: Gun Level "D"
  852.                 2 => [ 3, ],            # Bonus Skills for: Gun Level "C"
  853.                 3 => [ 3, 4, ],         # Bonus Skills for: Gun Level "B"
  854.                 4 => [ 3, 4, ],         # Bonus Skills for: Gun Level "A"
  855.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Gun Level "S"
  856.              },
  857.              
  858.              
  859.         2 => {                          # <= Bonus Skills for Actor Two
  860.                 1 => [ 3, ],            # Bonus Skills for: Gun Level "D"
  861.                 2 => [ 3, ],            # Bonus Skills for: Gun Level "C"
  862.                 3 => [ 3, 4, ],         # Bonus Skills for: Gun Level "B"
  863.                 4 => [ 3, 4, ],         # Bonus Skills for: Gun Level "A"
  864.                 5 => [ 3, 4, 5, ],      # Bonus Skills for: Gun Level "S"
  865.              },
  866.      
  867.      # If you have more actors, you can add them Just above this comment
  868.      }, # <= Do Not Delete
  869.      
  870.      
  871.      
  872.      
  873.       # Same as before, if you have any more weapon types, add them above this
  874.       # comment
  875.     }
  876.    
  877.    
  878.    
  879.    
  880.    
  881.     #----------------------------------------------------------------------
  882.     # * Weapon Status Menu Information
  883.     #----------------------------------------------------------------------
  884.     WeaponStatusMenuInfo = {
  885.       :weapon_level_colour => {
  886.         # Colour:  Red,  Green,  Blue  
  887.         1  => [    150,   150,    60  ], # Colour For: Actor's Name
  888.         2  => [    255,   200,   255  ], # Colour For: "Weapon Level" Label
  889.         3  => [    200,   255,   255  ], # Colour For: "Weapon Level Bonuses" Label
  890.         4  => [    255,    50,   255  ], # Colour For: Weapon Level "S"
  891.         5  => [    170,   135,   170  ], # Colour For: Weapon Level "A"
  892.         6  => [    140,   165,   140  ], # Colour For: Weapon Level "B"
  893.         7  => [    110,   195,   110  ], # Colour For: Weapon Level "C"
  894.         8  => [     80,   225,    80  ], # Colour For: Weapon Level "D"
  895.         9  => [     50,   255,    50  ], # Colour For: Weapon Level "E"
  896.         10 => [    255,   255,   255  ], # Colour For: No Weapon Param Bonus
  897.         11 => [     50,   255,    50  ], # Colour For: Weapon Param Bonus
  898.         12 => [    255,   216,     0  ], # Colour For: Equipped Weapon Param Bonus
  899.         13 => [    127,   100,    36  ], # Colour For: Weapon Gauge Primary Colour
  900.         14 => [     63,    50,    18  ], # Colour For: Weapon Gauge Gradient Colour
  901.       },
  902.      
  903.       :weapon_icon_id => {
  904.         #     Icon_ID,  
  905.         1  => [ 144 ],       # Weapon Type: Axe
  906.         2  => [ 145 ],       # Weapon Type: Claw
  907.         3  => [ 146 ],       # Weapon Type: Spear
  908.         4  => [ 147 ],       # Weapon Type: Sword
  909.         5  => [ 148 ],       # Weapon Type: Katana
  910.         6  => [ 149 ],       # Weapon Type: Bow
  911.         7  => [ 150 ],       # Weapon Type: Dagger
  912.         8  => [ 151 ],       # Weapon Type: Hammer
  913.         9  => [ 152 ],       # Weapon Type: Staff
  914.         10 => [ 153 ],       # Weapon Type: Gun
  915.                              # More Weapon Types? No Worries, Insert Them Here.
  916.       },
  917.      
  918.     :bonusparam_icon_id => {
  919.         #    Icon_ID,  
  920.         1  => [ 66 ],       # Icon for Bonus Param: ATK
  921.         2  => [ 67 ],       # Icon for Bonus Param: DEF
  922.         3  => [ 68 ],       # Icon for Bonus Param: MAT
  923.         4  => [ 69 ],       # Icon for Bonus Param: MDF
  924.         5  => [ 70 ],       # Icon for Bonus Param: AGI
  925.       },
  926.     }
  927.     #===========================================================
  928.     #                                           \/
  929.     #               End of Editable Region      /\
  930.     #                                           \/
  931.     #===========================================================
  932.     #---------------------------------------------------------
  933.     # No touchie past here unless you know what you are
  934.     # doing. Failure to heed this warning could cause your
  935.     # computer to yell and scream at you.
  936.     #
  937.     # Edit at your own risk.
  938.     #--------------------------------------------------------
  939.    
  940.    
  941.    
  942.    
  943.    
  944.    
  945.    
  946.    
  947.    
  948.    
  949.     #------------------------------------------------------------------------
  950.     # * Toggle Weapon Level Message Box
  951.     #------------------------------------------------------------------------
  952.     def self.toggle_weapon_level_message_display( on_or_off )
  953.       self.const_set(:Show_Message_Box, on_or_off) if !!on_or_off == on_or_off
  954.     end
  955.     #------------------------------------------------------------------------
  956.     # * Get Current Weapon Skill
  957.     #------------------------------------------------------------------------
  958.     def self.get_current_weapon_level( wType, actor_id, wCurrentSkill )
  959.       return "E" if wType <= 0 || wCurrentSkill == nil
  960.       return "S" if wCurrentSkill >= WeaponAccumulation[wType][actor_id][4]
  961.       return "A" if wCurrentSkill >= WeaponAccumulation[wType][actor_id][3]
  962.       return "B" if wCurrentSkill >= WeaponAccumulation[wType][actor_id][2]
  963.       return "C" if wCurrentSkill >= WeaponAccumulation[wType][actor_id][1]
  964.       return "D" if wCurrentSkill >= WeaponAccumulation[wType][actor_id][0]
  965.       return "E"
  966.     end
  967.     #------------------------------------------------------------------------
  968.     # * Convert Skill String To Index
  969.     #------------------------------------------------------------------------
  970.     def self.convert_skill_string_to_index( skill_string )
  971.       case skill_string
  972.         when "S" then return 4
  973.         when "A" then return 3
  974.         when "B" then return 2
  975.         when "C" then return 1
  976.         when "D" then return 0
  977.       end
  978.       return -1
  979.     end
  980.     #------------------------------------------------------------------------
  981.     # * Increment Weapon Skill Points
  982.     #------------------------------------------------------------------------
  983.     def self.increment_weapon_skill_points( actor_id, skillpoints = -1 )
  984.       skillpoints = Attack_Points_Gain if skillpoints < 0
  985.       actor = $game_actors[actor_id]
  986.      
  987.       # Get Weapon Types and Skill Levels
  988.       weapontype1 = actor.equips[0] && actor.equips[0].is_a?(RPG::Weapon) ? actor.equips[0].wtype_id : 0
  989.       weapontype2 = actor.equips[1] && actor.equips[1].is_a?(RPG::Weapon) ? actor.equips[1].wtype_id : 0
  990.            
  991.       # Increment Weapon Skill Points, Add Bonus Params, Show Level Up Message Box
  992.       if weapontype1 && weapontype1 > 0
  993.         weapon_skill = get_current_weapon_level( weapontype1, actor.id, actor.dp3_weapon_level[weapontype1 - 1] )
  994.         actor.dp3_weapon_level[weapontype1 - 1] += skillpoints
  995.         show_weapon_level_up_message_box(weapontype1, actor_id, weapon_skill)
  996.         remove_and_add_bonus_params(weapontype1, actor_id, weapon_skill)
  997.         remove_and_add_bonus_skills(weapontype1, actor_id, weapon_skill)
  998.       end
  999.      
  1000.       if weapontype2 && weapontype2 > 0
  1001.         weapon_skill = get_current_weapon_level( weapontype2, actor.id, actor.dp3_weapon_level[weapontype2 - 1] )
  1002.         actor.dp3_weapon_level[weapontype2 - 1] += skillpoints
  1003.         if weapontype1 != weapontype2
  1004.           show_weapon_level_up_message_box(weapontype2, actor_id, weapon_skill)
  1005.           remove_and_add_bonus_params(weapontype2, actor_id, weapon_skill)
  1006.           remove_and_add_bonus_skills(weapontype2, actor_id, weapon_skill)
  1007.         end
  1008.       end
  1009.     end
  1010.     #------------------------------------------------------------------------
  1011.     # * Increment Specific Weapon Skill Points
  1012.     #------------------------------------------------------------------------
  1013.     def self.increment_specific_weapon_skill_points( actor_id, wType, skillpoints = 1 )
  1014.       actor = $game_actors[actor_id]
  1015.      
  1016.       # Get Weapon Types and Skill Levels
  1017.       weapon_skill = get_current_weapon_level( wType, actor_id, actor.dp3_weapon_level[wType - 1] )
  1018.        
  1019.       # Increase Weapon Skill Points
  1020.       actor.dp3_weapon_level[wType - 1] += skillpoints
  1021.      
  1022.       # Show Weapon Level Up Message Box if Weapon Rank Increased
  1023.       show_weapon_level_up_message_box(wType, actor_id, weapon_skill)
  1024.      
  1025.       # Modify Bonus Params if Weapon Rank Increased
  1026.       remove_and_add_bonus_params(wType, actor_id, weapon_skill)
  1027.      
  1028.       # Modify Bonus Skills if Weapon Rank Increased
  1029.       remove_and_add_bonus_skills(wType, actor_id, weapon_skill)
  1030.     end
  1031.     #------------------------------------------------------------------------
  1032.     # * Add Bonus Params
  1033.     #------------------------------------------------------------------------
  1034.     def self.add_bonus_params( wType, actor_id, slot_id, skip_weapon_check = false, curr_skill = nil)
  1035.       unless !skip_weapon_check && get_opposing_weapon_slot_weapon_type( actor_id, slot_id ) == wType
  1036.         actor = $game_actors[actor_id]
  1037.         unless curr_skill
  1038.           method_args = [wType, actor_id, actor.dp3_weapon_level[wType - 1]]
  1039.           curr_skill = get_current_weapon_level( *method_args )
  1040.         end
  1041.         for i in 0..4
  1042.           actor.dp3_increment_param(i + 2, get_bonus_param( wType, actor_id, i, curr_skill ))
  1043.         end
  1044.       end
  1045.     end
  1046.     #------------------------------------------------------------------------
  1047.     # * Remove Bonus Params
  1048.     #------------------------------------------------------------------------
  1049.     def self.remove_bonus_params( wType, actor_id, slot_id, skip_weapon_check = false, curr_skill = nil)
  1050.       unless !skip_weapon_check && get_opposing_weapon_slot_weapon_type( actor_id, slot_id ) == wType
  1051.         actor = $game_actors[actor_id]
  1052.         unless curr_skill
  1053.           method_args = [wType, actor_id, actor.dp3_weapon_level[wType - 1]]
  1054.           curr_skill = get_current_weapon_level( *method_args )
  1055.         end
  1056.         for i in 0..4
  1057.           actor.dp3_decrement_param(i + 2, get_bonus_param( wType, actor_id, i, curr_skill ))
  1058.         end
  1059.       end
  1060.     end
  1061.     #------------------------------------------------------------------------
  1062.     # * Add and Remove Bonus Params
  1063.     #------------------------------------------------------------------------
  1064.     def self.remove_and_add_bonus_params(wType, actor_id, skill_before)
  1065.       curr_skill = get_current_weapon_level( wType, actor_id, $game_actors[actor_id].dp3_weapon_level[wType - 1] )
  1066.      
  1067.       if convert_skill_string_to_index(curr_skill) > convert_skill_string_to_index(skill_before)
  1068.         if get_currently_equipping_this_weapon_type( wType, actor_id )
  1069.           remove_bonus_params( wType, actor_id, nil, true)
  1070.           add_bonus_params( wType, actor_id, nil, true)
  1071.         end
  1072.       end
  1073.     end
  1074.     #------------------------------------------------------------------------
  1075.     # * Add Weapon Bonus Skills
  1076.     #------------------------------------------------------------------------
  1077.     def self.add_weapon_bonus_skills( wType, actor_id, slot_id, skip_weapon_check = false, curr_skill = nil)
  1078.      unless !skip_weapon_check && get_opposing_weapon_slot_weapon_type( actor_id, slot_id ) == wType
  1079.        unless curr_skill
  1080.           method_args = [wType, actor_id, $game_actors[actor_id].dp3_weapon_level[wType - 1]]
  1081.           curr_skill = get_current_weapon_level( *method_args )
  1082.         end
  1083.         curr_skill = convert_skill_string_to_index( curr_skill )
  1084.         return if curr_skill < 0
  1085.        
  1086.         # Now Apply Learning the Skills
  1087.         WeaponSkillBonuses[wType][actor_id][curr_skill + 1].each do |skill_id|
  1088.           $game_actors[actor_id].learn_skill(skill_id)
  1089.         end
  1090.       end
  1091.     end
  1092.     #------------------------------------------------------------------------
  1093.     # * Remove Weapon Bonus Skills
  1094.     #------------------------------------------------------------------------
  1095.     def self.remove_weapon_bonus_skills( wType, actor_id, slot_id, skip_weapon_check = false, curr_skill = nil)
  1096.       unless !skip_weapon_check && get_opposing_weapon_slot_weapon_type( actor_id, slot_id ) == wType
  1097.         unless curr_skill
  1098.           method_args = [wType, actor_id, $game_actors[actor_id].dp3_weapon_level[wType - 1]]
  1099.           curr_skill = get_current_weapon_level( *method_args )
  1100.         end
  1101.         curr_skill = convert_skill_string_to_index( curr_skill )
  1102.         return if curr_skill < 0
  1103.        
  1104.         # Now Apply Forgetting the Skills
  1105.         WeaponSkillBonuses[wType][actor_id][curr_skill + 1].each do |skill_id|
  1106.           $game_actors[actor_id].forget_skill(skill_id)
  1107.         end
  1108.        
  1109.         # Incase of Dual Wielding Weapons, the other Weapon May Contain Skills We
  1110.         # Just Removed, So Relearn them if Necessary
  1111.         return if skip_weapon_check
  1112.         wType = get_opposing_weapon_slot_weapon_type( actor_id, slot_id )
  1113.         return if wType == 0
  1114.         method_args = [wType, actor_id, $game_actors[actor_id].dp3_weapon_level[wType - 1]]
  1115.         curr_skill = get_current_weapon_level( *method_args )
  1116.         add_weapon_bonus_skills( wType, actor_id, nil, true, curr_skill)
  1117.       end
  1118.     end
  1119.     #------------------------------------------------------------------------
  1120.     # * Add and Remove Bonus Skills
  1121.     #------------------------------------------------------------------------
  1122.     def self.remove_and_add_bonus_skills(wType, actor_id, skill_before)
  1123.       curr_skill = get_current_weapon_level( wType, actor_id, $game_actors[actor_id].dp3_weapon_level[wType - 1] )
  1124.      
  1125.       if convert_skill_string_to_index(curr_skill) > convert_skill_string_to_index(skill_before)
  1126.         if get_currently_equipping_this_weapon_type( wType, actor_id )
  1127.           remove_weapon_bonus_skills( wType, actor_id, nil, true, skill_before)
  1128.           add_weapon_bonus_skills( wType, actor_id, nil, true, curr_skill)
  1129.         end
  1130.       end
  1131.     end
  1132.     #------------------------------------------------------------------------
  1133.     # * Weapon Compatible With Current Skill?
  1134.     #------------------------------------------------------------------------
  1135.     def self.get_skilllevel_and_weapon_compatible( current_skill, wskill )
  1136.       current_skill         = convert_skill_string_to_index(current_skill)
  1137.       wskill                = convert_skill_string_to_index(wskill)
  1138.       return current_skill >= wskill
  1139.     end  
  1140.     #------------------------------------------------------------------------
  1141.     # * Get Currently Equipped This Weapon Type?
  1142.     #------------------------------------------------------------------------
  1143.     def self.get_currently_equipping_this_weapon_type( wType, actor_id )
  1144.       weapon1 = $game_actors[actor_id].equips[0]
  1145.       weapon1 = weapon1 && weapon1.is_a?(RPG::Weapon) ? weapon1.wtype_id : 0
  1146.       weapon2 = $game_actors[actor_id].equips[1]
  1147.       weapon2 = weapon2 && weapon2.is_a?(RPG::Weapon) ? weapon2.wtype_id : 0
  1148.       return weapon1 == wType || weapon2 == wType
  1149.     end
  1150.     #------------------------------------------------------------------------
  1151.     # * Get Opposing Weapon Slot Type ~ Dual Wielding
  1152.     #------------------------------------------------------------------------
  1153.     def self.get_opposing_weapon_slot_weapon_type( actor_id, slot_id )
  1154.       # We're Checking the opposite Weapon Slot
  1155.       if slot_id == 0
  1156.         slot_id = 1
  1157.       else
  1158.         slot_id = 0
  1159.       end
  1160.       weapontype = $game_actors[actor_id].equips[slot_id]
  1161.       weapontype = weapontype && weapontype.is_a?(RPG::Weapon) ? weapontype.wtype_id : 0
  1162.       return weapontype
  1163.     end
  1164.     #------------------------------------------------------------------------
  1165.     # * Get Next Level Up Rate
  1166.     #------------------------------------------------------------------------
  1167.     def self.get_next_level_up_rate( wType, actor_id, current_skill, current_skill_points )
  1168.       return 0.0 if wType <= 0
  1169.       case current_skill
  1170.         when "S"
  1171.           return 1.0
  1172.         when "A"
  1173.           return current_skill_points.to_f / WeaponAccumulation[wType][actor_id][4]
  1174.         when "B"
  1175.           return current_skill_points.to_f / WeaponAccumulation[wType][actor_id][3]
  1176.         when "C"
  1177.           return current_skill_points.to_f / WeaponAccumulation[wType][actor_id][2]
  1178.         when "D"
  1179.           return current_skill_points.to_f / WeaponAccumulation[wType][actor_id][1]
  1180.       end
  1181.       return current_skill_points.to_f / WeaponAccumulation[wType][actor_id][0]
  1182.     end
  1183.     #------------------------------------------------------------------------
  1184.     # * Get Bonus Param
  1185.     #------------------------------------------------------------------------
  1186.     def self.get_bonus_param( wType, actor_id, param, curr_skill, return_float = false )
  1187.       return 0 if curr_skill == "E" || wType <= 0
  1188.       index = 5 * convert_skill_string_to_index(curr_skill)
  1189.       actor_param = $game_actors[actor_id].class.params[param + 2, $game_actors[actor_id].level]
  1190.       actor_param = (actor_param.to_f * (WeaponParamBonuses[wType][actor_id][param + index].to_f * 0.01)).to_f
  1191.       actor_param = 1.0 if actor_param < 1.0 && WeaponParamBonuses[wType][actor_id][param + index] > 0
  1192.       return actor_param if return_float
  1193.       return actor_param.to_i
  1194.     end
  1195.     #--------------------------------------------------------------------------
  1196.     # * Show Weapon Level Up Message Box
  1197.     #--------------------------------------------------------------------------
  1198.     def self.show_weapon_level_up_message_box(wType, actor_id, skill_before)
  1199.       return unless actor_id && Show_Message_Box && wType > 0
  1200.       curr_skill = get_current_weapon_level( wType, actor_id, $game_actors[actor_id].dp3_weapon_level[wType - 1] )
  1201.      
  1202.       if convert_skill_string_to_index(curr_skill) > convert_skill_string_to_index(skill_before)
  1203.         RPG::SE.new(Rank_Up_SE, SE_Volume, SE_Pitch).play if Rank_Up_SE && Rank_Up_SE != "NO_SOUNDEFFECT"
  1204.         actor_name = $game_actors[actor_id].name + "'s "
  1205.         $game_message.add('\.' + $game_actors[actor_id].name + " " + Increased_Weapon_Rank_Text)
  1206.        
  1207.         # Attack
  1208.         old_bonus_param = get_bonus_param( wType, actor_id, 0, skill_before, true )
  1209.         new_bonus_param = get_bonus_param( wType, actor_id, 0, curr_skill, true )
  1210.         $game_message.add('\.' + actor_name + Increased_Attack_Power) if new_bonus_param > old_bonus_param
  1211.        
  1212.         # Defence
  1213.         old_bonus_param = get_bonus_param( wType, actor_id, 1, skill_before, true )
  1214.         new_bonus_param = get_bonus_param( wType, actor_id, 1, curr_skill, true )
  1215.         $game_message.add('\.' + actor_name + Increased_Defence_Power) if new_bonus_param > old_bonus_param
  1216.        
  1217.         # Magic Attack
  1218.         old_bonus_param = get_bonus_param( wType, actor_id, 2, skill_before, true )
  1219.         new_bonus_param = get_bonus_param( wType, actor_id, 2, curr_skill, true )
  1220.         $game_message.add('\.' + actor_name + Increased_Magic_Attack_Power) if new_bonus_param > old_bonus_param
  1221.        
  1222.         # Magic Defense
  1223.         old_bonus_param = get_bonus_param( wType, actor_id, 3, skill_before, true )
  1224.         new_bonus_param = get_bonus_param( wType, actor_id, 3, curr_skill, true )
  1225.         $game_message.add('\.' + actor_name + Increased_Magic_Defence_Power) if new_bonus_param > old_bonus_param
  1226.        
  1227.         # Agility
  1228.         old_bonus_param = get_bonus_param( wType, actor_id, 4, skill_before, true )
  1229.         new_bonus_param = get_bonus_param( wType, actor_id, 4, curr_skill, true )
  1230.         $game_message.add('\.' + actor_name + Increased_Agility_Power) if new_bonus_param > old_bonus_param
  1231.        
  1232.         # Learned new Skill?
  1233.         curr_skill = convert_skill_string_to_index( curr_skill )
  1234.         WeaponSkillBonuses[wType][actor_id][curr_skill + 1].each do |skill_id|
  1235.           unless $game_actors[actor_id].skill_learn?($data_skills[skill_id])
  1236.             $game_actors[actor_id].learn_skill(skill_id)
  1237.             $game_message.add('\.' + $game_actors[actor_id].name + " " + Acquired_New_Skill)
  1238.             break
  1239.           end
  1240.         end
  1241.       end
  1242.     end
  1243.   end # Weapon Levels Module
  1244. end # DiamondandPlatinum3 Module
  1245.  
  1246.  
  1247.  
  1248. #==============================================================================
  1249. # ** Game_Actor
  1250. #------------------------------------------------------------------------------
  1251. #  This class handles actors. It is used within the Game_Actors class
  1252. # ($game_actors) and is also referenced from the Game_Party class ($game_party).
  1253. #==============================================================================
  1254.  
  1255. class Game_Actor < Game_Battler
  1256.   #--------------------------------------------------------------------------
  1257.   # * Public Instance Variables
  1258.   #--------------------------------------------------------------------------
  1259.   attr_accessor :dp3_weapon_level                 # Weapon Level Array
  1260.   attr_accessor :dp3_normal_params                # Regular Parameters Array
  1261.   attr_accessor :dp3_actor_param_weapon_bonus     # Bonus Parameters Array
  1262.   #--------------------------------------------------------------------------
  1263.   # * Alias Listings
  1264.   #--------------------------------------------------------------------------
  1265.   alias dp3_weaplev_gameactor_init_0edku                  initialize
  1266.   alias dp3_weaplev_gameactor_equippable_0edku            equippable?
  1267.   alias dp3_weaplev_gameactor_changeequip_0edku           change_equip
  1268.   alias dp3_weaplev_gameactor_skillconditionsmet_0edku    skill_conditions_met?
  1269.   #--------------------------------------------------------------------------
  1270.   # * Object Initialization
  1271.   #--------------------------------------------------------------------------
  1272.   def initialize( *args )
  1273.     @dp3_weapon_level             = []
  1274.     @dp3_normal_params            = [ 0, 0, 0, 0, 0  ] # ATK, DEF, MAT, MDF, AGI
  1275.     @dp3_actor_param_weapon_bonus = [ 0, 0, 0, 0, 0,   # ATK, DEF, MAT, MDF, AGI
  1276.                                       0, 0, 0, 0, 0, ] # In Case Of Dual Wielding
  1277.     highest_weapon_id = 0
  1278.     for weapon in $data_weapons
  1279.       highest_weapon_id = weapon.wtype_id if weapon && weapon.wtype_id > highest_weapon_id
  1280.     end
  1281.     while(@dp3_weapon_level.size < highest_weapon_id)
  1282.       @dp3_weapon_level[@dp3_weapon_level.size] = 0
  1283.     end
  1284.    
  1285.    
  1286.     # Call Original Method
  1287.     dp3_weaplev_gameactor_init_0edku( *args )
  1288.   end
  1289.   #--------------------------------------------------------------------------
  1290.   # * Determine if Equippable
  1291.   #--------------------------------------------------------------------------
  1292.   def equippable?(item)
  1293.     can_equip = dp3_weaplev_gameactor_equippable_0edku(item) # Call Original Method
  1294.     return can_equip || item.is_a?(RPG::Weapon) && dp3_is_weapon_level_sufficient(item)
  1295.   end
  1296.   #--------------------------------------------------------------------------
  1297.   # * Change Equipment
  1298.   #--------------------------------------------------------------------------
  1299.   def change_equip(slot_id, item)
  1300.     # Remove the Bonus Params For the Weapon Type Being Removed
  1301.     if self.equips[slot_id] && self.equips[slot_id].is_a?(RPG::Weapon)
  1302.       removed_weapon_type = self.equips[slot_id].wtype_id
  1303.       if removed_weapon_type > 0
  1304.         DiamondandPlatinum3::WeaponLevels::remove_bonus_params(removed_weapon_type, self.id, slot_id)
  1305.         DiamondandPlatinum3::WeaponLevels::remove_weapon_bonus_skills(removed_weapon_type, self.id, slot_id)
  1306.       end
  1307.     end
  1308.        
  1309.     # Add the Bonus Params For the Weapon Type Being Equipped
  1310.     if item && item.is_a?(RPG::Weapon)
  1311.       new_weapon_type = item.wtype_id
  1312.       if new_weapon_type > 0
  1313.         DiamondandPlatinum3::WeaponLevels::add_bonus_params(new_weapon_type, self.id, slot_id)
  1314.         DiamondandPlatinum3::WeaponLevels::add_weapon_bonus_skills(new_weapon_type, self.id, slot_id)
  1315.       end
  1316.     end
  1317.    
  1318.     # Call Original Method
  1319.     dp3_weaplev_gameactor_changeequip_0edku(slot_id, item)
  1320.   end
  1321.  
  1322.   #--------------------------------------------------------------------------
  1323.   # * Determine if Weapon Level is Sufficient
  1324.   #--------------------------------------------------------------------------
  1325.   def dp3_is_weapon_level_sufficient(weapon)
  1326.     # Do Not Equip Weapon Type Notetag
  1327.     $data_actors[self.id].note[/~DoNotEquip\[\s*(.+?)\]/im]
  1328.     if $1
  1329.       do_not_equip_types = $1.scan(/\d+/).collect {|i| i.to_i }
  1330.       return false if do_not_equip_types.include?(weapon.wtype_id)
  1331.     end
  1332.     #~~~~~
  1333.     return true if weapon.wtype_id == 0
  1334.     $data_weapons[weapon.id].note[/~WeaponLevel:\s*(.+)/i]
  1335.     return true unless $1 && $1 != ""
  1336.     method_args = [ weapon.wtype_id, self.id, @dp3_weapon_level[weapon.wtype_id - 1] ]
  1337.     curr_skill = DiamondandPlatinum3::WeaponLevels::get_current_weapon_level( *method_args )
  1338.     return DiamondandPlatinum3::WeaponLevels::get_skilllevel_and_weapon_compatible( curr_skill, $1.upcase )  
  1339.   end
  1340.   #--------------------------------------------------------------------------
  1341.   # * Increment Param
  1342.   #--------------------------------------------------------------------------
  1343.   def dp3_increment_param(param_id, incrementation)
  1344.     @param_plus[param_id] += incrementation
  1345.   end
  1346.   #--------------------------------------------------------------------------
  1347.   # * Decrement Param
  1348.   #--------------------------------------------------------------------------
  1349.   def dp3_decrement_param(param_id, decrementation)
  1350.     @param_plus[param_id] -= decrementation
  1351.   end
  1352.   #--------------------------------------------------------------------------
  1353.   # * Check Usability Conditions for Skill
  1354.   #--------------------------------------------------------------------------
  1355. #~   def skill_conditions_met?(skill)
  1356. #~     return true if dp3_weaplev_gameactor_skillconditionsmet_0edku(skill)
  1357. #~     return false unless usable_item_conditions_met?(skill)
  1358. #~    
  1359. #~     # Check Weapon Types and Skills for Usability
  1360. #~     weapontype = self.equips[0] && self.equips[0].is_a?(RPG::Weapon) ? self.equips[0].wtype_id : 0
  1361. #~     if weapontype > 0
  1362. #~       method_args = [ weapontype, self.id, @dp3_weapon_level[weapontype - 1] ]
  1363. #~       curr_skill = DiamondandPlatinum3::WeaponLevels::get_current_weapon_level( *method_args )
  1364. #~       if curr_skill != "E"
  1365. #~         curr_skill = DiamondandPlatinum3::WeaponLevels::convert_skill_string_to_index( curr_skill ) + 1
  1366. #~         return true if DiamondandPlatinum3::WeaponLevels::WeaponSkillBonuses[weapontype][self.id][curr_skill].include?(skill.id)
  1367. #~       end
  1368. #~     end
  1369. #~     # Weapon 2
  1370. #~     weapontype = self.equips[1] && self.equips[1].is_a?(RPG::Weapon) ? self.equips[1].wtype_id : 0
  1371. #~     return false if weapontype <= 0
  1372. #~     method_args = [ weapontype, self.id, @dp3_weapon_level[weapontype - 1] ]
  1373. #~     curr_skill = DiamondandPlatinum3::WeaponLevels::get_current_weapon_level( *method_args )
  1374. #~     return false if curr_skill == "E"
  1375. #~     curr_skill = DiamondandPlatinum3::WeaponLevels::convert_skill_string_to_index( curr_skill ) + 1
  1376. #~     return DiamondandPlatinum3::WeaponLevels::WeaponSkillBonuses[weapontype][self.id][curr_skill].include?(skill.id)
  1377. #~   end
  1378. end
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386. #==============================================================================
  1387. # ** Game_Actor
  1388. #------------------------------------------------------------------------------
  1389. #  This class handles actors. It is used within the Game_Actors class
  1390. # ($game_actors) and is also referenced from the Game_Party class ($game_party).
  1391. #==============================================================================
  1392.  
  1393. class Game_Actor < Game_Battler
  1394.   #--------------------------------------------------------------------------
  1395.   # * Alias Listings
  1396.   #--------------------------------------------------------------------------
  1397.   alias dp3_weaplev_gameactor_useitem_0edku                 use_item  
  1398.   #--------------------------------------------------------------------------
  1399.   # * Aliased Method: Use Skill/Item
  1400.   #--------------------------------------------------------------------------
  1401.   def use_item(item)
  1402.     if item.is_a?(RPG::Skill)
  1403.       #///// Increment Skill Points if Necessary /////#
  1404.       if item.id == 1 # Attack
  1405.         DiamondandPlatinum3::WeaponLevels::increment_weapon_skill_points( @actor_id )
  1406.       else
  1407.         $data_skills[item.id].note[/~EarnWeaponSkillPoints:\s*(\d+)/im]
  1408.         if $1 && $1 != ""
  1409.           DiamondandPlatinum3::WeaponLevels::increment_weapon_skill_points( @actor_id, $1.to_i )
  1410.         end
  1411.       end
  1412.     end
  1413.    
  1414.     # Call Original Method
  1415.     dp3_weaplev_gameactor_useitem_0edku(item)
  1416.   end
  1417. end
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426. #==============================================================================
  1427. # ** Window_WeaponLevelStatus
  1428. #------------------------------------------------------------------------------
  1429. #  This window displays full status specs on the Weapon Ranks.
  1430. #==============================================================================
  1431.  
  1432. class Window_WeaponLevelStatus < Window_Selectable
  1433.   include DiamondandPlatinum3::WeaponLevels
  1434.   #--------------------------------------------------------------------------
  1435.   # * Object Initialization
  1436.   #--------------------------------------------------------------------------
  1437.   def initialize(actor)
  1438.     @actor = actor
  1439.     create_oy_params
  1440.     super(0, 0, Graphics.width, Graphics.height)
  1441.     refresh
  1442.     activate
  1443.   end
  1444.   #--------------------------------------------------------------------------
  1445.   # * Create OY Params
  1446.   #--------------------------------------------------------------------------
  1447.   def create_oy_params
  1448.     $data_actors[@actor.id].note[/~DoNotEquip\[\s*(.+?)\]/im]
  1449.     do_not_equip_types = $1 ? $1.scan(/\d+/).collect {|i| i.to_i } : []
  1450.     @oy_finish = (90 + (25 * (WeaponAccumulation.size - do_not_equip_types.size)))
  1451.   end
  1452.   #--------------------------------------------------------------------------
  1453.   # * Set Contents Height
  1454.   #--------------------------------------------------------------------------
  1455.   def contents_height
  1456.     return @oy_finish
  1457.   end
  1458.   #--------------------------------------------------------------------------
  1459.   # * Set Actor
  1460.   #--------------------------------------------------------------------------
  1461.   def actor=(actor)
  1462.     return if @actor == actor
  1463.     @actor = actor
  1464.     create_oy_params
  1465.     create_contents
  1466.     self.oy = 0
  1467.     refresh
  1468.   end
  1469.   #--------------------------------------------------------------------------
  1470.   # * Update
  1471.   #--------------------------------------------------------------------------
  1472.   def update(*args)
  1473.     super(*args)
  1474.     self.oy += 1 if Input.press?(:DOWN) && self.oy <= (@oy_finish - self.height)
  1475.     self.oy -= 1 if Input.press?(:UP)   && self.oy > 0
  1476.   end
  1477.   #--------------------------------------------------------------------------
  1478.   # * Refresh
  1479.   #--------------------------------------------------------------------------
  1480.   def refresh
  1481.     self.oy = 0
  1482.     contents.clear
  1483.     @xPos = 20; @yPos = 5
  1484.     # Draw Top
  1485.     draw_actor_name()
  1486.     draw_horz_line(@yPos)
  1487.     @yPos += 20
  1488.    
  1489.     # Draw Lower
  1490.     draw_labels()
  1491.     draw_weapon_level_info()
  1492.   end
  1493.   #--------------------------------------------------------------------------
  1494.   # * Draw Horizontal Line
  1495.   #--------------------------------------------------------------------------
  1496.   def draw_horz_line(y)
  1497.     line_colour = normal_color
  1498.     line_colour.alpha = 48
  1499.     line_y = y + line_height / 2 - 1
  1500.     contents.fill_rect(0, line_y, contents_width, 2, line_colour)
  1501.   end
  1502.   #--------------------------------------------------------------------------
  1503.   # * Draw Icon
  1504.   #--------------------------------------------------------------------------
  1505.   def draw_icon(icon_index, x, y, w = 24, h = 24, enabled = true)
  1506.     bitmap = Cache.system("Iconset")
  1507.     blit_x = ((icon_index % 16) * 24) + (24 - w)
  1508.     blit_y = ((icon_index / 16) * 24) + (24 - h)
  1509.     rect = Rect.new(blit_x, blit_y, w, h)
  1510.     y += (24 - h)
  1511.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  1512.   end
  1513.   #--------------------------------------------------------------------------
  1514.   # * Draw Name
  1515.   #--------------------------------------------------------------------------
  1516.   def draw_actor_name()
  1517.     contents.font.size = 30
  1518.     w = (@actor.name.length * contents.font.size)
  1519.     x = ((self.width * 0.5) - ((@actor.name.length * 13) * 0.5))
  1520.     self.change_color(Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][1]))
  1521.     self.draw_text(x, @yPos, w, contents.font.size, @actor.name)
  1522.    
  1523.    
  1524.     change_color(normal_color)
  1525.     contents.font.size = Font.default_size
  1526.    
  1527.     @yPos += 30
  1528.   end
  1529.   #--------------------------------------------------------------------------
  1530.   # * Draw Labels
  1531.   #--------------------------------------------------------------------------
  1532.   def draw_labels()
  1533.     contents.font.size = 30
  1534.     @xPos += 30
  1535.     self.change_color(Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][2]))
  1536.     self.draw_text(@xPos, @yPos, 180, contents.font.size, "Weapon Level")
  1537.     @xPos += 210
  1538.     self.draw_text(@xPos, @yPos, 250, contents.font.size, "Current Weapon Bonuses")
  1539.     change_color(normal_color)
  1540.     contents.font.size = Font.default_size
  1541.     @xPos = 20
  1542.     @yPos += 35
  1543.   end
  1544.   #--------------------------------------------------------------------------
  1545.   # * Draw Weapon Level Info
  1546.   #--------------------------------------------------------------------------
  1547.   def draw_weapon_level_info()
  1548.     $data_actors[@actor.id].note[/~DoNotEquip\[\s*(.+?)\]/im]
  1549.     do_not_equip_types = $1 ? $1.scan(/\d+/).collect {|i| i.to_i } : []
  1550.     yPos_Correction = 25
  1551.     for i in 1..WeaponAccumulation.size
  1552.       # Skip this Weapon Type?
  1553.       next if do_not_equip_types.include?(i)
  1554.       # Get Current Weapon Skill
  1555.       curr_skill = get_current_weapon_skill(i)
  1556.       # Draw Icon
  1557.       draw_icon(WeaponStatusMenuInfo[:weapon_icon_id][i][0], @xPos, @yPos, 24, yPos_Correction)
  1558.       @xPos += 25
  1559.       # Draw Gauge
  1560.       rate = get_next_level_up_rate(i, curr_skill)
  1561.       draw_gauge(@xPos, @yPos - 5, 150, rate, get_gaugecolour1, get_gaugecolour2)
  1562.       @xPos += 175 # Gauge Width Plus 25 Offset
  1563.       # Draw Weapon Level
  1564.       self.change_color(get_weapon_level_colour( curr_skill ))
  1565.       draw_text(@xPos, @yPos, 25, 25, curr_skill)
  1566.       self.change_color(normal_color)
  1567.       @xPos += 25
  1568.       # Draw Weapon Bonuses
  1569.       for j in 0..4
  1570.         draw_icon(WeaponStatusMenuInfo[:bonusparam_icon_id][j + 1][0], @xPos, @yPos, 24, yPos_Correction)
  1571.         @xPos += 29
  1572.         bonus = self.get_actor_bonus_param( i, j, curr_skill )
  1573.         text = bonus.to_s
  1574.         self.change_color(get_weapon_bonus_colour( bonus, i ))
  1575.         draw_text(@xPos, @yPos, 23, yPos_Correction, text)
  1576.         self.change_color(normal_color)
  1577.         @xPos += 26
  1578.       end
  1579.       @xPos = 20
  1580.       @yPos += yPos_Correction
  1581.     end
  1582.   end
  1583.   #--------------------------------------------------------------------------
  1584.   # * Get Current Weapon Skill
  1585.   #--------------------------------------------------------------------------
  1586.   def get_current_weapon_skill( wType )
  1587.     return DiamondandPlatinum3::WeaponLevels::get_current_weapon_level(
  1588.             wType, @actor.id, @actor.dp3_weapon_level[wType - 1] )
  1589.   end
  1590.   #--------------------------------------------------------------------------
  1591.   # * Get Current Weapon Skill
  1592.   #--------------------------------------------------------------------------
  1593.   def get_next_level_up_rate( wType, curr_skill )
  1594.     return DiamondandPlatinum3::WeaponLevels::get_next_level_up_rate(
  1595.             wType, @actor.id, curr_skill, @actor.dp3_weapon_level[wType - 1] )
  1596.   end
  1597.   #--------------------------------------------------------------------------
  1598.   # * Get Current Weapon Skill
  1599.   #--------------------------------------------------------------------------
  1600.   def get_actor_bonus_param( wType, param, curr_skill )
  1601.     return DiamondandPlatinum3::WeaponLevels::get_bonus_param(
  1602.             wType, @actor.id, param, curr_skill )
  1603.   end        
  1604.   #--------------------------------------------------------------------------
  1605.   # * Get Gauge Colours
  1606.   #--------------------------------------------------------------------------
  1607.   def get_gaugecolour1
  1608.     return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][13])
  1609.   end
  1610.   def get_gaugecolour2
  1611.     return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][14])
  1612.   end
  1613.   #--------------------------------------------------------------------------
  1614.   # * Get Weapon Level Colours
  1615.   #--------------------------------------------------------------------------
  1616.   def get_weapon_level_colour( curr_skill )
  1617.     case curr_skill
  1618.       when "S"; return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][4])
  1619.       when "A"; return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][5])
  1620.       when "B"; return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][6])
  1621.       when "C"; return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][7])
  1622.       when "D"; return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][8])
  1623.     end
  1624.     return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][9])
  1625.   end
  1626.   #--------------------------------------------------------------------------
  1627.   # * Get Weapon Bonus Colour
  1628.   #--------------------------------------------------------------------------
  1629.   def get_weapon_bonus_colour( bonus, wType )
  1630.     if @actor.equips[0] && @actor.equips[0].wtype_id == wType || @actor.equips[1] && @actor.equips[1].is_a?(RPG::Weapon) && @actor.equips[1].wtype_id == wType
  1631.       return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][12])
  1632.     end
  1633.     return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][11]) if bonus > 0
  1634.     return Color.new(*WeaponStatusMenuInfo[:weapon_level_colour][10])
  1635.   end
  1636. end
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642. #==============================================================================
  1643. # ** Scene_WeaponLevelStatus
  1644. #------------------------------------------------------------------------------
  1645. #  This class performs the WeaponLevelStatus screen processing.
  1646. #==============================================================================
  1647.  
  1648. class Scene_WeaponLevelStatus < Scene_MenuBase
  1649.   #--------------------------------------------------------------------------
  1650.   # * Start Processing
  1651.   #--------------------------------------------------------------------------
  1652.   def start
  1653.     super
  1654.     @status_window = Window_WeaponLevelStatus.new(@actor)
  1655.     @status_window.set_handler(:cancel,   method(:return_scene))
  1656.     @status_window.set_handler(:pagedown, method(:next_actor))
  1657.     @status_window.set_handler(:pageup,   method(:prev_actor))
  1658.   end
  1659.   #--------------------------------------------------------------------------
  1660.   # * Change Actors
  1661.   #--------------------------------------------------------------------------
  1662.   def on_actor_change
  1663.     @status_window.actor = @actor
  1664.     @status_window.activate
  1665.   end
  1666. end
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673. #==============================================================================
  1674. # ** Window_MenuCommand
  1675. #------------------------------------------------------------------------------
  1676. #  This command window appears on the menu screen.
  1677. #==============================================================================
  1678.  
  1679. class Window_MenuCommand < Window_Command
  1680.   #--------------------------------------------------------------------------
  1681.   # * For Adding Original Commands
  1682.   #--------------------------------------------------------------------------
  1683.   alias dp3_weaplev_winmenucommand_addorigcommd_0edku   add_original_commands
  1684.   #--------------------------------------------------------------------------
  1685.   def add_original_commands
  1686.     add_command(DiamondandPlatinum3::WeaponLevels::Menu_Option_Title, :weapon_level_status_command, main_commands_enabled)
  1687.     dp3_weaplev_winmenucommand_addorigcommd_0edku()
  1688.   end
  1689. end
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697. #==============================================================================
  1698. # ** Window_EquipStatus
  1699. #------------------------------------------------------------------------------
  1700. #  This window displays actor parameter changes on the equipment screen.
  1701. #==============================================================================
  1702.  
  1703. class Window_EquipStatus < Window_Base
  1704.   #--------------------------------------------------------------------------
  1705.   # * Alias Listings
  1706.   #--------------------------------------------------------------------------
  1707.   alias dp3_weaplev_windowequipstatus_initialize_0edku            initialize
  1708.   alias dp3_weaplev_windowequipstatus_drawnewparam_0edku          draw_new_param
  1709.   #--------------------------------------------------------------------------
  1710.   # * Object Initialization
  1711.   #--------------------------------------------------------------------------
  1712.   def initialize(x, y)
  1713.     @dp3_slot_id = 0
  1714.     dp3_weaplev_windowequipstatus_initialize_0edku(x, y) # Call Original Method
  1715.   end
  1716.   #--------------------------------------------------------------------------
  1717.   # * Draw Post-Equipment Change Parameter
  1718.   #--------------------------------------------------------------------------
  1719.   def draw_new_param(x, y, param_id)
  1720.     bool1 = @temp_actor && @temp_actor.equips[@dp3_slot_id].is_a?(RPG::Weapon)
  1721.     bool2 = param_id > 1 && param_id < 7
  1722.     if bool1 && bool2
  1723.       # Get Weapon Types
  1724.       wType  = @actor.equips[@dp3_slot_id] && @actor.equips[@dp3_slot_id].is_a?(RPG::Weapon) ? @actor.equips[@dp3_slot_id].wtype_id : 0
  1725.       wType2 = @temp_actor.equips[@dp3_slot_id].wtype_id
  1726.       weapon_bonus_param = 0
  1727.      
  1728.       unless wType2 == wType || wType2 == DiamondandPlatinum3::WeaponLevels::get_opposing_weapon_slot_weapon_type( @actor.id, @dp3_slot_id )
  1729.         # Remove Negative Bonus Param from Temp Actor (AKA Current Actor Equipped Weapon)
  1730.         curr_skill = DiamondandPlatinum3::WeaponLevels::get_current_weapon_level( wType, @actor.id, @actor.dp3_weapon_level[wType - 1] )
  1731.         @temp_actor.dp3_decrement_param(param_id, DiamondandPlatinum3::WeaponLevels::get_bonus_param( wType, @actor.id, param_id - 2, curr_skill ))
  1732.        
  1733.         # Get Bonus Param (AKA New Weapon)
  1734.         curr_skill = DiamondandPlatinum3::WeaponLevels::get_current_weapon_level( wType2, @temp_actor.id, @temp_actor.dp3_weapon_level[wType2 - 1] )
  1735.         weapon_bonus_param = DiamondandPlatinum3::WeaponLevels::get_bonus_param( wType2, @temp_actor.id, param_id - 2, curr_skill )
  1736.       end
  1737.      
  1738.       # Apply Param
  1739.       new_value = (@temp_actor.param(param_id) + weapon_bonus_param)
  1740.       change_color(param_change_color(new_value - @actor.param(param_id)))
  1741.       draw_text(x, y, 32, line_height, new_value, 2)
  1742.      
  1743.     else
  1744.       # Call Original Method
  1745.       dp3_weaplev_windowequipstatus_drawnewparam_0edku(x, y, param_id)
  1746.     end
  1747.   end
  1748.   #--------------------------------------------------------------------------
  1749.   # * Set Slot ID
  1750.   #--------------------------------------------------------------------------
  1751.   def dp3_add_slot_id( slot_id )
  1752.     @dp3_slot_id = slot_id
  1753.   end
  1754.   #--------------------------------------------------------------------------
  1755.   # * Get Temp Actor
  1756.   #--------------------------------------------------------------------------
  1757.   def dp3_get_temp_actor()
  1758.     return @temp_actor
  1759.   end
  1760. end
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767. #==============================================================================
  1768. # ** Window_EquipItem
  1769. #------------------------------------------------------------------------------
  1770. #  This window displays choices when opting to change equipment on the
  1771. # equipment screen.
  1772. #==============================================================================
  1773.  
  1774. class Window_EquipItem < Window_ItemList
  1775.   #--------------------------------------------------------------------------
  1776.   # * Update Help Text
  1777.   #--------------------------------------------------------------------------
  1778.   alias dp3_weaplev_windowequipitem_updatehelp_0edku   update_help
  1779.   #--------------------------------------------------------------------------
  1780.   def update_help
  1781.     dp3_weaplev_windowequipitem_updatehelp_0edku() # Call Original Method
  1782.     @status_window.dp3_add_slot_id(@slot_id)
  1783.   end
  1784. end
  1785.  
  1786.  
  1787.  
  1788.  
  1789. #==============================================================================
  1790. # ** Window_SkillList
  1791. #------------------------------------------------------------------------------
  1792. #  This window is for displaying a list of available skills on the skill window.
  1793. #==============================================================================
  1794.  
  1795. class Window_SkillList < Window_Selectable
  1796.   #--------------------------------------------------------------------------
  1797.   # * Include in Skill List?
  1798.   #--------------------------------------------------------------------------
  1799.   alias dp3_weaplev_windowskilllist_include_0edku   include?
  1800.   #--------------------------------------------------------------------------
  1801.   def include?(*args)
  1802.     bool = dp3_weaplev_windowskilllist_include_0edku(args[0]) || enable?(args[0])
  1803.     return bool && args[0].stype_id == @stype_id
  1804.   end
  1805. end
  1806.  
  1807.  
  1808.  
  1809.  
  1810. #==============================================================================
  1811. # ** Scene_Menu
  1812. #------------------------------------------------------------------------------
  1813. #  This class performs the menu screen processing.
  1814. #==============================================================================
  1815.  
  1816. class Scene_Menu < Scene_MenuBase
  1817.   #--------------------------------------------------------------------------
  1818.   # * Alias Listings
  1819.   #--------------------------------------------------------------------------
  1820.   alias dp3_weaplev_scenemenu_createcommdwindow_0edku   create_command_window
  1821.   alias dp3_weaplev_scenemenu_onpersonalok_0edku        on_personal_ok
  1822.   #--------------------------------------------------------------------------
  1823.   # * Create Command Window
  1824.   #--------------------------------------------------------------------------
  1825.   def create_command_window
  1826.     dp3_weaplev_scenemenu_createcommdwindow_0edku()
  1827.     @command_window.set_handler(:weapon_level_status_command, method(:command_personal))
  1828.   end
  1829.   #--------------------------------------------------------------------------
  1830.   # * [OK] Personal Command
  1831.   #--------------------------------------------------------------------------
  1832.   def on_personal_ok
  1833.     case @command_window.current_symbol
  1834.     when :weapon_level_status_command
  1835.       SceneManager.call(Scene_WeaponLevelStatus)
  1836.     else
  1837.       dp3_weaplev_scenemenu_onpersonalok_0edku()
  1838.     end
  1839.   end
  1840. end
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850. #==============================================================================
  1851. # ** Game_Interpreter
  1852. #------------------------------------------------------------------------------
  1853. #  An interpreter for executing event commands. This class is used within the
  1854. # Game_Map, Game_Troop, and Game_Event classes.
  1855. #==============================================================================
  1856.  
  1857. class Game_Interpreter
  1858.   #--------------------------------------------------------------------------
  1859.   # * Add Weapon Skill Points
  1860.   #--------------------------------------------------------------------------
  1861.   def add_weapon_skill_points( actor_id, points )
  1862.     return unless actor_id.is_a?(Integer) && points.is_a?(Integer)
  1863.     if actor_id > 0    
  1864.       # Increase Current Weapon(s) points
  1865.       DiamondandPlatinum3::WeaponLevels::increment_weapon_skill_points(actor_id, points)    
  1866.     end
  1867.   end
  1868.   #--------------------------------------------------------------------------
  1869.   # * Add Weapon Skill Points to Specific Weapon Type
  1870.   #--------------------------------------------------------------------------
  1871.   def add_specific_weapon_type_skill_points( actor_id, wType, points )
  1872.     return unless actor_id.is_a?(Integer) && wType.is_a?(Integer) && points.is_a?(Integer)
  1873.     if actor_id > 0 && wType > 0
  1874.       # Increment Points
  1875.       DiamondandPlatinum3::WeaponLevels::increment_specific_weapon_skill_points( actor_id, wType, points )
  1876.     end
  1877.   end
  1878.   #--------------------------------------------------------------------------
  1879.   # * Add Weapon Skill Points to Specific Weapon Type
  1880.   #--------------------------------------------------------------------------
  1881.   def toggle_weapon_level_message_display( on_or_off )
  1882.     DiamondandPlatinum3::WeaponLevels::toggle_weapon_level_message_display( on_or_off )
  1883.   end
  1884. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement