Advertisement
TechSkylander1518

Battle Size Options

Oct 21st, 2021
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.34 KB | None | 0 0
  1. #In UI_Options (PScreen_Options in earlier versions), right at the top-
  2. class PokemonSystem
  3.   attr_accessor :textspeed
  4.   attr_accessor :battlescene
  5.   attr_accessor :battlestyle
  6.   attr_accessor :frame
  7.   attr_writer   :textskin
  8.   attr_accessor :font
  9.   attr_accessor :screensize
  10.   attr_writer   :border
  11.   attr_writer   :language
  12.   attr_writer   :runstyle
  13.   attr_writer   :bgmvolume
  14.   attr_writer   :sevolume
  15.   attr_writer   :textinput
  16. #Add:
  17.   attr_accessor :battlesize
  18.  
  19.  
  20. #Below that:
  21.   def initialize
  22.     @textspeed   = 1     # Text speed (0=slow, 1=normal, 2=fast)
  23.     @battlescene = 0     # Battle effects (animations) (0=on, 1=off)
  24.     @battlestyle = 0     # Battle style (0=switch, 1=set)
  25.     @frame       = 0     # Default window frame (see also $TextFrames)
  26.     @textskin    = 0     # Speech frame
  27.     @font        = 0     # Font (see also $VersionStyles)
  28.     @screensize  = (SCREEN_ZOOM.floor).to_i   # 0=half size, 1=full size, 2=double size
  29.     @border      = 0     # Screen border (0=off, 1=on)
  30.     @language    = 0     # Language (see also LANGUAGES in script PokemonSystem)
  31.     @runstyle    = 0     # Run key functionality (0=hold to run, 1=toggle auto-run)
  32.     @bgmvolume   = 100   # Volume of background music and ME
  33.     @sevolume    = 100   # Volume of sound effects
  34.     @textinput   = 0     # Text input mode (0=cursor, 1=keyboard)
  35. #Add:
  36.     @battlesize  = 0     # Battle size (0 = single, 1 = double)
  37.  
  38.  
  39. #Further down, below
  40.        EnumOption.new(_INTL("Battle Effects"),[_INTL("On"),_INTL("Off")],
  41.          proc { $PokemonSystem.battlescene },
  42.          proc { |value| $PokemonSystem.battlescene = value }
  43.        ),
  44. #Add:
  45.        EnumOption.new(_INTL("Battle Size"),[_INTL("Single"),_INTL("Double"),_INTL("Triple")],
  46.          proc { $PokemonSystem.battlesize },
  47.          proc { |value| $PokemonSystem.battlesize = value }
  48.        ),
  49.  
  50.  
  51. #This last part can technically be put in any section, but I think it's best to put in PField_EncounterModifiers, with similar scripts-
  52. Events.onTrainerPartyLoad += proc { |_sender, e|
  53.   if $PokemonTemp.battleRules["size"] == nil && e[0]
  54.   case $PokemonSystem.battlesize
  55.     when 1
  56.         setBattleRule("double") if pbCanDoubleBattle?
  57.     when 2
  58.         setBattleRule("triple") if pbCanTripleBattle?
  59.         setBattleRule("double") if !pbCanTripleBattle? && pbCanDoubleBattle?
  60.     end
  61.   end
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement