FF VIII How to MOD?

  • Thread starter Thread starter Divatox
  • Start date Start date
Status
Not open for further replies.
Well after some time i begun to use IFRIT tool to mod and im loving it XD
Just came up 2 questions:

1-How do i make a enemie cast it self some magic? cure, double, triple etc (or its possible to make a enemie have like auto-cure, auto-triple) (because i tried haste on Glacial Eye lvl 8 and he cast the magic on me XD)

2-When i was testing some magics i notice that the magics gravija, catastrophe, ultima, meteor etc only have damaged 1 party member, why is that? Only enemie with high level can use those magics and inflict damage on the whole party?
 
Last edited:
If you want to do more complicated things, you might want to use a beta mod for Ifrit that I made here.
You'll be be able tu edit IA but be carefull with it, you should have some bugs using it.
 
Yes i was reading about it and trying to understand some things in there  :o
And still seaking some part even in the AI to correspond with support actions from the enemies (auto cast support magics)

And why high level magics cast from low enemies inflict damage only in 1 party member for ex:
Glacial Eye (my test subject XD) casting Ultima or Apocalypse and damage only Squall  ??? ???

That is eh only 2 things i want o learn to begin modding my FF8, enemies using support magic on them (not in my party) and magic damagind all party.

Would be cool see Edea cast Firaga and hit all the party XD
 
The reason that they are only hitting a single target is because of the parameter to the target function, see here
more specifically:
Code: [Select]
Code:
Target & Attack04 ... is the simple way to target something.    00->07 : Squall -> Edea (it should work up to Laguna, Kiros and Ward as well but I haven't check those)       00 : Squall         01 : Zell       02 : Irvine       03 : Quistis       04 : Linoa       05 : Selphie       06 : Seifer       07 : Edea        c8 :  self        c9 :  random enemy        cc :  all enemies        cd :  all allies        cf :  random ally
note that you would need to convert these to decimal values.

As Girl next door says, the AI is editable but I would run through the changes with a hex editor to check that nothing weird has happened, there are some weird issues at the moment and I'm not 100% sure what's causing them.
Also I'd like to clarify that gjoerulv wrote most of Ifrit since I don't like taking credit for the work of other people, I only wrote the part that deals with the AI.
 
I'm gonna go ahead and close this thread so as to discourage people from helping Divatox with his pirated copy of the game, as per the forum rules.

He bought the game! Yay! Unlocked!
 
Last edited:
Wow sorry I didn't know I didn't have to help him. ^^ But now that we can, I wrote a memo about targets:

200 self
201 one target
203 last ononent who attacked (used for the counterattacks)
204 all oponents
205 all allies
207 ally
208 multiple hits

Also, for the bugs, remember that it mostly occurs when you have 2 or more enemies in battle that you have change AI. If you isolate enemies, there won't be problems.

Hope my english is clear. ^^
 
That helped a little XD i guess i need to learn what some line means

self.hp ok
self.status ok
target ok
rand() % 3 != 0 ??? dont know
self.varDC = 0 ??? dont know
domoveid (2) ??? dont know

self.status != REFLECT (i know that if something happens he will cast reflect in him self?)

Exist some topic that explain each line? Im always testing on Glacial Eye and i want to make him cast in him self protect, shell, triple etc when the battle starts. To use this on bosses and other enemies.

And why some magics hit only 1 target? Like Glacial Eye cast Ultima and hit only Squall? Not Squall, Quistis and Irvine (all party)
 
You say target is OK but it's not ! xD If you want Glacial eye casts Ultima on the party, you have to change the target of the attack from 201 to 204.

if rand() % 3 != 0 > means that the enemy has a 33% chance to do the action.

self.varDC = 0 > variable used by the enemy... hard to explain for me in english sorry. ^^

domoveid (2) > the enemy use the action number 2 of the list of its attacks.

if self.status != REFLECT > means that the enemy will do this action if it has not the status REFLECT.

If you don't have any knowing of things like "if" and "else" , that will be hard for you. ^^
 
BUT you already helped me ALOT if that thank you  8) 8)

i tested this:

