Author Topic: [PC] Enemy editor - IFRIT (0.11)  (Read 92223 times)

smalldirt

  • *
  • Posts: 20
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #175 on: 2019-12-24 08:08:04 »
Hey,

First i would like grab the opportunity and thank you for making such a cool tool.  :D

I would like to share a short info on the texture corruption:
few weeks ago i received a small know-how from @SegaChief how to fix manually (editing the AI bytes) the texture corruption problem that occurs randomly after using the AI editor (in enemy groups),
however after a little bit testing, it turns out the AI editor / compiler works perfectly, (if we don't take into account the unknown variables) the problem lies in section 10.
It contains some unexplored data (AKAO) and also can be empty for some monster files. The important thing is that the offset to this section in the file header must be divisible by 4 (/ zero), or it occurs texture bugs (even if the section empty it's offset should be divisible by 4 or should be zero - (e.g - x90F0 - > or 4/8/C)

Deleting the section in some cases makes the character textures color to some weird green, in some cases nothing happens.
Adding some padding values before section 10 (extra 00 bytes) can fix this quite easily to comply with this offset "requirement".

KR  :-)
« Last Edit: 2019-12-24 11:53:49 by smalldirt »

Divatox

  • *
  • Posts: 86
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #176 on: 2019-12-26 03:35:26 »
Hey,

First i would like grab the opportunity and thank you for making such a cool tool.  :D

I would like to share a short info on the texture corruption:
few weeks ago i received a small know-how from @SegaChief how to fix manually (editing the AI bytes) the texture corruption problem that occurs randomly after using the AI editor (in enemy groups),
however after a little bit testing, it turns out the AI editor / compiler works perfectly, (if we don't take into account the unknown variables) the problem lies in section 10.
It contains some unexplored data (AKAO) and also can be empty for some monster files. The important thing is that the offset to this section in the file header must be divisible by 4 (/ zero), or it occurs texture bugs (even if the section empty it's offset should be divisible by 4 or should be zero - (e.g - x90F0 - > or 4/8/C)

Deleting the section in some cases makes the character textures color to some weird green, in some cases nothing happens.
Adding some padding values before section 10 (extra 00 bytes) can fix this quite easily to comply with this offset "requirement".

KR  :-)

Sorry for the stupid question:
So after you edit the AI in IFRIT, you open the hex editor with the monster file, and "find" the line 10, and "find" the number divisible by 4 to put 00?

smalldirt

  • *
  • Posts: 20
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #177 on: 2019-12-26 07:14:22 »
Sorry for the stupid question:
So after you edit the AI in IFRIT, you open the hex editor with the monster file, and "find" the line 10, and "find" the number divisible by 4 to put 00?

Hi Divatox,

I don't really understand what you mean by line 10,  but find a detailed explanation below:
This is how the start of the dat file (header) looks like:

Name                          Hex
Number of Sections   0b000000
Section 1 - Offset      34000000
Section 2 - Offset      a4000000
Section 3 - Offset      cc070000
Section 4 - Offset      3c240000
Section 5 - Offset      80250000
Section 6 - Offset      90260000
Section 7 - Offset      98270000
Section 8 - Offset      14290000 - Contains AI
Section 9 - Offset      482a0000 - If you change the AI, theese offsets are adjusted by Ifrit automatically
Section 10 - Offset    842a0000 - If you change the AI, this offsets are adjusted by Ifrit automatically
Section 11 - Offset    644f0000 - If you change the AI, this offsets are adjusted by Ifrit automatically
End of File - Offset    90910000


Ifrit editor adjust theese offsets because you might extended the AI or make it more simple, but the point is you changed the size of the data which is fine. The important thing is you have to check the offsets to section 10.

Quote
Section 10 - Offset    842a0000

The byte i pointed out should be 0/4/8/C

If it's not then what you should do is jump to section 10 offset, in this case x2A84.
Add some "padding" bytes. For example it it would be x2A83 - you insert 1 byte to make the section start az x2A84 (so it's  then go back to the start of the file and add this 1 byte to the section 10 offset, and the offsets after section 10.

Section 10 - Offset    842a0000
Section 11 - Offset    644f0000
End of File - Offset    90910000

« Last Edit: 2019-12-26 15:06:37 by smalldirt »

Divatox

  • *
  • Posts: 86
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #178 on: 2019-12-26 14:47:16 »
ok i think im starting to understand  ::)
the number in section 10 MUST be divisible by 4 (or 0/4/8/C) or else will bug the visual of the enemy. So if in this case the number is not you need to input +1 to make him divisible.

"If it's not then what you should do is jump to section 10 offset, in this case x2A84.
Add some "padding" bytes. For example it it would be x2A83 - you insert 1 byte to make the section start az x2A84 (so it's  then go back to the start of the file and add this 1 byte to the section 10 offset, and the offsets after section 10.

Section 10 - Offset    842a0000
Section 11 - Offset    644f0000
End of File - Offset    90910000"

In this part why you right the number backward?? 842A and you wrote 2A84? or doesnt matter and im just complicating things XD

smalldirt

  • *
  • Posts: 20
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #179 on: 2019-12-26 15:05:16 »
Sent you a PM

Divatox

  • *
  • Posts: 86
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #180 on: 2019-12-28 00:28:45 »
Someone can upload the IfritAIbeta version again please?

Sebanisu

  • *
  • Posts: 171
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #181 on: 2019-12-29 11:55:58 »
Someone can upload the IfritAIbeta version again please?
https://cdn.discordapp.com/attachments/456629428940832796/658541486501265430/IfritAIbeta.rar
I asked for it on Discord and Leyhalknight posted it.

I'm wondering if someone could post to github so we can colab on bug fixes. I was looking at the code in dotPeak. Wanted to try to fix the AI bug when I got time. Sega Chief said you'd need to use a hex editor to correct the opcodes to 4 bytes.(or something like that, I'm new to looking into this part) Though I wasn't sure if, I used the disassembly to make code, I can compile in visual studio. I could post that or put it on github. As the dev might not want that. :P Though it's C# and you can get pretty good code from decompilers.

smalldirt

  • *
  • Posts: 20
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #182 on: 2019-12-30 07:05:34 »
Hey,

I am wondering if are there any list available that contains what abilities are used by each monster / difficulty?

Divatox

  • *
  • Posts: 86
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #183 on: 2020-01-01 19:41:09 »
Here:
https://github.com/alexfilth/doomtrain/wiki/Enemy-attacks

or using Doomtraim tool, in IFRIT see the number in the ability bar of the monster, then search in the link or doomtraim what the number is.
EX:
custom = 114
114 is breath (from Ruby Dragon)

smalldirt

  • *
  • Posts: 20
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #184 on: 2020-01-02 19:03:43 »
Hey, thanks for the reply,
but what i meant is like a single file let's say "database where the abilities are listed / enemy  :-\ , is there anyone who made a list like this and willing to share?  :-) would be awesome
example:
c0m061 - move 1 - custom - 332
c0m061 - move 1 - magic- 6
etc. etc
« Last Edit: 2020-01-02 19:16:11 by smalldirt »

Sebanisu

  • *
  • Posts: 171
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #185 on: 2020-01-03 20:22:56 »
I might be able to when I get time. To generate one.

Sent from my Pixel XL using Tapatalk


smalldirt

  • *
  • Posts: 20
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #186 on: 2020-01-04 07:06:58 »
I might be able to when I get time. To generate one.
Sounds supa-cool. Thank you in advance :)

Sebanisu

  • *
  • Posts: 171
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #187 on: 2020-01-08 13:23:03 »
Sorry about the delay. I posted that when I was at work and kinda slipped my mind. This will be the first project I do this morning.

Update:
Done
https://drive.google.com/file/d/1oa41WigkzxQJEvDtzHx-HRRH5RWJ7Top/view?usp=sharing

I can add more columns if you need. What ever data we've already parsed in openviii can be dumped.

Update 2:
added double quotes around the name of attacks for 1,000 needles and 10,000 needles. They were making their own column for 000 heh.
« Last Edit: 2020-01-08 15:08:24 by Sebanisu »

smalldirt

  • *
  • Posts: 20
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #188 on: 2020-01-08 16:06:18 »
Thats amazing, thank you very much Sebanisu.
I owe you one!   :D

darknesshah66

  • *
  • Posts: 9
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #189 on: 2020-03-17 16:19:01 »
Hello I'm having a problem with packing battle.fs from the battle files. Whenever I pack the files into battle.fs the file becomes larger than it was before and I don't think that's supposed to happen since I only change the enemy hp/str/mag parameters. Whenever I engage in battles the enemies show but my party members don't and I'm unable to assign commands since only the enemies are visible. I think this happens cause the battle.fs is larger than it's supposed to be. I'm running the newest FF8 on Stream (remaster).

darknesshah66

  • *
  • Posts: 9
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #190 on: 2020-03-17 17:32:46 »
Nvm I found a solution to my problem. I extracted all files instead of only the necessary ones. Then I replaced the original enemy files with my modded ones. And then I created battle.fs from all of the files (over 800 if i recall). For some reason it made the file size go just a bit over the original one but it still worked in-game.

gjoerulv

  • *
  • Posts: 1206
  • me
    • View Profile
    • My Youtube
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #191 on: 2020-03-18 10:58:38 »
Yes, I haven't tested this with the remaster version. But, iirc, there is some wrong information in the ifrit app. You should in fact extract all files instead of just the valid ones. It's easier to work with if you know what files to use.

Naphta

  • *
  • Posts: 2
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #192 on: 2020-03-28 20:08:32 »
Hello,
is it possible to make enemies immune vs eject yet with Ifrit?

JWP

  • *
  • Posts: 194
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #193 on: 2020-04-24 14:43:52 »
It should already be possible, the eject status that is inflicted by Rapture, Degenerator and Odin/Gilgamesh is marked as "Expu" in the editor unless there is a bug with it.
If you mean the status inflicted by Selphie's "The End", then no.

Regarding the the AI editor, there are a couple of known issues:
Alignment issues (the sections should be aligned to the next power of 4)
Some code does not get decompiled correctly and will actually change behaviour - this is typically around the tests in if statements. Some of the code that decompiles to self.x should target other entities.

I've been working on a new version from scratch because the code is such a mess and I've managed to get it to compile all the existing monsters correctly with the exception of two: G-Soldier and Tri-Point.
The former seems to be because the AI was coded incorrectly and the latter is because the code cannot handle negative offsets at present.
The new version also has an option to graph the AI and show the bytes (mostly to aid debugging).
Hopefully I'll have something that I can release within the next month or so.

Kefka

  • *
  • Posts: 196
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #194 on: 2020-04-24 18:57:57 »
Regarding the the AI editor, there are a couple of known issues:
Alignment issues (the sections should be aligned to the next power of 4)
Some code does not get decompiled correctly and will actually change behaviour - this is typically around the tests in if statements. Some of the code that decompiles to self.x should target other entities.

I've been working on a new version from scratch because the code is such a mess and I've managed to get it to compile all the existing monsters correctly with the exception of two: G-Soldier and Tri-Point.
The former seems to be because the AI was coded incorrectly and the latter is because the code cannot handle negative offsets at present.
The new version also has an option to graph the AI and show the bytes (mostly to aid debugging).
Hopefully I'll have something that I can release within the next month or so.

That's awesome news, man, I love you! The buggy AI editor was in fact the ONLY reason why I never bothered seriously modding this game!

gjoerulv

  • *
  • Posts: 1206
  • me
    • View Profile
    • My Youtube
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #195 on: 2020-04-25 12:37:54 »
Just wanted to add that, while Ifrit works as intended (hopefully lol), it's a mess of code. Looking at the source, I think I might have been drunk or something haha.

Antoine

  • *
  • Posts: 2
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #196 on: 2020-06-21 14:20:20 »
Hi there,

I'm modding FF8.
I'd like to build battles such as Wedge, Biggs and Elvoret; Vysage and Gargantua; Fake President and Gerogero; etc. That means battles where the first opponent leaves the place to a new one when he has died.
I tried so, but, in the best manner I could do, the new opponent is invisible. He is playing, he is targetable, but invisible, that is really not convenient for the player.
Would any other one have tried and made a success of it?

Thank you in advance!

rartart

  • Banned
  • *
  • Posts: 100
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #197 on: 2020-06-21 17:03:22 »
thanks for the update , i wish that even the other modding programs for this game were updated too

qotsaninsoadkorn

  • *
  • Posts: 156
    • View Profile
Re: [PC] Enemy editor - IFRIT (0.11)
« Reply #198 on: 2020-06-25 06:51:33 »
Hi there,

I'm modding FF8.
I'd like to build battles such as Wedge, Biggs and Elvoret; Vysage and Gargantua; Fake President and Gerogero; etc. That means battles where the first opponent leaves the place to a new one when he has died.
I tried so, but, in the best manner I could do, the new opponent is invisible. He is playing, he is targetable, but invisible, that is really not convenient for the player.
Would any other one have tried and made a success of it?

Thank you in advance!
might notice a diff result on 2019 compared to 2013 i assume you were on... regarding Wedge, Biggs and Elvoret they have fairly specific AI for the Dollet fight... whereas using the other Biggs/Wedge from later, you'll have better luck trying to mix them with a boss perhaps... but you might only managed to get 2/3 to display properly, when i did it Elvoret kept having a texture issue... then i removed Biggs i think it was and Elvoret worked perfectly alongside Wedge... some sort of vram limit ?