• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Problem: Battles

Aamelo

Reality Bender.
  • 49
    Posts
    14
    Years
    Hello People! I'am Kinda of New here... but this isn't an introduction topic... so let me get straight to the point already.

    Recently, I have become a programmer for a Game in deviantART called Pokémon Celestite, where we quickly released the first version of the game. How ever, in a expansion of this first version, we decided to delete all attacks and we decided to make all the attacks from scratch. And, after that, the game begin to crash every time that a battle was started.

    To explain better, here are a couple of facts:
    • The Game is completly custom in Pokémon, Items, Moves and Trainers, and the PBS files for all of them were cleaned to 0 and Started from there
    • There is only one trainer programed into the game, and two 'half-wild' (Since you have to interact with the pokémon to it begin) Battles so far
    • The Battles stoped working with the custom attacks

    Here are the errors while running the trainer battle normally:
    Code:
    ---------------------------
    Pokemon Celestile
    ---------------------------
    Exception: RuntimeError
    
    Message: Script error within event 2, map 15 (Nixing Rest):
    
    Exception: ArgumentError
    
    Message: Section068:280:in `initialize'wrong number of arguments(1 for 2)
    
    ***Full script:
    
    pbTrainerBattle(PBTrainers::RIVAL,"Alice",_I("Nice Battle Josh."),false,0)
    
    Interpreter:243:in `pbExecuteScript'
    
    PokeBattle_Battle:280:in `new'
    
    PokeBattle_Battle:280:in `initialize'
    
    PokemonTrainers:372:in `new'
    
    PokemonTrainers:372:in `pbTrainerBattle'
    
    (eval):1:in `pbExecuteScript'
    
    Interpreter:787:in `eval'
    
    Interpreter:243:in `pbExecuteScript'
    
    Interpreter:787:in `command_111'
    
    Interpreter:319:in `execute_command'
    
    
    
    Interpreter:275:in `pbExecuteScript'
    
    Interpreter:787:in `command_111'
    
    Interpreter:319:in `execute_command'
    
    Interpreter:193:in `update'
    
    Interpreter:106:in `loop'
    
    Interpreter:198:in `update'
    
    Scene_Map:103:in `update'
    
    Scene_Map:101:in `loop'
    
    Scene_Map:114:in `update'
    
    Scene_Map:68:in `main'

    Running the Trainer Battle from the Debug:
    Code:
    ---------------------------
    Pokemon Celestile
    ---------------------------
    Exception: ArgumentError
    
    Message: wrong number of arguments(1 for 2)
    
    PokeBattle_Battle:280:in `initialize'
    
    PokeBattle_Battle:280:in `new'
    
    PokeBattle_Battle:280:in `initialize'
    
    PokemonTrainers:372:in `new'
    
    PokemonTrainers:372:in `pbTrainerBattle'
    
    PokemonDebug:499:in `pbDebugMenu'
    
    PokemonDebug:293:in `loop'
    
    PokemonDebug:511:in `pbDebugMenu'
    
    PokemonDebug:645:in `main'
    
    Main:37:in `mainFunctionDebug'

    Running a Wild Battle from the Debug:
    Code:
    ---------------------------
    Pokemon Celestile
    ---------------------------
    Exception: ArgumentError
    
    Message: wrong number of arguments(1 for 2)
    
    PokeBattle_Battle:280:in `initialize'
    
    PokeBattle_Battle:280:in `new'
    
    PokeBattle_Battle:280:in `initialize'
    
    PokemonField:809:in `new'
    
    PokemonField:809:in `pbWildBattle'
    
    PokemonDebug:492:in `pbDebugMenu'
    
    PokemonDebug:293:in `loop'
    
    PokemonDebug:511:in `pbDebugMenu'
    
    PokemonDebug:645:in `main'
    
    Main:37:in `mainFunctionDebug'

    Sorry If I wasn't clear, but... Any help here would help.
    Thanks!
    ~ Aamelo
     
    Your error messages all flip out at PokeBattle_Battle line 280, so that seems like a nice place to start.

    It initialises the Struggle move. I remember this being a problem in the past. Go to that line and make it look like @struggle=PokeBattle_Struggle.new(self,nil) instead. See if that helps.
     
    Your error messages all flip out at PokeBattle_Battle line 280, so that seems like a nice place to start.

    It initialises the Struggle move. I remember this being a problem in the past. Go to that line and make it look like @struggle=PokeBattle_Struggle.new(self,nil) instead. See if that helps.

    It Fixed...
    ...
    Well, a so small missing term that caused so much trouble...

    Thanks for your help Maruno, you have certainly helped. Really, Thanks :D
     
    No problem.

    I couldn't get any error message when I tried it without a defined Struggle move (which is what caused your problem). It's strange. It's fixed, though, so never mind.
     
    It will use Struggle, just like you'd expect. Even if the move Struggle isn't mentioned in moves.txt, a default move called Struggle is defined in the scripts. Currently, the Struggle in moves.txt of a fresh copy of Essentials effectively says "do the default Struggle" anyway.
     
    Okay, thanks then. But Sadly, I am not done yet.

    Currently, I am experiencing a problem with a 'Controled' Wild Battle (Where the battle only starts in the event). The Error is the following:

    Code:
    ---------------------------
    Pokemon Celestile
    ---------------------------
    Exception: RuntimeError
    
    Message: Script error within event 4, map 14 (Nixing Rest):
    
    Exception: NameError
    
    Message: (eval):1:in `pbExecuteScript'uninitialized constant Interpreter::SHWHT
    
    ***Full script:
    
    pbWildBattle(SHWHT,3)
    
    Interpreter:243:in `pbExecuteScript'
    
    Interpreter:787:in `eval'
    
    Interpreter:243:in `pbExecuteScript'
    
    Interpreter:787:in `command_111'
    
    Interpreter:319:in `execute_command'
    
    Interpreter:193:in `update'
    
    Interpreter:106:in `loop'
    
    Interpreter:198:in `update'
    
    Scene_Map:103:in `update'
    
    Scene_Map:101:in `loop'
    
    
    
    Interpreter:275:in `pbExecuteScript'
    
    Interpreter:787:in `command_111'
    
    Interpreter:319:in `execute_command'
    
    Interpreter:193:in `update'
    
    Interpreter:106:in `loop'
    
    Interpreter:198:in `update'
    
    Scene_Map:103:in `update'
    
    Scene_Map:101:in `loop'
    
    Scene_Map:114:in `update'
    
    Scene_Map:68:in `main'

    The Event is done with a conditional branch, toggled on script with 'pbWildBattle(SHWHT,3)' written and 'Set Handling when Conditions do not apply'.

    and 'Sheepy' Internal data is this:
    Code:
    [8]
    Name=Sheepy
    InternalName=SHWHT
    Kind=Sheep
    Pokedex=Sheepy are the most common Dream Pokemon in Luminos, some say they are the mascots of the dream world.
    Type1=NORMAL
    BaseStats=55,40,40,65,45,35
    Rareness=150
    BaseEXP=80
    Happiness=70
    GrowthRate=Parabolic
    StepsToHatch=5120
    Color=White
    Habitat=Grassland
    EffortPoints=0,0,0,0,0,1
    Abilities=INSOMNIA
    Compatibility=1,1
    Height=50.8
    Weight=7.8
    GenderRate=AlwaysFemale
    Moves=1,COUNTME,1,PUSHNPULL
    EggMoves=
    Evolutions=SHDRM,ItemFemale,ANTPOISON
     
    Back
    Top