øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1973.msg22317e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd056.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1973.30e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd056.html.zx'g^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ…¬àOOKtext/htmlISO-8859-1gzip@øÕàOÿÿÿÿÿÿÿÿTue, 10 Mar 2020 05:51:49 GMT0ó°° ®0®P®€§²ð®'g^ÿÿÿÿÿÿÿÿì3àO Graphics info

Author Topic: Graphics info  (Read 10393 times)

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Graphics info
« Reply #30 on: January 07, 2015, 08:08:02 PM »
Unfortunately, the AI sequence is part of the monster data table, and not in a table by itself - and attack sequences are enormously complicated.

Grimoire LD did some super-helpful research, though, that, among other things, lists each monster that uses each AI component.
http://slickproductions.org/forum/index.php?topic=1893.0

Madsiur

  • Tunnel Armor
  • *
  • Posts: 149
  • Gender: Male
  • FF6AE coder
    • View Profile
    • Madsiur's Lair
Re: Graphics info
« Reply #31 on: January 28, 2015, 05:53:43 PM »
Finally the forum is up again!

I had a question about attack sequences. How can I know if an attack sequence (or attack sequence group data) is part of the regular data or Lunar Subterrane/Cave Bahamut Attack Sequences? Is there a bit bit for that somewhere (monster data maybe???)

Thanks

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Graphics info
« Reply #32 on: January 28, 2015, 07:33:00 PM »
Whether the monster uses a lunar script or not is determined entirely by whether you are on the moon or not.
So if you put lunar monsters in the Overworld, they will use entirely different battle sequences.

... Did that answer your question?

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Re: Graphics info
« Reply #33 on: January 29, 2015, 06:13:29 PM »
Yeah, and I checked Bahamut's AI and Mombomb's, and neither uses those two bits in its transition.
Still, I'd like to experiment with them to see if there's any noticeable effect.
It would be pretty easy to try it out on D.Mist...

 :edit:
OK, so I tried it on D.Mist.
It does something, but it's weird...
Apparently, when you set bit 6 or 7 in the parameters of F0, the command makes the monster flash the second form, but then revert to the original form again.
And it appears that which bit(s) is (are) set determines the duration the second form is visible.
01:a literal flash
10:about half a second
11:about one second

So... Not really very helpful, but somewhat interesting to know anyway...

I figured some of this mystery out! 

Those top 2 bits seem to indicate the monster slot to apply the change to.  The ones that have it set are those that occur with other monsters in the encounter.

As for the transition style, that is controlled by the [previously] "unknown byte" in the special monster size table, byte 3 (zero based).  The bottom 4 bits, specifically:
Code: [Select]
  0 = Instant change, no sound
  1 = Pixelizes out one and pixelizes in the next, no sound  ***Neato and unused??
  2 = Flicker between, play sound effect
  3 = Funky scanline transition effect, no sound   ***Also neato and unused??
  4 = Shake a moment, then instant change, no sound.
  5 = Shoot up, then back down, no sound.  (Dr Lugae)

I'm not sure what the upper 4 bits are used for, but it is also obviously monster index related, as they are only used on those where there are multiple monsters in the encounter.

So there look to be a couple of extra effects that I don't think are actually used.  Some monsters have them but those monsters never change graphics.  To see them in the debugger without modifying the ROM, go fight the Mist Dragon, put an execute breakpoint at 02:CCC7, and change the accumulator to any of the values 0-5 above.


chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Graphics info
« Reply #34 on: January 29, 2015, 10:19:48 PM »
Good going with transition style!
I figured out those top two bits just recently, too, because I'm working on a dual special boss battle in my hack currently.
The upper four bits in byte three have to do with palettes. If they match for both monsters, then they will both use the latest slot's palette (until that monster dies). I really took the long, confusing way round to figure that all out, too... I put together the monster in slot 0 first, and put an imp (as a dummy) in slot 1 just to test it all out, and everything worked fine. Then I made the second monster, and things kinda went haywire. Monster 0 was sporting monster 1's palette, and while monster 0 transitioned fine, 1's transition was all kinds of buggy. So then I spent a couple of hours researching the Eblans. Would have been far less if slick was up at the time, but even though I needed to go back to look at my own research, what I have saved on my computer is not complete, so I had to actually find the Eblans' data before I could study them. But once I knew I was looking at the right entries the missing pieces became pretty clear.

