• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Pokémon Essentials BW2 Mod

PocketAne

Shy Genwunner
8
Posts
6
Years
  • Age 29
  • Seen Mar 18, 2022
Custom scripts are not working for me

I follow the instructions to a T, yet when I start my game no changes occur. Am I doing something wrong? Are these scripts outdated because of the new version of essentials? Is there a certain method or way to install custom scripts? I also have Elite Battle System installed so is that conflicting with them?

Any help would be appreciated.

EDIT:

Found my answer. Some custom scripts don't work with the 17.2 update. Unless they're updated, they can't be used. Go figure.
 
Last edited by a moderator:
162
Posts
7
Years
  • Age 35
  • Seen yesterday
I am using the TRAINER CARD script, but it generates a conflict with the conditionals of the battles. For example, when I select a battle V/S a trainer or a wild encounter and decide that something happens after losing or for example I select "false" to the possibility of escape and the indications are ignored ...

It is probably a problem with the variables that count the number of battles with trainers and the number of wild encounters.

Does anybody know how I can fix it?

I think the problem is in this section... But I don´t know where

When I remove the script, the problem no longer occurs ...

#===============================================================================
# * adding and defining variables for the class PokeBattle_Trainer
#===============================================================================
class PokeBattle_Trainer
attr_accessor :times_linked
attr_accessor :link_battles
attr_accessor :link_wins
attr_accessor :link_trades
attr_accessor :wild_pokemon_encountered
attr_accessor :trainers_battled
attr_accessor :nature
attr_accessor :badgeObtainTime

def nature
@nature=$Trainer.publicID($Trainer.id)%25 if !@nature
return PBNatures.getName(@nature)
end

def times_linked
@times_linked=0 if !@times_linked
return @times_linked
end

def link_battles
@link_battles=0 if !@link_battles
return @link_battles
end

def link_wins
@link_wins=0 if !@link_wins
return @link_wins
end

def link_trades
@link_trades=0 if !@link_trades
return @link_trades
end

def wild_pokemon_encountered
@wild_pokemon_encountered=0 if !@wild_pokemon_encountered
return @wild_pokemon_encountered
end

def trainers_battled
@trainers_battled=0 if !@trainers_battled
return @trainers_battled
end

def badgeObtainTime
if !@badgeObtainTime
@badgeObtainTime=[]
default_time="0/0/2000"
for i in 0...8
@badgeObtainTime=default_time
end
end
return @badgeObtainTime
end
end

def obtainedBadge(badge)
$Trainer.badges[badge]=true
$Trainer.badgeObtainTime[badge]="#{pbGetTimeNow.mon}/#{pbGetTimeNow.day}/#{pbGetTimeNow.year}"
end
# increasing $Global.wild_pokemon_encountered by one when having a wild battle.
alias olddd_pbWildBattle :pbWildBattle
def pbWildBattle(species,level,variable=nil,canescape=true,canlose=false)
$Trainer.wild_pokemon_encountered+=1 if $Trainer.pokemonCount != 0
olddd_pbWildBattle(species,level,variable=nil,canescape=true,canlose=false)
end

# increasing $Global.wild_pokemon_encountered by two when having a wild double battle.
alias olddd_pbDoubleWildBattle :pbDoubleWildBattle
def pbDoubleWildBattle(species1,level1,species2,level2,variable=nil,canescape=true,canlose=false)
$Trainer.wild_pokemon_encountered+=2 if $Trainer.pokemonCount != 0
olddd_pbDoubleWildBattle(species1,level1,species2,level2,variable=nil,canescape=true,canlose=false)
end

# increasing $Global.trainers_battled by one when having a battle.
alias olddd_pbTrainerBattle :pbTrainerBattle
def pbTrainerBattle(trainerid,trainername,endspeech,doublebattle=false,trainerparty=0,canlose=false,variable=nil)
$Trainer.trainers_battled+=1 if $Trainer.pokemonCount != 0
olddd_pbTrainerBattle(trainerid,trainername,endspeech,doublebattle=false,trainerparty=0,canlose=false,variable=nil)
end

# increasing $Global.trainers_battled by two when having a double battle.
alias olddd_pbDoubleTrainerBattle :pbDoubleTrainerBattle
def pbDoubleTrainerBattle(trainerid1, trainername1, trainerparty1, endspeech1,trainerid2, trainername2, trainerparty2, endspeech2, canlose=false,variable=nil)
$Trainer.trainers_battled+=2 if $Trainer.pokemonCount != 0
olddd_pbDoubleTrainerBattle(trainerid1, trainername1, trainerparty1, endspeech1,trainerid2, trainername2, trainerparty2, endspeech2, canlose=false,variable=nil)
end
 
