XP - Constructor for RPG::BattleEventPage

Started by Heretic86, March 31, 2021, 05:15:38 pm

Previous topic - Next topic

Heretic86

So playing around with some stuff, and I came across this:

module RPG
  class Troop
    def initialize
      @id = 0
      @name = ""
      @members = []
      @pages = [RPG::BattleEventPage.new]
    end
    attr_accessor :id
    attr_accessor :name
    attr_accessor :members
    attr_accessor :pages
  end
end

Trouble is that there is nothing in the documentation for the structure of the RPG::BattleEventPage.new

Whats up with that?
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

KK20

It's another one of the help file's mistakes. You can easily confirm this by trying
p RPG::BattleEventPage
and get
uninitialized constant RPG::BattleEventPage

If you then try to do
p RPG::Troop.new
You'll see
@pages=[#<RPG::Troop::Page ... >]

The text in the RPG::Troop documentation in the help file is correct.
Quotepages
  Battle events. An RPG::Troop::Page array.

Though I never really realized this until just now and saw that XPA has this incorrect class definition in its scripts.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Heretic86

Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)