• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Pokemon Birthsigns

26
Posts
5
Years
    • Seen Nov 25, 2021
    Awesome Script, but i always get this error when battling after trying to make Trainers use Zodiac Powers.
    (Sorry my bad english.)

    ---------------------------
    Pokémon Chronicles
    ---------------------------
    [Pokémon Essentials version 17.2]

    Exception: TypeError

    Message: cannot convert String into Integer

    Pokémon Birthsigns:1173:in `[]'

    Pokémon Birthsigns:1173:in `setZodiacsign'

    PTrainer_NPCTrainers:84:in `pbLoadTrainer'

    PTrainer_NPCTrainers:47:in `each'

    PTrainer_NPCTrainers:47:in `pbLoadTrainer'

    PTrainer_NPCTrainers:33:in `each'

    PTrainer_NPCTrainers:33:in `pbLoadTrainer'

    PField_Battles:205:in `pbTrainerBattle'

    Debug_Menu:349:in `pbDebugMenuActions'

    Debug_Menu:800:in `pbDebugMenu'



    This exception was logged in

    C:\Users\User\Saved Games\Pokémon Chronicles\errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------
     
    Last edited:
    1,406
    Posts
    10
    Years
    • Seen today
    Awesome Script, but i always get this error when battling after trying to make Trainers use Zodiac Powers.
    (Sorry my bad english.)

    ---------------------------
    Pokémon Chronicles
    ---------------------------
    [Pokémon Essentials version 17.2]

    Exception: TypeError

    Message: cannot convert String into Integer

    Pokémon Birthsigns:1173:in `[]'

    Pokémon Birthsigns:1173:in `setZodiacsign'

    PTrainer_NPCTrainers:84:in `pbLoadTrainer'

    PTrainer_NPCTrainers:47:in `each'

    PTrainer_NPCTrainers:47:in `pbLoadTrainer'

    PTrainer_NPCTrainers:33:in `each'

    PTrainer_NPCTrainers:33:in `pbLoadTrainer'

    PField_Battles:205:in `pbTrainerBattle'

    Debug_Menu:349:in `pbDebugMenuActions'

    Debug_Menu:800:in `pbDebugMenu'



    This exception was logged in

    C:\Users\User\Saved Games\Pokémon Chronicles\errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------

    This is a bug and should be fixed now. I had to change things around a bit to get it to work again. Please reinstall the Zodiac Power Script first. Next, add this to the bottom of your Pokemon Birthsigns script:

    Code:
    #===============================================================================
    # NPC Trainers - Party birthsigns
    #===============================================================================
    # Allows you to give birthsigns to NPC trainers' Pokemon.
    #
    # In the Trainer PBS file, you may add birthsigns to a trainer's Pokemon as the
    # 18th variable. Enter this sign in this format: "SIGN00" replacing the 00's
    # with the number of your desired birthsign (01-33).
    #
    # If you equip the appropriate Zodiac Gem to one of these Pokemon, they will
    # automatically activate its Zodiac Power on turn 1. Must have the Zodiac Power
    # add-on script installed for this to occur.
    #===============================================================================
    TPBIRTHSIGN = 17
    
    def pbLoadTrainer(trainerid,trainername,partyid=0)
      if trainerid.is_a?(String) || trainerid.is_a?(Symbol)
        if !hasConst?(PBTrainers,trainerid)
          raise _INTL("Trainer type does not exist ({1}, {2}, ID {3})",trainerid,trainername,partyid)
        end
        trainerid=getID(PBTrainers,trainerid)
      end
      success=false
      items=[]
      party=[]
      opponent=nil
      trainers=load_data("Data/trainers.dat")
      for trainer in trainers
        name=trainer[1]
        thistrainerid=trainer[0]
        thispartyid=trainer[4]
        next if trainerid!=thistrainerid || name!=trainername || partyid!=thispartyid
        items=trainer[2].clone
        name=pbGetMessageFromHash(MessageTypes::TrainerNames,name)
        for i in RIVALNAMES
          if isConst?(trainerid,PBTrainers,i[0]) && $game_variables[i[1]]!=0
            name=$game_variables[i[1]]
          end
        end
        opponent=PokeBattle_Trainer.new(name,thistrainerid)
        opponent.setForeignID($Trainer) if $Trainer
        for poke in trainer[3]
          species=poke[TPSPECIES]
          level=poke[TPLEVEL]
          pokemon=PokeBattle_Pokemon.new(species,level,opponent)
          pokemon.forcedForm = true if poke[TPFORM]!=0 && MultipleForms.hasFunction?(pokemon.species,"getForm")
          pokemon.formNoCall=poke[TPFORM]
          pokemon.resetMoves
          pokemon.setItem(poke[TPITEM])
          if poke[TPMOVE1]>0 || poke[TPMOVE2]>0 || poke[TPMOVE3]>0 || poke[TPMOVE4]>0
            k=0
            for move in [TPMOVE1,TPMOVE2,TPMOVE3,TPMOVE4]
              pokemon.moves[k]=PBMove.new(poke[move])
              k+=1
            end
            pokemon.moves.compact!
          end
          pokemon.setAbility(poke[TPABILITY])
          pokemon.setGender(poke[TPGENDER])
          if poke[TPSHINY]   # if this is a shiny Pokémon
            pokemon.makeShiny
          else
            pokemon.makeNotShiny
          end
          pokemon.setNature(poke[TPNATURE])
          iv=poke[TPIV]
          for i in 0...6
            pokemon.iv[i]=iv&0x1F
            pokemon.ev[i]=[85,level*3/2].min
          end
          pokemon.happiness=poke[TPHAPPINESS]
          pokemon.name=poke[TPNAME] if poke[TPNAME] && poke[TPNAME]!=""
          if poke[TPSHADOW]   # if this is a Shadow Pokémon
            pokemon.makeShadow rescue nil
            pokemon.pbUpdateShadowMoves(true) rescue nil
            pokemon.makeNotShiny
          end
          pokemon.ballused=poke[TPBALL]
          pokemon.setBirthsign(poke[TPBIRTHSIGN])
          pokemon.calcStats
          party.push(pokemon)
        end
        success=true
        break
      end
      return success ? [opponent,items,party] : nil
    end

    You no longer need to manually change anything in PTrainer_NPCTrainers if you paste that into your birthsigns script, so you can go ahead and delete the old changes you've already made.

    Once that's done, you should be able to add birthsigns to NPC trainer's Pokemon in the Trainer PBS file. To do this, you now have to enter them like SIGN00 (replacing the 00's with the number of the sign you want). Equip the same Pokemon with the appropriate Zodiac Gem, and they will activate their Zodiac Power in battle. The instructions have been updated in the main post, please check back there for more details.
     
    Last edited:
    3
    Posts
    7
    Years
    • Seen Sep 30, 2022
    hello i love your script. but i get an error when i try to throw a pokeball to capture a wild pokemon.

    Exception: NoMethodError

    Message: undefined method `fainted?' for #<PokeBattle_Battler:0x19567878>

    Pokemon Birthsigns:5061:in `pbThrowPokeBall'

    PItem_ItemEffects:1709

    PItem_ItemEffects:1708:in `call'

    EventHandlers:150:in `trigger'

    PItem_Items:246:in `triggerUseInBattle'

    PokeBattle_Battle:1457:in `pbRegisterItem'

    PokeBattle_Battle:2637:in `pbCommandPhase'

    PokeBattle_Battle:2592:in `loop'

    PokeBattle_Battle:2682:in `pbCommandPhase'

    PokeBattle_Battle:2581:in `each'
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    Message: undefined method `fainted?' for #<PokeBattle_Battler:0x19567878>

    What version of Essentials are you using? I only ask because IIRC fainted? was introduced in v17, and it seems more likely that you're running an old version than you accidentally deleted that method (which would be the second thing I'd check).
     
    1,406
    Posts
    10
    Years
    • Seen today
    hello i love your script. but i get an error when i try to throw a pokeball to capture a wild pokemon.

    Exception: NoMethodError

    Message: undefined method `fainted?' for #<PokeBattle_Battler:0x19567878>

    Pokemon Birthsigns:5061:in `pbThrowPokeBall'

    PItem_ItemEffects:1709

    PItem_ItemEffects:1708:in `call'

    EventHandlers:150:in `trigger'

    PItem_Items:246:in `triggerUseInBattle'

    PokeBattle_Battle:1457:in `pbRegisterItem'

    PokeBattle_Battle:2637:in `pbCommandPhase'

    PokeBattle_Battle:2592:in `loop'

    PokeBattle_Battle:2682:in `pbCommandPhase'

    PokeBattle_Battle:2581:in `each'

    Are you using Essentials v17? I'm not really sure why you'd be getting that error otherwise. I've never gotten that before.
     
    423
    Posts
    13
    Years
    • Seen Aug 31, 2023
    Glad to see the new trainer sign feature would be kool to allow things like evolution dependant upon both poke and trainer sign

    I know its a bit off topic but thought saw a post few months ago regarding it but does anyone know how how to fix the bug regarding capturing pokemon with certain forms like genesect
     
    1,406
    Posts
    10
    Years
    • Seen today
    Glad to see the new trainer sign feature would be kool to allow things like evolution dependant upon both poke and trainer sign

    I know its a bit off topic but thought saw a post few months ago regarding it but does anyone know how how to fix the bug regarding capturing pokemon with certain forms like genesect

    The form glitch that I fixed was the one that prevented Pokemon with multiple forms that are randomized with each encounter (like Unown) from spawning properly, as before they would always just spawn with the default form 0. The newest iteration of my script fixed this, and they will now properly spawn with a random form.

    The glitch you're talking about that causes an error when a Pokemon with multiple forms is captured is something completely different - and as far as I can tell - not related to my scripts. It seems to just be a general Essentials bug. I uninstalled all of my birthsign scripts and I was still getting the same error, so I don't think it's an issue on my end.


    Now, as far as evolution methods, that's really easy and you can add that yourself under Pokemon_Evolution. .

    1) Scroll down until you reach the section that allows you to fill in your custom evolution methods, and under "Custom 1", and the following line of code: return poke if pokemon.level>=level && (pokemon.birthsign==$Trainer.birthsign)
    c3tJOFO.png


    This makes it so that evolution will trigger through this method when the Pokemon's birthsign matches the Trainer's birthsign upon reaching the necessary level. You can alter this code however you wish to match what you want it to do, specifically. Something like "if pokemon.isBlessed? && $Trainer.hasJanBirthsign?" should work too, or whatever specific combination you want. Maybe evolution triggers if the Pokemon and Trainer have partner/rival signs, or if it's the Pokemon's birthday, etc. All the code should be pretty straight forward. Consult my "Useful Things to Know" section for some ideas.

    2) Finally, in the Pokemon PBS file, for any Pokemon you'd like to evolve through this method, on their Evolution line, simply write the name of the species you want them to evolve into, followed by "Custom1", and then followed by the required level number. That's it.

    If you don't want the Pokemon's Level to be a factor (and instead evolve immediately if the right signs are in place), then find the section in the script with EVOPARAM, and change the first "1" on the last line to a "0", as shown in the picture below. If so, you don't need to specify a level in the Pokemon PBS file, and can simply leave it at "Custom1". And of course, remove the code under Custom1 referring to the Pokemon's level.
    NbHMquH.png



    Note that you can rename all instances of "Custom1" in the Pokemon_Evolution script to "Birthsigns" or whatever you like, if you'd prefer.
     
    423
    Posts
    13
    Years
    • Seen Aug 31, 2023
    Ah yh the form bug this is a vanilla bug i hadnt realised thete was another form related bug so when i read it was fixed i got all excited

    Thank you for clearing it up for me
     
    5
    Posts
    4
    Years
    • Seen Feb 16, 2023
    I love your script. It's amazing to see how much effort you've put in this. But I have a bug whe I try to throw a pokeball:
    Spoiler:

    Do you know any way to fix it?
     
    43
    Posts
    8
    Years
    • Seen Jun 5, 2022
    Just wanted to say that I learnt a lot from studying these scripts when it comes to writing new code for Essentials. So shout out for kinda teaching me how Ruby haha
     
    1,406
    Posts
    10
    Years
    • Seen today
    I love your script. It's amazing to see how much effort you've put in this. But I have a bug whe I try to throw a pokeball:
    Spoiler:

    Do you know any way to fix it?

    I'm unable to recreate this glitch, so I'm not so sure it has anything to do with my scripts in particular. Can you specify what specific Pokemon you're throwing balls at (or does the glitch occurs with any Pokemon?), which Pokemon is your lead, what birthsign it has (if any?). I need some details to try and replicate this myself, because I'm not getting this error.
     
    1,406
    Posts
    10
    Years
    • Seen today
    Just wanted to say that I learnt a lot from studying these scripts when it comes to writing new code for Essentials. So shout out for kinda teaching me how Ruby haha

    Haha you're welcome. Tbh I still consider myself a novice. I knew absolutely nothing about coding in general when I first began this project, and built it simply by taking existing code in the script and slightly modding it to see if I could get different results. Then i'd make mods to my own mods until suddenly the code was completely different to the original source. I still don't know the correct terminology for anything, or even WHY certain things work/don't work. I just keep tweaking things until they feel polished. I guess the best advice I could give to someone who's trying to learn is to do exactly what you're doing...take existing code that you already know works, and use it as a model for your own ideas.
     
    5
    Posts
    4
    Years
    • Seen Feb 16, 2023
    I'm unable to recreate this glitch, so I'm not so sure it has anything to do with my scripts in particular. Can you specify what specific Pokemon you're throwing balls at (or does the glitch occurs with any Pokemon?), which Pokemon is your lead, what birthsign it has (if any?). I need some details to try and replicate this myself, because I'm not getting this error.

    It happens when I try to catch any Pokemon. I'm Using a Horsea and I'm trying different birthsigns because I've tried different save files and every time the egg hatches it has a different birthsign.
     
    1,406
    Posts
    10
    Years
    • Seen today
    It happens when I try to catch any Pokemon. I'm Using a Horsea and I'm trying different birthsigns because I've tried different save files and every time the egg hatches it has a different birthsign.

    That's very odd. Are you running any other scripts? There seems to be some kind of conflict with the "fainted?" method, but I'm not sure what. The best way to troubleshoot this tbh would be to download a fresh copy of essentials, install nothing but my scripts, and see if you still get the same errors. If you don't, then there's something you added in your own game that is conflicting.
     
    5
    Posts
    4
    Years
    • Seen Feb 16, 2023
    That's very odd. Are you running any other scripts? There seems to be some kind of conflict with the "fainted?" method, but I'm not sure what. The best way to troubleshoot this tbh would be to download a fresh copy of essentials, install nothing but my scripts, and see if you still get the same errors. If you don't, then there's something you added in your own game that is conflicting.

    I tried but it keeps happening
     
    1,406
    Posts
    10
    Years
    • Seen today
    I tried but it keeps happening

    Well, I just installed a fresh copy of Essentials with Birthsigns installed, and I haven't gotten this error. Nor do I get this error in my personal game. So without being able to replicate it, I can't really say what the problem is or what needs to be fixed. It sounds to me more like you've installed something that conflicts with my code, or you're using an outdated version of a script.
     
    5
    Posts
    4
    Years
    • Seen Feb 16, 2023
    Well, I just installed a fresh copy of Essentials with Birthsigns installed, and I haven't gotten this error. Nor do I get this error in my personal game. So without being able to replicate it, I can't really say what the problem is or what needs to be fixed. It sounds to me more like you've installed something that conflicts with my code, or you're using an outdated version of a script.

    I don't know why, I just tried on v17.2 and it started working 😅 The essentials file I had downloaded must be corrupted or sth. I'll change everything to this one. Thanks anyways.
     
    Back
    Top