јAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=278;area=showposts;start=1065e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index0bf1.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=278e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index0bf1.html.zxихg^џџџџџџџџџџџџџџџџџџџџШ0P.?#OKtext/htmlISO-8859-1gzip0|ж?#џџџџџџџџTue, 10 Mar 2020 19:25:35 GMT0ѓАА Ў0ЎPЎ€ЇВ№Ўзхg^џџџџџџџџІ0?# Show Posts - chillyfeez

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.


Messages - chillyfeez

1066
Final Fantasy IV Research & Development / Re: Fun with Summons
« on: October 17, 2013, 09:58:51 PM »
The problem you'd face is that there are a limited number of Special sizes.

Bear in mind, you're not taking over Mist, Valvalis and Kainazzo's monsters in these examples, you're taking over their image arrangements.

There are only 40 (hex) special sizes to work with...

I think B1 and B2 are completely unused (both are a tiny 3x1 rectangle). Beyond that, you could also do away with a few of Octomamm's eight forms. That's a bit excessive.
All the rest of the special sizes are pretty essential to the game the way it normally works (you can view them all in my post here if you'd like to see for yourself).

If you can live with only 4 Octomamm formations (I've probably never seen more than three or four anyway), then four of those plus B1 and B2 are enough to make Shiva, Indra and Jinn... so there you go.

If you wanted to fight chocobos and sylphs, you could use regular sizes for them, since their images are naturally rectangular - as long as you can live with them not moving.

1067
Final Fantasy IV Research & Development / Re: Fun with Summons
« on: October 17, 2013, 08:28:40 PM »
This should be the shortest one yet - by the time I turned FloatEye into Shiva, I was able to do the whole thing from scratch in under 30 minutes. Hopefully this translates into being able to explain it quicker, too.

Alright, FloatEye's Graphical data is at 7CC0C and reads:
04 03 50 84
Shiva's sprites start at 694F8, and we'll be taking over Kainazzo's data, so we'll change this to:
92 03 5F C2

Now we change Special size 92's details at 7D05A from:
38 95 AA 02 12
to:
38 84 CE 02 12
Yessss. I finally figured out by this point that the only things I needed to change here were the size (bits 0-5 of Byte 01 changed from 15 to 4, to result in 84) and the Palette (Byte 02 from AA to CE).

While we're here, let's change Special size 93 so It's ready for Shiva #2. It's the next five Bytes, beginning at 7D05F.
Was:
38 96 AA 02 13
Now:
38 84 CE 02 13

And now it's time for sprite arranging.
Special size 92 uses the 12th (hex) pointer at 75100, so that's at 75124 and reads 79 D5.
D579 + 68200 = 75779

Shiva #1 looks like:
Code: [Select]
-XXX--
XXXX--
XXXXX-
XXXXX-
XXXXX-
XXXXX-
or
Code: [Select]
-XXX--XXXX--XXXXX-XXXXX-XXXXX-XXXXX-
so:
Code: [Select]
-- -- -- -- -- -- -- ----- FF 00 01 02 FE 02 03
04 05 06 FE 02 07 08 09-0A 0B FF 0C 0D 0E 0F 10
FF 11 12 13 14 15 FF 16-17 18 19 1A FF
Note: yes, there's a column of empty space on the right-hand side. Shiva #1 technically only needs a 5x6 space, but 5x6 doesn't naturally exist in the size table, plus Shiva #2 does need the 6x6, so this was the cleaner way to go about it.

Shiva #2 uses Special size 93, which uses the 13th (hex) arrangement pointer at 75126: B5 D5
D5B5 + 68200 = 757B5

Like the situation with Indra, Shiva #2 uses the same two bottom rows of sprites as Shiva #1, so:
Code: [Select]
--XXX-
XXXXXX
XXXXXX
XXXXX-
OOOOO-
OOOOO-
or
Code: [Select]
--XXX-XXXXXXXXXXXXXXXXX-OOOOO-OOOOO-
written as:
Code: [Select]
-- -- -- -- -- FE 02 1B-1C 1D FF 1E 1F 20 21 22
23 24 25 26 27 28 29 2A-2B 2C 2D 2E FF 11 12 13
14 15 FF 16 17 18 19 1A FF

Shiva starts as size 92 and shifts to sprite 13, or "19" in base-10 (as displayed in Ff4kster), then reverts back to sprite 12, or "18" in base-10.

There ya go.
I'm going to start working on The tutorial for changing summon images tonight, but don't know if I'll get through it...

1068
Huh... Intriguing. I might be able to alter these conditions to make an auto-learn happen (...maybe...) but unless I'm missing it, the instruction to actually execute Hide isn't here, right?

1069
I actually was planning on having it be a user-activated command, a la Gau's Jump in FFIV. The base would be similar to Copy - execute "Learn" after a monster uses a Tech (and before it makes its next move - while the command is still in the "next sub-action" byte in RAM) and if that spell is set to be learnable, you'll learn it (if not already learned).
But if we could figure out how to make it automatic... well that would be fantastic!
I figured that Auto-commands (remember, there's auto-Cover, too) were limited to characters that had the same command as executable, too. If I'm not mistaken, any character that can execute Hide will auto-hide when critical. I'd love to find out I was mistaken, though.

1070
Final Fantasy IV Research & Development / Re: Fun with Summons
« on: October 17, 2013, 05:22:16 PM »
Ok, this post will contain the slightly different steps taken to transform Eagle and FloatEye into Indra and Shiva.
I won't explain everything step-by-step. I'm assuming you've read the Imp --> Jinn post, and most of the process is the same.

Eagle uses the third entry in the Graphical data bank at 7CC00, which is
03 02 63 C1

We're turning Eagle into Indra, so first we use Tile Layer and our Hex calculator to figure out Indra's sprite pointer is C2EC, and now we have
03 02 EC C2

Shiva and Indra both require a 6x6 area to work within. This is good, because most Special sizes are larger than 6x6, so it doesn't matter too much whose data we take over. I chose Valvalis, only because I wanted to use monsters that normally undergo image transformations for my first stab at this. Valvalis's initial form is Special size 95. Now we have
95 02 EC C2
And we're done here.

Now to edit special size 95...
Start at 7D000 and count up by fives until you get to the 16th entry, at 7D069.
Note: a quick and easy way to find the appropriate entry is to look at the last byte of each. They are numbered in order beginning at 00 up through special size 9C.
The details for Special size 95 read:
35 18 B1 02 15
Byte 00 (35): Stays the same, unless you want to move Indra forward or backward
Byte 01 (18): Indicates the actual size entry. We want 6x6, which is size 04.
Byte 02 (B1): The palette - Indra uses palette CF
Byte 03 (02): Don't know what it does. Best not to mess with it.
Byte 04 (15): Indicates sprite arrangement. You can, and probably should, keep this the same. When I was at this point, I still did not fully understand what I was doing, so I started writing Indra over K. Eblan (size 9D). I thought I hit a roadblock when I discovered that both of K. Eblan's forms use the same sprite arrangement. Now I know that this is untrue, but it caused me to do something a little weird here. Because I had already arranged Indra over K. Eblan by the time I switched to using Valvalis, I kept K. Eblan's Sprite arrangement. So I changed this byte to 1E. If you're following this easily enough, you don't have to do that, but for the sake of demonstration I'll stick to describing exactly what I did here, exactly as I did it.
So now at 7D069 we have:
35 04 CF 02 1E

On to sprite arranging.
We are looking at the 1Eth sprite arrangement pointer in the index at 75100. Start at 00 and count up two bytes at a time to get to 7513C: BC D8
Add D8BC to 68200 to get 75ABC. This is the location of our sprite arrangement data.

Indra looks like this:
Code: [Select]
--XX--
XXXXX-
XXXXXX
XXXXXX
XXXXX-
XXXXXX
or:
Code: [Select]
--XX--XXXXX-XXXXXXXXXXXXXXXXX-XXXXXXAnd as with Jinn, these sprites all appear in order, so our arrangement data will look like this:
Code: [Select]
-- -- -- -- -- -- -- ----- -- -- -- FE 02 00 01
FE 02 02 03 04 05 06 FF-07 08 09 0A 0B 0C 0D 0E
0F 10 11 12 13 14 15 16-17 FF 18 19 1A 1B 1C 1D

That's it for Indra #1. Now for Indra #2...
We'll be writing over the details for Valvalis #2 now, at 7D06E:
35 18 B1 02 16
changes to
35 04 CF 02 02
All the same reasoning as above. Oops! looks like I was still wasting time messing with byte 04 here. So while we wrote over Valvalis #2's details here, we'll be writing over Titan #1's sprite arrangement. Ah well...
Sprite arrangement pointer 02 is 08 D0... Nope! look at this, I changed that, too. I was still learning, I guess. Looks like what I did here was point to just beyond the last bunch of arrangement data. My pointer 02 reads 60 DF.
68200 + DF60 = 76160
By default, this is a bank of ten lines of FFs. My custom Indra #2's sprite arrangement starts here. Sorry if this is a bit confusing, but at least it does show off some of the freedoms you have in this process.

The most notable thing about Indra #2 (in contrast to Jinn #2) is that some of the sprites from the first form are re-used. Notice, looking at Tile Layer, that Indra #2 doesn't have any feet. This is because between the two images, the bottom two rows of sprites are the same. This is something to keep in mind when planning your arrangement.
Indra #2 will look like this (Where "-" is empty space, "X" is a previously unused sprite, and "O" is a repeated sprite):
Code: [Select]
--XXXX
XXXXXX
XXXXXX
XXXXXX
OOOOO-
OOOOOO
or
Code: [Select]
--XXXXXXXXXXXXXXXXXXXXXXOOOOO-OOOOOOBe sure the sprites used in place of those Os are the same sprites used in the first image.
You'll end up with:
Code: [Select]
FE 02 1E 1F 20 21 22 23-24 25 26 27 28 29 2A 2B
2C 2D 2E 2F 30 31 32 33-13 14 15 16 17 FF 18 19
1A 1B 1C 1D

The only thing left now is to Edit the monster's AI. Whereas with Jinn (which used sizes 80 and 81), you first changed sprite to 1, then reverted to 0; for Indra you'll change sprite to 22 (that's 16 hex in base-10), then revert back to 21.

So there's Indra. I'm gonna go right into Shiva now, which should also be a demonstration of how, by the third time, I knew how to do this without any wasted steps...


1071
That's where I put it for testing purposes.
In the big hack I'm working on, It may replace some other command. What's nice about this is that it's a very short block of code, so It can replace just about anything (there are quite a few existing commands that I don't plan to use in my hack). I may need the big space you created by shortening Peep for something else. See, this, I think, would be a command available to my Blue Mage character, who would also have a "Blue" command, and possibly a "Learn" command, which would be entirely custom and (I think) a much longer string of code.

1072
Are you wondering what happens to the byte at 33C4 or are you wondering what becomes of the routine it arrived at 33C4 on? If it's the latter it gets overwritten for its original value, has a x2 added to it (to find its proper routine offset) and then it is replace by a 3 which is likely how the game reaches the address 03XXXX for Command Routines.

The former, actually. My guess is that the byte loaded into AV probably also gets an ASL and points to the AV sequence... whether that can be fully deciphered is another question, but if it leads to two byte pointers, then individual commands' movements are in fact replaceable (with those of other commands).

At any rate, this missing byte solved my Copy command!
Here's the code if anybody wants it:
Code: [Select]
AD 52 27  LDA $2752 ;Load target's last sub-action
F0 04     BEQ $04   ;If it's zero (not a spell), jump to the fight sequence
C9 A9     CMP #$A9  ;Compare it to A9 (the address of the highest desirable copied command)
90 0A     BCC $0A   ;If it's less (and therefore within desirable range), skip the fight sequence
A9 C0     LDA #$C0  ;Load Fight's AV identifier
8D C4 33  STA $33C4 ;Store into the AV loader byte in RAM
20 99 C4  JSR $C499 ;Jump to Fight subroutine
80 06     BRA $06   ;Jump to end
8D D2 26  STA $26D2 ;(having skipped past fight) Store target's last sub-action into caster's pending sub-action
20 46 CC  JSR $CC46 ;Jump to Magic subroutine
60        RTS

One limitation of this code that I am fine with - it only uses the action on the target, so you can't copy a monster's cure spell onto yourself. I'm OK with that. You CAN copy a white mage's cure spell back to them, so that's kinda neat.

Couple of things I haven't tested, but are probably problems (that can be fixed) -
I haven't tried to copy a party member's Dart. Items I've accounted for - they won't copy because useable items begin above A9. My guess, though, is that copying Dart will result in some weird spell being cast.
Copying summon spells will likely also be a problem, since castable summon spells get replaced in the sub-action byte by uncastable summon spells.
I think that these two issues can just be solved by changing the targeting options (in the index at 9FFC3) to "One enemy," thereby negating the ability to try copying a party member.

1073
Yeah... as long as command subroutine loads after the AV byte is loaded (which it seems to do), should be able to work that into a custom code.
I've pretty much finished developing what I'm calling a "Copy" command.

I tried to make Mime, but ran into a pretty big problem - in order to make it work, you'd have to reload $2700-$277F (the target's temporarily stored data). Unfortunately, the routine that loads the data from the in-battle character record (within $2000-$267F) to the target's temporary record is the same routine that calls the command subroutine and its AV effect. So I can mostly make it work - the Mime performs the same action on the same target as the Mimicked character - but the AV happens twice. I can perhaps best describe the phenomenon like so:
Code: [Select]
Load caster's data
Load Mime target's data
JUMP TO (command effect subroutine)
-----Copy Mime target's last action and target into caster's same
-----JUMP TO
----------Load new target's data
----------Jump to new command effect subroutine (and then return)
----------Run active command's AV
----------Return
-----Return
Run active command's AV

To make matters worse, this freezes the game when the mimicked command is Jump (probably Hide, too). I don't think there's a way to make it work...

So then I got to thinking smaller-scale. My custom Copy command essentially uses a monster's last action against it. I've tested it and it works perfectly, except that when the command is "fight" - really the only monster command that doesn't count as a spell - the character doesn't swing their weapon. I should be able to fix that now.

Something just occurred to me, though... the AV isn't indexed on the front end, but what's done with that byte after it's loaded into $33C4? Maybe I'll look into that tomorrow (after typing the summon tutorial I've been avoiding).

1074
Note:
Another mystery solved!

Code for Command Starting Graphics...
Code: [Select]
00-BF - Assigned by Spell.

C0 - Weapon Swing
C1 - None
C2 - White Magic
C3 - Black Magic
C4 - Summon Magic (Also includes the party vanishing)
C5 - Dark Wave
C6 - Character Jumps into the Air
C7 - Character does their Special Pose. (Recall)
C8 - Spell Pose is Held as White Magic light shows (Sing)
C9 - Run from battle (Hide)
CA - Just normal Spell/Item Use pose. (Salve)
CB - Pray
CC - Special Pose - Weapon Attack (Aim)
CD - Spell Pose is Held while attack happens (Focus)
CE - Kick
CF - Gird
D0 - Twincasting
D1 - Boast
D2 - Cry
D3 - Cover
D4 - Peep
D5 - Crash (Just a normal spell casting pose)
D6 - Dart (When used outside of its normal routine, shows a hand stuck in the foe as used in Fight without a weapon)
D7 - Sneak
D8 - Ninja
D9 - Regen
DA - Change
DB - Parry
DC - Character runs all the way from one side of the screen to the other, back to the front. ??
DD - Normal Spell Casting Pose.
DE - Return from Jump
DF - Second part of Focus (Attack)

Do you happen to know how/when/where the game uses these codes? Is it possible to assign a different pose to a command, like a spell-casting stance when using the Dart command, for example?

1075
You mean Jinn... Haven't done the Shadow Dragon tutorial yet!

1076
Dammit, Grimoire! I thought I was done researching summons    :happy:

1077
Hang on - when you say, "moves indra's sprite," (for example), do you mean that this contains the instructions for the summoned monster's image change?
I spent hours looking for that and never thought to look into what pointer 2 was doing.

1078
Ah, ok. I figured that's what you meant, but I forgot that's how Ff4kster refered to them.
Good find on pointer 2. I was beginning to think it was just unused. I wonder... is that also what makes, say, the screen turn blue for wave attacks, and other non-sprite effects like that?

1079
Sorry... can you explain that a bit more? Pointer 1 and 2 of what?
Also, an example of a graphic that appears regardless?

1080
When you cast a spell, the game checks if it is in the summon range, if so then it changes the value in the sub-action byte to the appropriate actual spell. It's a pretty straightforward process, but probably not very useful for what you're trying to do.