#Not Important
All hail the wishmaker
- 910
- Posts
- 5
- Years
- He/Him
- Hoenn
- Seen Jul 22, 2023
I wanted to add some new field effects and saw (broken link removed) tutorial on Relic Castle and not here on Pokecommunity so I made this!
You will learn to:
Here I go::
An automatic background changer:
In PokeBattle_Battle search for:
It should be like this (unless you have already modified the animations):
Underneath add this:
Now, we need to make a new variable in that def (I called it $fieldeffectsbg). Add it under the
Now, we will make two effects, an indoor effect (which is nothing) and an outside effect which I have already made called 'Scorched Ground':
Replace with this:
Now the game will know when to change the background and player bases.
Step 2: Battle boosts
I'm going to teach you how to do type boosts first:
In
Now, under it add:
Now let's add a boost to fire types:
BUT I also want to make grass weaker and it would make no sense to have grass weakened if the attacker did not touch the ground, right?
If you also want to, add this piece of code under the second last 'end':
And, water can also be weakened because it dries their attacks:
Specific moves:
Search for this:
Under, start the $fieldeffectsbg case again:
I want any Freezing moves to also do less damage:
Now we change the metadata:
(the image is only an example)
Like this, as simple as it can be. This will automatically make the map use that backdrop.
And it should be good to go!
Credit:
Amethyst
Blind Guardian
BIGFriv
Groniack
#Not Important
You will learn to:
- How to make it be active from the get go-
- How to let background change based on the field-
- How to implement battle start up messages-
- How to buff overall move types, specific moves, specific move kind-
- And more stuff...
Here I go::
Spoiler:
An automatic background changer:
Spoiler:
In PokeBattle_Battle search for:
def pbCommonAnimation(name,attacker,opponent,hitnum=0)
.It should be like this (unless you have already modified the animations):
![[PokeCommunity.com] New Field Effects [PokeCommunity.com] New Field Effects](https://i.imgur.com/d2z8035.png)
Underneath add this:
Code:
def pbChangeBGSprite
end
def pbChangeBGSprite
:
Code:
case $fieldeffectsbg
end
![[PokeCommunity.com] New Field Effects [PokeCommunity.com] New Field Effects](https://i.imgur.com/2Ok55xC.png)
Now, we will make two effects, an indoor effect (which is nothing) and an outside effect which I have already made called 'Scorched Ground':
Replace with this:
Code:
def pbChangeBGSprite
case $fieldeffectsbg
when 0 # Interior Field
@scene.sprites["battlebg"].setBitmap("Graphics/Battlebacks/battlebgIndoorA.png")
@scene.sprites["playerbase"].setBitmap("Graphics/Battlebacks/playerbaseIndoorA.png")
@scene.sprites["enemybase"].setBitmap("Graphics/Battlebacks/enemybaseIndoorA.png")
when 1 # Scorched Ground
@scene.sprites["battlebg"].setBitmap("Graphics/Battlebacks/battlebgMountainEve")
@scene.sprites["enemybase"].setBitmap("Graphics/Battlebacks/enemybaseMountainEve.png")
@scene.sprites["playerbase"].setBitmap("Graphics/Battlebacks/playerbaseMountainEve.png")
#To add more just make more when's like [when 2]
end
end
Step 2: Battle boosts
Spoiler:
I'm going to teach you how to do type boosts first:
In
PokeBattle_Move
look for this:![[PokeCommunity.com] New Field Effects [PokeCommunity.com] New Field Effects](https://i.imgur.com/m2A7iJa.png)
Now, under it add:
Code:
#Field
case $fieldeffectsbg
when 1 #Scorched
end
Code:
case $fieldeffectsbg
when 1 # Scorched
if isConst?(type,PBTypes,:FIRE)
damagemult=(damagemult*1.5).round
@battle.pbDisplay(_INTL("The ground boosted the fire power of the attack!",opponent.pbThis))
end
end
If you also want to, add this piece of code under the second last 'end':
Code:
if !attacker.isAirborne? && isConst?(type,PBTypes,:GRASS)
damagemult=(damagemult*0.5).round
@battle.pbDisplay(_INTL("The ground burned the attack!",opponent.pbThis))
end
Code:
if isConst?(type,PBTypes,:WATER) &&
pbIsSpecial?(pbType(@type,attacker,opponent))
damagemult=(damagemult*0.5).round
@battle.pbDisplay(_INTL("The attack got dried!",opponent.pbThis))
end
Search for this:
![[PokeCommunity.com] New Field Effects [PokeCommunity.com] New Field Effects](https://i.imgur.com/PPR2Dks.png)
Under, start the $fieldeffectsbg case again:
Code:
case $fieldeffectsbg
end
Code:
case $fieldeffectsbg
when 1#Scorched
if (id == PBMoves::TRIATTACK || id == PBMoves::BLIZZARD || id == PBMoves::ICEBEAM || id == PBMoves::ICEFANG || id == PBMoves::ICEPUNCH || id == PBMoves::POWDERSNOW #|| (id == PBMoves::SECRETPOWER && PBWeather==:HAIL) #I personally did not use this
damagemult=(damagemult*0.75).round
@battle.pbDisplay("The attack thawed out!")
end
[/SPOILER]
[b]Starting the field[/b]:
[spoiler]
Look for this in [ICODE]PokeBattle_Battle[/icode]
[img]https://i.imgur.com/KSTE3pb.png[/img]
For this part, we will need to know the code number for the maps you want this field to be in, so I'm gonna use (my) Route 1 for this.
[IMG]https://img.techpowerup.org/200315/NGZlMjQ3ZmJhNGQ4.jpg[/IMG]
It's 5.
Under that 'end' from before, add this:
[code]
maps=[5]#the maps that use the field
if $game_map && maps.include?($game_map.map_id)
if @environment==PBEnvironment::Grass || @environment==PBEnvironment::TallGrass || @environment==PBEnvironment::None
$fieldeffectsbg=1 #Scorched
pbDisplayPaused(_INTL("The ground is super-heated!")
end
end
![[PokeCommunity.com] New Field Effects [PokeCommunity.com] New Field Effects](https://i.imgur.com/s411Ws8.png)
Like this, as simple as it can be. This will automatically make the map use that backdrop.
And it should be good to go!
Credit:
Amethyst
Blind Guardian
BIGFriv
Groniack
#Not Important
Last edited: