Ego13
hollow_ego
- 307
- Posts
- 7
- Years
- Larua Region
- Seen Mar 24, 2023
Hey there,
for my game I want the player to be able to use multiple moves to cut trees, smash rocks and move boulders. I managed to make the game recognize the added moves as legit moves for the given obstacle.
However, I also want the player to be able to use these moves from the party screen. Now here's the problem: All additional moves for Strength are shown in the party screen, but all moves for Cut and Rock Smash aren't shown. For all three I used the same method, adding these lines.
I know there's no typo.
Here's what my Cut Script and my Strength script look like
Cut
Strength
I really have no clue, why some handlers are recognized and some aren't. If add handlers for the other moves by using
and everything below it it wors just fine, but given the amount of possible moves I don't really want to do this for every move.
Also the same problem occurs in Essentials v16.2
for my game I want the player to be able to use multiple moves to cut trees, smash rocks and move boulders. I managed to make the game recognize the added moves as legit moves for the given obstacle.
However, I also want the player to be able to use these moves from the party screen. Now here's the problem: All additional moves for Strength are shown in the party screen, but all moves for Cut and Rock Smash aren't shown. For all three I used the same method, adding these lines.
Code:
HiddenMoveHandlers::CanUseMove.copy(:X)
HiddenMoveHandlers::UseMove.copy(:X)
Here's what my Cut Script and my Strength script look like
Cut
Spoiler:
Code:
def Kernel.pbCut
possiblemoves=[:FIRESPIN,:THUNDER,:TOXIC,:SMOG,:SLUDGE,:FIREBLAST,:POISONGAS,:BLASTBURN,:FLAREBLITZ,:EMBER,:FLAMETHROWER,:ICEBEAM,:GUILLOTINE,:RAZORWIND,:AERIALACE,:BITE,:PECK,:RAZORLEAF,:WILLOWISP,:FURYSWIPES,:SUPERFANG,:SLASH,:FLAMEWHEEL,:SLUDGEBOMB,:FURYCUTTER,:DRAGONBREATH,:HEATWAVE,:POISONFANG,:AIRCUTTER,:ICICLESPEAR,:DRAGONCLAW,:SHADOWCLAW,:PSYCHOCUT,:CUT]
for i in possiblemoves
move = getID(PBMoves,i)
movefinder = Kernel.pbCheckMove(move)
if !pbCheckHiddenMoveBadge(BADGEFORCUT,false) || (!$DEBUG && !movefinder)
Kernel.pbMessage(_INTL("This tree looks like it can be cut down."))
return false
end
if movefinder
Kernel.pbMessage(_INTL("This tree looks like it can be cut down!\1"))
if Kernel.pbConfirmMessage(_INTL("Would you like to cut it?"))
speciesname = (movefinder) ? movefinder.name : $Trainer.name
Kernel.pbMessage(_INTL("{1} used {2}!",speciesname,PBMoves.getName(move)))
pbHiddenMoveAnimation(movefinder)
$cutmove=PBMoves.getName(move)
return true
end
return false
end
end
end
HiddenMoveHandlers::CanUseMove.add(:CUT,proc{|move,pkmn,showmsg|
return false if !pbCheckHiddenMoveBadge(BADGEFORCUT,showmsg)
facingEvent = $game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="Tree"
Kernel.pbMessage(_INTL("Can't use that here.")) if showmsg
return false
end
return true
})
HiddenMoveHandlers::UseMove.add(:CUT,proc{|move,pokemon|
if !pbHiddenMoveAnimation(pokemon)
Kernel.pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
$cutmove=PBMoves.getName(move)
end
facingEvent = $game_player.pbFacingEvent
if facingEvent
pbSmashEvent(facingEvent)
end
return true
})
HiddenMoveHandlers::CanUseMove.copy(:FIRESPIN,:THUNDER,:TOXIC,:SMOG,:SLUDGE,:FIREBLAST,:POISONGAS,:BLASTBURN,:FLAREBLITZ,:EMBER,:FLAMETHROWER,:ICEBEAM,:GUILLOTINE,:RAZORWIND,:AERIALACE,:BITE,:PECK,:RAZORLEAF,:WILLOWISP,:FURYSWIPES,:SUPERFANG,:SLASH,:FLAMEWHEEL,:SLUDGEBOMB,:FURYCUTTER,:DRAGONBREATH,:HEATWAVE,:POISONFANG,:AIRCUTTER,:ICICLESPEAR,:DRAGONCLAW,:SHADOWCLAW,:PSYCHOCUT,:CUT)
HiddenMoveHandlers::UseMove.copy(:FIRESPIN,:THUNDER,:TOXIC,:SMOG,:SLUDGE,:FIREBLAST,:POISONGAS,:BLASTBURN,:FLAREBLITZ,:EMBER,:FLAMETHROWER,:ICEBEAM,:GUILLOTINE,:RAZORWIND,:AERIALACE,:BITE,:PECK,:RAZORLEAF,:WILLOWISP,:FURYSWIPES,:SUPERFANG,:SLASH,:FLAMEWHEEL,:SLUDGEBOMB,:FURYCUTTER,:DRAGONBREATH,:HEATWAVE,:POISONFANG,:AIRCUTTER,:ICICLESPEAR,:DRAGONCLAW,:SHADOWCLAW,:PSYCHOCUT,:CUT)
Strength
Spoiler:
Code:
def Kernel.pbStrength
possiblemoves=[:STRENGTH,:WHIRLWIND,:TACKLE,:BODYSLAM,:HYDROPUMP,:PSYBEAM,:ROCKTHROW,:PSYWAVE,:ROCKSLIDE,:HIDDENPOWER,:ANCIENTPOWER,:NATUREPOWER,:KNOCKOFF,:ARMTHRUST,:HYDROCANON,:WATERPULSE,:TAILWIND,:VACUUMWAVE]
if $PokemonMap.strengthUsed
Kernel.pbMessage(_INTL("Your Pokemon made it possible to move boulders around."))
return false
end
for i in possiblemoves
move = getID(PBMoves,i)
movefinder = Kernel.pbCheckMove(move)
if !pbCheckHiddenMoveBadge(BADGEFORSTRENGTH,false) || (!$DEBUG && !movefinder)
Kernel.pbMessage(_INTL("It's a big boulder, but a Pokémon may be able to push it aside."))
return false
end
Kernel.pbMessage(_INTL("It's a big boulder, but a Pokémon may be able to push it aside.\1"))
if Kernel.pbConfirmMessage(_INTL("Would you like to use Strength?"))
speciesname = (movefinder) ? movefinder.name : $Trainer.name
Kernel.pbMessage(_INTL("{1} used {2}!",speciesname,PBMoves.getName(move)))
pbHiddenMoveAnimation(movefinder)
Kernel.pbMessage(_INTL("{1}'s Strength made it possible to move boulders around!",speciesname))
$PokemonMap.strengthUsed = true
return true
end
return false
end
end
Events.onAction+=proc{|sender,e|
facingEvent = $game_player.pbFacingEvent
if facingEvent && facingEvent.name=="Boulder"
Kernel.pbStrength
end
}
HiddenMoveHandlers::CanUseMove.add(:STRENGTH,proc{|move,pkmn,showmsg|
return false if !pbCheckHiddenMoveBadge(BADGEFORSTRENGTH,showmsg)
if $PokemonMap.strengthUsed
Kernel.pbMessage(_INTL("Strength is already being used.")) if showmsg
return false
end
return true
})
HiddenMoveHandlers::UseMove.add(:STRENGTH,proc{|move,pokemon|
if !pbHiddenMoveAnimation(pokemon)
Kernel.pbMessage(_INTL("{1} used {2}!\1",pokemon.name,PBMoves.getName(move)))
end
Kernel.pbMessage(_INTL("{1}'s Strength made it possible to move boulders around!",pokemon.name))
$PokemonMap.strengthUsed = true
return true
})
HiddenMoveHandlers::CanUseMove.copy(:STRENGTH,:WHIRLWIND,:TACKLE,:BODYSLAM,:HYDROPUMP,:PSYBEAM,:ROCKTHROW,:PSYWAVE,:ROCKSLIDE,:HIDDENPOWER,:ANCIENTPOWER,:NATUREPOWER,:KNOCKOFF,:ARMTHRUST,:HYDROCANON,:WATERPULSE,:TAILWIND,:VACUUMWAVE)
HiddenMoveHandlers::UseMove.copy(:STRENGTH,:WHIRLWIND,:TACKLE,:BODYSLAM,:HYDROPUMP,:PSYBEAM,:ROCKTHROW,:PSYWAVE,:ROCKSLIDE,:HIDDENPOWER,:ANCIENTPOWER,:NATUREPOWER,:KNOCKOFF,:ARMTHRUST,:HYDROCANON,:WATERPULSE,:TAILWIND,:VACUUMWAVE)
I really have no clue, why some handlers are recognized and some aren't. If add handlers for the other moves by using
Code:
HiddenMoveHandlers::UseMove.add
Also the same problem occurs in Essentials v16.2