UPLOAD, SHARE, PRESERVE MUGEN FOR ETERNITY!
a missing category? request it here.

Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2016
    Location
    Posts
    4
    Uploads
    0
    Comments
    0

    Default Help a noob with AI Activation code

    Could someone give me an example on how to put this on the hardest difficulty:

    [State -1, AI Activation]
    type = varset
    triggerall = AILevel > 1
    triggerall = (roundstate = 2) && (var(59) = 0)
    trigger1 = Random <= (ifelse(AILevel =1,40,(AILevel-2)*100))
    v = 59
    value = 1

    [State -1, AI Deactivation]
    type = varset
    triggerall = AIlevel < 8
    triggerall = var(59) = 1
    trigger1 = Random > ((AILevel-2)*100)
    trigger2 = roundstate != 2
    v = 59
    value = 0

    I would really appreciate the help.

  2. #2
    Join Date
    Jun 2015
    Location
    Posts
    824
    Uploads
    236
    Comments
    185

    Default Re: Help a noob with AI Activation code

    This is only to activate and deactivate the AI but it can't change the difficulty level.
    If you don't know nothing about AI coding just increase the value for some random parameters in the cmd file, otherwise search for some tutorials online explaining how to create moves and combo chains for the AI.

  3. #3
    Join Date
    Aug 2016
    Location
    Posts
    4
    Uploads
    0
    Comments
    0

    Default Re: Help a noob with AI Activation code

    Oh I see, I assumed that it could change the difficulty since it says AI Level in it. Thanks

  4. #4
    Join Date
    Jun 2015
    Location
    Posts
    824
    Uploads
    236
    Comments
    185

    Default Re: Help a noob with AI Activation code

    If you want change the difficulty of a character made for mugen 1.0+ you can use this code under the statedef -1:

    ;var(59) = AI variable
    ;var(50) = Difficulty variable

    [State -1, AI ON]
    Type = VarSet
    TriggerAll = Var(59) < 1
    TriggerAll = RoundState=2
    Trigger1 = AILevel>0
    v = 59
    value= 1
    Ignorehitpause=1

    [State -1, AI OFF]
    Type=VarSet
    Trigger1=var(59)>0
    Trigger1=RoundState!=2
    Trigger2=!IsHelper
    Trigger2=AILevel=0
    v=59
    value=0
    Ignorehitpause=1

    [State -1]
    Type=VarSet
    Trigger1=1
    var(50)=(AILevel=1)*3+(AILevel=2)*7+(AILevel=3)*16 +(AILevel=4)*30+(AILevel=5)*58+(AILevel=6)*90+ (AILevel=7)*150+(AILevel=8)*300

    This will be used to activate and deactivate the AI and to increase or decrease it's difficulty depending on the trigger used in every command.
    Use "triggerall = var(59)>0" for the commands that you want the AI to utilize and "triggerall = var(59) = 0" for the commands that you want to be used only by the player.
    To tell the CPU which difficulty level to utilize use "triggerall = random<var(50)*X". Where X is a number being multiplied by the var(50) which is our difficulty level variable. Generally you will want to use a number around 1.2 for the moves you don't want to see often and around 1.8 for the moves that will be executed a lot, thus increasing the difficulty of the character AI.
    If the character already have an AI activation by human impossible commands just remove every one of these commands to use only what's needed, in this case this new method introduced in Mugen 1.0 which is easier to understand and to work with.
    This way is similar to the one you wrote but easier to be implemented in almost any character.

Similar Threads

  1. Noob wanting to put a game together
    By geoffpool in forum MUGEN Configuration Help
    Replies: 7
    Last Post: 14th October 2017, 07:24
  2. MK Cartoon styled Noob?
    By Vincent77 in forum Requests
    Replies: 2
    Last Post: 21st November 2015, 06:58

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
  •