Edited: Sounds requirements
Hi Guys,
after some work I could take the pal selector usable with characters such as Infinite's Style as an Universal feature for Ikemen,
It requires you to add
Sound: 12345,0 to common.snd (being this sound the cursor moving sound)
Sound: 12345,1 to Common.snd (being this sound the cursor moving sound)
and animation 1234599 to your fightsfx files (ben that the animation for the pal selector)
Also It requieres you to define const(lastpal) on your config file (I ve set mine to 12) and define it on chars with less than 12 pals.
The way the code is done also requires you to manually give an unique id to each character to avoid duplicates/clones in the pal selector:
you must do it in the first lines following the example:
if Name="Ryu" {mapset{map:"PalNameId";value:1;}}
if Name="Ken" {mapset{map:"PalNameId";value:2;}}
if Name="Dante4" {mapset{map:"PalNameId";value:3;}}
If someone can improve this code it will be very much welcome.
pd: so far tested on single and tag modes,
should work fine on simul and turns
I will only be uplading the code so anyone can use their own animations or sounds
[StateDef -3]
if Name="Ryu" {mapset{map:"PalNameId";value:1;}}
if Name="Ken" {mapset{map:"PalNameId";value:2;}}
if Name="Dante4" {mapset{map:"PalNameId";value:3;}}
if
numhelper(1234599){
assertspecial{flag:intro}}
if
(playerno=2 || playerno=4 || playerno=6 || playerno=8 ) &&
map(fvar36)=[1,const(lastpal)] #fvar(36)=the number of pals available
&& numhelper(1234599)=0
&&
(
map(PalNameId)=enemy,map(PalNameId)&& map(fvar36)=enemy,map(fvar36) && enemy,numhelper(1234599)=0||
map(PalNameId)=enemy(1),map(PalNameId)&& map(fvar36)=enemy(1),map(fvar36) && enemy(1),numhelper(1234599)=0||
map(PalNameId)=enemy(2),map(PalNameId)&& map(fvar36)=enemy(2),map(fvar36) && enemy(2),numhelper(1234599)=0||
map(PalNameId)=enemy(3),map(PalNameId)&& map(fvar36)=enemy(3),map(fvar36) && enemy(3),numhelper(1234599)=0||
map(PalNameId)=enemy(4),map(PalNameId)&& map(fvar36)=enemy(4),map(fvar36) && enemy(4),numhelper(1234599)=0
)
&& map(fvar36)=const(lastpal)
{
RemapPal{source:1,1;dest:1,1;}
}
if
(playerno=2 || playerno=4 || playerno=6 || playerno=8 ) &&
map(fvar36)=[1,const(lastpal)] #fvar(36)=the number of pals available
&& numhelper(1234599)=0
&&
(map(PalNameId)=enemy,map(PalNameId)&& map(fvar36)=enemy,map(fvar36) && enemy,numhelper(1234599)=0||
map(PalNameId)=enemy(1),map(PalNameId)&& map(fvar36)=enemy(1),map(fvar36) && enemy(1),numhelper(1234599)=0||
map(PalNameId)=enemy(2),map(PalNameId)&& map(fvar36)=enemy(2),map(fvar36) && enemy(2),numhelper(1234599)=0||
map(PalNameId)=enemy(3),map(PalNameId)&& map(fvar36)=enemy(3),map(fvar36) && enemy(3),numhelper(1234599)=0||
map(PalNameId)=enemy(4),map(PalNameId)&& map(fvar36)=enemy(4),map(fvar36) && enemy(4),numhelper(1234599)=0)
&& map(fvar36)<const(lastpal)
{
RemapPal{source:1,1;dest:1,map(fvar36)+1;}
}
#doubt
IgnoreHitPause if
numhelper(1234599) &&
helper(1234599),map(fvar36)=[1,const(lastpal)]{
mapset{map:"fvar36";value: helper(1234599),map(fvar36);}
}
IgnoreHitPause if
numhelper(1234599)
&&
helper(1234599),map(fvar36)=[1,const(lastpal)]
{remappal
{source:1,1;
dest:1,map(fvar36);
}
}
ignorehitpause if
matchno>1&&!AILevel
{remappal
{source:1,1;
dest:1,map(fvar36);
}
}
#[StateDef 5900]
if
1&&!numhelper(1234599)&&!AILevel&&numenemy && stateno = 5900 &&! ishelper &&
roundno = 1 && matchno=1 && !(TeamMode = simul) && !(enemy, TeamMode = simul)
{helper{id:1234599;stateno:1234599;facing:facing;ownpal:1;size.xscale:.5;size.yscale:.5;}
}
if
1&&!numhelper(1234599)&&!AILevel&&numenemy && stateno = 5900 &&! ishelper &&
map(fvar36)=0
{helper{id:1234599;stateno:1234599;facing:facing;ownpal:1;size.xscale:.5;size.yscale:.5;}
}
if
1&&!numhelper(1234599)&&!AILevel&&numenemy && stateno = 5900 &&! ishelper &&
(TeamMode = turns)&& !roundsexisted && (enemy,roundsexisted)
{helper{id:1234599;stateno:1234599;facing:facing;ownpal:1;size.xscale:.5;size.yscale:.5;}
}
if
stateno = 5900
{mapset{map:"palturn";value:1;}
}
if
stateno = 5900
{teammapset{map:"palturn";value:1;}
}
ignorehitpause if AILevel
{remappal{source:1,1;dest:1,palno;}}
#if
#roundno = 1
#{changestate{value:190;}}
#if
#RoundsExisted=0 && TeamMode = Turns
#{changestate{value:190;}}
[StateDef 1234599;
physics: N;
anim: f1234599;
sprpriority: 99999;]
velset{x:0;y:0;}
assertspecial{flag:intro;flag:noshadow;flag:RoundNotSkip;}
#mapset{map:"mTeamMode";value:TeamMode;}
DisplayToClipboard{text:"Member is %d turn is %f time %f mode $i";params:parent,MemberNo,root,map(palturn),map(fvar38),teammode=tag;}
if parent,MemberNo!= root,map(palturn) && TeamMode = Tag
{
assertspecial{flag:invisible;}
}
ignorehitpause if
!time
{posset{x:root,pos x;y:-35;}}
if
!time{
mapset{map:"fvar38";value:600;}
}
if
!time{
mapset{map:"fvar36";value:root,palno;}
}
if
map(fvar36)>const(lastpal)
{mapset{map:"fvar36";value:1}
}
if
map(fvar36)=0
{mapset{map:"fvar36";value:const(lastpal);}
}
if
map(fvar39)=2
{playsnd{value: F12345,0;volumescale:100;channel:20;}
}
if parent,MemberNo= root,map(palturn) && TeamMode = tag {
mapadd{map:"fvar38";value:-1;}}
if TeamMode != tag {
mapadd{map:"fvar38";value:-1;}}
#tag
persistent(0) if
ishelper(1234599)&& parent,MemberNo= root,map(palturn) && TeamMode = tag &&
(root,command="a"||root,command="b"||root,command="c"||root,command="x"||root,command="y"||root,command="z"||roundstate=2)
{playsnd{value: F12345,1;volumescale:100;channel:20;}
}
if
map(fvar39)=0 && map(fvar38)<55
&& root,MemberNo= root,map(palturn) && TeamMode = tag &&
(root,command="holdup"||root,command="holddown"||root,command="holdback"||root,command="holdfwd")
{mapadd{map:"fvar38";value:30;}
}
if
map(fvar39)=0
&& parent,MemberNo= root,map(palturn) && TeamMode = tag &&
(root,command="holdup" ||root,command="holdfwd")
{mapadd{map:"fvar36";value:1;}
}
if
map(fvar39)=0
&& parent,MemberNo= root,map(palturn) && TeamMode = tag &&
(root,command="holddown"||root,command="holdback")
{mapadd{map:"fvar36";value:-1;}
}
if parent,MemberNo= root,map(palturn) && TeamMode = tag &&
(root,command="holdup"||root,command="holddown"||root,command="holdback"||root,command="holdfwd")&&!fvar(39)||fvar(39)
{mapadd{map:"fvar39";value:1;}
}
#normal
persistent(0) if
ishelper(1234599) && TeamMode != tag &&
(root,command="a"||root,command="b"||root,command="c"||root,command="x"||root,command="y"||root,command="z"||roundstate=2)
{playsnd{value: F12345,1;volumescale:100;channel:20;}
}
if
map(fvar39)=0 && map(fvar38)<55
&& TeamMode != tag &&
(root,command="holdup"||root,command="holddown"||root,command="holdback"||root,command="holdfwd")
{mapadd{map:"fvar38";value:30;}
}
if
map(fvar39)=0
&& TeamMode != tag &&
(root,command="holdup" ||root,command="holdfwd")
{mapadd{map:"fvar36";value:1;}
}
if
map(fvar39)=0
&& TeamMode != tag &&
(root,command="holddown"||root,command="holdback")
{mapadd{map:"fvar36";value:-1;}
}
if TeamMode != tag &&
(root,command="holdup"||root,command="holddown"||root,command="holdback"||root,command="holdfwd")&&!fvar(39)||fvar(39)
{mapadd{map:"fvar39";value:1;}
}
if
map(fvar39)>= 23
{mapset{map:"fvar39";value:0;}
}
persistent(2)
if
ishelper(1234599) && map(fvar38)=0 && TeamMode != tag
{destroyself{}
}
#turns or single
#persistent(0) if
#ishelper(1234599) && TeamMode != tag &&
#(root,command="a"||root,command="b"||root,command="c"||root,command="x"||root,command="y"||root,command="z"||roundstate=2)
#{TeamMapAdd{map:"palturn";value:1;}}
if
ishelper(1234599) && TeamMode != tag &&
(root,command="a"||root,command="b"||root,command="c"||root,command="x"||root,command="y"||root,command="z"||roundstate=2)
{
destroyself{}
}
#tag
persistent(0) if
ishelper(1234599) && parent,MemberNo= root,map(palturn) && map(fvar38)<580 && TeamMode = tag &&
(root,command="a"||root,command="b"||root,command="c"||root,command="x"||root,command="y"||root,command="z"||roundstate=2)
{TeamMapAdd{map:"palturn";value:1;}
destroyself{}
}
persistent(0)
if
ishelper(1234599) && map(fvar38)=0 && TeamMode = tag
{
TeamMapAdd{map:"palturn";value:1;}
destroyself{}
}
# persistent(0)
# if
# ishelper(1234599) && parent,MemberNo= root,map(palturn) && map(fvar38)<580 && TeamMode = tag &&
# (root,command="a"||root,command="b"||root,command="c"||root,command="x"||root,command="y"||root,command="z"||roundstate=2)
# {parentmapset{map:"arcadepal";value:map(fvar36);}}
# if
# ishelper(1234599) && parent,MemberNo<root,map(palturn) && TeamMode = tag && parent,map(arcadepal)>0 &&
# (root,command="a"||root,command="b"||root,command="c"||root,command="x"||root,command="y"||root,command="z"||roundstate=2)
# {destroyself{}}
if
ishelper(1234599) && root,AILevel
{destroyself{}}