- 7
- Posts
- 4
- Years
- Seen Mar 9, 2025
Maybe you didn't put Z-crystal PBS in items.txt.
Hello! I'm trying to run this on the 18.1.dev version. I'm getting the next crash:
Any guidance will be well received ^^
Maybe you didn't put Z-crystal PBS in items.txt.
I set the name of the Max Move animation below but Max Move animation did not work.
Move:MAXLIGHTNING
OppMove:MAXLIGHTNING
Sorry for bothering, but may I ask for some help?
I've installed all twelve scripts and made all changes to other scripts as as told in the installation guide. Everything works for the most part but once a pokemon tries to use a move I get this error:
[Pokémon Essentials version 18.1.dev]
Exception: NameError
Message: undefined local variable or method `battler' for #<PokeBattle_Move_Z000:0xec4a7c8>
Backtrace:
Move_Usage_Calculations:490:in `pbCalcDamageMultipliers'
Move_Usage_Calculations:263:in `pbCalcDamage'
Battler_UseMove:660:in `pbProcessMoveHit'
Battler_UseMove:652:in `each'
Battler_UseMove:652:in `pbProcessMoveHit'
Battler_UseMove:442:in `_ZUD_pbUseMove'
Battler_UseMove:435:in `each'
Battler_UseMove:435:in `_ZUD_pbUseMove'
04_Battle_Effects:545:in `pbUseMove'
05_Move_Data:129:in `pbUse'
I have Gen 8 project installed so I think that's why it says 18.1.dev.
Yes. Here it is. This should be all of it.
Spoiler:def pbCalcDamageMultipliers(user,target,numTargets,type,baseDmg,multipliers)
# Global abilities
if (@battle.pbCheckGlobalAbility(:DARKAURA) && isConst?(type,PBTypes,:DARK)) ||
(@battle.pbCheckGlobalAbility(:FAIRYAURA) && isConst?(type,PBTypes,:FAIRY))
if @battle.pbCheckGlobalAbility(:AURABREAK)
multipliers[BASE_DMG_MULT] *= 2/3.0
else
multipliers[BASE_DMG_MULT] *= 4/3.0
end
end
# Ability effects that alter damage
if user.abilityActive?
BattleHandlers.triggerDamageCalcUserAbility(user.ability,
user,target,self,multipliers,baseDmg,type)
end
if [email protected]
# NOTE: It's odd that the user's Mold Breaker prevents its partner's
# beneficial abilities (i.e. Flower Gift boosting Atk), but that's
# how it works.
user.eachAlly do |b|
next if !b.abilityActive?
BattleHandlers.triggerDamageCalcUserAllyAbility(b.ability,
user,target,self,multipliers,baseDmg,type)
end
if target.abilityActive?
BattleHandlers.triggerDamageCalcTargetAbility(target.ability,
user,target,self,multipliers,baseDmg,type) if [email protected]
BattleHandlers.triggerDamageCalcTargetAbilityNonIgnorable(target.ability,
user,target,self,multipliers,baseDmg,type)
end
target.eachAlly do |b|
next if !b.abilityActive?
BattleHandlers.triggerDamageCalcTargetAllyAbility(b.ability,
user,target,self,multipliers,baseDmg,type)
end
end
# Item effects that alter damage
if user.itemActive?
BattleHandlers.triggerDamageCalcUserItem(user.item,
user,target,self,multipliers,baseDmg,type)
end
if target.itemActive?
BattleHandlers.triggerDamageCalcTargetItem(target.item,
user,target,self,multipliers,baseDmg,type)
end
# Parental Bond's second attack
if user.effects[PBEffects::ParentalBond]==1
multipliers[BASE_DMG_MULT] /= 4
end
# Other
if user.effects[PBEffects::MeFirst]
multipliers[BASE_DMG_MULT] *= 1.5
end
if user.effects[PBEffects::HelpingHand] && !self.is_a?(PokeBattle_Confusion)
multipliers[BASE_DMG_MULT] *= 1.5
end
if user.effects[PBEffects::Charge]>0 && isConst?(type,PBTypes,:ELECTRIC)
multipliers[BASE_DMG_MULT] *= 2
end
# Mud Sport
if isConst?(type,PBTypes,:ELECTRIC)
@battle.eachBattler do |b|
next if !b.effects[PBEffects::MudSport]
multipliers[BASE_DMG_MULT] /= 3
break
end
if @battle.field.effects[PBEffects::MudSportField]>0
multipliers[BASE_DMG_MULT] /= 3
end
end
# Tar Shot
if target.effects[PBEffects::TarShot] && isConst?(type,PBTypes,:FIRE)
multipliers[BASE_DMG_MULT] *= 2
end
# Water Sport
if isConst?(type,PBTypes,:FIRE)
@battle.eachBattler do |b|
next if !b.effects[PBEffects::WaterSport]
multipliers[BASE_DMG_MULT] /= 3
break
end
if @battle.field.effects[PBEffects::WaterSportField]>0
multipliers[BASE_DMG_MULT] /= 3
end
end
# Terrain moves
if user.affectedByTerrain?
case @battle.field.terrain
when PBBattleTerrains::Electric
if isConst?(type,PBTypes,:ELECTRIC)
multipliers[BASE_DMG_MULT] = (multipliers[BASE_DMG_MULT]*1.3).round
end
when PBBattleTerrains::Grassy
if isConst?(type,PBTypes,:GRASS)
multipliers[BASE_DMG_MULT] = (multipliers[BASE_DMG_MULT]*1.3).round
end
when PBBattleTerrains::Psychic
if isConst?(type,PBTypes,:PSYCHIC)
multipliers[BASE_DMG_MULT] = (multipliers[BASE_DMG_MULT]*1.3).round
end
end
end
if @battle.field.terrain==PBBattleTerrains::Misty && target.affectedByTerrain? &&
isConst?(type,PBTypes,:DRAGON)
multipliers[BASE_DMG_MULT] /= 2
end
# Badge multipliers
if @battle.internalBattle
if user.pbOwnedByPlayer?
if physicalMove? && @battle.pbPlayer.numbadges>=NUM_BADGES_BOOST_ATTACK
multipliers[ATK_MULT] *= 1.1
elsif specialMove? && @battle.pbPlayer.numbadges>=NUM_BADGES_BOOST_SPATK
multipliers[ATK_MULT] *= 1.1
end
end
if target.pbOwnedByPlayer?
if physicalMove? && @battle.pbPlayer.numbadges>=NUM_BADGES_BOOST_DEFENSE
multipliers[DEF_MULT] *= 1.1
elsif specialMove? && @battle.pbPlayer.numbadges>=NUM_BADGES_BOOST_SPDEF
multipliers[DEF_MULT] *= 1.1
end
end
end
# Multi-targeting attacks
if numTargets>1
multipliers[FINAL_DMG_MULT] *= 0.75
end
# Weather
if !target.hasUtilityUmbrella?
case @battle.pbWeather
when PBWeather::Sun, PBWeather::HarshSun
if isConst?(type,PBTypes,:FIRE)
multipliers[FINAL_DMG_MULT] = (multipliers[FINAL_DMG_MULT]*1.5).round
elsif isConst?(type,PBTypes,:WATER)
multipliers[FINAL_DMG_MULT] /= 2
end
when PBWeather::Rain, PBWeather::HeavyRain
if isConst?(type,PBTypes,:FIRE)
multipliers[FINAL_DMG_MULT] /= 2
elsif isConst?(type,PBTypes,:WATER)
multipliers[FINAL_DMG_MULT] = (multipliers[FINAL_DMG_MULT]*1.5).round
end
end
end
if @battle.pbWeather == PBWeather::Sandstorm
if target.pbHasType?(:ROCK) && specialMove? && @function!="122" # Psyshock
multipliers[DEF_MULT] *= 1.5
end
end
# Critical hits
if target.damageState.critical
if NEWEST_BATTLE_MECHANICS
multipliers[FINAL_DMG_MULT] *= 1.5
else
multipliers[FINAL_DMG_MULT] *= 2
end
end
# Random variance
if !self.is_a?(PokeBattle_Confusion)
random = [email protected](16)
multipliers[FINAL_DMG_MULT] *= random/100.0
end
# STAB
if type>=0 && user.pbHasType?(type)
if user.hasActiveAbility?(:ADAPTABILITY)
multipliers[FINAL_DMG_MULT] *= 2
else
multipliers[FINAL_DMG_MULT] *= 1.5
end
end
# Recalculate the type modifier for Dragon Darts else it does 1 damage on its
# second hit on a different target
if self.function=="17C" && @battle.pbSideSize(target.index)>1
typeMod = self.pbCalcTypeMod(self.calcType,user,target)
target.damageState.typeMod = typeMod
end
# Type effectiveness
multipliers[FINAL_DMG_MULT] *= target.damageState.typeMod.to_f/PBTypeEffectiveness::NORMAL_EFFECTIVE
# Burn
if user.status==PBStatuses::BURN && physicalMove? && damageReducedByBurn? &&
!user.hasActiveAbility?(:GUTS)
multipliers[FINAL_DMG_MULT] /= 2
end
# Aurora Veil, Reflect, Light Screen
if !ignoresReflect? && !target.damageState.critical &&
!user.hasActiveAbility?(:INFILTRATOR)
if target.pbOwnSide.effects[PBEffects::AuroraVeil]>0
if @battle.pbSideBattlerCount(target)>1
multipliers[FINAL_DMG_MULT] *= 2/3.0
else
multipliers[FINAL_DMG_MULT] /= 2
end
elsif target.pbOwnSide.effects[PBEffects::Reflect]>0 && physicalMove?
if @battle.pbSideBattlerCount(target)>1
multipliers[FINAL_DMG_MULT] *= 2/3.0
else
multipliers[FINAL_DMG_MULT] /= 2
end
elsif target.pbOwnSide.effects[PBEffects::LightScreen]>0 && specialMove?
if @battle.pbSideBattlerCount(target)>1
multipliers[FINAL_DMG_MULT] *= 2/3.0
else
multipliers[FINAL_DMG_MULT] /= 2
end
end
end
# Minimize
if target.effects[PBEffects::Minimize] && tramplesMinimize?(2)
multipliers[FINAL_DMG_MULT] *= 2
end
# Move-specific base damage modifiers
multipliers[BASE_DMG_MULT] = pbBaseDamageMultiplier(multipliers[BASE_DMG_MULT],user,target)
# Move-specific final damage modifiers
multipliers[FINAL_DMG_MULT] = pbModifyDamage(multipliers[FINAL_DMG_MULT],user,target)
#===========================================================================
# Max Raids - Prevents capture of Raid Pokemon until it's defeated. (ZUD)
#===========================================================================
return if pbRaidCaptureFail(battler,ball)
#===========================================================================
# Calculate the number of shakes (4=capture)#===========================================================================
# Max Raids - Reduces damage while behind a Raid Shield. (ZUD)
#===========================================================================
pbCalcRaidShieldDamage(target,multipliers)
#===========================================================================
end
#===========================================================================
# Max Raids - Prevents capture of Raid Pokemon until it's defeated. (ZUD)
#===========================================================================
return if pbRaidCaptureFail(battler,ball)
#===========================================================================
# Calculate the number of shakes (4=capture)
def pbThrowPokeBall(idxBattler,ball,rareness=nil,showPlayer=false)
#===========================================================================
# Max Raids - Reduces damage while behind a Raid Shield. (ZUD)
#===========================================================================
pbCalcRaidShieldDamage(target,multipliers)
#===========================================================================
Maybe you didn't put Z-crystal PBS in items.txt.
Yes.
When I installed the weather encounter scriptOk, so I checked the Modular Pause Menu plugin.
In fact, it does use the SAFARISTEPS constant, but it's hidden in the file Data/Plugins/MODMN.rxdata. This file contains one script. I suggest you revert your changes, as it is bad practice to modify the whole project just to match an outdated version of a plugin, because it will endanger compatibility with future scripts, so I propose you do this instead:
- Rename your file Scripts.rxdata to Scripts_TEMP.rxdata.
- Rename your file MODMN.rxdata to MODMN_OLD.rxdata.
- Copy your file MODMN_OLD.rxdata to your Data folder (the folder where Scripts_TEMP.rxdata is).
- Rename the file MODMN_OLD (the one in the Data folder, not in the Plugins folder) to Scripts.rxdata.
- Open RPG Maker, open the script editor. If you did everything right, you will see only one script called Modular Menu.
- In this script, replace SAFARISTEPS with SAFARI_STEPS.
- Now, save your project, and close RPG Maker.
- Rename the current Scripts.rxdata to MODMN.rxdata, and put it back in the Plugins folder.
- Rename your old file Scripts_TEMP.rxdata to Scripts.rxdata
The SAFARISTEPS bug should be solved now.
As for your other problem, I think you should make a topic in the Pokémon Essentials forum.
PS: It is also bad practice to modify a plugin that's not yours, but eh, we're fangame-devs.
Did you compile the moves again?
If you've just made the animations and tested them right after, then the game doesn't know you have them (it's a bit complicated, but the compiler associates moves with animations and stores the association in a file that the Animation Editor doesn't edit).
Add a space to moves.txt for example, and delete it (do not CTRL+Z) and start the game again from RPG Maker.
PS: If you're interested in making animations, I suggest you see this topic. We're currently making animations for Gen 8 moves, and Max/Z-moves are the next step.
Animations are kinda off-topic in the thread for ZUD ^^"
How can I set max raid den animation like Pokemon swsh
What do you call "Max Raid Den animation"?
Why are you asking about issues with a different script here? This thread is about the ZUD Plugin. Go to that thread if you have an issue with that script.When I installed the weather encounter script
Iget this error
Script '311' line Weather: NameError occured.
uninitialized constant PBFieldWeather::Ash
The script can be found her:
https://www.pokecommunity.com/threads/429803
I i stalled both weather and weather encounter script
This thread is about features that are provided by the ZUD Plugin, not helping you create your own custom features.Sorry for my bad english.
What I wanted was to activate Max Ride Den once and the red beam would come out of the den glowing. after battle a Pokemon in Max Ride Den that den glow completely diminishes and turns black like Pokemon swsh
When I installed the weather encounter script
Iget this error
Script '311' line Weather: NameError occured.
uninitialized constant PBFieldWeather::Ash
The script can be found her:
https://www.pokecommunity.com/threads/429803
I i stalled both weather and weather encounter script
Why are you asking about issues with a different script here? This thread is about the ZUD Plugin. Go to that thread if you have an issue with that script.
Sorry for my bad english.
What I wanted was to activate Max Ride Den once and the red beam would come out of the den glowing. after battle a Pokemon in Max Ride Den that den glow completely diminishes and turns black like Pokemon swsh
I got the ZUD plugin to work, but I have one question. How do I give my pokemon the g-max factor?
I got the ZUD plugin to work, but I have one question. How do I give my pokemon the g-max factor?