Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Reload this Page [Question] Custom Attacks

Notices
For all updates, view the main page.

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 December 19th, 2012 (08:42 AM).
WinterKirby's Avatar
WinterKirby WinterKirby is offline
 
Join Date: Dec 2012
Age: 3
Gender: Male
Nature: Mild
Posts: 152
In the game I am working on, I'm adding new attacks (And Pokemon, but I know how to do that.)

How do I make new function codes to suit their effects? For example, there is a move that is essentially the Special version of Dragon Dance, raising Sp. Attack instead of Attack.

Although, the trickiest one would be one that diminishes in power the less PP it has.
Reply With Quote
  #2    
Old December 19th, 2012 (08:56 AM).
Maruno's Avatar
Maruno Maruno is online now
Lead Dev of Pokémon Essentials
Moderator
 
Join Date: Jan 2008
Location: England
Posts: 3,970
Pick an unused function code (133 or higher) and give it to your new move in moves.txt.

Then go into the script section PokeBattle_MoveEffects and find an effect similar to the one you want your new move to have. Copy that effect's class and give the copy your new function code's number. Then fiddle with the effect.

The "trickiest" one you mentioned is almost identical to Trump Card, except the power increases with more PP rather than decreases. Not difficult at all, actually.
__________________
Reply With Quote
  #3    
Old December 23rd, 2012 (08:38 AM). Edited December 23rd, 2012 by WinterKirby.
WinterKirby's Avatar
WinterKirby WinterKirby is offline
 
Join Date: Dec 2012
Age: 3
Gender: Male
Nature: Mild
Posts: 152
How would I get a move like Miracle Eye/Foresight to work, except that it lets Poison-type moves hit Steel Types?

I can't figure out how Miracle Eye's script works, so I don't know what to edit.

Also I'm having problems with another move that raises both the user's and the opponent's attack by 1. Originally, I had accidentally assigned its number as 133, which is the move above (Acidify, lets Poison hit Steel). So when I used Acidify, it would have this effect instead. I fixed this and gave this move 134. However, when I use it now, nothing happens.

This is the script for the move:

Code:
class PokeBattle_Move_134 < PokeBattle_Move
  def pbEffect(attacker,opponent)
    ret=-1
    if opponent.effects[PBEffects::Substitute]>0
      @battle.pbDisplay(_INTL("{1}'s attack missed!",attacker.pbThis))
      return -1
    end
    @battle.pbAnimation(@id,attacker,opponent)
    if !attacker.pbTooHigh?(PBStats::ATTACK)
      attacker.pbIncreaseStatBasic(PBStats::ATTACK,1)
      @battle.pbCommonAnimation("StatUp",attacker,opponent)
      @battle.pbDisplay(_INTL("{1}'s Attack rose!",attacker.pbThis))
      ret=0
    end
    if !opponent.pbTooHigh?(PBStats::ATTACK)
      opponent.pbIncreaseStatBasic(PBStats::ATTACK,1)
      @battle.pbCommonAnimation("StatUp",attacker,opponent)
      @battle.pbDisplay(_INTL("{1}'s Attack rose!",opponent.pbThis))
      ret=0
    end
    return ret
  end
end
And this is the line in the PB file:
Code:
561,ATARMS,At Arms,134,0,FIGHTING,Status,0,25,0,20,0,be,Cool,"The user honorably powers up itself and the foe to fight."
__________________
X/Y Friend Code: 1349-5852-1728 | Pinkie | Flying | Hoot-Hoot, Pidgey, and Tropius

Reply With Quote
Reply
Quick Reply

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 UTC -8. The time now is 11:47 AM.