- 17
- Posts
- 4
- Years
- Seen Jul 28, 2022
Main Installation [UPDATED FOR MAX RAID BATTLES]
Additional Installations [UPDATED FOR MAX RAID BATTLES]
Other Installations
Spoiler:
This is the core of what you need to actually get the Dynamax mechanic working in your game.
Download: Dynamax Folder
Download: Dynamax Folder
- [MAX RAID UPDATE] First, create a new section in the script, below all of the sections handling battle and the battle scene. Directly above Debug_Menu is where I have it. If you have Pokemon Birthsigns installed, it's probably a good idea to install it below all of that. Paste the contents of "Dynamax" text file into this new section.
- [MAX RAID UPDATE] Right below the Dynamax script you just installed, create another section right below that and paste the contents of "Battle Compatibility" here. This needs to also be below any code you installed that handles Z-Moves, Ultra Burst, or Birthsigns. This is needed not just for Dynamax to work, but allows it to work along side those other battle mechanics. This won't cause any problems, even if you don't have those scripts installed. Just make sure you dont turn the corresponding SWITCH on during gameplay if you aren't utilizing those particular mechanics. However, you must turn the DYNAMAX_SWITCH "on" in-game to allow Dynamax to work.
- [MAX RAID UPDATE] Copy and paste the contents of "Items" into your items PBS file. Out of these, only the Dynamax Band is mandatory. Renumber these to suit your game.
- Copy and paste the contents of "Moves" into your moves PBS file. This includes every Max Move and G-Max Move. They're numbered starting at 800, so you don't need to bother renumbering them unless your game already uses those numbers.
- [MAX RAID UPDATE] Drop or merge the contents of the "Picture" folder into their appropriate Essentials graphic folders. These are for both battle and summary graphics, and graphics required for Max Raid events.
- [MAX RAID UPDATE] Drop or merge the contents of the "Audio" folder into their appropriate Essentials audio folders. These tracks are used for Max Raid Battles and Raid events.
- If you're using other battle mechanic installations (Z-Moves, Ultra Burst, Zodiac Powers), make sure the Battle_Compatibility script has the correct pathways set up to find the appropriate graphics. Use CTRL+F and search for "Battle Graphics" to check.
Additional Installations [UPDATED FOR MAX RAID BATTLES]
Spoiler:
These implement a ton of tiny things that need manual installation. There's one or two necessary things, but it's mostly changes to old move effects, or the addition of new ones. Not required for Dynamax to work, but allows it to function in all the ways its intended. If updating for Max Raid battles, most of the tagged updates are required installations.
1) Changes in PokeBattle_Battler (changes to Imposter, Cursed Body, Red Card, and Choice Items) [UPDATED FOR MAX RAID BATTLES]
2) Changes in PokeBattle_Move (changes to Choice Band/Specs) [UPDATED FOR MAX RAID BATTLES]
3) Changes in PokeBattle_MoveEffects (changes to a slew of old moves for compatibility) [UPDATED FOR MAX RAID BATTLES]
4) Changes in PokeBattle_Battle (contains an important change, and adds G-Max Steelsurge) [UPDATED FOR MAX RAID BATTLES]
5) Changes in PokeBattle_Scene (implements enlarged sprites) [UPDATED FOR MAX RAID BATTLES]
6) Changes in PScreen_Summary (graphics for Dynamax meter & G-Max Factor)
1) Changes in PokeBattle_Battler (changes to Imposter, Cursed Body, Red Card, and Choice Items) [UPDATED FOR MAX RAID BATTLES]
Spoiler:
- Find the line "if self.hasWorkingItem(:CHOICESCARF)", and add this right next to it:
Code:&& !isDynamax?
- Under the effects for Imposter, find the line"@effects[PBEffects::Transform]=true", and paste this below it:
Code:#======================================================================= # Prevents Dynamaxing if transformed into a species on DMAX_BANLIST. #======================================================================= if choice.effects[PBEffects::NoDynamax] @effects[PBEffects::NoDynamax]=true end #=======================================================================
- Also in the code for Imposter, just a little further down: replace the lines between "for i in 0..4" and "@moves.pp=5" with this:
Code:#===================================================================== # Copies Dynamax Pokemon's base moves. - Edited for Dynamax. #===================================================================== if choice.isDynamax? @moves[i]=PokeBattle_Move.pbFromPBMove(@battle,PBMove.new(choice.pokemon.moves[i].id)) else @moves[i]=PokeBattle_Move.pbFromPBMove(@battle,PBMove.new(choice.moves[i].id)) end #=====================================================================
[*]Find the line "target.hasWorkingAbility(:CURSEDBODY,true)", and at the end of that if statement, add this (right after !user.fainted?):
Code:&& !user.isDynamax?
[*]Find the line "user.effects[PBEffects::Roar]=true", and right next to it, add this:
Code:if !target.isDynamax?
[*]In the def EndTurn, add this at the end of the first line (after "!fainted? &&"):
Code:!isDynamax? &&
[*][MAX RAID UPDATE] Find the line beginning with "addleffect=100 if $DEBUG", and paste this right above it:
Code:addleffect=0 if target.effects[PBEffects::RaidShield]>0 # Added for Max Raids
2) Changes in PokeBattle_Move (changes to Choice Band/Specs) [UPDATED FOR MAX RAID BATTLES]
Spoiler:
- Find the lines for both CHOICEBAND and CHOICESPECS, and add this at the end of both if statements:
Code:&& !attacker.isDynamax?
- [MAX RAID UPDATE] Find this line: "basedmg=(basedmg*damagemult*1.0/0x1000).round", and paste this above it:
Code:#=========================================================================== # Max Raid Battles - Reduces damage taken when Raid Shield is up. #=========================================================================== if opponent.effects[PBEffects::RaidShield]>0 damagemult=(damagemult/24).round end #===========================================================================
- [MAX RAID UPDATE] Find this line: "elsif opponent.effects[PBEffects::Endure]", and paste this above it:
Code:#======================================================================= # Max Raid Battles - Always leaves the Raid Boss with 1 HP from attacks. #======================================================================= elsif opponent.effects[PBEffects::MaxRaidBoss] damage=damage-1 #=======================================================================
3) Changes in PokeBattle_MoveEffects (changes to a slew of old moves for compatibility) [UPDATED FOR MAX RAID BATTLES]
Spoiler:
- In "class PokeBattle_Move_049" (Defog), under each instance of "effects[PBEffects::StealthRock]", add an equivalent line that is identical to each one, except it should have the effect "[PBEffects::Steelsurge]" instead.
- In "class PokeBattle_Move_05A" (Pain Split), replace everything in between the line "pbShowAnimation" and "return 0" with this:
Code:#=========================================================================== # Damage dealt based on target's normal HP - Added for Dynamax #=========================================================================== userboost=attacker.pokemon.pbDynamaxBoost(attacker.pokemon) userbaseHP=attacker.hp if !attacker.isDynamax? userbaseHP=(attacker.hp/userboost).floor if attacker.isDynamax? oppboost=opponent.pokemon.pbDynamaxBoost(opponent.pokemon) oppbaseHP=opponent.hp if !opponent.isDynamax? oppbaseHP=(opponent.hp/oppboost).floor if opponent.isDynamax? olda=attacker.hp oldo=opponent.hp avhp=((userbaseHP+oppbaseHP)/2).floor attacker.hp=[avhp,attacker.totalhp].min opponent.hp=[avhp,opponent.totalhp].min @battle.scene.pbHPChanged(attacker,olda) @battle.scene.pbHPChanged(opponent,oldo) @battle.pbDisplay(_INTL("The battlers shared their pain!")) #===========================================================================
- In "class PokeBattle_Move_05C" (Mimic), next to the line "opponent.lastMoveUsed<=0 ||", add this:
Code:opponent.isDynamax? ||
- In "class PokeBattle_Move_05D" (Sketch), next to the line "opponent.lastMoveUsedSketch<=0 ||", add this:
Code:opponent.isDynamax? ||
- In "class PokeBattle_Move_069" (Transform), under the line "attacker.effects[PBEffects::Transform]=true", add this:
Code:#=========================================================================== if opponent.effects[PBEffects::NoDynamax] attacker.effects[PBEffects::NoDynamax]=true end #===========================================================================
Then, replace the lines between "for i in 0...4" and "attacker.moves.pp=5" with this:
Code:#========================================================================= # Copies Dyanamax Pokemon's base moves. - Edited for Dynamax #========================================================================= if opponent.isDynamax? attacker.moves[i]=PokeBattle_Move.pbFromPBMove(@battle,PBMove.new(opponent.pokemon.moves[i].id)) else attacker.moves[i]=PokeBattle_Move.pbFromPBMove(@battle,PBMove.new(opponent.moves[i].id)) end #=========================================================================
[*]In "class PokeBattle_Move_06C" (Super Fang), replace the code within pbEffect with this:
Code:#=========================================================================== # Damage dealt based on target's normal HP - Added for Dynamax #=========================================================================== if opponent.isDynamax? oppboost=opponent.pokemon.pbDynamaxBoost(opponent.pokemon) baseHP=(opponent.hp/oppboost).floor return pbEffectFixedDamage([(baseHP/2).floor,1].max,attacker,opponent,hitnum,alltargets,showanimation) else return pbEffectFixedDamage([(opponent.hp/2).floor,1].max,attacker,opponent,hitnum,alltargets,showanimation) end #===========================================================================
[*]In "class PokeBattle_Move_06E" (Endeavor), replace all the code within pbEffect with this:
Code:#=========================================================================== # Damage dealt based on target's normal HP - Added for Dynamax #=========================================================================== userboost=attacker.pokemon.pbDynamaxBoost(attacker.pokemon) userbaseHP=attacker.hp if !attacker.isDynamax? userbaseHP=(attacker.hp/userboost).floor if attacker.isDynamax? oppboost=opponent.pokemon.pbDynamaxBoost(opponent.pokemon) oppbaseHP=opponent.hp if !opponent.isDynamax? oppbaseHP=(opponent.hp/oppboost).floor if opponent.isDynamax? if userbaseHP>=oppbaseHP @battle.pbDisplay(_INTL("But it failed!")) return -1 end return pbEffectFixedDamage(oppbaseHP-userbaseHP,attacker,opponent,hitnum,alltargets,showanimation) #===========================================================================
[*]In "class PokeBattle_Move_0AF" (Copycat), above the line "if @battle.lastMoveUsed<=0", add this:
Code:#=========================================================================== # Finds the base move if last move used was a Max Move. - Added for Dynamax #=========================================================================== basemove=0 partner=attacker.pbPartner opponent1=attacker.pbOppositeOpposing opponent2=attacker.pbOppositeOpposing2 if @battle.lastMoveUsed==partner.lastMoveUsed && partner.isDynamax? [email protected][partner.index][1] basemove=partner.pokemon.moves[movechoice].id elsif @battle.lastMoveUsed==opponent1.lastMoveUsed && opponent1.isDynamax? [email protected][opponent1.index][1] basemove=opponent1.pokemon.moves[movechoice].id elsif @battle.lastMoveUsed==opponent2.lastMoveUsed && opponent2.isDynamax? [email protected][opponent2.index][1] basemove=opponent2.pokemon.moves[movechoice].id end if basemove!=0 if blacklist.include?(PBMoveData.new(basemove).function) @battle.pbDisplay(_INTL("But it failed!")) return -1 end attacker.pbUseMoveSimple(basemove) return 0 end #===========================================================================
[*]In "class PokeBattle_Move_0B0" (Me First), right next to the line "oppmove.pbIsStatus? ||", add this:
Code:opponent.isDynamax? ||
[*]In "class PokeBattle_Move_0EC" (Dragon Tail/Circle Throw), right next to the line "!opponent.effects[PBEffects::Ingrain]", add this:
Code:&& !opponent.isDynamax?
[*]In "class PokeBattle_Move_110" (Rapid Spin), above the line "if attacker.pbOwnSide.effects[PBEffects::Spikes]>0", add this:
Code:#========================================================================= # G-Max Steelsurge - Added for Dynamax #========================================================================= if attacker.pbOwnSide.effects[PBEffects::Steelsurge] attacker.pbOwnSide.effects[PBEffects::Steelsurge]=false @battle.pbDisplay(_INTL("{1} blew away the steel spikes!",attacker.pbThis)) end #=========================================================================
[*][MAX RAID UPDATE] In "class PokeBattle_Move_0EA" (Teleport), right next to the line "@battle.opponent ||", add this on the same line:
Code:$game_switches[MAXRAID_SWITCH] || # Added for Max Raids
[*][MAX RAID UPDATE] In "class PokeBattle_Move_0E5" (Perish Song), right above the line "if failed", add this:
Code:failed=true if $game_switches[MAXRAID_SWITCH] # Added for Max Raids
4) Changes in PokeBattle_Battle (contains an important change, and adds G-Max Steelsurge) [UPDATED FOR MAX RAID BATTLES]
Spoiler:
- Find the line starting with "pokemon.makeUnprimal" and paste this right below it:
Code:((pokemon.makeUnmax if pokemon.isDynamax?) rescue nil)
- Find the line "# Stealth Rock", and paste this right above it:
Code:#========================================================================= # G-Max Steelsurge - Added for Dynamax #========================================================================= if pkmn.pbOwnSide.effects[PBEffects::Steelsurge] && !pkmn.fainted? if !pkmn.hasWorkingAbility(:MAGICGUARD) atype=getConst(PBTypes,:STEEL) || 0 eff=PBTypes.getCombinedEffectiveness(atype,pkmn.type1,pkmn.type2,pkmn.effects[PBEffects::Type3]) if eff>0 PBDebug.log("[Entry hazard] #{pkmn.pbThis} triggered G-Max Steelsurge") @scene.pbDamageAnimation(pkmn,0) pkmn.pbReduceHP(((pkmn.totalhp*eff)/64).floor) pbDisplayPaused(_INTL("The sharp steel bit into {1}!",pkmn.pbThis(true))) end end end #=========================================================================
- IMPORTANT! This needs to be installed to allow Dynamax turns to count down.
Find the second instance of "@battlers.pbCheckForm" (around line 3905, below # Form checks), and paste this below that line:
Code:#========================================================================= # Added for Dynamax. #========================================================================= if $game_switches[DYNAMAX_SWITCH] if @battlers[i].effects[PBEffects::Dynamax]>0 @battlers[i].effects[PBEffects::Dynamax]-=1 if @battlers[i].effects[PBEffects::Dynamax]==0 @battlers[i].pbUndynamax end end end #=========================================================================
[*][MAX RAID UPDATE] Find the line "pbDisplayPaused(_INTL("Wild {1} appeared!",wildpoke.name))", and replace it with this:
Code:#======================================================================= # Encounter text - Edited for Max Raids #======================================================================= if $game_switches[MAXRAID_SWITCH] text="Dynamaxed" text="Gigantamax" if wildpoke.isGigantamax? && !isConst?(wildpoke.species,PBSpecies,:ETERNATUS) pbDisplayPaused(_INTL("A {1} {2} lurks in the den!",text,wildpoke.name)) else pbDisplayPaused(_INTL("Wild {1} appeared!",wildpoke.name)) end #=======================================================================
[*][MAX RAID UPDATE] Find the line that begins with "pbDisplay(_INTL("The Trainer blocked the Ball!", and paste this below it:
Code:#=========================================================================== # Poke Ball failure - Added for Max Raids #=========================================================================== elsif $game_switches[MAXRAID_SWITCH] && battler.effects[PBEffects::MaxRaidBoss] && battler.hp>1 @scene.pbThrowAndDeflect(ball,1) pbDisplay(_INTL("The ball was repelled by a burst of Dynamax energy!")) #===========================================================================
[*][MAX RAID UPDATE] Find the line that begins with "pokemon.makeUnprimal", and paste this below it:
Code:((pokemon.makeUnmax if pokemon.isDynamax?) rescue nil) # Added for Max Raids
5) Changes in PokeBattle_Scene (implements enlarged sprites) [UPDATED FOR MAX RAID BATTLES]
Spoiler:
- Under class PokeballSendOutAnimation, scroll down to the update def, and paste this above the line towards the end that starts with "if @PokemonBattlerSprite.tone.gray<=0"
Code:#=========================================================================== # Enlarge opponent's Pokemon sprites - Added for Dynamax #=========================================================================== if ENLARGESPRITE && @pkmn.pokemon.isDynamax? @PokemonBattlerSprite.zoom_x+=@zoomstep @PokemonBattlerSprite.zoom_y+=@zoomstep @PokemonBattlerSprite.zoom_x=1.5 if @PokemonBattlerSprite.zoom_x > 1.5 @PokemonBattlerSprite.zoom_y=1.5 if @PokemonBattlerSprite.zoom_y > 1.5 currentY=@spritey-(@stepspritey*@PokemonBattlerSprite.zoom_y) pbSpriteSetCenter(@PokemonBattlerSprite,@spritex,currentY) @PokemonBattlerSprite.y=currentY end #===========================================================================
- Now do basically the same as above, but this time in the "PokeballPlayerSendOutAnimation" class further down.
Code:#=========================================================================== # Enlarge player's Pokemon sprites - Added for Dynamax #=========================================================================== if ENLARGESPRITE && @pkmn.pokemon.isDynamax? @PokemonBattlerSprite.zoom_x+=0.5 @PokemonBattlerSprite.zoom_y+=0.5 @PokemonBattlerSprite.zoom_x=1.5 if @PokemonBattlerSprite.zoom_x > 1.5 @PokemonBattlerSprite.zoom_y=1.5 if @PokemonBattlerSprite.zoom_y > 1.5 pbSpriteSetCenter(@PokemonBattlerSprite,@spritex,0) @PokemonBattlerSprite.y=@spritey+(@endspritey-@spritey)*@PokemonBattlerSprite.zoom_y end #===========================================================================
- For both instances of "pbPlayCry(@illusionpoke)", replace those lines with this:
Code:if @pkmn.pokemon.isDynamax? && ENLARGESPRITE pbPlayCry(@illusionpoke,100,60) else pbPlayCry(@illusionpoke) end
- For both instances of "pbPlayCry(@pkmn.pokemon)", replace those lines with this:
Code:if @pkmn.pokemon.isDynamax? && ENLARGESPRITE pbPlayCry(@pkmn.pokemon,100,60) else pbPlayCry(@pkmn.pokemon) end
- Find the line "if !targetsprite", and paste this above it:
Code:#=========================================================================== # Used for keeping the Pokemon's sprite enlarged. - Added for Dynamax. #=========================================================================== if ENLARGESPRITE olduserzoomx=usersprite ? usersprite.zoom_x : 0 olduserzoomy=usersprite ? usersprite.zoom_y : 0 oldtargetzoomx=targetsprite ? targetsprite.zoom_x : 0 oldtargetzoomy=targetsprite ? targetsprite.zoom_y : 0 end #===========================================================================
- Find the line "animplayer.update", and paste this underneath it:
Code:#========================================================================= # Used for keeping the Pokemon's sprite enlarged. - Added for Dynamax. #========================================================================= if ENLARGESPRITE usersprite.zoom_x=olduserzoomx if usersprite usersprite.zoom_y=olduserzoomy if usersprite targetsprite.zoom_x=oldtargetzoomx if targetsprite targetsprite.zoom_y=oldtargetzoomy if targetsprite end #=========================================================================
- [MAX RAID UPDATE] Find the line starting with "@expbar = AnimatedBitmap.new", and paste this below it:
Code:#=========================================================================== # Added for Max Raids #=========================================================================== @raidbar = AnimatedBitmap.new(_INTL("Graphics/Pictures/Battle/raidbar")) @raidshield = AnimatedBitmap.new(_INTL("Graphics/Pictures/Battle/raidshield")) #===========================================================================
- [MAX RAID UPDATE] Find the line "if @battler.owned && (@battler.index&1)==1", and add this right next to it on the same line:
Code:&& !$game_switches[MAXRAID_SWITCH] # Added for Max Raids
- [MAX RAID UPDATE] Find the first instance of the line "@sprites["pokemon1"].visible=true", and paste this above it:
Code:#===================================================================== # Enlarge Wild Pokemon Sprite - Added for Max Raids #===================================================================== if $game_switches[MAXRAID_SWITCH] && ENLARGESPRITE poke=@sprites["pokemon1"] poke.zoom_x=1.5 poke.zoom_y=1.5 poke.zoom_x=1.5 if poke.zoom_x > 1.5 poke.zoom_y=1.5 if poke.zoom_y > 1.5 pokeX=PokeBattle_SceneConstants::FOEBATTLER_X pokeY=PokeBattle_SceneConstants::FOEBATTLER_Y pokeStepY=(pokeY-poke.y) currentY=pokeY-(pokeStepY*poke.zoom_y) pbSpriteSetCenter(poke,pokeX,currentY) poke.y=currentY end #=====================================================================
- [MAX RAID UPDATE] Find the line "pbPlayCry(@battle.party2[0])", and replace it with this:
Code:#========================================================================= # Deepen Wild Pokemon Cry - Edited for Max Raids #========================================================================= if $game_switches[MAXRAID_SWITCH] && ENLARGESPRITE pbPlayCry(@battle.party2[0],100,60) # Play cry for Max Raid Pokémon else pbPlayCry(@battle.party2[0]) # Play cry for wild Pokémon end #=========================================================================
6) Changes in PScreen_Summary (graphics for Dynamax meter & G-Max Factor)
Spoiler:
- In def drawPage(page)", right above the line "# Draw all images", add this:
Code:pbDisplayGMaxFactor pbDisplayDynamaxMeter
Then, right above "# Write the held item's name", add this:
Code:#=========================================================================== # Added for Dynamax if defined?(@pokemon.isDynamax?) nodynamax=false for i in DMAX_BANLIST if isConst?(@pokemon.species,PBSpecies,i) nodynamax=true end end textpos[3][0]="" if @page==3 if !nodynamax end #===========================================================================
Other Installations
Spoiler:
1) If you want access to debug features to allow you to manually set Dynamax Levels and G-Max Factor on Pokemon, make the following additions in Debug_Pokemon:
2) If you want to be able to set Dynamax Levels and Gigantamax Factor on NPC trainer's Pokemon, you can make the following additions.
And that's it. You will now be able to give Dynamax levels (max 10), and G-Max Factor (true/false) to NPC trainer's Pokemon in the editor. You can also do so manually in the trainers PBS file.
3) If you're using my Pokemon Birthsigns scripts, you may also need to make a few tweaks for compatibility. I've outlined what's needed in this update in that thread.
Spoiler:
- Above the line that ends in "_INTL("Set happiness"))", add this:
Code:#========================================================================= # Dynamax - Debug Options #========================================================================= commands.add("levelstats","dynamax",_INTL("Dynamax...")) if $game_switches[DYNAMAX_SWITCH] #=========================================================================
- Find the line "when "sethappiness"", and paste this above it:
Code:#=========================================================================== # Dynamax - Set levels & G-Max factor #=========================================================================== when "dynamax" cmd = 0 banned=false for i in DMAX_BANLIST if isConst?(pkmn.species,PBSpecies,i) banned=true end end if pkmn.egg? || (pkmn.isShadow? rescue false) || banned pbDisplay(_INTL("Can't edit Dynamax values on that Pokémon.")) pkmn.dynamax_lvl=0 pkmn.gmaxfactor=false return end loop do dlvl=pkmn.dynamax_lvl gmax="No" gmax="Yes" if pkmn.hasGMaxFactor? cmd = @scene.pbShowCommands(_INTL("Dynamax Level: {1}\nG-Max: {2}.",dlvl,gmax),[ _INTL("Set Dynamax Level"), _INTL("Set G-Max Factor"), _INTL("Reset All")],cmd) break if cmd<0 case cmd when 0 # Set Dynamax Level params = ChooseNumberParams.new params.setRange(0,10) params.setDefaultValue(pkmn.dynamax_lvl) params.setCancelValue(pkmn.dynamax_lvl) f = Kernel.pbMessageChooseNumber(_INTL("Set {1}'s Dynamax level (max. 10).", pkmn.name),params) { @scene.update } if f!=pkmn.dynamax_lvl pkmn.dynamax_lvl = f pbRefreshSingle(pkmnid) end when 1 # Set G-Max Factor if pkmn.hasGMaxFactor? pkmn.removeGMaxFactor pbDisplay(_INTL("Gigantamax factor was removed from {1}.",pkmn.name)) else if pkmn.hasGigantamax? pkmn.giveGMaxFactor pbDisplay(_INTL("Gigantamax factor was given to {1}.",pkmn.name)) else pbDisplay(_INTL("{1} doesn't have a Gigantamax form.",pkmn.name)) if pbConfirm(_INTL("Give it Gigantamax factor anyway?")) pkmn.giveGMaxFactor pbDisplay(_INTL("Gigantamax factor was given to {1}.",pkmn.name)) end break end end pbRefreshSingle(pkmnid) when 2 # Reset All pkmn.setDynamaxLvl(0) pkmn.removeGMaxFactor pbDisplay(_INTL("Dynamax level set to zero.",pkmn.name)) pbDisplay(_INTL("Gigantamax factor was removed.",pkmn.name)) pbRefreshSingle(pkmnid) end end #===========================================================================
2) If you want to be able to set Dynamax Levels and Gigantamax Factor on NPC trainer's Pokemon, you can make the following additions.
Spoiler:
- In PTrainer_NPCPokemon, add these to the list at the top:
Code:TPDYNAMAX = 17 TPGMAX = 18
And in the "TPDEFAULTS" array, add "0,false" to the end of the array. If you have Pokemon Birthsigns installed, you make these changes in the Birthsigns_Effects script (make sure to renumber things correctly if so).
- Further down in the same script, find the line "pokemon.ballused=poke[TPBALL]", and add the following:
Code:pokemon.setDynamaxLvl(poke[TPDYNAMAX]) if poke[TPGMAX] pokemon.giveGMaxFactor else pokemon.removeGMaxFactor end
- In Editor_Screens, find the line beginning with "[_INTL("Ball"),BallProperty.new" and replace it with this:
Code:[_INTL("Ball"),BallProperty.new(oldsetting),_INTL("Number of the Poké Ball the Pokémon is kept in.")], [_INTL("Dynamax Level"),LimitProperty.new(10),_INTL("Number associated with the Dynamax level of the Pokémon.")], [_INTL("G-Max Factor"),BooleanProperty,_INTL("If true, the Pokémon has Gigantamax Factor.")]
- In Editor_SaveData, find the line beginning with "towrite[TPBALL]", and add this below it:
Code:towrite[TPDYNAMAX] = (poke[TPDYNAMAX] && poke[TPDYNAMAX]!=TPDEFAULTS[TPDYNAMAX]) ? poke[TPDYNAMAX].to_s : "" towrite[TPGMAX] = (poke[TPGMAX]) ? "true" : ""
- In Compiler, find the line "pkmn.push(poke)", and add the following above it:
Code:# Dynamax if !poke[TPDYNAMAX] || poke[TPDYNAMAX]=="" poke[TPDYNAMAX] = TPDEFAULTS[TPDYNAMAX] else poke[TPDYNAMAX] = poke[TPDYNAMAX].to_i raise _INTL("Bad dynamax: {1} (must be from 0-10)\r\n{2}",poke[TPDYNAMAX],FileLineData.linereport) if poke[TPDYNAMAX]<0 || poke[TPDYNAMAX]>10 end # G-Max Factor if !poke[TPGMAX] || poke[TPGMAX]=="" poke[TPGMAX] = TPDEFAULTS[TPGMAX] else poke[TPGMAX] = csvBoolean!(poke[TPGMAX].clone) end
And that's it. You will now be able to give Dynamax levels (max 10), and G-Max Factor (true/false) to NPC trainer's Pokemon in the editor. You can also do so manually in the trainers PBS file.
3) If you're using my Pokemon Birthsigns scripts, you may also need to make a few tweaks for compatibility. I've outlined what's needed in this update in that thread.
Last edited by a moderator: