øAslickproductions.org/forum/index.php?PHPSESSID=su9kpie3sgp38v79udfn44eej6&action=profile;area=showposts;sa=topics;u=339e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index5852.htmlslickproductions.org/forum/index.php?action=profile;u=339e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index5852.html.zx×›h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ …­«„OKtext/htmlISO-8859-1gzip0|Ö«„ÿÿÿÿÿÿÿÿWed, 11 Mar 2020 08:22:08 GMT0ó°° ®0®P®€§²ð®×›h^ÿÿÿÿÿÿÿÿ©«„ Show Posts - avalanche

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - avalanche

Pages: 1
1
I was a little disturbed when, in my game, Edge and the party were celebrating after Edge's parents died.  I thought surely that wasn't right, and it isn't.  As an addendum to http://slickproductions.org/forum/index.php?topic=2024.0, which discusses victory music and reward suppression. 

Encounters in which PCs do not celebrate
List at 13:FE76 (ROM A0076), FF-terminated.  If in this list, the PCs will not celebrate.

These two are documented by Pinkpuff and Grimoire in the page linked above:
Encounters which do not reward with XP/GP/loot
List at 13:FD00 (ROM 9FF00), FF-terminated. 

Encounters which should play victory music, even if "no change music" battle flag
List at 13:FE67 (ROM A0067), FF-terminated.


