• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

Team Preview in V15.1?

Yep, I need to update it with the V15 new names in the future. Now you can guess looking into the old version.
I will put the changes that I have done in the script:

NOTE: The script does not work
The battle remains blocked when I defeat a pokemon and answer YES or NO to change my pokemon.
Spoiler:


In PokeBattle_ActualScene

Change line
OLD VERSION ---> @sprites["partybar2"].x-=16
VERSION 15.1 ---> @sprites["partybarplayer"].x-=16

to

OLD VERSION--->@sprites["partybar2"].x-=16 if @sprites["partybar2"]
VERSION 15.1 ---> @sprites["partybarplayer"].x-=16 if @sprites["partybarplayer"]


Change line:
OLD VERSION ---> @sprites["partybar2"].x=PokeBattle_SceneConstants::PLAYERPARTYBAR_X
VERSION 15.1 ---> @sprites["partybarplayer"].x=PokeBattle_SceneConstants::PLAYERPARTYBAR_X

to

OLD VERSION ---> @sprites["partybar2"].x=PokeBattle_SceneConstants::PLAYERPARTYBAR_X if @sprites["partybar2"]
VERSION 15.1 --->
@sprites["partybarplayer"].x=PokeBattle_SceneConstants::PLAYERPARTYBAR_X if @sprites["partybarplayer"]

Change line:
OLD VERSION ---> @sprites["player#{@partyAnimI}"].x-=ballmovedist
VERSION 15.1 ---> @sprites["player#{i}"].x-=ballmovedist

to

OLD VERSION ---> @sprites["player#{@partyAnimI}"].x-=ballmovedist if @sprites["partybar2"]
VERSION 15.1 ---> @sprites["player#{i}"].x-=ballmovedist if @sprites["partybarplayer"]


Change line:
OLD VERSION ---> @partyAnimI=0
VERSION 15.1 ---> @partyAnimPhase=0

to

OLD VERSION ---> @partyAnimI=@previewSecondParty ? 6 : 0
VERSION 15.1 ---> @partyAnimPhase=@previewSecondParty ? 6 : 0


Change line:
OLD VERSION --> if @partyAnimI>=6
VERSION 15.1 ---> ?????

to

OLD VERSION --> if @partyAnimI>=(@previewSecondParty ? 12 : 6)
VERSION 15.1 ---> ?????

I could not have found a line similar to this one, so I ignored it.
Where should it be modified?



Before line:

OLD VERSION ---> if @[email protected] || [email protected][@partyAnimI]

VERSION 15.1 , I could not have found a line similar, I put it before this line, but I'm not so sure:

pbAddSprite("player#{i}",
@xposplayer+i*ballmovedist*6,PokeBattle_SceneConstants::PLAYERPARTYBALL1_Y,
ballgraphic,@viewport)
@sprites["player#{i}"].z=41
# Choose the ball's graphic (opponent's side)
ballgraphic="Graphics/Pictures/ballempty"


Add:
OLD VERSION ---> @sprites["enemy#{@partyAnimI}"].y-=50 if @doublePreviewTop
VERSION 15.1 --> @sprites["enemy#{i}"].y-=50 if @doublePreviewTop


Before line:

OLD VERSION & VERSION 15.1 ---> def partyAnimationUpdate

Add:

OLD VERSION:

def partyAnimationRestart(doublePreviewTop,previewSecondParty=false)
@doublePreviewTop=doublePreviewTop
@previewSecondParty=previewSecondParty
yvalue=114
yvalue-=50 if doublePreviewTop
pbAddSprite("partybar1",-400,yvalue,"Graphics/Pictures/battleLineup",@viewport)
@sprites["partybar1"].visible=true
@partyAnimPhase=0
end

def partyAnimationFade
frame=0
while(frame<24)
if @partyAnimPhase!=4
pbGraphicsUpdate
next
end
frame+=1
@sprites["partybar1"].x+=8
@sprites["partybar1"].opacity-=12
for i in 0...6
partyI = i
partyI += 6 if @previewSecondParty
@sprites["enemy#{partyI}"].opacity-=12
@sprites["enemy#{partyI}"].x+=8 if frame>=i*4
end
pbGraphicsUpdate
end
for i in 0...6
partyI = i
partyI += 6 if @previewSecondParty
pbDisposeSprite(@sprites,"player#{partyI}")
end
@previewSecondParty = false
pbDisposeSprite(@sprites,"partybar1")
end


VERSION 15.1:


def partyAnimationRestart(doublePreviewTop,previewSecondParty=false)
@doublePreviewTop=doublePreviewTop
@previewSecondParty=previewSecondParty
yvalue=114
yvalue-=50 if doublePreviewTop
pbAddSprite("partybarfoe",-400,yvalue,"Graphics/Pictures/battleLineup",@viewport)
@sprites["partybarfoe"].visible=true
@partyAnimPhase=0
end

def partyAnimationFade
frame=0
while(frame<24)
if @partyAnimPhase!=4
pbGraphicsUpdate
next
end
frame+=1
@sprites["partybarfoe"].x+=8
@sprites["partybarfoe"].opacity-=12
for i in 0...6
partyI = i
partyI += 6 if @previewSecondParty
@sprites["enemy#{i}"].opacity-=12
@sprites["enemy#{i}"].x+=8 if frame>=i*4
end
pbGraphicsUpdate
end
for i in 0...6
partyI = i
partyI += 6 if @previewSecondParty
pbDisposeSprite(@sprites,"player#{i}")
end
@previewSecondParty = false
pbDisposeSprite(@sprites,"partybarfoe")
end


In PokeBattle_Battle


After line:

OLD VERSION & VERSION 15.1 --> opponent=pbGetOwner(index)

Add lines

OLD & 15.1 VERSION:
previewSecondParty = index==3 && @opponent.is_a?(Array) && pbSecondPartyBegin(1)==6
@scene.partyAnimationRestart(index==1 && @doublebattle,previewSecondParty) if index != 2


Change:

OLD VERSION & VERSION 15.1 :
end pbRecallAndReplace(index,newenemy)

to

else
# You can change the time delay for double/Set Option here
timedelay=64 # Set Option
timedelay=96 if @doublebattle
for i in 0...timedelay
@scene.pbGraphicsUpdate
end
end
@scene.partyAnimationFade if index!=2
pbRecallAndReplace(index,newenemy)
 
Opponent Team Preview between switches v.14/15

Respecting forum rules, I create this new thread, because this old one (https://www.pokecommunity.com/showthread.php?t=348295) is "expired" due of the 30 days limit.


After I compared version 14 and 15 script section, I saw there are many things in common, excluding, of course, updates. One thing missing to both, however, is the view of the Opposing Bar, during a switch.
How can I introduce this feature in script section? I also watched the tutorial by FL, in the wiki, but it's updated to version 12/13. Thank you all for replies!
 
Back
Top