Qhimm.com Forums

Miscellaneous Forums => Gameplay => Topic started by: Hazedge on 2018-08-09 23:55:44

Title: [FFVIII-PCSteam] Enemy AI? <Solved>
Post by: Hazedge on 2018-08-09 23:55:44
Hey guys, I wanted to know which program I can see and write the monsters AI?
Title: Re: [FFVIII-PCSteam] Enemy AI?
Post by: JWP on 2018-08-10 17:11:27
There's a beta version of Ifrit that has been modified to make it possible to view/edit AI but note that it is pretty buggy at present.
see here (http://forums.qhimm.com/index.php?topic=8741.msg242070#msg242070)
Title: Re: [FFVIII-PCSteam] Enemy AI?
Post by: Hazedge on 2018-08-11 16:54:34
Hey guys, I wanted to modify something with Seifer 2nd battle.
When he lands his first dialogue, I wanted him to use an action but I dont know where to put the command.

Spoiler: show
if (self.varDC != 0) {
    return
}
if (rand() % 3 == 0) {
    return
}
if (self.hp < 3) {
    if (self.varDD == 1) {
        if (rand() % 3 == 0) {
            if (rand() % 3 == 0) {
                targetadv(0, 200, 0, 229)
                domoveid(4)
            }
            else {
                target(201)
                domoveid(0)
            }
        }
        else if (rand() % 2 == 0) {
            target(201)
            domoveid(5)
        }
        else if (rand() % 3 != 0) {
            target(200)
            domoveid(1)
        }
        else {
            if (self.status == POISON) {
                if (rand() % 2 == 0) {
                    target(200)
                    domoveid(1)
                    return
                }
            }
            if (self.status == BLIND) {
                if (rand() % 3 == 0) {
                    target(200)
                    domoveid(1)
                    return
                }
            }
            if (self.status == SILENCE) {
                if (rand() % 3 == 0) {
                    target(200)
                    domoveid(1)
                    return
                }
            }
            target(200)
            domoveid(1)
        }
    }
    else if (rand() % 3 == 0) {
        if (rand() % 3 == 0) {
            targetadv(0, 200, 0, 229)
            domoveid(3)
        }
        else {
            target(201)
            domoveid(0)
        }
    }
    else if (rand() % 2 == 0) {
        if (rand() % 3 != 0) {
            target(200)
            domoveid(1)
        }
        else {
            if (self.status == POISON) {
                if (rand() % 2 == 0) {
                    target(200)
                    domoveid(1)
                    return
                }
            }
            if (self.status == BLIND) {
                if (rand() % 3 == 0) {
                    target(200)
                    domoveid(1)
                    return
                }
            }
            if (self.status == SILENCE) {
                if (rand() % 3 == 0) {
                    target(200)
                    domoveid(1)
                    return
                }
            }
            target(200)
            domoveid(1)
        }
    }
    else {
        target(201)
        domoveid(5)
    }
}
else if (self.hp < 6) {
    if (rand() % 2 == 0) {
        if (self.status == POISON) {
            if (rand() % 2 == 0) {
                target(200)
                domoveid(1)
                return
            }
        }
        if (self.status == BLIND) {
            if (rand() % 3 == 0) {
                target(200)
                domoveid(1)
                return
            }
        }
        if (self.status == SILENCE) {
            if (rand() % 3 == 0) {
                target(200)
                domoveid(1)
                return
            }
        }
    }
    if (self.varDD == 0) {
        if (character.alive == SQUALL) {
            self.varDD = 1
            target(200)
            domoveid(9)
            target(0)
            domoveid(5)
            return
        }
    }
    if (rand() % 3 != 0) {
        target(201)
        domoveid(0)
    }
    else if (rand() % 3 == 0) {
        target(201)
        domoveid(5)
    }
    else {
        targetadv(0, 200, 0, 229)
        domoveid(3)
    }
}
else {
    if (self.varDF <= 3) {
        self.varDF += 1
        if (self.varDF == 3) {
            self.varDF += 2
            target(200)
            domoveid(6)
        }
    }
    if (rand() % 2 == 0) {
        if (self.status == POISON) {
            if (rand() % 2 == 0) {
                target(200)
                domoveid(1)
                return
            }
        }
        if (self.status == BLIND) {
            if (rand() % 3 == 0) {
                target(200)
                domoveid(1)
                return
            }
        }
        if (self.status == SILENCE) {
            if (rand() % 3 == 0) {
                target(200)
                domoveid(1)
                return
            }
        }
    }
    target(201)
    choose(0, 0, 3)
}


Can someone tell me where I can put the target(200) and domoveid(1)?
Title: Re: [FFVIII-PCSteam] Enemy AI?
Post by: Hazedge on 2018-08-23 03:52:24
I've got the info that Seifer and some few other enemies have some glitches about their AI, while with normal monsters it works normally.