• 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!
  • 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.

Field effects?

SuperJanBro

Renegade
  • 63
    Posts
    10
    Years
    Hello! Um, I'm still sorta new here so sorry if I sound noobish, but I was wondering if any of you had an idea on how to implement field effects? Sorta like how rain works inside of battle, except have it extend to the whole area. For example:

    Say I had a flower field area, and I wanted to have a special field effect for this place. (Boosting grass type moves as you will, and having wind attacks boosted in accuracy)

    How could I do this in-game? I know it's possible, because I've seen a few fan-games do it.

    (Now that I think about it, sorta like Grassy, and Misty terrain, but have it work automatically, and not done through moves.)

    Thanks!
     
    Something like this maybe

    Code:
    if isConst?(type,PBTypes,:GRASS)
    mapname=$game_map.name
    if mapname.include?("Route") 
            damage=(damage*1.5).floor
    end
    end

    in PokeBattle_Move after IRONFIST
     
    Are you talking areas as in maps or areas as in if you're walking in tall grass, surfing in water, walking in a cave, ect. then you get a different backdrop kind of area?
     
    What I'm talking about is an entire map. See I may have explained it sort of weird, but I'll try to explain it again. Say you go into this swamp that's full of poison water etc. I want to have it so that in that SPECIFIC map, to have poison types boosted. Basically have certain things different depending on the conditions of the particular biome.

    Like I said before, if you have ever played X/Y they have new moves called Grassy/Misty Terrain. Basically changes the field and in turn, changes certain things.

    I want to have that, except have it active all the time on a specific map. I'm sorry if this is still confusing. I'll try to find an example somewhere!
     
    Okay, so basically what you do is add the little script below, after you edit the part where it says "InsertMapIDHere" to your map ID.

    Code:
    # the line below should be all the maps where poison type should be boosted.
    maps = [InsertMapIDHere, InsertAnotherMapIDHereIfYouWant]
    if isConst?(type,PBTypes,:POISON)
      if maps.include?($game_map.map_id)
            damage = (damage * 1.5).floor
      end
    end

    place this in PokeBattle_Move after IRONFIST

    This should multiply all poison type moves to 1.5x as normal if it's on a given map.
     
    Oh, so in that case Mej71 was correct. Sorry about that! One more question I promise. So in addition to that, if I wanted to weaken a type's move would it be like
    maps = [InsertMapIDHere, InsertAnotherMapIDHereIfYouWant]
    if isConst?(type,PBTypes,:FAIRY)
    if maps.include?($game_map.map_id)
    damage = (damage * .5).floor
    end
    end
    ?
     
    Oh, so in that case Mej71 was correct. Sorry about that! One more question I promise. So in addition to that, if I wanted to weaken a type's move would it be like
    maps = [InsertMapIDHere, InsertAnotherMapIDHereIfYouWant]
    if isConst?(type,PBTypes,:FAIRY)
    if maps.include?($game_map.map_id)
    damage = (damage * .5).floor
    end
    end
    ?

    i think that should work. if it doesn't just change .5 to 0.5
     
    Hmm... This looks useful. Field Bonus. Say, at a Power Plant. Very flavour friendly. Nice work.
     
    Back
    Top