if (rand() % 3 == 0) { <-------this works because he has 3 abilities with reflect
    target(200)
    domoveid(2)
    return
}
if (self.hp <= 100) {
    target(200)
    domoveid(3) <------this should work? 3 is the reflect magic, when he has 100 HP he will cast on it self?
    return

Abilities:
1-custom = 2 / anin=13
2-magic = 4(blizzard) / anin=11
3-magic = 31(reflect) / anin=11
4-custom = 2 / anin=13
5-custom = 20(vampire) / anin=14
6-custom = 20(vampire) / anin=14

Its possible i will come back to ask something else XD
 
Last edited:
if (self.hp <= 100) {

That's not correct. This is a precentage. For example, if you want an enemy do an action when it has les than 50% of its HPs, you have to write:

if (self.hp <= 5) {

5 means 50%.

Tell me exactly what you want to do with the actions IDs and I should give you the code. :)
 
Ok lets go, i want to the enemie do:

start casting triple
cast haste, cure (cura or curaga), shell or protect with 50% HP

to resume, he cast support magics in him self when necessary. (like bosses) Right now the enemie use blizzard and reflect on my party XD

to cast a high level magic in the hole party is:

if (rand() % 3 == 0) {
    target(204)
    domoveid(2) <------- my question is, this move in from the list of abilities right?
    return
 
Last edited:
Well I think I may have found the root of the problem, it looks like if any if statement is > 255 bytes, the offset doesn't get patched correctly.
I'll see if I can find the old code somewhere to patch since the version I'm working on is a bit of a mess atm.

Edit: I've patched the issue and updated the link here

I'm not sure if it will fix the issue that is causing the problem but it does fix a very major issue - it completely screws the logic up but it doesn't show in the code because the decompiler ignores the offset.
To fix any file, you should be able to adjust the textbox to get the compile button and a compile + save should fix it.
 
Last edited:
Well I think I may have found the root of the problem, it looks like if any if statement is > 255 bytes, the offset doesn't get patched correctly.
I'll see if I can find the old code somewhere to patch since the version I'm working on is a bit of a mess atm.

Edit: I've patched the issue and updated the link here

I'm not sure if it will fix the issue that is causing the problem but it does fix a very major issue - it completely screws the logic up but it doesn't show in the code because the decompiler ignores the offset.
To fix any file, you should be able to adjust the textbox to get the compile button and a compile + save should fix it.
Nice, an update; cheers for this.

There was another thing that could make the compiler go wonky; in some counter scripts like for the Ifrit enemy there'll be unknown values that can disrupt it when trying to save/compile scripts:

Code: [Select]
Code:
self.varDC += 1if (unknown(0x0A, 03) == 254) {    if (unknown(0x0A, 04) == 65) {        if (self.varDF == 0) {            self.varDF = 1            target(200)            domoveid(3)            return        }    }}
If I change anything in this script, for instance if I change the attack ID or anything else, then it'll run into this error when compiling: 'Syntax error on line 2: no viable alternative at input 'if(unknown'.
 
Great job JWP ! I will test it tonight, hope that works !

Ok lets go, i want to the enemie do:

start casting triple
cast haste, cure (cura or curaga), shell or protect with 50% HP

to resume, he cast support magics in him self when necessary. (like bosses) Right now the enemie use blizzard and reflect on my party XD

to cast a high level magic in the hole party is:

if (rand() % 3 == 0) {
    target(204)
    domoveid(2) <------- my question is, this move in from the list of abilities right?
    return
Yeah that's right.

So I will take your abilities' list and put the others:

1-custom = 2 / anin=13
2-magic = 4(blizzard) / anin=11
3-magic = 31(reflect) / anin=11
4-custom = 2 / anin=13
5-custom = 20(vampire) / anin=14
6-custom = 20(vampire) / anin=14
7-magic = 34(triple) / anim 11
8-magic = 21(cure, you can put cura and curaga for medium and high level) / anim11
9-magic = 35(haste) / anim11
10-magic = 29(protect) / anim 11

Put this in the init AI:

Code: [Select]
Code:
        target(200)        domoveid(5)
Put this in the Turn AI:

Code: [Select]
Code:
if (self.hp <= 5) {    if (self.varDC == 0) {        self.varDC = 1        target(200)        choose(8, 9, 10)        return    }}else if (rand() % 3 == 0) {    target(201)    choose(1, 5, 5)}else {      target(201)      domoveid(2)       if (self.status == TRIPLE) {              target(201)              domoveid(2)              target(201)              domoveid(2)         }        return}
That's a simple possibility, let me know if you want to complicate it.
 
Now he use vampire on it self XD (in the code that you send me =/)

Im trying now just he uses triple, i think its more simple so i did:

1-custom=2 / anim=13
2-magic=4(blizzard) / anim=11
3-magic=34(triple) / anim=11
5-custom=20 (vampire) / anim=14
-----------
INT AI

 target(200)
        domoveid(5)
-----------
TURN AI

if (self.hp <= 5) {
    if (self.varDC == 0) {
        self.varDC = 1
        target(200)
        domoveid(3)
        return
    }
}
else if (rand() % 3 == 0) {
    target(201)
    choose(1, 5, 5)
}
else {
      target(201)
      domoveid(2)
       if (self.status == TRIPLE) {
              target(201)
              domoveid(2)
              target(201)
              domoveid(2)
         }
        return
}
-----
But he still crashes the game doing vampire on it self
 
The init code is targeting himself and casting vampire. Also I thought the magic was indexed at 0.
 
Last edited:
Oops my bad sorry. ^^'

Here's the good one for init:

        target(200)
        domoveid(7)


Also I thought the magic was indexed at 0.
I don't understand what you mean, you can put magic wherever you want in the index.

Edit:

OK JWP, I've tested for Seifer and his gunblade is still invisible. :'(
 
Last edited:
What I mean is that the magic is numbered 0-15, not 1-16.
In other words, the first magic line is id 0 - getting this incorrect would cause you to reference the wrong magic.

Which dat file?
Did you recompile and insert back into the archive?
What specific changes have you made?
 
Last edited:
Status
Not open for further replies.
Back
Top