• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Eventing Question] CUT mechanic help?

  • 2
    Posts
    250
    Days
    • Seen Apr 21, 2025
    Hello!

    I've been working on my first game in RMXP with Pokemon Essentials v21.1, and had an idea that I'm finding hard to research.

    Anybody know if there is a way to make the standard CUT event (I'm struggling with that, I got it to trigger the sound and animation, but the space still has collision after), but alter it a little to work differently?

    I'd like the player to be required to catch a Pokemon that already knows CUT (I've put this Pokemon in game already, works fine) in order to cut down the first tree obstacle in my game. I'm not sure what series of conditions need to be met/scripted to allow this to be the condition in which CUT functions...also, hoping someone may know about the collision issue.

    Still pretty new to this, but hoping this is fairly simple and I'm just missing something!

    Thanks for taking a sec, if you do!
     
    Funnily enough, this is not so simple for a new person!
    However, I think it's possible, and I'll try and walk you through it

    In the Pokemon class, @first_moves records the first moves a Pokemon learns

    Now, we just have to change how CUT works. Change the parts of the script that you want to, but I have included the important part at the top

    def pbCut
    move = :CUT
    # movefinder has been changed. Rest is same.
    movefinder = false
    for p in $player.pokemon_party
    next unless p.first_moves.include?(move)
    movefinder = true
    break
    end
    if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_CUT, false) || (!$DEBUG && !movefinder)
    pbMessage(_INTL("This tree looks like it can be cut down."))
    return false
    end
    if pbConfirmMessage(_INTL("This tree looks like it can be cut down!\nWould you like to cut it?"))
    $stats.cut_count += 1
    speciesname = (movefinder) ? movefinder.name : $player.name
    pbMessage(_INTL("{1} used {2}!", speciesname, GameData::Move.get(move).name))
    pbHiddenMoveAnimation(movefinder)
    return true
    end
    return false
    end

    To avoid the bump issue, try copying the sample event from the base game
    If that doesn't work, try and contact me via Discord
    Hope this helps!
    Swdfm
     
    Thank you so much for taking the time to respond, means a lot to me. :D

    I ended up finding a work around since the original post that seems to have done the trick, I'll link it for reference but basically just removed the line about badge requirements at all, and the rest of the function checked out. (Only needed a Pokemon with Cut, and the Ursaring in question has it glued to his moveset).

    But despite having looked a few times, I had totally missed the CutTree event from the base game. Missed the tree for the forest or something, but was able to copy that over and it works! I'm in business, thanks for that.

    I was struggling to build one from scratch and something is going wrong with how I'm entering conditional branches, but that's not important anymore. :D

    Much appreciation,

    Gylanth


    def pbCut
    move = :CUT
    movefinder = $player.get_pokemon_with_move(move) # Check if any Pokemon has CUT
    if !movefinder # If no Pokemon with CUT
    pbMessage(_INTL("This shrub is simply too much. You'd need a rull mean Pokemon to hack it down."))
    return false
    end
    if pbConfirmMessage(_INTL("You've got the meanest Pokemon in town!\nYou wanna maul this shrub?"))
    pbMessage(_INTL("{1} used {2}!", movefinder.name, GameData::Move.get(move).name))
    pbHiddenMoveAnimation(movefinder)
    return true
    end
    return false
    end

    HiddenMoveHandlers::CanUseMove.add(:CUT, proc { |move, pkmn, showmsg|
    facingEvent = $game_player.pbFacingEvent
    if !facingEvent || !facingEvent.name[/cuttree/i]
    pbMessage(_INTL("You can't use that here.")) if showmsg
    next false
    end
    next true
    })

    HiddenMoveHandlers::UseMove.add(:CUT, proc { |move, pokemon|
    if !pbHiddenMoveAnimation(pokemon)
    pbMessage(_INTL("{1} used {2}!", pokemon.name, GameData::Move.get(move).name))
    end
    $stats.cut_count += 1
    facingEvent = $game_player.pbFacingEvent
    pbSmashEvent(facingEvent) if facingEvent
    next true
    })

    def pbSmashEvent(event)
    return if !event
    if event.name[/cuttree/i]
    pbSEPlay("Cut")
    elsif event.name[/smashrock/i]
    pbSEPlay("Rock Smash")
    end
    pbMoveRoute(event, [PBMoveRoute::WAIT, 2,
    PBMoveRoute::TURN_LEFT, PBMoveRoute::WAIT, 2,
    PBMoveRoute::TURN_RIGHT, PBMoveRoute::WAIT, 2,
    PBMoveRoute::TURN_UP, PBMoveRoute::WAIT, 2])
    pbWait(0.4)
    event.erase
    $PokemonMap&.addErasedEvent(event.id)
    end
     
    Back
    Top