设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 144|回复: 0

[转载发布] FG7 - JRPG MP Levels (Suikoden MP)

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-2 17:08:32 | 显示全部楼层 |阅读模式
    JRPG MP Levels
    By: FamilyGamer7​


    Introduction
                            This script was designed to imitate the Suikoden 1 & 2 MP level usage within your game. You have a total of 4 MP levels on each actor. For Ex: 0 / 0 / 0 / 0. When Skill LV1 is consumed, it will only deplete the first MP level usage and the same applies to each skill specifically. This script works around the default MP consumption and avoids using external scripts with the manipulation of $game_variables. The idea is to give more control with $game_variables.               
    Click to expand...


    Features
                            - MP level on all actors (Up to 25) - Ex: 4 / 2 / 1 / 0
    - MP levels based on actor class (3 classes + 1 non-class)
    - Able to set MP level maximum to 9 (Like Suikoden)
    - Can define MP consumption
    - Able to recover MP on level up
    - Script call to restore MP for all party members (Inn type event)
    - See more in script header...               
    Click to expand...


    Screenshots
    Spoiler: Example 1
    [/quote]
    Spoiler: Example 2[quote]
    Spoiler: Example 3

    How to Use
                            Add this script in the script editor under in the "Materials" section and above "Main Process".
    The instructions and setup for the script are held within the script header itself. No need to repeat here.               
    Click to expand...


    Script
    Spoiler: FG7 - JRPG MP Levels
                    Ruby:       
    1. #==============================================================================
    2. # Title: JRPG MP Levels
    3. # Author: FamilyGamer7
    4. # Version: 2.4
    5. # Engine: RPG Maker VX Ace
    6. #==============================================================================
    7. # ** Change Log |
    8. # ---------------
    9. # 1.0 => Created Script (Work in Progress)
    10. # 1.1 => Started working more back on the script
    11. # 1.2 => Made script independent - No longer requires "Hime - Tag Manager"
    12. # 1.3 => Added support up to 25 actors
    13. # 1.4 => Added in user friendly control with MP growth up to actor max level
    14. # 1.5 => Added in actor classes that will boost the MP level growth
    15. # 1.6 => Added in the option to remove MP guage from menu
    16. # 1.7 => Added in custom MP level consumption versus the default of "1"
    17. # 1.8 => Added in the option to remove LV1-4 on Skill names
    18. # 1.9 => Added in script call to recover MP on all actors (Inn type event)
    19. # 2.0 => Added in option to remove default actor MP maximum of "9"
    20. # 2.1 => Added in Skill MP usage for battle
    21. # 2.2 => Re-wrote various sections of script for efficiency
    22. # 2.3 => Added in option to recover MP on level up
    23. # 2.4 => Script now completed - No longer "Work in Progress"
    24. #==============================================================================
    25. # ** Description |
    26. # ----------------
    27. # This script was designed to imitate the Suikoden 1 & 2 MP level usage within
    28. # game. You have a total of 4 MP Levels on each actor. For Ex: 0 / 0 / 0 / 0.
    29. # When Skill LV1 is consumed, it will only deplete the first MP level usage and
    30. # the same applies to each skill Specifically.
    31. #
    32. # This script works around the default MP consumption and avoids using external
    33. # scripts with the manipulation of $game_variables.
    34. #
    35. # Overall, the purpose of the script was to imitate Suikoden 1 & 2 MP levels as
    36. # mentioned above, but many options have been added in to customize your game to
    37. # the way you want.
    38. #==============================================================================
    39. # ** Important Note(s) |
    40. # ---------------------
    41. # The script is only designed to work up to 6 actors in the party at a time.
    42. # (Script modification will be needed to support more than 6 actors in party.)
    43. #
    44. # The script also uses the following $game_switches and $game_variables numbers
    45. # within the script (Higher numbers were chosen for compatibility).
    46. # - $game_variables: 900-999
    47. # - $game_switches: 976-999
    48. #
    49. # Within this script, the default "death" state is used, which is id #1. If you
    50. # have changed this to another id #, this script will not work as designed.
    51. #==============================================================================
    52. # ** Setup |
    53. # ----------
    54. #
    55. #  ---------------------
    56. # | Skill Configuration |
    57. #  ---------------------------------------------------------------------------
    58. # | When setting up your skills, you need to define 2 points for this script  |
    59. # | to correctly work without issue. See below.                               |   
    60. #  ---------------------------------------------------------------------------
    61. #
    62. #   Skill Cost:
    63. #
    64. #   - Skill MP Cost must be set as "0"
    65. #
    66. #   Skill Name:
    67. #
    68. #   - Skill name must have LV1, LV2, LV3, or LV4 at the end of its name
    69. #
    70. #     Ex: Healing Water LV1
    71. #         Tsunami Power LV2
    72. #         Thrashing Ocean LV3
    73. #         Ultimate Flood LV4
    74. #
    75. #    -------
    76. #   | Notes |
    77. #    -------
    78. #   The script will automatically remove the LV1, LV2, LV3, and LV4 from the
    79. #   skill names. Unless you decide you want to keep it through the on and off
    80. #   switch in the module configuration.
    81. #
    82. #  --------------------------
    83. # | Skill LV1-4 Name Removal |
    84. #  ---------------------------------------------------------------------------
    85. # | The initial script setup removed the LV1-4 out of the skill name. The     |
    86. # | option has been given to either keep LV in the skill name or remove.      |
    87. #  ---------------------------------------------------------------------------
    88. #
    89. # - To keep "LV" in skill name:
    90. #
    91. #     Ex: RemoveSkill_LV_Name = false
    92. #
    93. # - To remove "LV" in skill name:
    94. #
    95. #     Ex: RemoveSkill_LV_Name = true
    96. #
    97. #  -----------------
    98. # | MP Gauge Option |
    99. #  ---------------------------------------------------------------------------
    100. # | You have the option to turn off the default MP gauge in the game. Since   |
    101. # | this script works around the default MP usage, the gauge will never       |
    102. # | decrease. You can either keep the option on or turn off. Example below.   |
    103. #  ---------------------------------------------------------------------------
    104. #
    105. # - To keep on:
    106. #
    107. #     Ex: RemoveMPGauge = false
    108. #
    109. # - To turn off:
    110. #
    111. #     Ex: RemoveMPGauge = true
    112. #
    113. #  ----------------------
    114. # | MP Maximum Per Level |
    115. #  ---------------------------------------------------------------------------
    116. # | You have the option to go by script design where the maximum MP per level |
    117. # | is "9" or remove it. To remove this maximum cap, see example below.       |
    118. #  ---------------------------------------------------------------------------
    119. #
    120. # - To keep maximum MP of 9:
    121. #
    122. #     Ex: MaxMP9 = true
    123. #
    124. # - To remove maximum MP:
    125. #
    126. #     Ex: MaxMP9 = false
    127. #
    128. #  ------------------------
    129. # | MP Recover on Level Up |
    130. #  ---------------------------------------------------------------------------
    131. # | Allows you to recover MP when the party members level up in battle.       |
    132. #  ---------------------------------------------------------------------------
    133. #
    134. # - To recover MP on level up:
    135. #
    136. #     Ex: RecoverMPOnLvL = true
    137. #
    138. # - To not recover MP on level up:
    139. #
    140. #     Ex: RecoverMPOnLvL = false
    141. #
    142. #    -------
    143. #   | Notes |
    144. #    -------
    145. #   If you win in battle and level up, the party members that are only alive
    146. #   will recover MP when the RecoverMPOnLvL is set to "true".
    147. #
    148. #  ----------------
    149. # | MP Consumption |
    150. #  ---------------------------------------------------------------------------
    151. # | Allows you to modify the value amount that is consumed from the specific  |
    152. # | MP Level on the actor.                                                    |
    153. #  ---------------------------------------------------------------------------
    154. #
    155. # - Default consumption:
    156. #
    157. #     Ex: MP_Consumption = 1
    158. #
    159. # - Custom consumption:
    160. #   (The higher value will decrease MP level faster)
    161. #
    162. #     Ex: MP_Consumption = 2
    163. #
    164. #  -----------------
    165. # | Actor MP Levels |
    166. #  ---------------------------------------------------------------------------
    167. # | These numbers are divided by the actors level which give a MP Level       |
    168. # | Growth like effect. Example below.                                        |
    169. #  ---------------------------------------------------------------------------
    170. #
    171. #     Ex: MP_Level_1 = 11
    172. #
    173. #     If Actor1 is level 39, and you define MP_Level_1 as 11, then...
    174. #     39 / MP_Level_1 = 3.545. If the number is not a whole number and is a
    175. #     decimal, the number will round up or down based off the decimal place.
    176. #
    177. #     What you want to keep in mind, the bigger the number, the slower the MP
    178. #     level growth will be on the Actor. So, if you define a small number, the
    179. #     MP level growth will be faster. Same applies when using the actor
    180. #     class multiplier.
    181. #
    182. #    -------
    183. #   | Notes |
    184. #    -------
    185. #   If an actor does not match one of the 3 classes, then it will use
    186. #   the defined MP Levels without a multiplier, thus giving you essentially
    187. #   4 differenct classes as a total.
    188. #
    189. #  --------------------------------
    190. # | MP Levels Based On Actor Class |
    191. #  ---------------------------------------------------------------------------
    192. # | It would not be fun if everyone had the same MP Level growth. To make it  |
    193. # | more interesting, you can define between 3 different classes within your  |
    194. # | game. So for example, a Mage would have a higher MP level growth than a   |
    195. # | warrior actor class.                                                      |
    196. #  ---------------------------------------------------------------------------
    197. #
    198. #     The actors that are soldiers, you would define in Class1, Class2, and
    199. #     Class3 as shown below. Remember to add the "Soldier" name to as the class
    200. #     in the Game Database.
    201. #
    202. #     Actor 1-3 (Class = Soldier)
    203. #     Ex: Class1 = "Soldier"
    204. #
    205. #     Actor 4-7 (Class = Mage)
    206. #     Ex: Class2 = "Mage"
    207. #
    208. #     Actor 8-11 (Class = Bowman)
    209. #     Ex: Class3 = "Bowman"
    210. #
    211. #    -------
    212. #   | Notes |
    213. #    -------
    214. #   If you do not define a class on an actor that matches in the script setup,
    215. #   it will just not use the defined multipliers for MP level growth.
    216. #
    217. #  ----------------------------------------------------
    218. # | MP level Recovery - Party Members (Inn Type Event) |
    219. #  ---------------------------------------------------------------------------
    220. # | To recover all party members mp levels outside of an item, you can setup  |
    221. # | an event within your game and use the script call below.                  |
    222. #  ---------------------------------------------------------------------------
    223. #
    224. #     Script Call: $game_party.restore_mp_levels_party_members
    225. #
    226. #    -------
    227. #   | Notes |
    228. #    -------
    229. #
    230. #   Before using the script call to recover mp on all party members, be sure
    231. #   to remove "death" state on in any actors in the party. Example below.
    232. #
    233. #   Event Example:
    234. #
    235. #   # Removes [Death] state all party members
    236. #   Change State: Entire Party, + [Death]
    237. #
    238. #   # Restores all party members mp
    239. #   Script: $game_party.restore_mp_levels_party_members
    240. #
    241. #==============================================================================
    242. # ** Terms of Use |
    243. # -----------------
    244. # * Free to use in non-commercial projects and commercial projects
    245. # * Feel free to modify and improve the script. Credit is still required.
    246. # * Credit FamilyGamer7
    247. #==============================================================================
    248. # ** Special Thanks |
    249. # -------------------
    250. # * To the RM community for the assistance.
    251. #   - Specifically: Roninator2, TheoAllen and A-Moonless-Night
    252. #==============================================================================
    253. #==============================================================================
    254. # ** MP Level Module - FG7_JRPG_MP_Levels::Variables
    255. #---------------------------------------- --------------------------------------
    256. # This module gives the user a friendly way of making the necessary changes.
    257. # * Provides the ability to:
    258. #   - Can remove the default MP gauge
    259. #   - Can remove the LV1-4 from Skill name
    260. #   - Can remove MP maximum cap of "9"
    261. #   - Can recover MP on level up
    262. #   - Define MP level 1-4
    263. #   - Define MP level consumption
    264. #   - Define actor classes for MP level growth and multiplier
    265. #------------------------------------------------------------------------------
    266. module FG7_JRPG_MP_Levels
    267.   module Variables
    268.   
    269. #==============================================================================
    270. # -------------------- ALLOWED TO EDIT BELOW THIS LINE ---------------------- #
    271. #==============================================================================
    272.   # Determines if the MP Guage should be removed or not
    273.   # (This is set to "true" by default - MP system works around the default)
    274.   RemoveMPGauge = true
    275.   # Determines if the LV1-4 should be removed or not from the skill name
    276.   # (This is set to "true" by default)
    277.   RemoveSkill_LV_Name = true
    278.   # Determines if the maximum MP level can go beyond "9"
    279.   # (This is set to "true" by default)
    280.   MaxMP9 = true
    281.   # Determines if the party member recovers MP on level up
    282.   # (This is set to "false" by default)
    283.   RecoverMPOnLvL = false
    284.   # Defines how much the skill MP consumes from the specific MP level
    285.   # Note: This will affect all actors in game (Up to 25 actors per design)
    286.   # (MP Consumption of "1" is the default)
    287.   MP_Consumption = 1
    288.   # Actor Defined MP levels - Values that divide into the actor levels
    289.   MP_Level_1 = 11
    290.   MP_Level_2 = 12
    291.   MP_Level_3 = 20
    292.   MP_Level_4 = 30
    293.   # Low MP levels - Physical: multiplier to adjust the MP level growth
    294.   Class1 = "Soldier"
    295.   Class1_Multiplier = 1.2
    296.   # High MP levels - Magic: multiplier to adjust the MP level growth
    297.   Class2 = "Mage"
    298.   Class2_Multiplier = 1.6
    299.   # Normal MP levels - Balanced: multiplier to adjust the MP level growth
    300.   Class3 = "Bowman"
    301.   Class3_Multiplier = 1.4
    302. #==============================================================================
    303. # ---------- DO NOT EDIT BELOW THIS LINE (FOR ADVANCED USERS) --------------- #
    304. #==============================================================================
    305.   end
    306. end
    307. #==============================================================================
    308. # ** Game_Party
    309. #------------------------------------------------------------------------------
    310. #  This class handles parties. Information such as gold and items is included.
    311. # Instances of this class are referenced by $game_party.
    312. #==============================================================================
    313. class Game_Party < Game_Unit
    314.   #--------------------------------------------------------------------------
    315.   # * New Methods: Creates Actor MP level (Ex: 0 / 0 / 0 / 0)
    316.   # Sets up MP Levels in an array (With $game_variables) for 25 Actors
    317.   #--------------------------------------------------------------------------
    318.   # Actor 1
    319.   def actor_mp_levels_actor1; return [$game_variables[900], $game_variables[901], $game_variables[902], $game_variables[903], "900", "901", "902", "903"]; end
    320.   # Actor 2
    321.   def actor_mp_levels_actor2; return [$game_variables[904], $game_variables[905], $game_variables[906], $game_variables[907], "904", "905", "906", "907"]; end
    322.   # Actor 3
    323.   def actor_mp_levels_actor3; return [$game_variables[908], $game_variables[909], $game_variables[910], $game_variables[911], "908", "909", "910", "911"]; end
    324.   # Actor 4
    325.   def actor_mp_levels_actor4; return [$game_variables[912], $game_variables[913], $game_variables[914], $game_variables[915], "912", "913", "914", "915"]; end
    326.   # Actor 5
    327.   def actor_mp_levels_actor5; return [$game_variables[916], $game_variables[917], $game_variables[918], $game_variables[919], "915", "917", "918", "919"]; end
    328.   # Actor 6
    329.   def actor_mp_levels_actor6; return [$game_variables[920], $game_variables[921], $game_variables[922], $game_variables[923], "920", "921", "922", "923"]; end
    330.   # Actor 7
    331.   def actor_mp_levels_actor7; return [$game_variables[924], $game_variables[925], $game_variables[926], $game_variables[927], "924", "925", "926", "927"]; end
    332.   # Actor 8
    333.   def actor_mp_levels_actor8; return [$game_variables[928], $game_variables[929], $game_variables[930], $game_variables[931], "928", "929", "930", "931"]; end
    334.   # Actor 9
    335.   def actor_mp_levels_actor9; return [$game_variables[932], $game_variables[933], $game_variables[934], $game_variables[935], "932", "933", "934", "935"]; end
    336.   # Actor 10
    337.   def actor_mp_levels_actor10; return [$game_variables[936], $game_variables[937], $game_variables[938], $game_variables[939], "936", "937", "938", "939"]; end
    338.   # Actor 11
    339.   def actor_mp_levels_actor11; return [$game_variables[940], $game_variables[941], $game_variables[942], $game_variables[943], "940", "941", "942", "943"]; end
    340.   # Actor 12
    341.   def actor_mp_levels_actor12; return [$game_variables[944], $game_variables[945], $game_variables[946], $game_variables[947], "944", "945", "946", "947"]; end
    342.   # Actor 13
    343.   def actor_mp_levels_actor13; return [$game_variables[948], $game_variables[949], $game_variables[950], $game_variables[951], "948", "949", "950", "951"]; end
    344.   # Actor 14
    345.   def actor_mp_levels_actor14; return [$game_variables[952], $game_variables[953], $game_variables[954], $game_variables[955], "952", "953", "954", "955"]; end
    346.   # Actor 15
    347.   def actor_mp_levels_actor15; return [$game_variables[956], $game_variables[957], $game_variables[958], $game_variables[959], "956", "957", "958", "959"]; end
    348.   # Actor 16
    349.   def actor_mp_levels_actor16; return [$game_variables[960], $game_variables[961], $game_variables[962], $game_variables[963], "960", "961", "962", "963"]; end
    350.   # Actor 17
    351.   def actor_mp_levels_actor17; return [$game_variables[964], $game_variables[965], $game_variables[966], $game_variables[967], "964", "965", "966", "967"]; end
    352.   # Actor 18
    353.   def actor_mp_levels_actor18; return [$game_variables[968], $game_variables[969], $game_variables[970], $game_variables[971], "968", "969", "970", "971"]; end
    354.   # Actor 19
    355.   def actor_mp_levels_actor19; return [$game_variables[972], $game_variables[973], $game_variables[974], $game_variables[975], "972", "973", "974", "975"]; end
    356.   # Actor 20
    357.   def actor_mp_levels_actor20; return [$game_variables[976], $game_variables[977], $game_variables[978], $game_variables[979], "976", "977", "978", "979"]; end
    358.   # Actor 21
    359.   def actor_mp_levels_actor21; return [$game_variables[980], $game_variables[981], $game_variables[992], $game_variables[983], "980", "981", "982", "983"]; end
    360.   # Actor 22
    361.   def actor_mp_levels_actor22; return [$game_variables[984], $game_variables[985], $game_variables[986], $game_variables[987], "984", "985", "986", "987"]; end
    362.   # Actor 23
    363.   def actor_mp_levels_actor23; return [$game_variables[988], $game_variables[989], $game_variables[990], $game_variables[991], "988", "989", "990", "991"]; end
    364.   # Actor 24
    365.   def actor_mp_levels_actor24; return [$game_variables[992], $game_variables[993], $game_variables[994], $game_variables[995], "992", "993", "994", "995"]; end
    366.   # Actor 25
    367.   def actor_mp_levels_actor25; return [$game_variables[996], $game_variables[997], $game_variables[998], $game_variables[999], "996", "997", "998", "999"]; end
    368.   #--------------------------------------------------------------------------
    369.   # * New Method: Restore MP levels on all actors
    370.   # (Script call for an event - Inn type event)
    371.   #--------------------------------------------------------------------------
    372.   def restore_mp_levels_party_members
    373.     # Variable created for Loop (Party Member 1-6)
    374.     a_1 = 0; a_2 = 5
    375.     # Loops through variables until condition is met (Party Member 1-6)
    376.     while a_1 < a_2 do
    377.       # Check if Party Member is available for MP Recover
    378.       if $game_party.members[a_1] && !$game_party.members[a_1].state?(1)
    379.         mp_level_1_usage = $game_party.send("actor_mp_levels_actor#{$game_party.members[a_1].id}")[4]
    380.         mp_level_2_usage = $game_party.send("actor_mp_levels_actor#{$game_party.members[a_1].id}")[5]
    381.         mp_level_3_usage = $game_party.send("actor_mp_levels_actor#{$game_party.members[a_1].id}")[6]
    382.         mp_level_4_usage = $game_party.send("actor_mp_levels_actor#{$game_party.members[a_1].id}")[7]
    383.         # Variable created for Loop (Classes 1-3)
    384.         b_1 = 1; b_2 = 3
    385.         # Loops through variables until condition is met (Classes 1-3)
    386.         while b_1 < b_2 do
    387.           # Checks if Party Member matches Class #1, #2. or #3
    388.           if $game_party.members[a_1].class.name == FG7_JRPG_MP_Levels::Variables.const_get("Class#{b_1}")
    389.             $game_variables[mp_level_1_usage.to_i] = ($game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_1) * FG7_JRPG_MP_Levels::Variables.const_get("Class#{b_1}_Multiplier")
    390.             $game_variables[mp_level_2_usage.to_i] = ($game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_2) * FG7_JRPG_MP_Levels::Variables.const_get("Class#{b_1}_Multiplier")
    391.             $game_variables[mp_level_3_usage.to_i] = ($game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_3) * FG7_JRPG_MP_Levels::Variables.const_get("Class#{b_1}_Multiplier")
    392.             $game_variables[mp_level_4_usage.to_i] = ($game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_4) * FG7_JRPG_MP_Levels::Variables.const_get("Class#{b_1}_Multiplier")
    393.           # If Party Member does not match Class #1, #2, or #3
    394.           else
    395.             $game_variables[mp_level_1_usage.to_i] = $game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_1
    396.             $game_variables[mp_level_2_usage.to_i] = $game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_2
    397.             $game_variables[mp_level_3_usage.to_i] = $game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_3
    398.             $game_variables[mp_level_4_usage.to_i] = $game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_4
    399.           end
    400.           # Increment the count by +1 in the loop (For Classes)
    401.           b_1 += 1
    402.         end
    403.         # Adds variables into game_variables to recover party members MP
    404.         if $game_variables[mp_level_1_usage.to_i] > 9 && FG7_JRPG_MP_Levels::Variables::MaxMP9 == true; $game_variables[mp_level_1_usage.to_i] = 9; else; $game_variables[mp_level_1_usage.to_i] = $game_variables[mp_level_1_usage.to_i].round; end
    405.         if $game_variables[mp_level_2_usage.to_i] > 9 && FG7_JRPG_MP_Levels::Variables::MaxMP9 == true; $game_variables[mp_level_2_usage.to_i] = 9; else; $game_variables[mp_level_2_usage.to_i] = $game_variables[mp_level_2_usage.to_i].round; end
    406.         if $game_variables[mp_level_3_usage.to_i] > 9 && FG7_JRPG_MP_Levels::Variables::MaxMP9 == true; $game_variables[mp_level_3_usage.to_i] = 9; else; $game_variables[mp_level_3_usage.to_i] = $game_variables[mp_level_3_usage.to_i].round; end
    407.         if $game_variables[mp_level_4_usage.to_i] > 9 && FG7_JRPG_MP_Levels::Variables::MaxMP9 == true; $game_variables[mp_level_4_usage.to_i] = 9; else; $game_variables[mp_level_4_usage.to_i] = $game_variables[mp_level_4_usage.to_i].round; end
    408.       end
    409.       # Increment the count by +1 in the loop (For next party member)
    410.       a_1 += 1
    411.     end
    412.   end
    413. end
    414. #==============================================================================
    415. # ** Game_Actor
    416. #------------------------------------------------------------------------------
    417. #  This class handles actors. It is used within the Game_Actors class
    418. # ($game_actors) and is also referenced from the Game_Party class ($game_party).
    419. #==============================================================================
    420. class Game_Actor < Game_Battler
    421.   #--------------------------------------------------------------------------
    422.   # * Alias Method: Level Up
    423.   #--------------------------------------------------------------------------
    424.   alias :fg7_jrpg_mp_levels_level_up :level_up
    425.   def level_up
    426.     fg7_jrpg_mp_levels_level_up
    427.     # If Recover MP on Level Up is false - Ignore all logic below
    428.     return false if FG7_JRPG_MP_Levels::Variables::RecoverMPOnLvL != true
    429.     # Variable created for Loop (Party Member 1-6)
    430.     a_1 = 0; a_2 = 5
    431.     # Loops through variables until condition is met (Party Member 1-6)
    432.     while a_1 < a_2 do
    433.       if $game_party.members[a_1] && $game_party.members[a_1].name == actor.name && !$game_party.members[a_1].state?(1)
    434.         mp_level_1_usage = $game_party.send("actor_mp_levels_actor#{$game_party.members[a_1].id}")[4]
    435.         mp_level_2_usage = $game_party.send("actor_mp_levels_actor#{$game_party.members[a_1].id}")[5]
    436.         mp_level_3_usage = $game_party.send("actor_mp_levels_actor#{$game_party.members[a_1].id}")[6]
    437.         mp_level_4_usage = $game_party.send("actor_mp_levels_actor#{$game_party.members[a_1].id}")[7]
    438.         # Variable created for Loop (Classes 1-3)
    439.         b_1 = 1; b_2 = 3
    440.         # Loops through variables until condition is met (Classes 1-3)
    441.         while b_1 < b_2 do
    442.           # Checks if Party Member matches Class #1, #2. or #3
    443.           if $game_party.members[a_1].class.name == FG7_JRPG_MP_Levels::Variables.const_get("Class#{b_1}")
    444.             $game_variables[mp_level_1_usage.to_i] = ($game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_1) * FG7_JRPG_MP_Levels::Variables.const_get("Class#{b_1}_Multiplier")
    445.             $game_variables[mp_level_2_usage.to_i] = ($game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_2) * FG7_JRPG_MP_Levels::Variables.const_get("Class#{b_1}_Multiplier")
    446.             $game_variables[mp_level_3_usage.to_i] = ($game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_3) * FG7_JRPG_MP_Levels::Variables.const_get("Class#{b_1}_Multiplier")
    447.             $game_variables[mp_level_4_usage.to_i] = ($game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_4) * FG7_JRPG_MP_Levels::Variables.const_get("Class#{b_1}_Multiplier")
    448.           # If Party Member does not match Class #1, #2, or #3
    449.           else
    450.             $game_variables[mp_level_1_usage.to_i] = $game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_1
    451.             $game_variables[mp_level_2_usage.to_i] = $game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_2
    452.             $game_variables[mp_level_3_usage.to_i] = $game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_3
    453.             $game_variables[mp_level_4_usage.to_i] = $game_party.members[a_1].level / FG7_JRPG_MP_Levels::Variables::MP_Level_4
    454.           end
    455.           # Increment the count by +1 in the loop (For Classes)
    456.           b_1 += 1
    457.         end
    458.         # Adds variables into game_variables to recover party members MP
    459.         if $game_variables[mp_level_1_usage.to_i] > 9 && FG7_JRPG_MP_Levels::Variables::MaxMP9 == true; $game_variables[mp_level_1_usage.to_i] = 9; else; $game_variables[mp_level_1_usage.to_i] = $game_variables[mp_level_1_usage.to_i].round; end
    460.         if $game_variables[mp_level_2_usage.to_i] > 9 && FG7_JRPG_MP_Levels::Variables::MaxMP9 == true; $game_variables[mp_level_2_usage.to_i] = 9; else; $game_variables[mp_level_2_usage.to_i] = $game_variables[mp_level_2_usage.to_i].round; end
    461.         if $game_variables[mp_level_3_usage.to_i] > 9 && FG7_JRPG_MP_Levels::Variables::MaxMP9 == true; $game_variables[mp_level_3_usage.to_i] = 9; else; $game_variables[mp_level_3_usage.to_i] = $game_variables[mp_level_3_usage.to_i].round; end
    462.         if $game_variables[mp_level_4_usage.to_i] > 9 && FG7_JRPG_MP_Levels::Variables::MaxMP9 == true; $game_variables[mp_level_4_usage.to_i] = 9; else; $game_variables[mp_level_4_usage.to_i] = $game_variables[mp_level_4_usage.to_i].round; end
    463.       end
    464.       # Increment the count by +1 in the loop (For next party member)
    465.       a_1 += 1
    466.     end
    467.   end
    468. end
    469. #==============================================================================
    470. # ** Window_Base
    471. #------------------------------------------------------------------------------
    472. #  This is a super class of all windows within the game.
    473. #==============================================================================
    474. class Window_Base < Window
    475.   #--------------------------------------------------------------------------
    476.   # * Override Method: Draw MP
    477.   #--------------------------------------------------------------------------
    478.   def draw_actor_mp(actor, x, y, width = 124)
    479.     @actor = actor
    480.     return if @actor.nil?
    481.     # Checks if Module Variable is True or False (To Remove MP Gauge)
    482.     if FG7_JRPG_MP_Levels::Variables::RemoveMPGauge == false
    483.       draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
    484.     end
    485.     # Checks if Module Variable is True (To adjust MP level position)
    486.     if FG7_JRPG_MP_Levels::Variables::MaxMP9 == true
    487.       # Draws Actors MP Levels
    488.       draw_text(x + 29, y, 350, line_height, $game_party.send("actor_mp_levels_actor#{@actor.id}")[0])
    489.       draw_text(x + 58, y, 350, line_height, $game_party.send("actor_mp_levels_actor#{@actor.id}")[1])
    490.       draw_text(x + 87, y, 350, line_height, $game_party.send("actor_mp_levels_actor#{@actor.id}")[2])
    491.       draw_text(x + 114, y, 350, line_height, $game_party.send("actor_mp_levels_actor#{@actor.id}")[3])
    492.       # Draws Dividers for MP Levels
    493.       draw_text(x + 43, y, 350, line_height, "/")
    494.       draw_text(x + 72, y, 350, line_height, "/")
    495.       draw_text(x + 101, y, 350, line_height, "/")
    496.     else
    497.       # Draws Actors MP Levels
    498.       draw_text(x - 309, y, 350, line_height, $game_party.send("actor_mp_levels_actor#{@actor.id}")[0], 2)
    499.       draw_text(x - 280, y, 350, line_height, $game_party.send("actor_mp_levels_actor#{@actor.id}")[1], 2)
    500.       draw_text(x - 251, y, 350, line_height, $game_party.send("actor_mp_levels_actor#{@actor.id}")[2], 2)
    501.       draw_text(x - 223, y, 350, line_height, $game_party.send("actor_mp_levels_actor#{@actor.id}")[3], 2)
    502.       # Draws Dividers for MP Levels
    503.       draw_text(x + 41, y, 350, line_height, "/")
    504.       draw_text(x + 70, y, 350, line_height, "/")
    505.       draw_text(x + 99, y, 350, line_height, "/")
    506.     end
    507.     change_color(system_color)
    508.     draw_text(x, y, 30, line_height, Vocab::mp_a)
    509.   end
    510.   #--------------------------------------------------------------------------
    511.   # * New Method: Draw Item Name Trim (For Skill List Names)
    512.   #     enabled : Enabled flag. When false, draw semi-transparently.
    513.   #--------------------------------------------------------------------------
    514.   def draw_item_name_trim(item, x, y, enabled = true, width = 172)
    515.     return unless item
    516.     draw_icon(item.icon_index, x, y, enabled)
    517.     change_color(normal_color, enabled)
    518.     # Removes LV1/LV2/LV3/LV4 from all Skill names
    519.     draw_text(x + 24, y, width, line_height, item.name.tr('LV1', '').tr('LV2', '').tr('LV3', '').tr('LV4', '').strip)
    520.   end
    521. end
    522. #==============================================================================
    523. # ** Window_SkillList
    524. #------------------------------------------------------------------------------
    525. #  This window is for displaying a list of available skills on the skill window.
    526. #==============================================================================
    527. class Window_SkillList < Window_Selectable
    528.   #--------------------------------------------------------------------------
    529.   # * Override Method: Draw Item
    530.   #--------------------------------------------------------------------------
    531.   def draw_item(index)
    532.     skill = @data[index]
    533.     if skill
    534.       rect = item_rect(index)
    535.       rect.width -= 4
    536.       # Draws Item Name Trim (New) - Only one item name will be used
    537.       draw_item_name_trim(skill, rect.x, rect.y, enable?(skill)) if FG7_JRPG_MP_Levels::Variables::RemoveSkill_LV_Name == true
    538.       # Draws Item Name - Only one item name will be used
    539.       draw_item_name(skill, rect.x, rect.y, enable?(skill)) if FG7_JRPG_MP_Levels::Variables::RemoveSkill_LV_Name == false
    540.       draw_skill_cost(rect, skill)
    541.     end
    542.   end
    543.   #--------------------------------------------------------------------------
    544.   # * Override Method: Get Activation State of Selection Item
    545.   #--------------------------------------------------------------------------
    546.   def current_item_enabled?
    547.     enable?(@data[index])
    548.     item = @data[index]
    549.     return false unless enable?(item)
    550.     actor = @actor
    551.     # Checks if Skill Name matches "LV1"
    552.     if item.name.match("LV1")
    553.       $game_party.send("actor_mp_levels_actor#{@actor.id}")[0] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption
    554.     # Checks if Skill Name matches "LV2"
    555.     else if item.name.match("LV2")
    556.       $game_party.send("actor_mp_levels_actor#{@actor.id}")[1] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption
    557.     # Checks if Skill Name matches "LV3"
    558.     else if item.name.match("LV3")
    559.       $game_party.send("actor_mp_levels_actor#{@actor.id}")[2] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption
    560.     # Checks if Skill Name matches "LV4"
    561.     else if item.name.match("LV4")
    562.       $game_party.send("actor_mp_levels_actor#{@actor.id}")[3] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption
    563.     end end end end
    564.   end
    565.   #--------------------------------------------------------------------------
    566.   # * Override Method: Display Skill in Active State?
    567.   #--------------------------------------------------------------------------
    568.   def enable?(item)
    569.     @actor && @actor.usable?(item)
    570.     return false unless @actor && @actor.usable?(item)
    571.     actor = @actor
    572.     # Creates MP level variables that contains the correct game variable #
    573.     mp_level_1 = $game_party.send("actor_mp_levels_actor#{@actor.id}")[0]
    574.     mp_level_2 = $game_party.send("actor_mp_levels_actor#{@actor.id}")[1]
    575.     mp_level_3 = $game_party.send("actor_mp_levels_actor#{@actor.id}")[2]
    576.     mp_level_4 = $game_party.send("actor_mp_levels_actor#{@actor.id}")[3]
    577.     # Return true if Item Name matches "LV1"
    578.     return true if item.name.match("LV1") and mp_level_1 >= 1
    579.     # Return true if Item Name matches "LV2"
    580.     return true if item.name.match("LV2") and mp_level_2 >= 1
    581.     # Return true if Item Name matches "LV3"
    582.     return true if item.name.match("LV3") and mp_level_3 >= 1
    583.     # Return true if Item Name matches "LV4"
    584.     return true if item.name.match("LV4") and mp_level_4 >= 1
    585.   end
    586.   #--------------------------------------------------------------------------
    587.   # * Override Method: Draw Skill Use Cost
    588.   #--------------------------------------------------------------------------
    589.   def draw_skill_cost(rect, skill)
    590.     # Checks if Skill Name matches "LV1"
    591.     if skill.name.match("LV1")
    592.       draw_text(rect, $game_party.send("actor_mp_levels_actor#{@actor.id}")[0], 2)
    593.     end
    594.     # Checks if Skill Name matches "LV2"
    595.     if skill.name.match("LV2")
    596.       draw_text(rect, $game_party.send("actor_mp_levels_actor#{@actor.id}")[1], 2)
    597.     end
    598.     # Checks if Skill Name matches "LV3"
    599.     if skill.name.match("LV3")
    600.       draw_text(rect, $game_party.send("actor_mp_levels_actor#{@actor.id}")[2], 2)
    601.     end
    602.     # Checks if Skill Name matches "LV4"
    603.     if skill.name.match("LV4")
    604.       draw_text(rect, $game_party.send("actor_mp_levels_actor#{@actor.id}")[3], 2)
    605.     end
    606.   end
    607. end
    608. #==============================================================================
    609. # ** Scene_Skill
    610. #------------------------------------------------------------------------------
    611. #  This class performs skill screen processing. Skills are handled as items for
    612. # the sake of process sharing.
    613. #==============================================================================
    614. class Scene_Skill < Scene_ItemBase
    615.   #--------------------------------------------------------------------------
    616.   # * Added Method: Actor [OK]
    617.   #--------------------------------------------------------------------------
    618.   def on_actor_ok
    619.     # Creates MP level variables that contains the correct game variable #
    620.     mp_level_1_usage = $game_party.send("actor_mp_levels_actor#{@actor.id}")[4]
    621.     mp_level_2_usage = $game_party.send("actor_mp_levels_actor#{@actor.id}")[5]
    622.     mp_level_3_usage = $game_party.send("actor_mp_levels_actor#{@actor.id}")[6]
    623.     mp_level_4_usage = $game_party.send("actor_mp_levels_actor#{@actor.id}")[7]
    624.     if item_usable?
    625.       empty = false
    626.       # Checks for Skill "LV1"
    627.       if item.name.match("LV1")
    628.         $game_variables[mp_level_1_usage.to_i] > 0 ? $game_variables[mp_level_1_usage.to_i] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption : empty = true
    629.         $game_variables[mp_level_1_usage.to_i] = 0 if $game_variables[mp_level_1_usage.to_i] < 0
    630.       end
    631.       # Checks for Skill "LV2"
    632.       if item.name.match("LV2")
    633.         $game_variables[mp_level_2_usage.to_i] > 0 ? $game_variables[mp_level_2_usage.to_i] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption : empty = true
    634.         $game_variables[mp_level_2_usage.to_i] = 0 if $game_variables[mp_level_2_usage.to_i] < 0
    635.       end
    636.       # Checks for Skill "LV3"
    637.       if item.name.match("LV3")
    638.         $game_variables[mp_level_3_usage.to_i] > 0 ? $game_variables[mp_level_3_usage.to_i] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption : empty = true
    639.         $game_variables[mp_level_3_usage.to_i] = 0 if $game_variables[mp_level_3_usage.to_i] < 0
    640.       end
    641.       # Checks for Skill "LV4"
    642.       if item.name.match("LV4")
    643.         $game_variables[mp_level_4_usage.to_i] > 0 ? $game_variables[mp_level_4_usage.to_i] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption : empty = true
    644.         $game_variables[mp_level_4_usage.to_i] = 0 if $game_variables[mp_level_4_usage.to_i] < 0
    645.       end
    646.       # Checks if empty
    647.       if empty == true
    648.         Sound.play_buzzer
    649.       else
    650.         use_item
    651.         @item_window.refresh
    652.       end
    653.     else
    654.       Sound.play_buzzer
    655.     end
    656.   end
    657. end
    658. #==============================================================================
    659. # ** Window_BattleStatus
    660. #------------------------------------------------------------------------------
    661. #  This window is for displaying the status of party members on the battle
    662. # screen.
    663. #==============================================================================
    664. class Window_BattleStatus < Window_Selectable
    665.   #--------------------------------------------------------------------------
    666.   # * Override Method: Draw Gauge Area (with TP)
    667.   #--------------------------------------------------------------------------
    668.   def draw_gauge_area_with_tp(rect, actor)
    669.     # Removed TP for MP levels if "Display TP in Battle" is turned on
    670.     draw_actor_hp(actor, rect.x + 0, rect.y, 72)
    671.     draw_actor_mp(actor, rect.x + 82, rect.y, 64)
    672.   end
    673.   #--------------------------------------------------------------------------
    674.   # * Override Method: Draw Gauge Area (without TP)
    675.   #--------------------------------------------------------------------------
    676.   def draw_gauge_area_without_tp(rect, actor)
    677.     draw_actor_hp(actor, rect.x + 0, rect.y, 72)
    678.     draw_actor_mp(actor, rect.x + 82, rect.y, 64)
    679.   end
    680. end
    681. #==============================================================================
    682. # ** Scene_Battle
    683. #------------------------------------------------------------------------------
    684. #  This class performs battle screen processing.
    685. #==============================================================================
    686. class Scene_Battle < Scene_Base
    687.   #--------------------------------------------------------------------------
    688.   # * Override Method: To Previous Command Input
    689.   #--------------------------------------------------------------------------
    690.   def prior_command
    691.     if BattleManager.prior_command
    692.       # Creates MP level variables that contains the correct game variable #
    693.       mp_level_1_usage = $game_party.send("actor_mp_levels_actor#{BattleManager.actor.id}")[4]
    694.       mp_level_2_usage = $game_party.send("actor_mp_levels_actor#{BattleManager.actor.id}")[5]
    695.       mp_level_3_usage = $game_party.send("actor_mp_levels_actor#{BattleManager.actor.id}")[6]
    696.       mp_level_4_usage = $game_party.send("actor_mp_levels_actor#{BattleManager.actor.id}")[7]
    697.       # Variable created for Loop (Party Member 1-6)
    698.       a_1 = 0; a_2 = 5;
    699.       # Loop through variables until complete
    700.       while a_1 < a_2 do
    701.         # Skill "LV1" - Check if Party Member and conditions are met
    702.         if $game_party.members[a_1] && BattleManager.actor.name == $game_party.members[a_1].name && $game_switches[976 + a_1] == true
    703.           # Re-add the Skill MP consumption back to Party Member
    704.           $game_variables[mp_level_1_usage.to_i] += FG7_JRPG_MP_Levels::Variables::MP_Consumption; $game_switches[976 + a_1] = false
    705.         end
    706.         # Increment the count by +1 in the loop (For next party member)
    707.         a_1 += 1
    708.       end
    709.       # Reset loop variable
    710.       a_1 = 0
    711.       # Loop through variables until complete
    712.       while a_1 < a_2 do
    713.         # Skill "LV2" - Check if Party Member and conditions are met
    714.         if $game_party.members[a_1] && BattleManager.actor.name == $game_party.members[a_1].name && $game_switches[982 + a_1] == true
    715.           # Re-add the Skill MP consumption back to Party Member
    716.           $game_variables[mp_level_2_usage.to_i] += FG7_JRPG_MP_Levels::Variables::MP_Consumption; $game_switches[982 + a_1] = false
    717.         end
    718.         # Increment the count by +1 in the loop (For next party member)
    719.         a_1 += 1
    720.       end
    721.       # Reset loop variable
    722.       a_1 = 0
    723.       # Loop through variables until complete
    724.       while a_1 < a_2 do
    725.         # Skill "LV3" - Check if Party Member and conditions are met
    726.         if $game_party.members[a_1] && BattleManager.actor.name == $game_party.members[a_1].name && $game_switches[988 + a_1] == true
    727.           # Re-add the Skill MP consumption back to Party Member
    728.           $game_variables[mp_level_3_usage.to_i] += FG7_JRPG_MP_Levels::Variables::MP_Consumption; $game_switches[988 + a_1] = false
    729.         end
    730.         # Increment the count by +1 in the loop (For next party member)
    731.         a_1 += 1
    732.       end
    733.       # Reset loop variable
    734.       a_1 = 0
    735.       # Loop through variables until complete
    736.       while a_1 < a_2 do
    737.         # Skill "LV4" - Check if Party Member and conditions are met
    738.         if $game_party.members[a_1] && BattleManager.actor.name == $game_party.members[a_1].name && $game_switches[994 + a_1] == true
    739.           # Re-add the Skill MP consumption back to Party Member
    740.           $game_variables[mp_level_4_usage.to_i] += FG7_JRPG_MP_Levels::Variables::MP_Consumption; $game_switches[994 + a_1] = false
    741.         end
    742.         # Increment the count by +1 in the loop (For next party member)
    743.         a_1 += 1
    744.       end
    745.       start_actor_command_selection
    746.     else
    747.       start_party_command_selection
    748.     end
    749.   end
    750.   #--------------------------------------------------------------------------
    751.   # * New Method: Skill MP LVL Check
    752.   #--------------------------------------------------------------------------
    753.   def skill_mp_lvl_check
    754.     # Checks when the skill has been selected
    755.     case @actor_command_window.current_symbol
    756.     when :skill
    757.       mp_level_1_usage = $game_party.send("actor_mp_levels_actor#{BattleManager.actor.id}")[4]
    758.       mp_level_2_usage = $game_party.send("actor_mp_levels_actor#{BattleManager.actor.id}")[5]
    759.       mp_level_3_usage = $game_party.send("actor_mp_levels_actor#{BattleManager.actor.id}")[6]
    760.       mp_level_4_usage = $game_party.send("actor_mp_levels_actor#{BattleManager.actor.id}")[7]
    761.       @skill = @skill_window.item
    762.       # Variable created for Loop (Party Member 1-6)
    763.       a_1 = 0; a_2 = 5
    764.       # Checks for Skill "LV1"
    765.       if @skill.name.match("LV1")
    766.         while a_1 < a_2 do
    767.           # Game Switch equals true if Party Member matches
    768.           $game_switches[976 + a_1] = true if $game_party.members[a_1] && BattleManager.actor.name == $game_party.members[a_1].name
    769.           a_1 += 1 # Increment loop +1
    770.         end
    771.         # Consume Skill MP from Party Member
    772.         $game_variables[mp_level_1_usage.to_i] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption
    773.         $game_variables[mp_level_1_usage.to_i] = 0 if $game_variables[mp_level_1_usage.to_i] < 0
    774.       end
    775.       # Reset loop variable
    776.       a_1 = 0
    777.       # Checks for Skill "LV2"
    778.       if @skill.name.match("LV2")
    779.         while a_1 < a_2 do
    780.           # Game Switch equals true if Party Member matches
    781.           $game_switches[982 + a_1] = true if $game_party.members[a_1] && BattleManager.actor.name == $game_party.members[a_1].name
    782.           a_1 += 1 # Increment loop +1
    783.         end
    784.         # Consume Skill MP from Party Member
    785.         $game_variables[mp_level_2_usage.to_i] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption
    786.         $game_variables[mp_level_2_usage.to_i] = 0 if $game_variables[mp_level_1_usage.to_i] < 0
    787.       end
    788.       # Reset loop variable
    789.       a_1 = 0
    790.       # Checks for Skill "LV3"
    791.       if @skill.name.match("LV3")
    792.         while a_1 < a_2 do
    793.           # Game Switch equals true if Party Member matches
    794.           $game_switches[988 + a_1] = true if $game_party.members[a_1] && BattleManager.actor.name == $game_party.members[a_1].name
    795.           a_1 += 1 # Increment loop +1
    796.         end
    797.         # Consume Skill MP from Party Member
    798.         $game_variables[mp_level_3_usage.to_i] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption
    799.         $game_variables[mp_level_3_usage.to_i] = 0 if $game_variables[mp_level_1_usage.to_i] < 0
    800.       end
    801.       # Reset loop variable
    802.       a_1 = 0
    803.       # Checks for Skill "LV4"
    804.       if @skill.name.match("LV4")
    805.         while a_1 < a_2 do
    806.           # Game Switch equals true if Party Member matches
    807.           $game_switches[994 + a_1] = true if $game_party.members[a_1] && BattleManager.actor.name == $game_party.members[a_1].name
    808.           a_1 += 1 # Increment loop +1
    809.         end
    810.         # Consume Skill MP from Party Member
    811.         $game_variables[mp_level_4_usage.to_i] -= FG7_JRPG_MP_Levels::Variables::MP_Consumption
    812.         $game_variables[mp_level_4_usage.to_i] = 0 if $game_variables[mp_level_1_usage.to_i] < 0
    813.       end
    814.     end
    815.   end
    816.   #--------------------------------------------------------------------------
    817.   # * Override Method: Actor [OK]
    818.   #--------------------------------------------------------------------------
    819.   def on_actor_ok
    820.     BattleManager.actor.input.target_index = @actor_window.index
    821.     skill_mp_lvl_check # Call method to decrease skill MP
    822.     @actor_window.hide
    823.     @skill_window.hide
    824.     @item_window.hide
    825.     next_command
    826.   end
    827.   #--------------------------------------------------------------------------
    828.   # * Override Method: Skill [OK]
    829.   #--------------------------------------------------------------------------
    830.   def on_skill_ok
    831.     @skill = @skill_window.item
    832.     BattleManager.actor.input.set_skill(@skill.id)
    833.     BattleManager.actor.last_skill.object = @skill
    834.     if !@skill.need_selection?
    835.       skill_mp_lvl_check # Call method to decrease skill MP
    836.       @skill_window.hide
    837.       next_command
    838.     elsif @skill.for_opponent?
    839.       select_enemy_selection
    840.     else
    841.       select_actor_selection
    842.     end
    843.   end
    844.   #--------------------------------------------------------------------------
    845.   # * Alias Method: End Turn
    846.   #--------------------------------------------------------------------------
    847.   alias :fg7_jrpg_mp_levels_turn_end :turn_end
    848.   def turn_end
    849.     fg7_jrpg_mp_levels_turn_end
    850.     # Runs through the game variables to set to "false" for start of new turn
    851.     24.times do |i|
    852.       $game_switches[i + 976] = false
    853.     end
    854.   end
    855. end
    复制代码


    FAQ
                            Q: My party member has a death state (dead) and the MP is not restored when using the script call. How can I fix?
    A: This is by design and I have no plans to change this feature. Feel free to modify the script to your liking - Credit still required.

    Q: I have 8 actors in my party, why does it not work for 2 of them?
    A: I have designed the script similar to Suikoden 1 & 2 - So, the party member size is supported up to 6 members. Feel free to modify the script to your liking - Credit still required.

    Q: I cannot get the script to work. Can you help?
    A: Please read the script header in full detail before requesting help. I will do my best to help within reason.

    Q: Do you plan to add more enhancements or taking request for enhancements?
    A: I am not. The script is provided as-is. I will look to fix any bugs if required, but nothing beyond that.               
    Click to expand...


    Terms of Use
                            - Free to use in non-commercial projects and commercial projects
    - Feel free to modify and improve the script. Credit is still required.
    - Credit FamilyGamer7               
    Click to expand...


    Special Thanks
                            To the RM community for the assistance.
       - Specifically: Roninator2, TheoAllen and A-Moonless-Night               
    Click to expand...




    本贴来自国际rpgmaker官方论坛作者:FG7处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/fg7-jrpg-mp-levels-suikoden-mp.133243/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 09:26 , Processed in 0.108349 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表