• 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.
Pokemon World Tournament (Unofficial V20.1 Port)

Resource Pokemon World Tournament (Unofficial V20.1 Port) 1.0.4

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
549
I was seeing an error message similar to what was posted elsewhere in this thread but it seems to be resolved now after deleting the plugin and reinstalling it. But now when I start the tournament and go up on stage, I get this error:


Ruby:
Expand Collapse Copy
Script error in event 36 (coords 15,4), map 302 (MAP302)
Exception: NoMethodError
Message: undefined method `length' for nil:NilClass

***Full script:
$PWT.continue

Backtrace:
[PWT System] 002_CoreSystem.rb:232:in `block in generateRounds'
[PWT System] 002_CoreSystem.rb:231:in `loop'
[PWT System] 002_CoreSystem.rb:231:in `generateRounds'
[PWT System] 002_CoreSystem.rb:134:in `continue'
(eval):1:in `execute_script'
Interpreter:143:in `eval'
Interpreter:143:in `execute_script'
Interpreter_Commands:1112:in `command_355'
Interpreter_Commands:116:in `execute_command'
Interpreter:133:in `block in update'
Of what I can tell, this is happening because the game is getting nil back from trying to pull the list of trainers from the GameData::PWTTournment setup in Settings. I assume you made your own category? I can't reproduce this with my copy of the plugin, which only has the Kanto Leaders available.
 

itman312

Novice
Member
Joined
Jan 13, 2019
Posts
12
I didn't make a completely new category but I did modify the existing one to use the naming conventions I'm using in the rest of the game.

Ruby:
Expand Collapse Copy
GameData::PWTTournament.register({
  :id => :Kanto_Leaders,
  :name => _INTL("Kanto Leaders"),
  :trainers => [
                [:GYMLEADER_Brock,"Brock","Your Pokémon's powerful attacks overcame my rock-hard resistance...\nYou're stronger than I expected...","My barrier was tough to break. Maybe next time.",1,"You were pretty tough! I can't wait to face off against you again!","I'm Brock! I'm an expert on Rock-type Pokémon.","Brock: I really enjoyed the battle with you.\nStill, the world is huge! I can't believe you got past my rock-hard defense!"],
                [:GYMLEADER_Misty,"Misty","You are a skilled Trainer, I have to admit that.","Looks like out of the two of us, I was the better Trainer.",1,"I'm going to train even harder, so that I can beat you next time!"],
                [:GYMLEADER_Erika,"Erika","Oh my! \nLooks like I've underestimated you.","Keep practicing hard, and one day you will be the victor.",1,"My Pokémon have bloomed ever since they've battled you."],
                [:GYMLEADER_Sabrina,"Sabrina","Impossible! I did not predict this!","The outcome was just as I predicted.",1,"The future tells me of our rematch."],
                [:GYMLEADER_Janine,"Janine","You've got a great battle technique!","My technique was the superior one!",1],
                [:GYMLEADER_Flannery,"Flannery","Your flame burnt me up!","My flames are not something everyone can handle.",1,"You really burned me up back there!"]
               ],
  :rules_proc => proc {|length|
    rules = PokemonChallengeRules.new
    rules.addPokemonRule(BannedSpeciesRestriction.new(:MEWTWO,:MEW,:HOOH,:LUGIA,:CELEBI,:KYOGRE,:GROUDON,:RAYQUAZA,
                                                      :DEOXYS,:JIRACHI,:DIALGA,:PALKIA,:GIRATINA,:REGIGIGAS,:HEATRAN,:DARKRAI,
                                                      :SHAYMIN,:ARCEUS,:ZEKROM,:RESHIRAM,:KYUREM,:LANDORUS,:MELOETTA,
                                                      :KELDEO,:GENESECT))
    rules.addPokemonRule(NonEggRestriction.new)
    rules.addPokemonRule(AblePokemonRestriction.new)
    rules.setNumber(length)
    rules.setLevelAdjustment(FixedLevelAdjustment.new(50))
    next rules
  },
  :banned_proc => proc {
    pbMessage(_INTL("Certain exotic species, as well as eggs, are ineligible.\\1"))
  },
  :points_won => 2
})
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
549
I didn't make a completely new category but I did modify the existing one to use the naming conventions I'm using in the rest of the game.

Ruby:
Expand Collapse Copy
GameData::PWTTournament.register({
  :id => :Kanto_Leaders,
  :name => _INTL("Kanto Leaders"),
  :trainers => [
                [:GYMLEADER_Brock,"Brock","Your Pokémon's powerful attacks overcame my rock-hard resistance...\nYou're stronger than I expected...","My barrier was tough to break. Maybe next time.",1,"You were pretty tough! I can't wait to face off against you again!","I'm Brock! I'm an expert on Rock-type Pokémon.","Brock: I really enjoyed the battle with you.\nStill, the world is huge! I can't believe you got past my rock-hard defense!"],
                [:GYMLEADER_Misty,"Misty","You are a skilled Trainer, I have to admit that.","Looks like out of the two of us, I was the better Trainer.",1,"I'm going to train even harder, so that I can beat you next time!"],
                [:GYMLEADER_Erika,"Erika","Oh my! \nLooks like I've underestimated you.","Keep practicing hard, and one day you will be the victor.",1,"My Pokémon have bloomed ever since they've battled you."],
                [:GYMLEADER_Sabrina,"Sabrina","Impossible! I did not predict this!","The outcome was just as I predicted.",1,"The future tells me of our rematch."],
                [:GYMLEADER_Janine,"Janine","You've got a great battle technique!","My technique was the superior one!",1],
                [:GYMLEADER_Flannery,"Flannery","Your flame burnt me up!","My flames are not something everyone can handle.",1,"You really burned me up back there!"]
               ],
  :rules_proc => proc {|length|
    rules = PokemonChallengeRules.new
    rules.addPokemonRule(BannedSpeciesRestriction.new(:MEWTWO,:MEW,:HOOH,:LUGIA,:CELEBI,:KYOGRE,:GROUDON,:RAYQUAZA,
                                                      :DEOXYS,:JIRACHI,:DIALGA,:PALKIA,:GIRATINA,:REGIGIGAS,:HEATRAN,:DARKRAI,
                                                      :SHAYMIN,:ARCEUS,:ZEKROM,:RESHIRAM,:KYUREM,:LANDORUS,:MELOETTA,
                                                      :KELDEO,:GENESECT))
    rules.addPokemonRule(NonEggRestriction.new)
    rules.addPokemonRule(AblePokemonRestriction.new)
    rules.setNumber(length)
    rules.setLevelAdjustment(FixedLevelAdjustment.new(50))
    next rules
  },
  :banned_proc => proc {
    pbMessage(_INTL("Certain exotic species, as well as eggs, are ineligible.\\1"))
  },
  :points_won => 2
})
There's your problem. You need at least 8 trainers defined. You only have 6
 

itman312

Novice
Member
Joined
Jan 13, 2019
Posts
12
There's your problem. You need at least 8 trainers defined. You only have 6
I added an additional 6 more to give me 12 trainers, and all it did was cause a different error that occurs at the same moment as the previous error.

Code:
Expand Collapse Copy
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Script error in event 36 (coords 15,4), map 302 (MAP302)
Exception: TypeError
Message: no implicit conversion of nil into String

***Full script:
$PWT.continue

Backtrace:
RPG_Cache:35:in `+'
RPG_Cache:35:in `load_bitmap'
[PWT System] 002_CoreSystem.rb:331:in `block in displayScoreboard'
[PWT System] 002_CoreSystem.rb:320:in `each'
[PWT System] 002_CoreSystem.rb:320:in `displayScoreboard'
[PWT System] 002_CoreSystem.rb:412:in `startTournament'
[PWT System] 002_CoreSystem.rb:135:in `continue'
(eval):1:in `execute_script'
Interpreter:143:in `eval'
Interpreter:143:in `execute_script'
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
549
I added an additional 6 more to give me 12 trainers, and all it did was cause a different error that occurs at the same moment as the previous error.

Code:
Expand Collapse Copy
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Script error in event 36 (coords 15,4), map 302 (MAP302)
Exception: TypeError
Message: no implicit conversion of nil into String

***Full script:
$PWT.continue

Backtrace:
RPG_Cache:35:in `+'
RPG_Cache:35:in `load_bitmap'
[PWT System] 002_CoreSystem.rb:331:in `block in displayScoreboard'
[PWT System] 002_CoreSystem.rb:320:in `each'
[PWT System] 002_CoreSystem.rb:320:in `displayScoreboard'
[PWT System] 002_CoreSystem.rb:412:in `startTournament'
[PWT System] 002_CoreSystem.rb:135:in `continue'
(eval):1:in `execute_script'
Interpreter:143:in `eval'
Interpreter:143:in `execute_script'
My best guess from looking at that code is you don't have a graphic for one of your trainers in the Graphics/Characters/ folder.
 

itman312

Novice
Member
Joined
Jan 13, 2019
Posts
12
My best guess from looking at that code is you don't have a graphic for one of your trainers in the Graphics/Characters/ folder.

I do. I checked again, but I'm wondering if perhaps there is a problem with the naming convention. In Settings.rb for example, I may have a trainer type listed as GYMLEADER_Flannery, and so in my Graphics/Character folder, I will have an overworld sprite called GYMLEADER_Flannery.png because I assume it has to be consistent.
 
Back
Top