New Ability help?

Discussion in 'Database Modifications' started by Sam Spade, Jan 11, 2014.

  1. Sam Spade

    Sam Spade New Member

    Joined:
    Jul 9, 2013
    Messages:
    21
    Likes Received:
    0
    So I'm trying to implement an ability. Permafrost, Raises defense in hail. How would I go about doing that? The tutorial isn't that clear to be honest.
     
  2. Lone Swordsman

    Lone Swordsman Say What?

    Joined:
    Aug 23, 2012
    Messages:
    38
    Likes Received:
    0
    PO Trainer Name:
    [RB]Lone swordsman
    I don't think modded abilities can be added in standard tiers. Maybe in a customized metagame. But, from what I've seen. There is a possibly that your ability can be added. I think you should present the ability suggestion to other modded meta games like one that'd you see it working in the best. I wish ya luck on getting the ability used.
     
  3. Sam Spade

    Sam Spade New Member

    Joined:
    Jul 9, 2013
    Messages:
    21
    Likes Received:
    0
    It's part of entire gen of pokemon mod I'm making to help test a game me and a community are working on, not for standard GF metagame.
     
  4. Lone Swordsman

    Lone Swordsman Say What?

    Joined:
    Aug 23, 2012
    Messages:
    38
    Likes Received:
    0
    PO Trainer Name:
    [RB]Lone swordsman
    Ah, If that's the case. Why not post the metagame idea in Server Suggestions.
     
  5. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    abilities.cpp
    Code (text):
    1.  
    2. struct AMPermafrost : public AM {
    3.     AMPermafrost() {
    4.         functions["StatModifier"] = &sm;
    5.         functions["WeatherSpecial"] = &ws;
    6.     }
    7.  
    8.     static void sm(int s, int, BS &b) {
    9.         if (b.isWeatherWorking(poke(b,s)["AbilityArg"].toInt())) {
    10.             turn(b,s)["Stat2AbilityModifier"] = 20;
    11.         }
    12.     }
    13.  
    14.     static void ws(int s, int, BS &b) {
    15.         if (b.isWeatherWorking(poke(b,s)["AbilityArg"].toInt())) {
    16.             turn(b,s)["WeatherSpecialed"] = true;
    17.         }
    18.     }
    19. };
    20.  
    21.  
    22. [...]
    23.  
    24. REGISTER_AB(122, Permafrost);
    25.  

    ability_effects_%G.txt
    Code (text):
    1.  
    2. 189 122-1#Permafrost
    3.  
    abilities.txt
    Code (text):
    1.  
    2. 189 Permafrost
    3.  

    Give or take, this should work. You're essentially copying Chlorophyll but replacing Speed with Defense.

    First part determines what boost you're getting
    Second part prevents damage from the weather


    I spent only a whole 5 minutes on this so if it doesn't work, don't blame me.

    In addition, if you wanted any other ability to raise defense in a weather, just change the "189 122-1#Permafrost" to 2 (rain), 3 (sand), or 4 (sun), matching the first number with the ability number... so like "190 122-3#Sand Armor" if you want one for increased defense in sand