Resource icon

Tutorial How to add Field Effects to your game

BIGFriv

People call me adorable for some reason.
Member
Posts
14
#1
BIGFriv submitted a new resource:

How to add Field Effects to your game - A tutorial of how to create Field Effects, like Pokémon Reborn has.

Have you ever wanted to have Field Effects in your game?
It's personaly, one of my favorite mechanics of any fangame, so I'll teach you too how to do it too.

What are Field Effects?
If you have played Gen 6 or Gen 7, then you probably know about Terrains (Electric Terrain, Psychic Terrain ...)
Field Effects, are in a way, the exact same thing, but they are present from the very start of the battle, and are map based.
Because of this, it can be used to make fights more interesting...
Read more about this resource...
 

WolfPP

Discord Wolf#1235
Member
Posts
49
#2
Oh my God! One day i tried to copy like Terrains works in Reborn but i dont got it :/ Thank you!

But, well, i just want to add to change the backgrounds when pokemon use Terrains moves (Electric, Grassy, Psychic, Misty) or abilities (Surges by Alolan Guardian)
I have to do all? Im confuse, sorry.

The last part i stoped was:
Code:
    if isConst?(type,PBTypes,:ELECTRIC)
      for i in 0...4
        if @battle.battlers[i].effects[PBEffects::MudSport] && !@battle.battlers[i].fainted?
          damagemult=(damagemult*0.33).round
          break
        end
      end
      if @battle.field.effects[PBEffects::MudSportField]>0
        damagemult=(damagemult*0.33).round
      end
    end
    #Field Effects Same-Type Boost
    case $fieldeffectsbg
    when 0 # Electric Terrain
      if @battle.field.effects[PBEffects::ElectricTerrain]>0 &&
         !attacker.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:ELECTRIC)
        damagemult=(damagemult*1.5).round
      end
    when 1 # Misty Terrain
      if @battle.field.effects[PBEffects::MistyTerrain]>0 &&
         !opponent.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:DRAGON)
        damagemult=(damagemult*0.5).round
      end
    when 2 # Grassy Terrain
      if @battle.field.effects[PBEffects::GrassyTerrain]>0 &&
         !attacker.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:GRASS)
        damagemult=(damagemult*1.5).round
      end
    when 3 # Psychic Terrain
      if @battle.field.effects[PBEffects::PsychicTerrain]>0 &&
         !attacker.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:PSYCHIC)
        damagemult=(damagemult*1.5).round
      end
    end
In PokeBattle_Move (Step 2)
Thank you!!! <3
 

BIGFriv

People call me adorable for some reason.
Member
Posts
14
#3
Oh my God! One day i tried to copy like Terrains works in Reborn but i dont got it :/ Thank you!

But, well, i just want to add to change the backgrounds when pokemon use Terrains moves (Electric, Grassy, Psychic, Misty) or abilities (Surges by Alolan Guardian)
I have to do all? Im confuse, sorry.

The last part i stoped was:
Code:
    if isConst?(type,PBTypes,:ELECTRIC)
      for i in 0...4
        if @battle.battlers[i].effects[PBEffects::MudSport] && !@battle.battlers[i].fainted?
          damagemult=(damagemult*0.33).round
          break
        end
      end
      if @battle.field.effects[PBEffects::MudSportField]>0
        damagemult=(damagemult*0.33).round
      end
    end
    #Field Effects Same-Type Boost
    case $fieldeffectsbg
    when 0 # Electric Terrain
      if @battle.field.effects[PBEffects::ElectricTerrain]>0 &&
         !attacker.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:ELECTRIC)
        damagemult=(damagemult*1.5).round
      end
    when 1 # Misty Terrain
      if @battle.field.effects[PBEffects::MistyTerrain]>0 &&
         !opponent.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:DRAGON)
        damagemult=(damagemult*0.5).round
      end
    when 2 # Grassy Terrain
      if @battle.field.effects[PBEffects::GrassyTerrain]>0 &&
         !attacker.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:GRASS)
        damagemult=(damagemult*1.5).round
      end
    when 3 # Psychic Terrain
      if @battle.field.effects[PBEffects::PsychicTerrain]>0 &&
         !attacker.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:PSYCHIC)
        damagemult=(damagemult*1.5).round
      end
    end
In PokeBattle_Move (Step 2)
Thank you!!! <3
Glad you like it.
Hmm for what you want to do you kinda of just need step 1 I believe.
It's kinda late right now. But ill try to do what you need later.
In my own game I transformed Electric Terrain into an Electric field anf that took a while (its something I was going to talk about in the next tutorial update).
But Ill try to see how to do what you want tomorrow!
 

WolfPP

Discord Wolf#1235
Member
Posts
49
#4
Glad you like it.
Hmm for what you want to do you kinda of just need step 1 I believe.
It's kinda late right now. But ill try to do what you need later.
In my own game I transformed Electric Terrain into an Electric field anf that took a while (its something I was going to talk about in the next tutorial update).
But Ill try to see how to do what you want tomorrow!
Im tryin to put inside terrain codes in MoveEffects...

Anyway, i will be waiting for your instruction!
 

Kartik

Dumbo
Member
Posts
34
#5
@WolfPP
Add this code while you write about ability or move
@battle.pbChangeBGSprite

Use ctrl+shift+f to find in drought or a similar ability and paste the code changing it a bit and adding the above code

Here I have created an ability SNOWCALL to imitate the field effect created by BIGFriv in the tutorial

Btw is it just me or even if you don't have the field active the effects take place
 
Last edited:

WolfPP

Discord Wolf#1235
Member
Posts
49
#6
@WolfPP
Add this code while you write about ability or move
@battle.pbChangeBGSprite

Use ctrl+shift+f to find in drought or a similar ability and paste the code changing it a bit and adding the above code

Here I have created an ability SNOWCALL to imitate the field effect created by BIGFriv in the tutorial

Btw is it just me or even if you don't have the field active the effects take place
Sorry but i see nothing in your Screenshot.
 

Amethyst

Rookie
Member
Posts
8
#11
hey, thanks for doing this! there's a lot of moving parts to field effects depending on what other custom effects one wants to add and such, so i've never made a proper tutorial, but this is a really nice start.

could you add "Blind Guardian" to the credits list though please? he was the one who first made a way to change the background on the fly, and played a big role in getting this system off the ground.
cheers!
 

BIGFriv

People call me adorable for some reason.
Member
Posts
14
#12
hey, thanks for doing this! there's a lot of moving parts to field effects depending on what other custom effects one wants to add and such, so i've never made a proper tutorial, but this is a really nice start.

could you add "Blind Guardian" to the credits list though please? he was the one who first made a way to change the background on the fly, and played a big role in getting this system off the ground.
cheers!
Omg, yeah. I can add him to the list of Credits!

Thank you!
 
Top