BTW, I also discovered that byte 0 is entirely position. The upper four bits are X, and the lower four are Y. Not quite sure how I missed that before...
« Last Edit: January 29, 2015, 11:49:45 PM by chillyfeez »

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Graphics info
« Reply #35 on: January 30, 2015, 05:09:20 AM »
Two questions semi-related to this:

In the hack I'm working on, I'm trying to get working some additional monsters that also use the Fiends' graphics. But I ran into a couple of issues:

1. Changing the "palette" (at least in the monster info) does nothing to change the actual color of the monster. Is this hard-coded? Or is there a way to get the monster to change color without affecting the color of the other Fiend that uses the same graphic? It seems like there should be, since I know in the "Elements" battle you can sometimes see the monster palette change before the sprite.

2. I started with a monster based off Cagnazzo's appearance, and I told it to "set sprite to 19" thinking that, just like in the Cagnazzo battle, he would erect a wall of water around him. He sort of did, but rather than a wall of water it was a wall of glitches. Is there anything I can do to get him to display a wall of water correctly that you guys know of?

Thanks!
Let's dance!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Graphics info
« Reply #36 on: January 30, 2015, 07:55:20 AM »
There's a lot involved in changing monster sprites, pinkpuff, and from your description, I'm not quite sure which of the details you're missing...
First of all, the palette for a special size monster is coded into the table referenced here, instead of the regular monster info palette assignment (note how most bosses "use" palette 00, because they are actually ignoring that byte altogether), that's how, for instance, k. And q. Eblan can change palettes mid-battle.
Also, it's important to know that all special size monsters in the same battle draw from the same pool of sprites - 254 of them beginning with the first one pointed by the graphical pointer, so they all have to share a graphical pointer that begins with the earliest sprite used, and the sprtite arrangement of all of the special sized monsters has to account for this common starting point.
If you're making a monster that is just a second Kainazzo, it'll probably be easiest to just copy Kainazzo's details. But if you're doing something more like the Elements battle, it'll likely be more complicated.
Did that help at all?
I don't think I explained that very well, so let me know if you need clarification.

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Re: Graphics info
« Reply #37 on: January 30, 2015, 08:28:02 AM »
BTW, I also discovered that byte 0 is entirely position. The upper four bits are X, and the lower four are Y. Not quite sure how I missed that before...

Yep.  A few other bits regarding which are hidden, in case you don't have them yet:  http://slickproductions.org/forum/index.php?topic=1990.msg21860#msg21860

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Graphics info
« Reply #38 on: January 30, 2015, 08:30:25 AM »
I'm basically just making a "second Cagnazzo". Maybe I should just describe the result I want a little better:

I'm making it so that there are four underground crystal scenarios/adventures just like in the upper world. The four "dark" crystals each correspond to an element just like the "light" ones do. The "light" crystals are Earth, Fire, Air, and Water, so the "dark" crystals correspond to the other four elements Ice, Bolt, Shadow, and Holy. I wanted to make it so that just like there is a fiend for each of the "light" elements, there is also a fiend for each of the "dark" elements. These new fiends will use the same graphics as the other fiends, but (ideally) with different color palettes.

So far I managed to make a new monster called Alichino who is supposed to be the Fiend of Ice. He uses Cagnazzo's graphics but I want him to be a different color (maybe a lighter blue and/or white if possible but I'm not picky right now; just getting a different color at all would be a good starting point). He is a different monster with different stats and pattern, he just uses Cagnazzo's graphics. He's working except that he's the same color as Cagnazzo no matter what I set the palette byte to (as chillyfeez mentioned, it must be ignored) and that when I try to tell him to change sprite so that he erects a wall of water, he instead erects a wall of glitches. Otherwise, his behaviour is perfectly fine, he just looks messed up when he changes form. He is the only monster in the battle; you don't fight him alongside Cagnazzo or any other monsters for that matter. It's a completely separate scenario.

