UPLOAD, SHARE, PRESERVE MUGEN FOR ETERNITY!

Results 1 to 14 of 14

Thread: Linked skill Dillema

  1. #1
    Join Date
    Sep 2018
    Location
    Posts
    117
    Uploads
    4
    Comments
    20

    Default Linked skill Dillema

    Hi Guys

    Just curious about this one

    I made SF5's nash Stealth dash into Justice Shell or Justice Corridor with the following code at the end of Stealth dash ins the specials state file

    [State 1461, Justice Shell]
    type=ChangeState
    triggerall= time>=8&&anim=1400&&p2dist x>=0
    trigger1=!AILevel&&(command="a"|command="b"|comman d="c")
    trigger2=AILevel&&(P2bodydist x<=50)&&(enemynear,statetype!=C)&&random<=550
    value=1190

    [State 1461, Justice Corridor]
    type=ChangeState
    triggerall= time>=8&&anim=1400&&p2dist x>=0
    trigger1=!AILevel&&(command="x"|command="y"|comman d="z")
    trigger2=AILevel&&(P2bodydist x<=50)&&(enemynear,statetype!=A)&&random<=550
    value=1195

    The AI in the .cmd file for Stealth dash is :

    [State -1, Stealth Dash]
    type=changestate
    value=1461
    triggerall = var(40)
    triggerall= AILevel && numenemy
    triggerall= roundstate=2 && statetype!=A
    triggerall= p2bodydist x>=70 && (p2statetype!=L || p2stateno=5120)
    trigger1= ctrl && P2movetype = A && (P2stateNo=[1000,1099])&& Random <100
    trigger2= ctrl && (p2bodydist x=[70,200]) && Random<50

    The prob is is it works 100% fine manually but the AI won't execute no matter what. To compensate I wrote code in the .cmd file's AI section for those 2 skills (Justice Corridor/Shell)

    Did I do something wrong in the code above?



  2. #2
    Join Date
    Jul 2018
    Location
    Posts
    163
    Uploads
    0
    Comments
    0

    Default Re: Linked skill Dillema

    [State -1, Stealth Dash]
    type=changestate
    value=1461
    triggerall = var(40)
    triggerall= AILevel && numenemy
    triggerall= roundstate=2 && statetype!=A
    triggerall= p2bodydist x>=70 && (p2statetype!=L || p2stateno=5120)
    trigger1= ctrl && P2movetype = A && (P2stateNo=[1000,1099])&& Random <100
    trigger2= ctrl && (p2bodydist x=[70,200]) && Random<50


    -Unless he has control during states 1000-1099 he will never execute trigger1
    -Can you give me the purpose of that variable? Is it an A.I. check?
    -Low chances of A.I. execution intended? You could also validate the changes against the current A.I. level to make it feel more natural.
    -If you are gonna check certain opponent distances then you need to exclude the condition from the Triggerall as it might conflict with your specific trigger ones.


    My initial suggestion is to start simple and add conditions one at a time to see how it works. The triggeralls seem to be fine. According to code, you want him to execute it when the opponent is either standing or crouching during active match while the opponent is at a horizontal distance of 70 or above while in the middle of a state between 1000-1099.

    Update: please disregard the comment about the states, you are validating the enemy's states in order to counter them. You can leave the orange code as it is.
    Last edited by Moldredd; Oct 24, 2018 at 14:34.
    Do not ask me for God Ken.

    WIPS
    SCWU Rario(Update) - 4%
    SCWU Sin - 20%
    Super Castlevania IV Stage - 0%

  3. #3
    Join Date
    Sep 2018
    Location
    Posts
    117
    Uploads
    4
    Comments
    20

    Default Re: Linked skill Dillema

    Quote Originally Posted by Moldredd View Post
    [State -1, Stealth Dash]
    type=changestate
    value=1461
    triggerall = var(40)
    triggerall= AILevel && numenemy
    triggerall= roundstate=2 && statetype!=A
    triggerall= p2bodydist x>=70 && (p2statetype!=L || p2stateno=5120)
    trigger1= ctrl && P2movetype = A && (P2stateNo=[1000,1099])&& Random <100
    trigger2= ctrl && (p2bodydist x=[70,200]) && Random<50


    -Unless he has control during states 1000-1099 he will never execute trigger1
    -Can you give me the purpose of that variable? Is it an A.I. check?
    -Low chances of A.I. execution intended? You could also validate the changes against the current A.I. level to make it feel more natural.
    -If you are gonna check certain opponent distances then you need to exclude the condition from the Triggerall as it might conflict with your specific trigger ones.


    My initial suggestion is to start simple and add condition one at a time to see how it works. The triggeralls seem to be fine. According to code, you want him to execute it when the opponent is either standing or crouching during active match while the opponent is at a horizontal distance of 70 or above while in the middle of a state between 1000-1099.
    Oh sorry this char is a 2 in one by trololo
    Var(40) is for nash mode

    hmm I need to correct my code for the orange section and red.

    The thing is he executes the stealth dash but not the skills that follow (justice Shell/corridor)

  4. #4
    Join Date
    Jul 2018
    Location
    Posts
    163
    Uploads
    0
    Comments
    0

    Default Re: Linked skill Dillema

    Another thing worth checking out is that if your initial move puts you into a flying state then none of the trigger will execute as you are limiting that StateType in your triggerall. I'm not familiar with the move so if this is not the case then please disregard this.


    UPDATE: edited my first post. Ignore my orange suggestions.

    UPDATE2: The A.I. code is lacking the condition related to executing while in your desired state.
    Last edited by Moldredd; Oct 24, 2018 at 14:50.
    Do not ask me for God Ken.

    WIPS
    SCWU Rario(Update) - 4%
    SCWU Sin - 20%
    Super Castlevania IV Stage - 0%

  5. #5
    Join Date
    Sep 2018
    Location
    Posts
    117
    Uploads
    4
    Comments
    20

    Default Re: Linked skill Dillema

    The toon just dashes forward (no "y" entries) to opponent.

    With the ai entries into the .cmd file the 2 skills (Justice Corridor/shell) follow perfect from the dash skill but not with the changestate in the .st file in op.
    I copied it from another character (Gouken) that worked

    The reason why I made the random low is other wise he spams its and chain combos to death.

  6. #6
    Join Date
    Jul 2018
    Location
    Posts
    163
    Uploads
    0
    Comments
    0

    Default Re: Linked skill Dillema

    Gotcha. I'm having a headache right now and apologies if I'm misunderstanding you.

    You want the character to execute the moves out of the Stealth Dash?

    If so just add this line to the Justice Shell and Justice Corridor states:

    trigger3=AILevel&&time>=8&&(P2bodydist x<=50)&&(enemynear,statetype!=A)&&StateNo=1461&&ra ndom<=550

    Let me know if this fixes it. If it does don't forget to tweak the random number to your liking.
    Last edited by Moldredd; Oct 24, 2018 at 14:57.
    Do not ask me for God Ken.

    WIPS
    SCWU Rario(Update) - 4%
    SCWU Sin - 20%
    Super Castlevania IV Stage - 0%

  7. #7
    Join Date
    Sep 2018
    Location
    Posts
    117
    Uploads
    4
    Comments
    20

    Default Re: Linked skill Dillema

    Quote Originally Posted by Moldredd View Post
    Gotcha. I'm having a headache right now and apologies if I'm misunderstanding you.
    No need to apologize, I really appreciate your help

    Quote Originally Posted by Moldredd View Post
    You want the character to execute the moves out of the Stealth Dash?
    Yes

    Quote Originally Posted by Moldredd View Post
    If so just add this line to the Justice Shell and Justice Corridor states:

    trigger3=AILevel&&time>=8&&(P2bodydist x<=50)&&(enemynear,statetype!=A)&&StateNo=1461&&ra ndom<=550

    Let me know if this fixes it. If it does don't forget to tweak the random number to your liking.
    That's my dilemma .
    I did do something like that and it works. But other characters don't and put it in the .st file only.

  8. #8
    Join Date
    Jul 2018
    Location
    Posts
    163
    Uploads
    0
    Comments
    0

    Default Re: Linked skill Dillema

    Quote Originally Posted by kai_jph View Post
    No need to apologize, I really appreciate your help

    That's my dilemma .
    I did do something like that and it works. But other characters don't and put it in the .st file only.
    Could you elaborate on the other characters' issue? Maybe I could help.
    Do not ask me for God Ken.

    WIPS
    SCWU Rario(Update) - 4%
    SCWU Sin - 20%
    Super Castlevania IV Stage - 0%

  9. #9
    Join Date
    Sep 2018
    Location
    Posts
    117
    Uploads
    4
    Comments
    20

    Default Re: Linked skill Dillema

    Quote Originally Posted by Moldredd View Post
    Could you elaborate on the other characters' issue? Maybe I could help.
    If you take gouken for example
    he does a leap move (Hyaki shu) that can link into other moves
    His st file ends with this

    [State 1400, Change]
    type=ChangeState
    triggerall=animelemtime(8)>=0&&numenemy
    trigger1=!AILevel&&((command="x"&&command="y")|(co mmand="x"&&command="z")|(command="y"&&command="z") )
    trigger2=AILevel&&(P2bodydist x<=35)&&(enemynear,statetype=S)&&random<=250
    value=1430
    [State 1400, Change]
    type=ChangeState
    triggerall=animelemtime(8)>=0&&numenemy
    trigger1=!AILevel&&(command="x"|command="y"|comman d="z")
    trigger2=AILevel&&(enemynear,Movetype=A)&&(P2bodyd ist x<=35)&&random<=200
    value=1410
    [State 1400, Change]
    type=ChangeState
    triggerall=animelemtime(8)>=0&&numenemy
    trigger1=!AILevel&&(command="a"|command="b"|comman d="c")
    trigger2=AILevel&&(P2bodydist x<=35)&&random<=300
    value=1420

    Those 3 states are not in his .cmd file in the AI section (just the Hyaki shu move) but they still work.

    I'm just curious how or if the AI is programmed in another file maybe
    Last edited by kai_jph; Oct 24, 2018 at 15:54.

  10. #10
    Join Date
    Jul 2018
    Location
    Posts
    163
    Uploads
    0
    Comments
    0

    Default Re: Linked skill Dillema

    As long as those states exist in his CNS files then it should be fine. These codes are just state callers, they are calling the corresponding states from the CNS file (1410, 1420, 1430). If they exist there then it should work as usual but the moment they are absent from the CNS files, you will be greeted by a nice debug error message in your screen and your character will get stuck in limbo.
    Do not ask me for God Ken.

    WIPS
    SCWU Rario(Update) - 4%
    SCWU Sin - 20%
    Super Castlevania IV Stage - 0%

  11. #11
    mulambo is offline wicked and toxic user banned for repeated defamation, spreading plain lies with clear intent to damage people's reputation and/or ruin people's motivation
    Join Date
    Aug 2016
    Location
    Posts
    1,733
    Uploads
    70
    Comments
    55

    Default Re: Linked skill Dillema

    beside the yellow-on-white "finger-in-the-eye" font usage, I'd say it writes "dilemma", not "dillema"

    I'm just curious how or if the AI is programmed in another file maybe
    usually all files are listed in the .DEF file, pretty obvious.
    If the AI doesn't trigger them, it means the code of the [State -1] is too complex or it doesn't just check the random values (so you probably have to wait until the CPU actually performs x, y or z during the first state).
    Probably you have to make the ChangeState in the first state simpler (without all those strange values, but only "command" triggers and without the "random" factor if you want it to be executed no matter what).
    Example:


    [State 1461, Justice Corridor]
    type=ChangeState
    trigger1= time > 20 ; set this the time lapse in which the command can be executed
    trigger1= command = "x"
    value=1195

    [State 1461, Justice Shell]
    type=ChangeState
    triggerall= time > 20 ; set this the time lapse in which the command can be executed
    trigger1= command = "y" ; or any other
    trigger2= command = "z" ; or any other
    value=1190

    this way it should perform justice corridor when player presses x, and justice shell for y and z
    it's up to CPU to press those buttons, I guess.
    in winane's method, though, you can directly set a changestate in CMD according to random trigger and stateno trigger (in this case stateno=1461). But I guess your char doesn't use winane's method.

  12. #12
    Join Date
    Sep 2018
    Location
    Posts
    117
    Uploads
    4
    Comments
    20

    Default Re: Linked skill Dillema

    Quote Originally Posted by mulambo View Post
    beside the yellow-on-white "finger-in-the-eye" font usage, I'd say it writes "dilemma", not "dillema"
    Sorry My spelling is terrible

    Quote Originally Posted by mulambo View Post
    usually all files are listed in the .DEF file, pretty obvious.
    If the AI doesn't trigger them, it means the code of the [State -1] is too complex or it doesn't just check the random values (so you probably have to wait until the CPU actually performs x, y or z during the first state).
    Probably you have to make the ChangeState in the first state simpler (without all those strange values, but only "command" triggers and without the "random" factor if you want it to be executed no matter what).
    Example:


    [State 1461, Justice Corridor]
    type=ChangeState
    trigger1= time > 20 ; set this the time lapse in which the command can be executed
    trigger1= command = "x"
    value=1195
    Thanks, did that and it works better now although I made the time >0. With >20 I can only hit the moves when I'm in the opp's face

    Pretty much redid codes for AI and Manual in separate change states for each

    - - - Updated - - -

    Quote Originally Posted by Moldredd View Post
    As long as those states exist in his CNS files then it should be fine. These codes are just state callers, they are calling the corresponding states from the CNS file (1410, 1420, 1430). If they exist there then it should work as usual but the moment they are absent from the CNS files, you will be greeted by a nice debug error message in your screen and your character will get stuck in limbo.
    Finally got it right.
    Simplified the 1st trigger like Mulambo said and did a separate change state for manual and AI

  13. #13
    Join Date
    Jul 2018
    Location
    Posts
    163
    Uploads
    0
    Comments
    0

    Default Re: Linked skill Dillema

    Yeah, making the triggers simple and building up from there tends to be the right way most of the time. Hence, the reason of me suggesting on it on my first post.

    Glad you found the solution to the problem.
    Last edited by Moldredd; Oct 25, 2018 at 11:38. Reason: Sauce baby!
    Do not ask me for God Ken.

    WIPS
    SCWU Rario(Update) - 4%
    SCWU Sin - 20%
    Super Castlevania IV Stage - 0%

  14. #14
    Join Date
    Sep 2018
    Location
    Posts
    117
    Uploads
    4
    Comments
    20

    Default Re: Linked skill Dillema

    Quote Originally Posted by Moldredd View Post
    Yeah, making the triggers simple and building up from there tends to be the right way most of the time. Hence, the reason of me suggesting on it on my first post.

    Glad you found the solution to the problem.
    Thanks

    Its a bad habit of mine IRL. I always start complicated and fix when it doesn't work instead of the other way around

Similar Threads

  1. Life Steal Skill !
    By acmadianguc005 in forum MUGEN Configuration Help
    Replies: 0
    Last Post: Aug 08, 2018, 22:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •