• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

[Scripting Question] Help with a new ability

  • 172
    Posts
    8
    Years
    • Seen Sep 6, 2022
    Would anyone be able to help me with scripting a new ability? it's basically intimidate but it lowers the enemy's attack and special attack by 2 stages. I've looked into how to make abilities on the wiki, I've also looked into intimidate itself in the scripts as well as other abilities/attacks that raise or lower stats, I'm just not sure how to format it and I recently had to back track a lot of my progress because of a scripting error and I just don't want to make anymore mistakes haha.

    anyways I'd really appreciate the help!

    Also I've been getting this error with the Steelworker ability that I haven't been able to fix...

    Spoiler:


    all I did was add this script, not the first sentence obviously.

    # In PokeBattle_Move, locate "def pbCalcDamage" and paste this somewhere in the list underneath it:

    if attacker.hasWorkingAbility(:STEELWORKER) && isCont?(PBTypes,:STEEL)
    damagemult=(damagemult*1.5).round
    end
     
    Last edited:
    For Steelworker you want "isConst?" Const stands for constant, as in a value that is the same the whole time your game is running (in contrast to a variable which can change, e.g. HP or level).

    For the first question, post what you've tried (Intimidate is a good starting point, I think your code will look pretty much identical).
     
    Last edited:
    For Steelworker you want "isConst?" Const stands for constant, as in a value that is the same the whole time your game is running (in contrast to a variable which can change, e.g. HP or level).

    For the first question, post what you've tried (Intimidate is a good starting point, I think your code will look pretty much identical).

    Thanks I got it to work! I didn't even realize I missed the s in const haha. although it still didn't work after that, but I looked again at another script for water bubble that came with my abilities zip and it showed
    isConst(type,PBTypes,..... and mine didn't have that additional "type," in it and that seemed to fix it! tested it in battle and everything. thank you!
     
    also in case anyone was wondering, or ends up using this as some kind of resource later on, I got my other ability to work too, but I decided to just drop spatk 2 stages instead of both and this is what it looked like


    in PokeBattle_Battler under #Intimidate

    Spoiler:


    and then in PokeBattle_BatterEffects after
    if pbPartner.hasWorkingAbility(:FLOWERVEIL) && pbHasType?(:GRASS) add

    Spoiler:


    pretty easy actually, just copied everything intimidate did, but defined a new ability "pbReduceSpecialAttackStatTerrorize"
    then at the very bottom at "pbReduceStatWithCause" change it to SPATK and 2 which is the stat and how much its being reduced by. :]
     
    Last edited:
    Back
    Top