Also, a little info on $A8, which stores flags for why to end battle.  If it is non-zero, battle ends.  Some routines check for victory/loss conditions and assign it regularly through battle.  Also some spells might set it directly, like the special action that ends battle.  Here's what I can gather about what the bits mean, most don't seem to be used together:
Code: [Select]
bit hex  description
0   01   (?)
1   02   (?)
2   04   Set by handler for End Battle AI spell/action
3   08   Faux-loss in a "no game over" encounter
4   10   Used with 20 bit to gain rewards, etc. (not set when encounter is in 13:FD00 table)
5   20   Victory, sometimes with 10 bit above.
6   40   (?  confused, like victory but weird pc status checks I couldn't understand)
7   80   Actual loss
So maybe some custom code might find that interesting.  I would imagine running, and the Exit/Smoke spells are relevant here too, but I didn't check into them.


2
Here's a break down of the parameter byte for AI commands F4 and F5 which modify the condition flags.  First, the flags are shared by all monsters, which I didn't realize until just now when I was looking at Dr.Lugae and Balnab.  For some reason I assumed each monster had their own.

Code: [Select]
MMxxxxxx
    MM = mode
         00: add
         01: subtract  (never used)
         10: set
         11: (undefined, would probably behave as 10)
    xxxxxx = 6-bit operand

3
Final Fantasy IV Research & Development / Automatic action retargeting
« on: November 02, 2015, 06:27:26 PM »
Some actions implicitly re-target if the previously selected target is no longer valid (such as dead) by the time it is executed.  Obviously Fight does this.  Do others?  Do spells?  Is the logic of when retargeting is performed known?

4
Does anyone know why some spell/action names do not display?  How about whether or not monsters flash when using them?  Is it a number range thing, or a table flag thing, or custom assembly thing..?

5
Do PC spells use MP in autobattles?  It seems they must not, because the scripts would stall out if spells could not be cast to kill or trigger monster AI reflex scripts.  Also, in Tellah vs Golbez, Tellah casts Meteo and he never has the 99 MP necessary.  So does anyone know if that is true about autobattles?

I took a major hiatus and am trying to get back into my project, and I am super rusty.  Appreciate the help!

6
Here are a few more palette tricks used by the game, in addition to those posted in the FF4kster thread a while back.  (http://slickproductions.org/forum/index.php?topic=1713.msg22009#msg22009)

15:C4D3 - Lava pulsating glow.
When in the underground, palette 1 (0-based) is overwritten every frame, pulled from one of 4 consecutive palettes stored at 14:FA16 (ROM A7C16).  The pulse pattern which says which of the 4 to use at any moment is defined by an 8-byte entry at 15:C503 (ROM AC703).

15:C3C3 - Big Whale running lights in flight.
When flying in the whale, just one color of the palette used by the whale is overwritten, pulled in sequence from an 8-color table at 15:C3E0 (ROM AC5E0).

15:C3F0 - Psychedelic trippy Tower of Babil colors.
When event flag 66 is set (after Kain steals the crystal), and when in either the Overworld or Underground, the frame counter byte itself is used to make a funky color entry and written to the palette used by the Tower tiles.  Oddly the tower tiles use a different palette index for the two different worlds, but the effect is the same.  Black is used instead when the flag isn't set.


I can't imagine these would be very useful to anyone.  But if anybody wanted to say, turn the Underground into something that wasn't so yellow and lava-ish, there ya go!  Of course, these kinds of routines could certainly be modified or mimicked to add pulsing or other effects to different maps entirely.

7
Final Fantasy IV Research & Development / Avalanche's Project: FF2
« on: February 08, 2015, 08:15:28 PM »
I thought I'd take a moment to post something about the project that I've been working on.  My goal when deciphering disassembly and cracking how spell visuals work, etc, has been from a slightly different point of view than many of you, who modify the game to make it do something different than the original.  What I have been doing is deciphering how the game works and getting as much data as I can from it, so that I may remake the game from scratch, as exact as possible.  My goal is to be pixel-perfect... every screen transition, the way a character walks forward to attack, and so on.  Though there have been a couple of places where I had to make some concessions or chose not to reproduce a bug that was in the original.  I'm sure I'll have enough quirky bugs of my own! : )

It is a combination of cracking how the original assembly does something, trying to decipher whether and how data is stored in the ROM and finding a way to use it, and original programming.  It's interesting to me how there is a large amount of information that is useful both to me and to those of you hacking the original game, and that there are also a few things that I need to know that you don't, or vice versa.  For example, figuring out how the game did the spell visual effects was crucial for my project, but might not quite be as interesting to other FF4 hackers.

I attached a few random screenshots.  As you can see, the platform is a browser.  I won't ever release it for general use, for obvious reasons, but it would be really great to show to some people eventually.  It's complete and fully playable nearly to the underground as of right now.

8
Final Fantasy IV Research & Development / Extracting sound effects
« on: January 09, 2015, 11:43:39 AM »
Because I am crazy, I'm trying to get the sound effects from the ROM.  Here's my highly tedious plan:  Hack the assembly to disable all music, so it isn't playing in the background.  Then trick it into playing sound effect 0, then 1, and so on for all of them, which should take about the rest of my life.  Then find a way to get that recorded or dumped.

The first part is working, I can get it to play each sound effect at will.  But when I try to dump an SPC (from Geiger's) the SPC doesn't seem to play anything.  Even if I wait until the sound effect is part-way through and then dump it, still nothing.  Do any of you audio guys know why this would be?

 :edit:
I think I fixed it.  Using a clean reset instead of loading an emulator save state seems to make it work okay.

9
Final Fantasy IV Research & Development / Vehicle event flags
« on: January 05, 2015, 06:41:47 PM »
I'm trying to figure out what event flag instructs the game to run the event that occurs the first time the Enterprise goes down the hole after Agart.  Opening the hole only sets 30, and the initial event sets flag 32 (hex) which renders the Enterprise unusable for a while.  But that flag gets cleared later.  After you drill back up with the Falcon later, I assume you could still get on the Enterprise and head down the hole, so what flag prevents/forces that initial event?

10
Final Fantasy IV Research & Development / Damcyan border tiles
« on: January 05, 2015, 10:35:35 AM »
Is it just me, or is the Damcyan map missing tiles around the edge to transport back to the overworld?  How does the game know where to send you?

11
Final Fantasy IV Research & Development / Spell Visual Effects
« on: December 27, 2014, 03:41:16 PM »
Here is some information about how spell visuals are coded and animations stored in the ROM.  This would be pretty long for one post, so I will make a few, and link to them from this first as a little table of contents.

Table of Contents
1. Spell Visual Table
2. Sprites
3. Keyframe Animations
4. Frames for Animations
5. Master Routines

12
Here are a few bits I deciphered from the battle/encounter/formation/arrangement data.  I think Yousei called this "Enemy Combination Data".  Boy we have a few names for things, don't we?

Encounter Table
At 70200 in the ROM.
  byte 4:
        bits 0-1: indicate which of the 3 monster types are initially hidden (eg Shadow dragon, what Alert summons, etc)
              00: normal, all 3 appear
              01: monster type 2 initially hidden
              10: monster types 2 and 3 initially hidden
              11: monster type 3 initially hidden

The 3 bottom bits in byte 0 are still unknown to me.  Bit 0 is on some but not all of the boss battles, bit 1 is on most of the non-boss battles but a few boss ones as well, bit 2 is only on Calbrena and the final Zeromus battles.

Monster Positions:
Indexed by byte 5 in the above table, into the ROM at 71200.  Each entry is 8 bytes, one for each monster in the order they appear (all monster type 1's, then 2's etc).  The high nibble is X, low is Y, in 8-pixel units, with a small additional offset for X:
     xxxxyyyy
            - Final screen X position is (x * 8) + 16
            - Final screen Y position is (y * 8).


To show my work, attached are some images I made using the data above.  They're missing the +16 in X, for those with a detailed eye.  The large bands of color in the background were what I used to look for patterns for the bits.  You can see in the Calbrena image both of the byte 4 bits on (green and dark blue), which means "monster type 3 initially hidden", so the big Calbrena is hidden but the Cal and Brena are present.  For completeness, the byte 0 colors are 0=red, 1=yellow, 2=cyan.


Pages: 1