Advertisement
Jragyn

[VXa] J Param-Limit v1.0

Aug 18th, 2015
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.16 KB | None | 0 0
  1. =begin
  2.                               J-Param-Limit
  3.                           A parameterific story.
  4.                         Currently [1.0.0] version.
  5.  
  6. This is a very short, very sweet little snippet that enables all base parameters
  7. to either have a limit lower or higher than the default of
  8. 999999 hp, 9999 mp, 999 bparams.
  9.  
  10. Use the small module below to decide.
  11. =end
  12.  
  13. $imported = {} if $imported.nil?
  14. $imported["J-Param-Limit"] = true
  15.  
  16. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  17. # This is a module used for setting the cap for the parameters.
  18. module J
  19. module ParamLimit
  20.   HP = 250
  21.   MP = 2500
  22.   PMAX = 250
  23. end#ParamBoost
  24. end#module J
  25.  
  26. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  27. # Overwrites: def param_max (in Game_Actor)
  28. #   : Allows the module to add in the new caps for player stats.
  29. class Game_Actor
  30.  
  31. # \\ Redefines the method to enable custom parameter limits for all bparams.
  32.   def param_max(param_id)
  33.     return J::ParamLimit::HP if param_id == 0  # MHP
  34.     return J::ParamLimit::MP if param_id == 1  # MMP
  35.     return J::ParamLimit::PMAX
  36.   end#def
  37.  
  38. end#Game_Actor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement