• 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.

Zygarde Core and Cube Mechanic V2 (I

81
Posts
8
Years
    • Seen Sep 7, 2019
    In its own script above main

    Code:
    #Zygarde Cube and Core mechanic by BlackStarG5
    #Free to use with credit!!
    
    ZYGARDECELLS = 107          #Variable reserved for this
    COREEXTREMESPEED = 276      #Switch reserved for this 
    CORETHOUSANDARROWS =  277   #Switch reserved for this
    COREDRAGONDANCE = 278       #Switch reserved for this
    CORETHOUSANDWAVES = 279     #Switch reserved for this
    CORECOREENFORCER = 280      #Switch reserved for this
    
    def pbZygardeConstruct
      loop do
        choices = ["Assembly","Separation","What is assembly?","What is separation?","Quit"]
        cmd = Kernel.pbMessage(_INTL("What would you like to do?"), choices, choices.length - 1)
        if choices[cmd]=="Assembly"
          choices = ["Using Zygarde and the Zygarde Cube","Using the Zygarde Cube only","What assembly methods are available?","Quit"]
          cmd = Kernel.pbMessage(_INTL("Please select how you'd like to assemble Zygarde."), choices, choices.length - 1)
          if choices[cmd]=="Using Zygarde and the Zygarde Cube"
            Kernel.pbMessage(_INTL("Please select Zygarde."))
            pbChooseAblePokemon(1,3)
            poke=$Trainer.party[$game_variables[1]]
            if poke.species==PBSpecies::ZYGARDE
              if $game_variables[ZYGARDECELLS]>9 && poke.form==1
                if $game_variables[ZYGARDECELLS]>=50 && poke.form==1
                  Kernel.pbMessage(_INTL("The 50% stored in the Zygarde Cube will be used to assemble Zygarde 50% Forme!"))
                  choices = ["Yes","No"]
                  cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                  if choices[cmd]=="Yes"
                    poke=pbGetPokemon(1)
                    poke.form=0
                    $game_variables[ZYGARDECELLS]-=40
                    Kernel.pbMessage(_INTL("Cells have appeared! Zygarde transformed to Zygarde 50% Forme!"))
                    Kernel.pbMessage(_INTL("The remaining Cells disappeared."))
                    Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                    break
                  elsif choices[cmd]=="No"
                    Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                    return false
                  end
                else
                  Kernel.pbMessage(_INTL("You do not have enough Cells!")) 
                end
              elsif poke.form==0 && $game_variables[ZYGARDECELLS]>=50
                Kernel.pbMessage(_INTL("From your chosen Zygarde and the 50% now in the Zygarde Cube, the unified Zygarde with the Power Construct Ability will be assembled!"))
                choices = ["Yes","No"]
                cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                if choices[cmd]=="Yes"
                  poke.setAbility(2)
                  $game_variables[ZYGARDECELLS]-=50
                  Kernel.pbMessage(_INTL("Zygarde has been reassembled!"))
                  Kernel.pbMessage(_INTL("It's the unified Zygarde with the the Power Construct Ability!"))
                  Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                  break
                elsif choices[cmd]=="No"
                  Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                  break
                  return false
                end
              else
                Kernel.pbMessage(_INTL("You do not have enough Cells!"))
              end
            else
              Kernel.pbMessage(_INTL("You cannot assemble Pokemon other than Zygarde!"))
              Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
              return false
            end
          elsif choices[cmd]=="Using the Zygarde Cube only"
            if $game_variables[ZYGARDECELLS]>10
              if $game_variables[ZYGARDECELLS]<49
                Kernel.pbMessage(_INTL("Zygarde will be assembled with the Cores and Cells within the Zygarde Cube only!"))
                Kernel.pbMessage(_INTL("The 10% stored in the Zygarde Cube will be used to assemble Zygarde 10% Forme!"))
                choices = ["Yes","No"]
                cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                if choices[cmd]=="Yes"
                  p=PokeBattle_Pokemon.new(:ZYGARDE,30,$Trainer)
                  p.form=1
                  p.makeNotShiny
                  p.pbLearnMove(:SAFEGUARD)
                  p.pbLearnMove(:BIND)
                  p.pbLearnMove(:DIG)
                  p.pbLearnMove(:LANDSWRATH)
                  p.setAbility(0)
                  p.calcStats
                  Kernel.pbAddPokemon(p)
                  $game_variables[ZYGARDECELLS]-=10
                  break
                  Kernel.pbMessage(_INTL("A new Zygarde has been assembled!"))
                  Kernel.pbMessage(_INTL("It's Zygarde 10% Forme!"))
                  Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                elsif choices[cmd]=="No"
                  break
                  Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                  return false
                end
              end
            else
              Kernel.pbMessage(_INTL("You do not have enough Cells!"))
            end
            if $game_variables[ZYGARDECELLS]>49
              if $game_variables[ZYGARDECELLS]<100
                Kernel.pbMessage(_INTL("Zygarde will be assembled with the Cores and Cells within the Zygarde Cube only!"))
                Kernel.pbMessage(_INTL("The 50% stored in the Zygarde Cube will be used to assemble Zygarde 50% Forme!"))
                choices = ["Yes","No"]
                cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                if choices[cmd]=="Yes"
                  p=PokeBattle_Pokemon.new(:ZYGARDE,50,$Trainer)
                  p.form=0
                  p.makeNotShiny
                  p.pbLearnMove(:SAFEGUARD)
                  p.pbLearnMove(:BIND)
                  p.pbLearnMove(:SANDSTORM)
                  p.pbLearnMove(:HAZE)
                  p.setAbility(0)
                  p.calcStats
                  Kernel.pbAddPokemon(p)
                  $game_variables[ZYGARDECELLS]-=50
                  break
                  Kernel.pbMessage(_INTL("A new Zygarde has been assembled!"))
                  Kernel.pbMessage(_INTL("It's Zygarde 50% Forme!"))
                  Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                elsif choices[cmd]=="No"
                  break
                  Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                  return false
                end
              end
            end
            if $game_variables[ZYGARDECELLS]>99
              if $game_variables[ZYGARDECELLS]>99
                Kernel.pbMessage(_INTL("Zygarde will be assembled with the Cores and Cells within the Zygarde Cube only!"))
                Kernel.pbMessage(_INTL("The 50% stored in the Zygarde Cube will be used to assemble Zygarde 50% Forme!"))
                Kernel.pbMessage(_INTL("The Zygarde will have the Power Construct Ability."))
                choices = ["Yes","No"]
                cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                if choices[cmd]=="Yes"
                  p=PokeBattle_Pokemon.new(:ZYGARDE,50,$Trainer)
                  p.form=0
                  p.makeNotShiny
                  p.pbLearnMove(:SAFEGUARD)
                  p.pbLearnMove(:BIND)
                  p.pbLearnMove(:SANDSTORM)
                  p.pbLearnMove(:HAZE)
                  p.setAbility(2)
                  p.calcStats
                  Kernel.pbAddPokemon(p)
                  $game_variables[ZYGARDECELLS]-=50
                  break
                  Kernel.pbMessage(_INTL("A new Zygarde has been assembled!"))
                  Kernel.pbMessage(_INTL("It's Zygarde 50% Forme!"))
                  Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                elsif choices[cmd]=="No"
                  break
                  Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                  return false
                end
              end
            end
          elsif choices[cmd]=="What assembly methods are available?"
            Kernel.pbMessage(_INTL("There are two ways to achieve Zygarde assembly."))
            Kernel.pbMessage(_INTL("One is to take a Zygarde in your party and add to it the Cells stored in the Zygarde Cube!"))
            Kernel.pbMessage(_INTL("The other way is to assemble the Cells stored in the Zygarde Cube to form a whole new Zygarde!"))
          elsif choices[cmd]=="Quit"
            return false
          end
        elsif choices[cmd]=="Separation"
          Kernel.pbMessage(_INTL("Please select the Zygarde you'd like to speparate into cells"))
          pbChooseAblePokemon(1,3)
          poke=$Trainer.party[$game_variables[1]]
          party=$Trainer.party[$game_variables[1]]
          if poke.species==PBSpecies::ZYGARDE
            if $Trainer.party.length>1
              Kernel.pbMessage(_INTL("Once separated, the separated Zygarde cannot be put back together."))
              Kernel.pbMessage(_INTL("You'll lose all it's moves, Ribbons-\\neverything about it."))
              choices = ["Yes","No"]
              cmd = Kernel.pbMessage(_INTL("Would you like to separate the Zygarde you've selected?"), choices, choices.length - 1)
              if choices[cmd]=="Yes"
                if poke.form==1 && !isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
                  Kernel.pbMessage(_INTL("Zygarde has separated."))
                  Kernel.pbMessage(_INTL("The percentage the Zygarde Cube has increased by was 10."))
                  $game_variables[ZYGARDECELLS]+=10
                  $Trainer.party.delete_at($game_variables[1])
                elsif poke.form==1 && isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
                  Kernel.pbMessage(_INTL("Zygarde has separated."))
                  Kernel.pbMessage(_INTL("The percentage the Zygarde Cube has increased by was 100."))
                  $game_variables[ZYGARDECELLS]+=100
                  $Trainer.party.delete_at($game_variables[1])
                elsif poke.form==0 && !isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
                  Kernel.pbMessage(_INTL("Zygarde has separated."))
                  Kernel.pbMessage(_INTL("The percentage the Zygarde Cube has increased by was 50."))
                  $game_variables[ZYGARDECELLS]+=50
                  $Trainer.party.delete_at($game_variables[1])
                elsif poke.form==0 && isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
                  Kernel.pbMessage(_INTL("Zygarde has separated."))
                  Kernel.pbMessage(_INTL("The percentage the Zygarde Cube has increased by was 100."))
                  $game_variables[ZYGARDECELLS]+=100
                  $Trainer.party.delete_at($game_variables[1])
                end
              elsif choices[cmd]=="No"
                Kernel.pbMessage(_INTL("Quitting the separation operation!"))
                return false
              end
            else
              Kernel.pbMessage(_INTL("That is your only Pokemon. It can't be divided."))
              return false
            end
          else
            Kernel.pbMessage(_INTL("The Pokemon can only be Zygarde."))
            return false
          end
        elsif choices[cmd]=="What is assembly?"
          Kernel.pbMessage(_INTL("It is called assembly when Zygarde is formed from the cells stored in the Zygarde Cube!"))
        elsif choices[cmd]=="What is separation?"
          Kernel.pbMessage(_INTL("It is called separation when Zygarde is broken down into cells which are then stored in the Zygarde Cube!"))
        elsif choices[cmd]=="Quit"
          return false
        end
      end
    end
    
    ItemHandlers::UseFromBag.add(:ZYGARDECUBE,proc{|item|
      pbChooseAblePokemon(1,3)
      poke=$Trainer.party[$game_variables[1]]
      if poke.species==PBSpecies::ZYGARDE
        choices = ["Teach Move", "Change Forms"]
        #choices.push("Change Forms") if isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
        if poke.species==PBSpecies::ZYGARDE
          cmd = Kernel.pbMessage(_INTL("What would you like to do?"), choices, choices.length - 1)
          if choices[cmd]=="Teach Move"
            choices = []
            choices.push("Extreme Speed") if $game_switches[COREEXTREMESPEED] # Switch for Z-Core 1
            choices.push("Thousand Arrows") if $game_switches[CORETHOUSANDARROWS] # Switch for Z-Core 2
            choices.push("Dragon Dance") if $game_switches[COREDRAGONDANCE] # Switch for Z-Core 3
            choices.push("Thousand Waves") if $game_switches[CORETHOUSANDWAVES] # Switch for Z-Core 4
            choices.push("Core Enforcer") if $game_switches[CORECOREENFORCER] # Switch for Z-Core 5
            choices.push("Cancel")
            cmd = Kernel.pbMessage(_INTL("What would you like to teach it?"), choices, choices.length - 1)
            if choices[cmd]=="Extreme Speed"
              move=getConst(PBMoves,:EXTREMESPEED)
              pbLearnMove(poke,move)
            elsif choices[cmd]=="Thousand Arrows"
              move=getConst(PBMoves,:THOUSANDARROWS)
              pbLearnMove(poke,move)
            elsif choices[cmd]=="Dragon Dance"
              move=getConst(PBMoves,:DRAGONDANCE)
              pbLearnMove(poke,move)
            elsif choices[cmd]=="Thousand Waves"
              move=getConst(PBMoves,:THOUSANDWAVES)
              pbLearnMove(poke,move)
            elsif choices[cmd]=="Core Enforcer"
              move=getConst(PBMoves,:COREENFORCER)
              pbLearnMove(poke,move)
            elsif choices[cmd]=="Cancel"
              return 1
            end
          elsif choices[cmd]=="Change Forms"
            if !isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
              Kernel.pbMessage(_INTL("Only a Zygarde with the Power Construct Ability can change its Forme."))
              return 1
            end
            choices = []
            choices.push("10%")
            choices.push("50%")
            choices.push("Cancel")
            cmd = Kernel.pbMessage(_INTL("What form would you like?"), choices, choices.length - 1)
            if choices[cmd]=="10%"
              if poke.form==0
                newform=poke.form==1
                poke.form=1
                Kernel.pbMessage(_INTL("{1} changed Form!",poke.name))
                #@scene.pbEndScene
              else
                Kernel.pbMessage(_INTL("It's already 10%!"))
                return 1
              end
            elsif choices[cmd]=="50%"
              if poke.form>=1
                newform=poke.form==0
                poke.form=0
                Kernel.pbMessage(_INTL("{1} changed Form!",poke.name))
              else
                Kernel.pbMessage(_INTL("It's already 50%!"))
                return 1
              end
            end
          elsif choices[cmd]=="Cancel"
            return false
          end
        else
          Kernel.pbMessage(_INTL("You can't do anything with it."))
          return 1
        end
      else
        Kernel.pbMessage(_INTL("It won't have any effect."))
        return 1
      end
      next 1 # Continue
    })

    For the cube, create a new item in items.txt indexed (Change it to fit key items in your game)
    Code:
    XXX,ZYGARDECUBE,Zygarde Cube,8,0,"An item to store Zygarde Cores and Cells. You can also use it to teach Zygarde moves.",2,0,6,

    In PItem_Items place
    Code:
    def pbIsZCube?(item)
      return true if isConst?(item,PBItems,:ZYGARDECUBE)
      return false
    end
    anywhere outside of any def

    Search
    Code:
    commands[cmdUse=commands.length]=_INTL("Use") if ItemHandlers.hasOutHandler(item) || (pbIsMachine?(item) && $Trainer.party.length>0)
    for in PScreen_Bag and under it put
    Code:
    commands[cmdCheck=commands.length]=_INTL("Check") if pbIsZCube?(item)

    In the same script search for
    Code:
    if cmdUse>=0 && command==cmdUse # Use item
            ret=pbUseItem(@bag,item,@scene)
            # 0=Item wasn't used; 1=Item used; 2=Close Bag to use in field
            break if ret==2 # End screen
            @scene.pbRefresh
            next
    under it put
    Code:
    elsif cmdCheck>=0 && command==cmdCheck # Check Zygarde Cube
             Kernel.pbMessage(_INTL("\\w[blacktextskin]\\c[8]You have collected {1}/100 Zygarde Cores and Zygarde Cells.",$game_variables[107]))
             Kernel.pbMessage(_INTL("\\w[blacktextskin]\\c[8]You have {1} in the Zygarde Cube now.",$game_variables[107]))
             @scene.pbRefresh

    The variables are reserved for the moves (Can be changed, One of these has to be on for the cube to work, otherwise it'll say you can't do nothing with it)

    Call the Zygarde Core/Stone mechanic using "[S-HIGHLIGHT]pbZygardeConstruct[/S-HIGHLIGHT]"

    If any edits are made or mistakes are found please let me know. This is free to use with credit of course.
    #Note! This also uses a windowskin called "blacktextskin" so you want to make sure you either change those or create a window skin with that name
     
    Last edited:
    10
    Posts
    7
    Years
    • Seen Aug 17, 2021
    Sounds good... But not working for me.
    I get a Syntax error in PItem_items

    Edit: I´m dumb. I placed it wrong.
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Oh, sorry to ress, but when i press Toss, Give or Cancel, open that issue. Every item (to use them its ok and Zygarde Cube its all ok too):

    Code:
    ---------------------------
    Pokemon Essentials
    ---------------------------
    [Pok?mon Essentials version 17.2]
    
    Exception: NoMethodError
    
    Message: undefined method `>=' for nil:NilClass
    
    PScreen_Bag:490:in `pbStartScreen'
    
    PScreen_Bag:448:in `loop'
    
    PScreen_Bag:562:in `pbStartScreen'
    
    PScreen_PauseMenu:191:in `pbStartPokemonMenu'
    
    PScreen_PauseMenu:188:in `pbFadeOutIn'
    
    PScreen_PauseMenu:188:in `pbStartPokemonMenu'
    
    PScreen_PauseMenu:144:in `loop'
    
    PScreen_PauseMenu:279:in `pbStartPokemonMenu'
    
    Scene_Map:127:in `call_menu'
    
    Scene_Map:213:in `follow_update'
     
    Last edited:
    35
    Posts
    8
    Years
    • Seen Jun 3, 2023
    Oh, sorry to ress, but when i press Toss, Give or Cancel, open that issue. Every item (to use them its ok and Zygarde Cube its all ok too):

    Code:
    ---------------------------
    Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 17.2]
    
    Exception: NoMethodError
    
    Message: undefined method `>=' for nil:NilClass
    
    PScreen_Bag:490:in `pbStartScreen'
    
    PScreen_Bag:448:in `loop'
    
    PScreen_Bag:562:in `pbStartScreen'
    
    PScreen_PauseMenu:191:in `pbStartPokemonMenu'
    
    PScreen_PauseMenu:188:in `pbFadeOutIn'
    
    PScreen_PauseMenu:188:in `pbStartPokemonMenu'
    
    PScreen_PauseMenu:144:in `loop'
    
    PScreen_PauseMenu:279:in `pbStartPokemonMenu'
    
    Scene_Map:127:in `call_menu'
    
    Scene_Map:213:in `follow_update'

    I have this error too.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I have this error too.

    in PScreen_Bag, 'def pbStartScreen', add:
    Code:
    cmdCheck    = -1

    and add like this:
    Code:
          commands[cmdRead = commands.length]        = _INTL("Read") if pbIsMail?(item)
          if ItemHandlers.hasOutHandler(item) || (pbIsMachine?(item) && $Trainer.party.length>0)
            if ItemHandlers.hasUseText(item)
              commands[cmdUse = commands.length]     = ItemHandlers.getUseText(item)
            else
              commands[cmdUse = commands.length]     = _INTL("Use")
            end
          end
    [B]      [COLOR="Red"]commands[cmdCheck = commands.length]       = _INTL("Check")if pbIsZCube?(item)[/COLOR][/B]
          commands[cmdGive = commands.length]        = _INTL("Give") if $Trainer.pokemonParty.length>0 && pbCanHoldItem?(item)
          commands[cmdToss = commands.length]        = _INTL("Toss") if !pbIsImportantItem?(item) || $DEBUG

    Done!
     

    mybusiness

    Guest
    0
    Posts
    Excellent contribution. I modified the party screen that appears when you have to choose a Zygarde from your team so that any pokemon other than Zygarde has a "Not able" text in front of them:


    In PSystem_PokemonUtilities put this anywhere outside any def:
    Code:
    def pbChooseZygarde(variableNumber,nameVarNumber)
      pbChoosePokemon(variableNumber,nameVarNumber,proc {|poke|
         !poke.egg? && isConst?(poke.species,PBSpecies,:ZYGARDE)
      })
    end

    In BlackOutG5's script, replace pbChooseAblePokemon(1,3) with pbChooseZygarde(1,3). There are three instances where you have to do this step.

    Done!
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Excellent contribution. I modified the party screen that appears when you have to choose a Zygarde from your team so that any pokemon other than Zygarde has a "Not able" text in front of them:


    In PSystem_PokemonUtilities put this anywhere outside any def:
    Code:
    def pbChooseZygarde(variableNumber,nameVarNumber)
      pbChoosePokemon(variableNumber,nameVarNumber,proc {|poke|
         !poke.egg? && isConst?(poke.species,PBSpecies,:ZYGARDE)
      })
    end

    In BlackOutG5's script, replace pbChooseAblePokemon(1,3) with pbChooseZygarde(1,3). There are three instances where you have to do this step.

    Done!

    Its possible to record what pokeball Zygarde was catch before actions? Idk if BlackOutG5 did it... I mean, if i catchted Zygarde with a Master Ball and after use this script, the Zygarde will appears only in a Pokeball (instead Masteball).


    Also, if i catchted a SHINY zygarde and use that script, after used, i will have SHINY zygarde too? Cuz we have 'p.makeNotShiny' in the script.

    Thanks in advance,
     
    Last edited:

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    Its possible to record what pokeball Zygarde was catch before actions? Idk if BlackOutG5 did it... I mean, if i catchted Zygarde with a Master Ball and after use this script, the Zygarde will appears only in a Pokeball (instead Masteball).


    Also, if i catchted a SHINY zygarde and use that script, after used, i will have SHINY zygarde too? Cuz we have 'p.makeNotShiny' in the script.

    Thanks in advance,
    From what I can tell just looking at the script, p.makeNotShiny only occurs in the script when you are assembling the Zygarde just using the cells in the Zygarde cube. If you are using a Zygarde you own along with the cube, it only changes the form and/or ability and doesn't touch shininess. Of course, if you completely disassemble your Zygarde, then you would lose shininess.

    If you wanted it to be possible to create a shiny Zygarde using only the cells in the Zygarde cube, you could just delete the p.makeNotShiny lines and let people soft reset to their hearts content!

    As for the pokeball, I don't see anything in the script that would affect that, again, unless you are completely disassembling a Zygarde, which deletes it from your party (along with the ball it's in). But if you are just adding cells to a Zygarde you caught, it's pokeball shouldn't change (at least based on what I see in the script. I haven't tested any of this).

    For either the pokeball or the shininess, I'm sure you store that information in a variable somewhere. before you delete the pokemon from the party and then access that information later to add an empty ball to the party or to use that specific ball again the next time a Zygarde is created, to check whether or not the cells in the cube are shiny and thus a shiny zygarde should be created. You would need to add some lines checking the selected pokemon's ball and shininess, then add some code to interact with global variables.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • From what I can tell just looking at the script, p.makeNotShiny only occurs in the script when you are assembling the Zygarde just using the cells in the Zygarde cube. If you are using a Zygarde you own along with the cube, it only changes the form and/or ability and doesn't touch shininess. Of course, if you completely disassemble your Zygarde, then you would lose shininess.

    If you wanted it to be possible to create a shiny Zygarde using only the cells in the Zygarde cube, you could just delete the p.makeNotShiny lines and let people soft reset to their hearts content!

    As for the pokeball, I don't see anything in the script that would affect that, again, unless you are completely disassembling a Zygarde, which deletes it from your party (along with the ball it's in). But if you are just adding cells to a Zygarde you caught, it's pokeball shouldn't change (at least based on what I see in the script. I haven't tested any of this).

    For either the pokeball or the shininess, I'm sure you store that information in a variable somewhere. before you delete the pokemon from the party and then access that information later to add an empty ball to the party or to use that specific ball again the next time a Zygarde is created, to check whether or not the cells in the cube are shiny and thus a shiny zygarde should be created. You would need to add some lines checking the selected pokemon's ball and shininess, then add some code to interact with global variables.

    Code:
    [COLOR="Red"]You would need to add some lines checking the selected pokemon's ball and shininess, then add some code to interact with global variables[/COLOR]
    Meu Deus @_@ How can i do that? auhauha
     

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    Code:
    [COLOR="Red"]You would need to add some lines checking the selected pokemon's ball and shininess, then add some code to interact with global variables[/COLOR]
    Meu Deus @_@ How can i do that? auhauha

    Here's the code that you would need to retrieve these traits from the selected Zygarde,

    At the top of the script, where the other globals are defined, you'll want to designate a switch and a variable:
    Code:
    ZYGARDECELLS = 107          #Variable reserved for this
    [COLOR="red"]ZYGARDEBALL = 108     #Variable reserved for this[/COLOR]
    COREEXTREMESPEED = 276      #Switch reserved for this 
    CORETHOUSANDARROWS =  277   #Switch reserved for this
    COREDRAGONDANCE = 278       #Switch reserved for this
    CORETHOUSANDWAVES = 279     #Switch reserved for this
    CORECOREENFORCER = 280      #Switch reserved for this
    [COLOR="Red"]SHINYZYGARDE = 281     #Switch reserved for this[/COLOR]
    The exact numbers can be different depending on what you're using for your game, you just want to make sure they are reserved.

    Next, in the Separation section of the script, you'll want to retrieve the Zygarde's shininess and ball used.
    Code:
        elsif choices[cmd]=="Separation"
          Kernel.pbMessage(_INTL("Please select the Zygarde you'd like to speparate into cells"))
          pbChooseAblePokemon(1,3)
          poke=$Trainer.party[$game_variables[1]]
          party=$Trainer.party[$game_variables[1]]
          if poke.species==PBSpecies::ZYGARDE
            if $Trainer.party.length>1
              Kernel.pbMessage(_INTL("Once separated, the separated Zygarde cannot be put back together."))
              Kernel.pbMessage(_INTL("You'll lose all it's moves, Ribbons-\\neverything about it."))
              choices = ["Yes","No"]
              cmd = Kernel.pbMessage(_INTL("Would you like to separate the Zygarde you've selected?"), choices, choices.length - 1)
    					if choices[cmd]=="Yes"
    [COLOR="red"]						$game_switches[SHINYZYGARDE] = true if poke.isShiny?
    						$game_variables[ZYGARDEBALL] = poke.ballused[/COLOR]
    			      if poke.form==1 && !isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)

    And then, back in the sections where the Zygarde assembly sections where the Zygarde is being assembled just from cells, you'll want to add two new traits to that list of qualities that are all defined with p.(method):
    Code:
    p.makeShiny if $game_switches[SHINYZYGARDE]
    p.ballused = $game_variables[ZYGARDEBALL] if $game_variables[ZYGARDEBALL] != nil     #puts the new Zygarde in the same ball a previous Zygarde was separated from
    $game_switches[SHINYZYGARDE]=false     #turn of the switch since the shiny cells were "used up"
    $game_variables[ZYGARDEBALL]=0
    #set the Zygarde ball to a regular pokeball since Zygarde was returned to the empty ball
    Remembering that you'll have to add this to each of the three possible Zygarde's created from cells: 10%, 50%, and power construct Zygarde.

    Now, if you also want to be able to separate a Zygarde's cells, retain their shininess and then add that shininess to another captured Zygarde (which would mean you're doing weird things with Zygarde availability in your game, but whatever), you would need to add similar code to the section for assembly "Using Zygarde and the Zygarde Cube". You would have to add it in more than one place for the different % of Zygarde, but you'd be looking for the lines where it is being edited with poke.(method)
    Code:
    poke.makeShiny if $game_switches[SHINYZYGARDE]

    I think that ought to do it!
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Here's the code that you would need to retrieve these traits from the selected Zygarde,
    Spoiler:

    Done! Thank you!
    Spoiler:


    Also, to my game the player have to capture your Zygarde Shiny. I dont want that make shiny usin the machine lol.
     
    Last edited:
    1
    Posts
    191
    Days
    • Seen Oct 26, 2023
    I am so sorry for bringing this back up, lol. But, does this still work in v21.1? If so, can anyone tell me how to add this step by step? 'cause i'm new to this code thing in Script Editor.
     
    Back
    Top