YesNoOk
avatar

UNIVERSAL PAL SELECTOR (Read 3206 times)

Started by germanvasquez, August 29, 2022, 05:31:20 pm
Share this topic:
UNIVERSAL PAL SELECTOR
#1  August 29, 2022, 05:31:20 pm
  • avatar
  • **
    • Honduras

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

Code:
[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{}}
Jesus loves you
Last Edit: August 29, 2022, 06:46:06 pm by germanvasquez
Re: UNIVERSAL PAL SELECTOR
#2  August 30, 2022, 09:34:36 pm
  • *
  • Coming on!
  • MUGEN/IKEMEN Creation
    • Mexico
    • sites.google.com/view/djpilous-stuff
Wow! How Can i Using The Ikemen GO Pallete Selector?
Who is The Name of The World.

NekoAzul
Re: UNIVERSAL PAL SELECTOR
#3  August 30, 2022, 11:47:07 pm
  • avatar
  • **
    • Honduras
Hi,

Well, you can add the whole code to one of the .zss files on save>config.json
or create a new file, paste the code and add to that section on config.json

In my case I created PALSELECTOR.ZSS and my config.json looks like this:

"CommonStates": [
      "data/action.zss",
      "data/dizzy.zss",
      "data/guardbreak.zss",
      "data/score.zss",
      "data/tagwithsuperpause.zss",
      "data/training.zss",
      "data/AUTOCOMBO.zss",
      "data/commonsgv.zss",
      "data/PALSELECTOR.zss",
      "data/superfin.cns",
      "data/wireattack.zss"

after that It works just like infinte chars pal selector. You must define your own Sounds and animations for hud. otherwise it will work like this:

https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fikemen-engine%2FIkemen-GO%2Ffiles%2F9294228%2Fvideo.zip&data=05%7C01%7C%7C905470ab26ae4e9988f908da7a42eb41%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637956725082961566%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=u6J5x2pjUjXWuBWqZoQLlnW2a1lYgftGmUnYzQzTUtY%3D&reserved=0



Jesus loves you