Well for it to work with that script, you would need to keep the save files that have the achievements completed.nice, do you know how it could be done with persistent switches?
How did you set it up to have a achievement based on a switch?It doesn't disrupt the gameplay, but the background doesn't appear, making the design look a bit ugly. I don't understand programming much, but I've tried various possible modifications that don't change the result, and it works fine in v20, so it must be something that changed in v21. I'm investigating what it could be, but, as I mentioned, I'm not very skilled at this
View attachment 22077
How did you set it up to have a achievement based on a switch?
"DYNAMAXING"=>{
"id"=>16,
"name"=>"Dynamax Expert",
"description"=>"Dynamaxing Pokémon",
"goals"=>[1,10,50,100,300]
},
"GIGANTAMAXING"=>{
"id"=>17,
"name"=>"Gigantamax Expert",
"description"=>"Gigantamaxing Pokémon",
"goals"=>[1,10,50,100,300]
},
"ZMOVE"=>{
"id"=>18,
"name"=>"Z-move Expert",
"description"=>"zmove",
"goals"=>[1,10,25,50,100,200]
},
"ULTRA"=>{
"id"=>19,
"name"=>"Ultra Expert",
"description"=>"Ultra",
"goals"=>[1,10,25,50,100,200]
},
"TERASTAL"=>{
"id"=>20,
"name"=>"Terastal Expert",
"description"=>"terastal",
"goals"=>[1,10,25,50,100,200]
}
}
alias achieve_pbUseMove pbUseMove
def pbUseMove(*args)
achieve_pbUseMove(*args)
if @lastMoveUsedIsZMove && @battle.pbOwnedByPlayer?(self.index)
Achievements.incrementProgress("ZMOVE", 1)
else
Achievements.incrementProgress("MOVES_USED", 1)
end
end
end
alias tera_pbTerastallize pbTerastallize
def pbTerastallize(idxBattler)
tera_pbTerastallize(idxBattler)
battler = @battlers[idxBattler]
if battler.pbOwnedByPlayer?
Achievements.incrementProgress("TERASTAL", 1)
end
end
alias achieve_pbDynamax pbDynamax
def pbDynamax(index, *args)
achieve_pbDynamax(index, *args)
return if !pbOwnedByPlayer?(index)
if @battlers[index].gmax?
Achievements.incrementProgress("GIGANTAMAXING", 1)
else
Achievements.incrementProgress("DYNAMAXING", 1)
end
end
alias achieve_pbUltraBurst pbUltraBurst
def pbUltraBurst(index)
achieve_pbUltraBurst(index)
return if !pbOwnedByPlayer?(index)
if @battlers[index].ultra?
Achievements.incrementProgress("ULTRA", 1)
end
end
Hello, I followed your instructions, but there was a problem. I don't understand Ruby very well, and I don't know where I went wrong. Thank you for your guidance.I modified Achievement_Triggers a little so that it could identify the use of: Dynamax, gigantamax, terastal and z-moves.
but it is necessary to add the respective achievements to be updated by the modifications in the Achievement_Module, they are:
Don't forget to put the order corresponding to your script, the description and goals are just examples, do as you wish.
Ruby:"DYNAMAXING"=>{ "id"=>16, "name"=>"Dynamax Expert", "description"=>"Dynamaxing Pokémon", "goals"=>[1,10,50,100,300] }, "GIGANTAMAXING"=>{ "id"=>17, "name"=>"Gigantamax Expert", "description"=>"Gigantamaxing Pokémon", "goals"=>[1,10,50,100,300] }, "ZMOVE"=>{ "id"=>18, "name"=>"Z-move Expert", "description"=>"zmove", "goals"=>[1,10,25,50,100,200] }, "ULTRA"=>{ "id"=>19, "name"=>"Ultra Expert", "description"=>"Ultra", "goals"=>[1,10,25,50,100,200] }, "TERASTAL"=>{ "id"=>20, "name"=>"Terastal Expert", "description"=>"terastal", "goals"=>[1,10,25,50,100,200] } }
Z-MOVE:
in Achievement Triggers, in the class Battle::Battler, where it says " alias achieve_pbUseMove pbUseMove" replace with:
Ruby:alias achieve_pbUseMove pbUseMove def pbUseMove(*args) achieve_pbUseMove(*args) if @lastMoveUsedIsZMove && @battle.pbOwnedByPlayer?(self.index) Achievements.incrementProgress("ZMOVE", 1) else Achievements.incrementProgress("MOVES_USED", 1) end end end
This will make the system recognize the use of Z-move or not.
for Dynamax, Gigantamax and Terastal, in class Battle, place:
Ruby:alias tera_pbTerastallize pbTerastallize def pbTerastallize(idxBattler) tera_pbTerastallize(idxBattler) battler = @battlers[idxBattler] if battler.pbOwnedByPlayer? Achievements.incrementProgress("TERASTAL", 1) end end alias achieve_pbDynamax pbDynamax def pbDynamax(index, *args) achieve_pbDynamax(index, *args) return if !pbOwnedByPlayer?(index) if @battlers[index].gmax? Achievements.incrementProgress("GIGANTAMAXING", 1) else Achievements.incrementProgress("DYNAMAXING", 1) end end alias achieve_pbUltraBurst pbUltraBurst def pbUltraBurst(index) achieve_pbUltraBurst(index) return if !pbOwnedByPlayer?(index) if @battlers[index].ultra? Achievements.incrementProgress("ULTRA", 1) end end
Are you using the Deluxe battle kit plugins?Hello, I followed your instructions, but there was a problem. I don't understand Ruby very well, and I don't know where I went wrong. Thank you for your guidance.
Deluxe Battle Kit ?Yes, I am using it.Are you using the Deluxe battle kit plugins?
because the error says that it did not find "terastallize" in the existing scripts, you need to have the dbk terastal plugin for this, the same for dynamax and zmove, I think I didn't include this information when I posted XD
Can you send me your entire Achievement_Triggers file so I can take a look? I'm half blind and just looking at the photo of the error I can't see almost anything hahahahahDeluxe Battle Kit ?Yes, I am using it.
class Battle
alias achieve_pbMegaEvolve pbMegaEvolve
def pbMegaEvolve(index)
achieve_pbMegaEvolve(index)
return if !pbOwnedByPlayer?(index)
if @battlers[index].mega?
Achievements.incrementProgress("MEGA_EVOLUTIONS", 1)
end
end
alias tera_pbTerastallize pbTerastallize
def pbTerastallize(idxBattler)
tera_pbTerastallize(idxBattler)
battler = @battlers[idxBattler]
if battler.pbOwnedByPlayer?
Achievements.incrementProgress("TERASTAL", 1)
end
end
alias achieve_pbDynamax pbDynamax
def pbDynamax(index, *args)
achieve_pbDynamax(index, *args)
return if !pbOwnedByPlayer?(index)
if @battlers[index].gmax?
Achievements.incrementProgress("GIGANTAMAXING", 1)
else
Achievements.incrementProgress("DYNAMAXING", 1)
end
end
alias achieve_pbPrimalReversion pbPrimalReversion
def pbPrimalReversion(index)
achieve_pbPrimalReversion(index)
return if !pbOwnedByPlayer?(index)
if @battlers[index].primal?
Achievements.incrementProgress("PRIMAL_REVERSIONS", 1)
end
end
alias achieve_pbUltraBurst pbUltraBurst
def pbUltraBurst(index)
achieve_pbUltraBurst(index)
return if !pbOwnedByPlayer?(index)
if @battlers[index].ultra?
Achievements.incrementProgress("ULTRA", 1)
end
end
#use item on pokemon in battle
Wow, that's really great. After you made these modifications, it can now be used normally. It's really amazing. Thank you very much for your guidance.Can you send me your entire Achievement_Triggers file so I can take a look? I'm half blind and just looking at the photo of the error I can't see almost anything hahahahah
Or, just copy this section here again and put it in Achievement_Triggers
Ruby:class Battle alias achieve_pbMegaEvolve pbMegaEvolve def pbMegaEvolve(index) achieve_pbMegaEvolve(index) return if !pbOwnedByPlayer?(index) if @battlers[index].mega? Achievements.incrementProgress("MEGA_EVOLUTIONS", 1) end end alias tera_pbTerastallize pbTerastallize def pbTerastallize(idxBattler) tera_pbTerastallize(idxBattler) battler = @battlers[idxBattler] if battler.pbOwnedByPlayer? Achievements.incrementProgress("TERASTAL", 1) end end alias achieve_pbDynamax pbDynamax def pbDynamax(index, *args) achieve_pbDynamax(index, *args) return if !pbOwnedByPlayer?(index) if @battlers[index].gmax? Achievements.incrementProgress("GIGANTAMAXING", 1) else Achievements.incrementProgress("DYNAMAXING", 1) end end alias achieve_pbPrimalReversion pbPrimalReversion def pbPrimalReversion(index) achieve_pbPrimalReversion(index) return if !pbOwnedByPlayer?(index) if @battlers[index].primal? Achievements.incrementProgress("PRIMAL_REVERSIONS", 1) end end alias achieve_pbUltraBurst pbUltraBurst def pbUltraBurst(index) achieve_pbUltraBurst(index) return if !pbOwnedByPlayer?(index) if @battlers[index].ultra? Achievements.incrementProgress("ULTRA", 1) end end #use item on pokemon in battle
After the round using Dynamax in a battle this happens.But the game didn't crash and the opposing pokemon did nothing.Can you send me your entire Achievement_Triggers file so I can take a look? I'm half blind and just looking at the photo of the error I can't see almost anything hahahahah
Or, just copy this section here again and put it in Achievement_Triggers
Ruby:class Battle alias achieve_pbMegaEvolve pbMegaEvolve def pbMegaEvolve(index) achieve_pbMegaEvolve(index) return if !pbOwnedByPlayer?(index) if @battlers[index].mega? Achievements.incrementProgress("MEGA_EVOLUTIONS", 1) end end alias tera_pbTerastallize pbTerastallize def pbTerastallize(idxBattler) tera_pbTerastallize(idxBattler) battler = @battlers[idxBattler] if battler.pbOwnedByPlayer? Achievements.incrementProgress("TERASTAL", 1) end end alias achieve_pbDynamax pbDynamax def pbDynamax(index, *args) achieve_pbDynamax(index, *args) return if !pbOwnedByPlayer?(index) if @battlers[index].gmax? Achievements.incrementProgress("GIGANTAMAXING", 1) else Achievements.incrementProgress("DYNAMAXING", 1) end end alias achieve_pbPrimalReversion pbPrimalReversion def pbPrimalReversion(index) achieve_pbPrimalReversion(index) return if !pbOwnedByPlayer?(index) if @battlers[index].primal? Achievements.incrementProgress("PRIMAL_REVERSIONS", 1) end end alias achieve_pbUltraBurst pbUltraBurst def pbUltraBurst(index) achieve_pbUltraBurst(index) return if !pbOwnedByPlayer?(index) if @battlers[index].ultra? Achievements.incrementProgress("ULTRA", 1) end end #use item on pokemon in battle