• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Battle Size Options

Resource Battle Size Options 2022-05-20

TechSkylander1518 submitted a new resource:

Battle Size Options - Lets the player choose whether to battle in Single or Double mode! (Or even Triple!)

View attachment 3892
Simple little add-on that lets players choose between Singles, Doubles, or Triples in the Options menu!

Code
A few steps to putting in this one, but nothing especially complicated!

In PScreen_Options, right at the top-
Ruby:
Expand Collapse Copy
class PokemonSystem
  attr_accessor :textspeed
  attr_accessor :battlescene
  attr_accessor :battlestyle
  attr_accessor :frame
  attr_writer   :textskin
  attr_accessor :font...

Read more about this resource...
 

Jangajinx

An Overly Ambitious Developer
Member
Joined
Apr 21, 2023
Posts
213
Hey TechSkylander1518, wonderful script! I wanted to let you know that your script removes the "Text Entry" option in the menu. This can be problematic for players that prefer to type names ingame. Just want to bring this bug to your attention. Thank you!
 
Hey TechSkylander1518, wonderful script! I wanted to let you know that your script removes the "Text Entry" option in the menu. This can be problematic for players that prefer to type names ingame. Just want to bring this bug to your attention. Thank you!
Thank you!

Are you sure you don’t have any other changes in UI_Options that might be causing this? This only creates a new handler, so I don’t see how it could delete another one, and I haven’t had anyone else report this issue… (not at a computer to playtest myself atm)
 

Jangajinx

An Overly Ambitious Developer
Member
Joined
Apr 21, 2023
Posts
213
Thank you!

Are you sure you don’t have any other changes in UI_Options that might be causing this? This only creates a new handler, so I don’t see how it could delete another one, and I haven’t had anyone else report this issue… (not at a computer to playtest myself atm)
No options have been edited in my version of v20.1. Thanks for looking into this.
 

Jangajinx

An Overly Ambitious Developer
Member
Joined
Apr 21, 2023
Posts
213
Thank you!

Are you sure you don’t have any other changes in UI_Options that might be causing this? This only creates a new handler, so I don’t see how it could delete another one, and I haven’t had anyone else report this issue… (not at a computer to playtest myself atm)
Quite a long time since last post put I managed to fix it with this:
Ruby:
Expand Collapse Copy
class PokemonSystem
  attr_accessor :battlesize
 
  alias oldinitialize initialize

  def initialize
    oldinitialize
    @battlesize    = 0     # Battle size (0 = single, 1 = double 2 = triple)
  end
end

MenuHandlers.add(:options_menu, :battle_size_option, {
  "name"        => _INTL("Battle Size"),
  "order"       => 55,
  "type"        => EnumOption,
  "parameters"  => [_INTL("Single"), _INTL("Double"), _INTL("Triple")],
  "description" => _INTL("Choose the size battles are fought in."),
  "get_proc"    => proc { next $PokemonSystem.battlesize },
  "set_proc"    => proc { |value, _scene| $PokemonSystem.battlesize = value }
})


EventHandlers.add(:on_trainer_load, :battle_size_option,
  proc { |trainer|
    if !$game_temp.battle_rules["size"] && trainer
    case $PokemonSystem.battlesize
      when 1
          setBattleRule("double") if pbCanDoubleBattle?
      when 2
          setBattleRule("triple") if pbCanTripleBattle?
          setBattleRule("double") if !pbCanTripleBattle? && pbCanDoubleBattle?
      end
    end
  }
)
I replaced :text_input_style as it seems to be having causing this bug with the text input.
 
Back
Top