Does that make what I'm asking for any clearer?
Let's dance!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Graphics info
« Reply #39 on: January 30, 2015, 08:56:53 AM »
Yes, quite clear.
Unfortunately, what you're trying to do involves using a brand new Special size that you will have to create (because the palette of special size monsters is determined by byte 2 in the table referenced in the post I linked above).
Doing so won't be too difficult, except that there are only two completely unused special sizes in the entire game, meaning you can only do this for two Underworld fiends before you have to get... creative... by which I mean destructive... by which I mean that you'll have to cannibalize some other monsters' special sizes in order to make this dream a reality.
In the past, I've suggested that if somebody wanted to do something like this, they could steal a couple of Octomamm's forms, since 8 is a little excessive, and I imagine few people see all 8 forms in a normal playthrough anyway. but regardless, you'll have to make a concession or two somewhere.
Aside from creating a new special size specifically for the new palette, you'll want all other graphical information to be identical to that of Kainazzo - same graphical pointer and aside from the palette same other four bytes in the special size detail table.
The post I linked above should contain all of the info you need to do what you're trying to do (even if it does miss some information we're only discovering now... you don't really need that for what you're trying to accomplish), but again, let me know if you need clarification on anything.

Of course, the other "problem" with this proposition is that it's going to require some hacking outside of FF4kster. Nothing that will make your ROM incompatible (I know, I've done it several times now in my hack), but since I think you've said before that you're trying to make a hack that specifically showcases the editor's capabilities, this might be something you don't want to get into... or you might want to whip up a new version of FF4kster that allows a hacker to edit the special size table (I know, that makes it sound so easy, huh?).
Anyway, that's all up to you. I'm working the closing shift tonight, so I won't be around most of the (EST) evening, but I'm home all weekend so if you have any questions, ask away.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Graphics info
« Reply #40 on: January 30, 2015, 11:46:27 AM »
That explains what to do about the palette, but how do I fix the wall of glitches? Currently I haven't changed anything in that table so the monster should display Cagnazzo's exact graphics with his palette, right? And it does for his main form, but not his "gathering the water" form. I mean, Cagnazzo's displays normally but not Alichino's. It's using the exact same graphic pointer with the exact same size byte.
Let's dance!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Graphics info
« Reply #41 on: January 30, 2015, 03:39:29 PM »
Taking a quick break... Did you check to see if Kainazzo's transition uses one of those weird numbers with one or two of the upper two bits?

That's all I can think of now. If not, if you wanna send me a ROM (or patch) I'll take a look at it.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Graphics info
« Reply #42 on: January 31, 2015, 06:42:58 AM »
there are only two completely unused special sizes in the entire game

Which two, specifically?

... or you might want to whip up a new version of FF4kster that allows a hacker to edit the special size table

Done and uploaded.  :cycle:

Taking a quick break... Did you check to see if Kainazzo's transition uses one of those weird numbers with one or two of the upper two bits?

How do I check this? Which byte should I be looking at? In FF4kster, Cagnazzo's script just says "change sprite to 19" which is exactly what I put into Alichino's script...

That's all I can think of now. If not, if you wanna send me a ROM (or patch) I'll take a look at it.

Hm, I'd like the details of the game to be mostly a surprise and I'm pretty far in plotwise so I'd prefer to talk it out if possible... though if it comes down to it I don't mind sending you a copy. In the meantime I'm attaching a "before" and "after" screenshot. And yes, the "change sprite" process does cause him to change back to Cagnazzo's palette... it also seems to make porom throw her arms up and selecting Edge's magic menu to hang the game.

If you have some kind of sandbox rom handy, try this and let me know the results:
  • Replace the graphic pointer and size byte of a boss monster (on mine I replaced Q. Eblan) with Cagnazzo's template (he should be in the list of templates)
  • Change this monster's AI to contain an instruction telling him to change sprite to 19
  • Replace one of the underground Formations and put the new monster in there (I used Formation 502)
  • Set up a way to fight him in the underground and have at 'er
