The PokéCommunity Forums Fan Games Game Development Pokémon Essentials
Custom Scripts Question Extra versions of other HM moves

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.


Reply
 
Thread Tools
  #1    
Old 3 Weeks Ago (2:47 PM).
Rob-120's Avatar
Rob-120 Rob-120 is offline
~Revived~
     
    Join Date: Jul 2008
    Location: Chicago, IL
    Gender: Male
    Nature: Hasty
    Posts: 128
    So I want to make an extra version/change cut to a move called Wildfire and allow players to burn down bushes that are normally cut (The fire gym in my game is where the player learns cut).


    Would all I have to do is change the cut option in "PField_FieldMoves" to something like so & change the CUT in settings to WILDFIRE?

    Spoiler:

    #===============================================================================
    # Wildfire
    #===============================================================================
    def Kernel.pbWildfire
    move = getID(PBMoves,:Wildfire)
    movefinder = Kernel.pbCheckMove(move)
    if !pbCheckHiddenMoveBadge(BADGEFORWILDFIRE,false) || (!$DEBUG && !movefinder)
    Kernel.pbMessage(_INTL("This tree looks like it can be cut down."))
    return false
    end
    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)
    return true
    end
    return false
    end

    HiddenMoveHandlers::CanUseMove.add(:WILDFIRE,proc{|move,pkmn,showmsg|
    return false if !pbCheckHiddenMoveBadge(BADGEFORWILDFIRE,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(:WILDFIRE,proc{|move,pokemon|
    if !pbHiddenMoveAnimation(pokemon)
    Kernel.pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
    end
    facingEvent = $game_player.pbFacingEvent
    if facingEvent
    pbSmashEvent(facingEvent)
    end
    return true
    })

    def pbSmashEvent(event)
    return if !event
    if event.name=="Tree"; pbSEPlay("Fire1",80)
    elsif event.name=="Rock"; pbSEPlay("Rock Smash",80)
    end
    pbMoveRoute(event,[
    PBMoveRoute::Wait,2,
    PBMoveRoute::TurnLeft,
    PBMoveRoute::Wait,2,
    PBMoveRoute::TurnRight,
    PBMoveRoute::Wait,2,
    PBMoveRoute::TurnUp,
    PBMoveRoute::Wait,2
    ])
    pbWait(2*2*4)
    event.erase
    $PokemonMap.addErasedEvent(event.id) if $PokemonMap
    end
    __________________
    ~Back after who knows when


    Reply With Quote

    Relevant Advertising!

      #2    
    Old 3 Weeks Ago (11:57 PM).
    Ego13's Avatar
    Ego13 Ego13 is offline
       
      Join Date: Jul 2017
      Location: Larua Region
      Gender: Male
      Nature: Calm
      Posts: 100
      Of you wish to replace cut with wildfire, then this looks about right. You still will have the cut animation though.
      __________________
      Looking for mappers and storywriters to help with

      Pokemon Hollow on pokecommunity.com
      Reply With Quote
        #3    
      Old 3 Weeks Ago (10:08 AM).
      Rob-120's Avatar
      Rob-120 Rob-120 is offline
      ~Revived~
         
        Join Date: Jul 2008
        Location: Chicago, IL
        Gender: Male
        Nature: Hasty
        Posts: 128
        Quote:
        Originally Posted by Ego13 View Post
        Of you wish to replace cut with wildfire, then this looks about right. You still will have the cut animation though.
        But that could be easily replaced or changed.

        If I wanted it to be a separate move I'd just need to copy that into the Fields script lower down and add a separate badge level in settings? Along with adding an animation, adding it into the moves, and adding the HM move allowances and what not (/whatever else is in the adding moves guide).
        __________________
        ~Back after who knows when


        Reply With Quote
          #4    
        Old 3 Weeks Ago (10:48 AM).
        Ego13's Avatar
        Ego13 Ego13 is offline
           
          Join Date: Jul 2017
          Location: Larua Region
          Gender: Male
          Nature: Calm
          Posts: 100
          Yeah basically you would just copy it but you dont need to copy pbSmash event. if you want it to play a fire sound instead of a cut sound, but also want the same trees to be either cutable or flamable you would need to do a bit of coding.

          I had to do sth similar to determine the animation, since different move types were used for the same purpose
          __________________
          Looking for mappers and storywriters to help with

          Pokemon Hollow on pokecommunity.com
          Reply With Quote
          Reply

          Quick Reply

          Join the conversation!

          Create an account to post a reply in this thread, participate in other discussions, and more!

          Create a PokéCommunity Account

          Sponsored Links
          Thread Tools

          Posting Rules
          You may not post new threads
          You may not post replies
          You may not post attachments
          You may not edit your posts

          BB code is On
          Smilies are On
          [IMG] code is On
          HTML code is Off

          Forum Jump


          All times are GMT -8. The time now is 6:21 PM.