Last edited:

Luka S.J.

Jealous Croatian
1,270
Posts
15
Years
I am using the TRAINER CARD script, but it generates a conflict with the conditionals of the battles. For example, when I select a battle V/S a trainer or a wild encounter and decide that something happens after losing or for example I select "false" to the possibility of escape and the indications are ignored ...

It is probably a problem with the variables that count the number of battles with trainers and the number of wild encounters.

Does anybody know how I can fix it?

I think the problem is in this section... But I don´t know where

When I remove the script, the problem no longer occurs ...

The reason for these kinds of problems, with these scripts specifically, is that some of the referencing of the aliased methods is a little bit wonky; so it ends up overwriting additional parameters that you may specify. The fix is actually pretty simple though. All you have to do is remove the variable names of the arguments and replace them with a variable argument variable. This is how you'd go about it:

Replace
Code:
def pbTrainerBattle(trainerid,trainername,endspeech,doublebattle=false,trainerparty=0,canlose=false,variable=nil)
with
Code:
def pbTrainerBattle(*args)

And do the same thing with the call back of the aliased functions, where you replace this
Code:
olddd_pbTrainerBattle(trainerid,trainername,endspeech,doublebattle=false,trainerparty=0,canlose=false,variable=nil)
with
Code:
olddd_pbTrainerBattle(*args)

Do this for all the functions that have aliasing in them and that are improperly overwriting the function arguments.
 
Last edited:
350
Posts
5
Years
  • Age 33
  • He/Him
  • Oshawa
  • Seen Jan 11, 2024
Sorry But my script doesn't even work..
The default Essentials Trainer Screen Appears even after I installed the trainer card script
 
162
Posts
7
Years
  • Age 35
  • Seen yesterday
The reason for these kinds of problems, with these scripts specifically, is that some of the referencing of the aliased methods is a little bit wonky; so it ends up overwriting additional parameters that you may specify. The fix is actually pretty simple though. All you have to do is remove the variable names of the arguments and replace them with a variable argument variable. This is how you'd go about it:

Replace
Code:
def pbTrainerBattle(trainerid,trainername,endspeech,doublebattle=false,trainerparty=0,canlose=false,variable=nil)
with
Code:
def pbTrainerBattle(*args)

And do the same thing with the call back of the aliased functions, where you replace this
Code:
olddd_pbTrainerBattle(trainerid,trainername,endspeech,doublebattle=false,trainerparty=0,canlose=false,variable=nil)
with
Code:
olddd_pbTrainerBattle(*args)

Do this for all the functions that have aliasing in them and that are improperly overwriting the function arguments.

OMG... You're absolutely right ... It works that way. I really appreciate it. I have learned a lot from scripting by watching your work!
 

Squeaky Duck

Squeaky Duck
22
Posts
4
Years
  • Age 18
  • Seen Mar 14, 2021
Where do I download? I already tried on the link in your DeviantArt, but it's dead, tried using WayBack Machine but the scripts URLs have been excluded! Anyone has a backup or knows a place where I can download?
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
  • Age 32
  • He/Him
  • Brazil
  • Seen Apr 22, 2024
50
Posts
4
Years
  • Age 27
  • Seen Oct 17, 2023
The link page works, but when I try to link to any section "Click here to get the Script!" You skip the page with "Sorry.
This URL has been excluded from the Wayback Machine. "

Does anyone know how to solve this problem?
 
210
Posts
7
Years
  • Age 24
  • Seen yesterday
The link page works, but when I try to link to any section "Click here to get the Script!" You skip the page with "Sorry.
This URL has been excluded from the Wayback Machine. "

Does anyone know how to solve this problem?

Yes Sure.....Just Copy url link from wayback machine and paste and search in url search....
So simply right??
 
50
Posts
4
Years
  • Age 27
  • Seen Oct 17, 2023
Yes Sure.....Just Copy url link from wayback machine and paste and search in url search....
So simply right??


Try what you said right now, it seems that it still does not work.
I try to get the Receive Item Scene and Save Screen script, but it doesn't seem to allow access

thanks in replying equally
 
2
Posts
4
Years
Is this script compatible with Pokémon Essentials v17? I would love to use the Trainer card and Save Menu, but when I put it on, nothing changes. I don't know if I'm doing something wrong.
Sorry for my English
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
  • Age 32
  • He/Him
  • Brazil
  • Seen Apr 22, 2024

DarrylBD99

Content Creator and Game Developer
321
Posts
3
Years
The only thing I see working with both V17 and 18 from the BW2 mod is the location window and that is it. There is however a script for the BW save screen by HDrawer and he posted the resource on RelicCastle (which is currently under construction...)
 
Back
Top