Let's dance!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Graphics info
« Reply #43 on: January 31, 2015, 08:15:26 AM »
there are only two completely unused special sizes in the entire game

Which two, specifically?
B1 and B2. They're just little 1x3 rectangles in the air by default (and no, they're not Baigan's arms).
Quote
... or you might want to whip up a new version of FF4kster that allows a hacker to edit the special size table

Done and uploaded.  :cycle:
Oh, wow. Cool!

Quote
Taking a quick break... Did you check to see if Kainazzo's transition uses one of those weird numbers with one or two of the upper two bits?

How do I check this? Which byte should I be looking at? In FF4kster, Cagnazzo's script just says "change sprite to 19" which is exactly what I put into Alichino's script...
No, that's what I meant, so that's not the problem...
Quote
That's all I can think of now. If not, if you wanna send me a ROM (or patch) I'll take a look at it.

Hm, I'd like the details of the game to be mostly a surprise and I'm pretty far in plotwise so I'd prefer to talk it out if possible... though if it comes down to it I don't mind sending you a copy. In the meantime I'm attaching a "before" and "after" screenshot....

If you have some kind of sandbox rom handy, try this and let me know the results:
  • Replace the graphic pointer and size byte of a boss monster (on mine I replaced Q. Eblan) with Cagnazzo's template (he should be in the list of templates)
  • Change this monster's AI to contain an instruction telling him to change sprite to 19
  • Replace one of the underground Formations and put the new monster in there (I used Formation 502)
  • Set up a way to fight him in the underground and have at 'er
[/quote]
That's cool, I can empathize 100% on that point. But please understand that that means it will take me longer to get to trying to figure this out. I do have some work on my own project I intend to do this weekend.
However, this gives me pause...
Quote
And yes, the "change sprite" process does cause him to change back to Cagnazzo's palette... it also seems to make porom throw her arms up and selecting Edge's magic menu to hang the game.
This sounds precisely symptomatic of a bugged battle script.
If you put two uncooperative actions together in a monster's AI without properly separating them (like, with "Wait"), then when the monster gets to that part of its script, the character in the middle will freeze in their "dodge" stance and the game will hang when you choose your next action.
Also, are you remembering to make that second sprite transition back to Alichino's initial spriting instead of Kainazzo's? That might explain why he's reverting back to the wrong palette...

Anyway, I promise I will look deeper into this this weekend. I won't leave you hanging, but I need at least a few hours to devote to my own stuff before I start playing around with a blank ROM to try to match what you've done, k?

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Graphics info
« Reply #44 on: January 31, 2015, 09:58:26 AM »
That's cool, I can empathize 100% on that point. But please understand that that means it will take me longer to get to trying to figure this out. I do have some work on my own project I intend to do this weekend.
However, this gives me pause...

No problem! By all means your own stuff takes priority. It'll be a long time before this game is ready anyway so take your time.

This sounds precisely symptomatic of a bugged battle script.
If you put two uncooperative actions together in a monster's AI without properly separating them (like, with "Wait"), then when the monster gets to that part of its script, the character in the middle will freeze in their "dodge" stance and the game will hang when you choose your next action.

Aha, upon closer inspection I had a "do nothing" separating the sprite change from his next action instead of "wait". That fixed the game hanging issue but nothing else.

Also, are you remembering to make that second sprite transition back to Alichino's initial spriting instead of Kainazzo's? That might explain why he's reverting back to the wrong palette...

I don't know quite what you mean here, but his AI doesn't tell him to turn back. He's supposed to bring up the wall and leave it up (for now, til I get the hang of this). Trouble is, when he does this (change from normal to wall of water from), he changes from his funky palette to Cagnazzo's palette.

Anyway, I promise I will look deeper into this this weekend. I won't leave you hanging, but I need at least a few hours to devote to my own stuff before I start playing around with a blank ROM to try to match what you've done, k?

Of course; I'm in no rush. And thanks for your help!
Let's dance!