Advertiser Content
Seen 3 Weeks Ago
Posted August 17th, 2019
23 posts
145 Days
Hey there, I basically want to achieve a style of game not unlike Pokemon Colusseum. To do that, I need to somehow modify the script to do this one thing that eludes me: all trainers would be double battles, even if the player only has one avaliable Pokemon. Now, it sounds real simple but I have no idea where to start; Googling has given no results. If anyone has any insight, that would be brilliant!

Sidenote: this community is endlessly helpful for one starting out, it's the best!
Seen 3 Weeks Ago
Posted August 17th, 2019
23 posts
145 Days
I think it might be in this section:

def pbDoubleBattleAllowed?
return false if !@fullparty1 && @party1.length>MAXPARTYSIZE
return false if !@fullparty2 && @party2.length>MAXPARTYSIZE
_opponent=@opponent
_player=@player
# Wild battle
if !_opponent
if @party2.length==1
return false
elsif @party2.length==2
return true
else
return false
end
# Trainer battle
else
if _opponent.is_a?(Array)
if _opponent.length==1
_opponent=_opponent[0]
elsif _opponent.length!=2
return false
end
end
_player=_player
if _player.is_a?(Array)
if _player.length==1
_player=_player[0]
elsif _player.length!=2
return false
end
end
if _opponent.is_a?(Array)
sendout1=pbFindNextUnfainted(@party2,0,pbSecondPartyBegin(1))
sendout2=pbFindNextUnfainted(@party2,pbSecondPartyBegin(1))
return false if sendout1<0 || sendout2<0
else
sendout1=pbFindNextUnfainted(@party2,0)
sendout2=pbFindNextUnfainted(@party2,sendout1+1)
return false if sendout1<0 || sendout2<0
end
end
if _player.is_a?(Array)
sendout1=pbFindNextUnfainted(@party1,0,pbSecondPartyBegin(0))
sendout2=pbFindNextUnfainted(@party1,pbSecondPartyBegin(0))
return false if sendout1<0 || sendout2<0
else
sendout1=pbFindNextUnfainted(@party1,0)
sendout2=pbFindNextUnfainted(@party1,sendout1+1)
return false if sendout1<0 || sendout2<0
end
return true
end
But again, I'm unsure what exactly I would have to change

mgriffin

Online now
Posted 8 Hours Ago
758 posts
5.6 Years
Right, so if we return false that means that the double battle isn't allowed. So you just need to find all the check related to the player having too few Pokémon and get rid of them or make them return true (which might cause errors in a different part of the code if that part assumes that there will be at least two Pokémon, but you can tackle that if it happens).
Seen 3 Weeks Ago
Posted August 17th, 2019
23 posts
145 Days
---------------------------
Pokemon Essentials
---------------------------
[Pokémon Essentials version 17.2]

Exception: RuntimeError

Message: Opponent trainer must be only one person in single battles

PokeBattle_Battle:2442:in `pbStartBattleCore'

PokeBattle_Battle:2345:in `pbStartBattle'

PField_Battles:373:in `pbDoubleTrainerBattle'

PField_Battles:372:in `pbSceneStandby'

PField_Battles:374:in `pbDoubleTrainerBattle'

PField_Battles:371:in `pbBattleAnimation'

PField_Battles:371:in `pbDoubleTrainerBattle'

Debug_Menu:342:in `pbDebugMenuActions'

Debug_Menu:744:in `pbDebugMenu'

Debug_Menu:710:in `loop'



This exception was logged in

C:\Users\MSI\Saved Games\Pokemon Essentials\errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
I got this far,but it seems that there's a lot that would need to be changed aha. Maybe it's a dream suited for a much more skilled coder.
Advertiser Content