Home Gallery Resources The Team Rules chat Login Register
Pages:  1 2 [3] 4 5
Author Topic: [AI coding]AIScriptpad2.0 Support Thread  (Read 22336 times)
0 Members and 1 Guest are viewing this topic.
NEWB
Intermediate Kitten
**
Offline Offline

Posts: 19


View Profile Awards
« Reply #30 on: September 16, 2013, 01:55:33 AM »


So bero, you basically exported AImario.pac with brawl box and opened it using the AIScriptpad?  As you can tell, I don't want to make AI from scratch, there are just some additions that I want to make.  Is this how I would take and edit the existing AI?
Logged

Bero
Expert Kitten
****
Offline Offline

Posts: 65

  • Awards Hot Topic

  • View Profile Awards
    « Reply #31 on: September 16, 2013, 02:05:04 AM »


    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.
    Logged

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3067

    complexity == fun

  • Awards Fiery Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #32 on: September 16, 2013, 08:15:55 AM »


    Thank you. If you have any requests, feel free posting it!

    indeed Wink

    I havn't installed it yet due to massive amounts of web cleanup and reorganization I'm trying to perform...
    (especially with my forum)

    but once I install it,
    I hope you don't mind me requesting convenience features. Smiley
    (some of them may be complex)
    Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    NEWB
    Intermediate Kitten
    **
    Offline Offline

    Posts: 19


    View Profile Awards
    « Reply #33 on: September 16, 2013, 10:13:29 AM »


    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

    However I didn't test these codes.

    So, do I edit what you edited to look this?  And when you say same as previous ost, I squeeze that in there?
    Logged

    Bero
    Expert Kitten
    ****
    Offline Offline

    Posts: 65

  • Awards Hot Topic

  • View Profile Awards
    « Reply #34 on: September 16, 2013, 01:57:43 PM »


    @DarkPika
    I'm a little feared by your word 'complex' Smiley
    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.
    Logged

    ??_?
    Attention. I have your Attention.
    Holy Kitten
    *
    Offline Offline

    Posts: 1618


    PM me or something

  • Awards KCMM Old Timer Sniper Fiery Topic Favorite'd Pin Collector

  • View Profile Awards
    « Reply #35 on: September 16, 2013, 05:44:43 PM »


    I heard there was a contest of which one would make the best CPU character... Is it with this program that the CPUs were "made"?
    That was mine from like 2 years ago back when v1.0 was released. Nobody submitted anything though.

    Good to see you bero, looking forward to some AI submissions in the vault soon
    Logged


    Tailsmiles249
    Advanced Kitten
    ***
    Offline Offline

    Posts: 32


  • Awards Star Hacker Active Contributor >9000 Diamond in the Rough Smash 3 Team

  • View Profile Awards
    « Reply #36 on: September 16, 2013, 05:47:44 PM »


    I managed to clean up my L-canceling code for Project M by a lot. It still only works for individual attacks but it's much made progress. Unfortunately, there are some issues when dealing with platforms. I would assume the Y Coordinate is relative to what's directly below a character. This is still a good thing since it won't end up only L-canceling at the very ground. However, when moving around, the Y coordinate (assuming I'm correct) changes drastically when moving over a platform (ground is lowest -> platform is lowest).

    Here's an example for Marth's Nair:


    Code:
    if FrameGE 1 && !(FrameGE 2)
        Button A
    endif
    if FrameGE 3 && !(FrameGE 24) && InAir
        if FrameGE 15 && !(FrameGE 16) && InAir  // Ideal Fast Fall Frame
            Stick 0 (-1)
        endif
        if YCoord <= 1  // L-cancel when close to the ground
            Button R
            Finish
        endif
    Return
    endif
    if FrameGE 24 || !(InAir)
        Finish
    endif
    Return
    Logged


    Bero
    Expert Kitten
    ****
    Offline Offline

    Posts: 65

  • Awards Hot Topic

  • View Profile Awards
    « Reply #37 on: September 16, 2013, 06:20:39 PM »


    @ 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.

    Have you already learned AI coding!?
    Logged

    Tailsmiles249
    Advanced Kitten
    ***
    Offline Offline

    Posts: 32


  • Awards Star Hacker Active Contributor >9000 Diamond in the Rough Smash 3 Team

  • View Profile Awards
    « Reply #38 on: September 16, 2013, 06:43:24 PM »


    In a sense I did; I can at least read it without much problems.

    So are you telling me "Cliff" doesn't refer to a ledge? It simply refers to an sort of floor?
    Logged


    Bero
    Expert Kitten
    ****
    Offline Offline

    Posts: 65

  • Awards Hot Topic

  • View Profile Awards
    « Reply #39 on: September 16, 2013, 07:05:31 PM »


    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.
    Logged

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3067

    complexity == fun

  • Awards Fiery Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #40 on: September 16, 2013, 07:41:15 PM »


    @DarkPika I'm a little feared by your word 'complex' Smiley But I will do my best when you give me feedback though I cannot touch my PC for 2 weeks from now.

    lol not in my terms of complexity, is what I mean. XD
    it's the normal terms of complexity, meaning things shouldn't be 50x more complex than average Wink
    (at least... this is what I hope for)

    and pardon my curiosity, but may I ask why?? ._.
    or would you rather feel better not explaining it??
    Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    Bero
    Expert Kitten
    ****
    Offline Offline

    Posts: 65

  • Awards Hot Topic

  • View Profile Awards
    « Reply #41 on: September 16, 2013, 08:05:23 PM »


    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.
    Logged

    NEWB
    Intermediate Kitten
    **
    Offline Offline

    Posts: 19


    View Profile Awards
    « Reply #42 on: September 16, 2013, 08:27:40 PM »


    So, I found where you made the change in 2040.as, only it said label _0 not 2.  I am now trying to change it.

    Post Merge: September 16, 2013, 09:09:58 PM
    Can you show me what the whole code should now look like, so I can compare?  Not sure I did it right...
    « Last Edit: September 16, 2013, 09:09:58 PM by NEWB » Logged

    Tailsmiles249
    Advanced Kitten
    ***
    Offline Offline

    Posts: 32


  • Awards Star Hacker Active Contributor >9000 Diamond in the Rough Smash 3 Team

  • View Profile Awards
    « Reply #43 on: September 18, 2013, 08:50:41 AM »


    Alright, I've redone my L-cancel code a bit, but I think I found the real issue: Looping. While it does seem that the code is looping, the AI will only press 'R' either on the 3rd frame or on a fast fall frame when close to the ground.

    Marth's Nair:

    Code:
    if FrameGE 1 && !(FrameGE 2)
        Button A
    endif
    if FrameGE 3 && !(FrameGE 24) && InAir
        GetNearestCliffR var0
        if FrameGE 15 && !(FrameGE 16) && InAir && !OutOfStage  // Ideal Fast fall frame
            Stick 0 (-1)
        endif
        if var1 <= 1  // L-cancel when close to the ground
            Button R
            Finish
        endif
    Return
    endif
    if FrameGE 24 || !(InAir)
        Finish
    endif
    Return
    « Last Edit: September 18, 2013, 08:56:19 AM by Tailsmiles249 » Logged


    Bero
    Expert Kitten
    ****
    Offline Offline

    Posts: 65

  • Awards Hot Topic

  • View Profile Awards
    « Reply #44 on: September 18, 2013, 03:22:25 PM »


    @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.
    Logged

    Pages:  1 2 [3] 4 5
    Print
    Jump to: