@NEWB I'm sorry but I am using smart phone to post here and cannot use my PC for 4 days. When I return home, I will post the script.
@Tailsmiles249 It's an inherent issue. The AI system cancels execution when the character performs attack. To avoid it, you have to edit AIPD to load only 1 routine when on stage. However, it means you have to write all the moves in one script.
It's very personal reason that I have club activity event in my university. After that, I return home for 1 week. I usually work using desktop PC so I cannot touch it.
It doesn't always return ledge coordinate. Stages like Summit don't have ledge and this command returns the left or right end of the floor on which CPU is. If you want to get coordinates of ledge, use GetNearestHangable. I didn't know the term 'ledge' when I found this command so I named like this.
@ NaOH My previous version had many problems like complex syntax, UI bugs, and this is the largest, lacked much information which was necessary to implement AI. This version solves these problems. So I hope many people use this.
@Tailsmiles249 If you would like to know distance between platform and the CPU, "GetNearestCliff" is useful. It returns nearest cliff coordinates into specified variables. For example, GetNearestCliff var3 results in that var3=nearest cliff x coordinate, and var4=nearest cliff y coordinate. If the stage is flat, this will work fine with your code.
By the way, CPU doesn't learn players' behavior. In AIMain and ASM code, such part doesn't exist. Indeed, CPU spams one action in certain situations, which is often taken advantage of by players.
@DarkPika I'm a little feared by your word 'complex' But I will do my best when you give me feedback though I cannot touch my PC for 2 weeks from now.
@NEWB Yes, please place correspond part there. To be more specific, lines after "label _2" and before "Button B". However the code isn't tested so you may have to do trial-error.
@NaOH I saw your thread for the first time. I'm very glad to see that many people were interested in AI coding. I updated AIScriptpad recently. This is the support thread:http://forums.kc-mm.com/index.php?topic=62818.0
By the way, I'm afraid to say but the code doesn't make CPU smart. CPU's behavior is defined in AIMain scripts which are shared among all the levels. Level value is used like this : Some moves are disabled in low levels and level 9 unlocks all the moves. Also, AIMain scripts are adjusted to work best at level 9.
As I wrote in tutorial, AIScriptpad loads FitChar(Motion)Etc.pac, common3.pac, and Fighter.pac. After the program loads these pacs, it automatically exports scripts. After that, you can edit them. After you make a project, you won't have to do these steps next time.
No, I have little time now and didn't implement them. To implement direction change, I would write like this: label _2 if Rnd < 0.5 //50% right var4=1 else //50% left var4=-1 endif label ... //the same as previous post Button B AbsStick var4 1 //input stick
To implement only 1 input, I would write like this: label _2 ... GetNearestCliff var0 //var0=Nearest Cliff X coordinate, var1=Nearest Cliff Y coordinate if YCoord < var1 Button B endif
@Akeno-sempai Yes, this must be. AIS is the only AI editor that is published.
@DarkPika Thank you. If you have any requests, feel free posting it!
@NEWB https://www.dropbox.com/s/2yeumu4b0pogs4e/ai_mario.pac Please replace FitMarioMotionEtc/FitMarioEtc/ai_mario with this. All I did is to write 1 line to a script from Fighter.pac which handles recovery. This is the part of source:
Code:
label _2 if !(InAir) || Falling Finish endif GetRndPointOnStage var0 if !(FrameGE 4) var3=var1+(-10) if YCoord < var3 GetNearestCliff var0 endif endif if XCoord < var0 AbsStick 1 else AbsStick (-1) endif Button B if FrameGE 25 Finish endif Return
This is a section which deals with the situation after using up B. I added this line:Button B With this line, Mario holds B button while using up B. I tested this code and confirmed Mario used second up B.
CPU's taunt is controlled by the system and cannot be controlled by scripts by default. Also, to know variables used in PSA, we have to make codes to get the information. But yes, you could make Goku use Kamehameha using this program if it doesn't require complicated input.