Resource icon

Tutorial Field Effects v2

BIGFriv

Mr. Bigglesworth
Member
Joined
Mar 31, 2017
Posts
36
Ah damn.
I won't be able to fix that for a day or two.
But I'll try to do it this weekend.
I think I know what the issue is. But I won't be in my pc for a bit.
Sorry for the trouble.
 

SamuelJ

Rookie
Member
Joined
Oct 22, 2020
Posts
4
Age
24
Ah damn.
I won't be able to fix that for a day or two.
But I'll try to do it this weekend.
I think I know what the issue is. But I won't be in my pc for a bit.
Sorry for the trouble.
Thank you! I really appreciate it!
 

SamuelJ

Rookie
Member
Joined
Oct 22, 2020
Posts
4
Age
24
Hi BIGFriv, I tried again and it's working smoothly with the fields you created!
I was trying to add a new field called "Mountain", but the field announcement is not showing up. The battle bg and bases load properly and appear when I enter battle.
I checked and I followed every step carefully, but i'm not sure if i'm just changing the bg without any effect, I changed it in the metadata of the map.
I have not edited the battle effects script, I just want to know if I am loading the field properly in battle or if I am just loading the bg I want.

If you can please help me identify why I am not able to see the announcement, I will be very thankful!

Here's a copy of the field effects graphics copy in my game and the specific part of field announcements.
Note that for my game it is #4.

Thank you very much, I really appreciate your help!
 

Attachments

  • Field announcement clip.png
    Field announcement clip.png
    73.1 KB · Views: 9
  • Field effect graphics copy.txt
    9.8 KB · Views: 8

BIGFriv

Mr. Bigglesworth
Member
Joined
Mar 31, 2017
Posts
36
"
elsif backdropFilename == "mountain_bg" #Mountain
fieldbd = 4

"
Instead of "mountain_bg" make it be "mountain"
Hi BIGFriv, I tried again and it's working smoothly with the fields you created!
I was trying to add a new field called "Mountain", but the field announcement is not showing up. The battle bg and bases load properly and appear when I enter battle.
I checked and I followed every step carefully, but i'm not sure if i'm just changing the bg without any effect, I changed it in the metadata of the map.
I have not edited the battle effects script, I just want to know if I am loading the field properly in battle or if I am just loading the bg I want.

If you can please help me identify why I am not able to see the announcement, I will be very thankful!

Here's a copy of the field effects graphics copy in my game and the specific part of field announcements.
Note that for my game it is #4.

Thank you very much, I really appreciate your help!
 

bisball

Rookie
Member
Joined
Dec 27, 2020
Posts
1
Hello.
I've tried to use the script (V18.1) and testing it with the default forest field (on a map using the correct background) but nothing happened.
I am new to Relic and also to scripting so I don't know if I did something wrong when putting the script : I have inserted the 2 scripts above the "main" script (in the good order) in the script editor.
Does anyone have an idea ?
Thank you in advance.

EDIT: I just needed to remove the _bg of the name of the background, my bad.
 
Last edited:

TechSkylander1518

Wiki Dweeb
Member
Joined
Mar 24, 2017
Posts
572
Would adding seed effects as an optional choice by the scripter be possible?
Yeah, you'd just add them in item handlers like you would any other item.

We can look at the code for stuff like the Electric Seed for an example of where to start:
Ruby:
BattleHandlers::TerrainStatBoostItem.add(:ELECTRICSEED,
  proc { |item,battler,battle|
    next false if battle.field.terrain!=PBBattleTerrains::Electric
    next false if !battler.pbCanRaiseStatStage?(PBStats::DEFENSE,battler)
    itemName = PBItems.getName(item)
    battle.pbCommonAnimation("UseItem",battler)
    next battler.pbRaiseStatStageByCause(PBStats::DEFENSE,1,battler,itemName)
  }
)

You'd just change "battle.field.terrain!=PBBattleTerrains::Electric" to whatever conditional you'd want for it.
 

0maeWaM0uShindeiru

Novice
Member
Joined
Nov 23, 2020
Posts
10
Age
21
Testing, this look good?
Code:
    # Snow Warning
BattleHandlers::AbilityOnSwitchIn.add(:SNOWWARNING,
  proc { |ability,battler,battle|
    $PokemonTemp.fieldEffectsBg = 4 # Winter Field
    @battle.scene.pbChangeBGSprite
    @battle.pbDisplay(_INTL("Snow covered the field!"))
  }
)
 
Last edited:

BIGFriv

Mr. Bigglesworth
Member
Joined
Mar 31, 2017
Posts
36
Testing, this look good?
Code:
    # Snow Warning
BattleHandlers::AbilityOnSwitchIn.add(:SNOWWARNING,
  proc { |ability,battler,battle|
    $PokemonTemp.fieldEffectsBg = 4 # Winter Field
    @battle.scene.pbChangeBGSprite
    @battle.pbDisplay(_INTL("Snow covered the field!"))
  }
)
That should work yeah!
 
Top