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

smalldirt

  • Fast newbie
  • *
  • Posts: 20
  • Karma: 7
    • 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

  • Cool newbie
  • *
  • Posts: 86
  • Karma: 10
    • 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

  • Fast newbie
  • *
  • Posts: 20
  • Karma: 7
    • 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

  • Cool newbie
  • *
  • Posts: 86
  • Karma: 10
    • 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

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

Divatox

  • Cool newbie
  • *
  • Posts: 86
  • Karma: 10
    • 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

  • Crazy poster
  • *
  • Posts: 170
  • Karma: 8
    • 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

  • Fast newbie
  • *
  • Posts: 20
  • Karma: 7
    • 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

  • Cool newbie
  • *
  • Posts: 86
  • Karma: 10
    • 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

  • Fast newbie
  • *
  • Posts: 20
  • Karma: 7
    • 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

  • Crazy poster
  • *
  • Posts: 170
  • Karma: 8
    • 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

  • Fast newbie
  • *
  • Posts: 20
  • Karma: 7
    • 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

  • Crazy poster
  • *
  • Posts: 170
  • Karma: 8
    • 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

  • Fast newbie
  • *
  • Posts: 20
  • Karma: 7
    • 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