TutorialField Effects v2

BIGFriv

Mr. Bigglesworth
Member
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
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!

Member

SamuelJ

Rookie
Member
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
73.1 KB · Views: 9
• Field effect graphics copy.txt
9.8 KB · Views: 8

BIGFriv

Mr. Bigglesworth
Member
"
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!

SamuelJ

Rookie
Member
That was it, thanks a lot BIGFriv!!!
"
elsif backdropFilename == "mountain_bg" #Mountain
fieldbd = 4

"
Instead of "mountain_bg" make it be "mountain"

SebastiaanZ

Novice
Member
How do I make it map dependant in v18.1?

bisball

Rookie
Member
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 ?

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

Last edited:

Novice
Member
Would adding seed effects as an optional choice by the scripter be possible?

TechSkylander1518

Wiki Dweeb
Member
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.

Member
Alright. Thanks!

0maeWaM0uShindeiru

Novice
Member
Is there a way to make abilities like Snow Warning cause Field Effects?

0maeWaM0uShindeiru

Novice
Member
Testing, this look good?
Code:
    # Snow Warning
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 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!

0maeWaM0uShindeiru

Novice
Member
That should work yeah!
Thanks bro. I wanted to use Field Effects for some of the Gyms in my game, will be sure to credit you.

Member

0maeWaM0uShindeiru

Novice
Member
I figured it out and in hindsight it was obvious, just remove the at signs before each instance of battle w/abilities