• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 02:44:07 pm

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


weapon sprites (in battle)

Started by Mando, January 30, 2011, 11:45:34 pm

Mando

Currently I have a small snag in my patch. Since I added new items. Changed up weapons via removal.
I have to match up whats in the item screen and the animation for when it calls forth the sprite.
Does anyone here know the number of colors that maybe used on the WEP palettes?
OR how to make it call forth the correct color I changed it to.
Either one would be helpful.

^ New FFAT website made by St4r!

Vanya

Those can be hex edited. Give me a little while to look through my notes and I'll post back later.
  • Modding version: Other/Unknown
¯\(°_0)/¯

Mando


^ New FFAT website made by St4r!

RavenOfRazgriz

I actually needed this info as well, because I remember seeing the need for hex editing being posted before but couldn't google-fu the answer, so I'm also much interested in these notes.

Vanya

February 01, 2011, 11:00:43 pm #4 Last Edit: February 02, 2011, 12:30:51 am by Vanya
Here's a big chunk of data I got from Cheetah.

-----Cheetah-----
Ah excellent. I think we have the two pieces to this puzzle. This is some information I found on the Japanese wiki. First byte changes the palette, the second byte changes the weapon icon I think but it looks all messed up. I believe that if you coordinate the stuff in the Patcher with this information it should work perfectly!

Battle.BIN Information

Weapon Palettes and Animations
0x02D3E6

2-byte increments (no address offset)
?:??? Example: Dagger
E0 00
? ?
?: palette on the left is (0,3 ~ F before), the right color effects??Missile (1: red 2: yellow, 3: green, 4: Brown, 5: White, 6: Purple ... F up also the same color)
?: graphic (this value of the basic data items SLPS +05 h (item type) is determined by the value of graphics)

SLPS here also have the same value and the values are different and different graphics.

-----Values in Battle.bin-----
0e 00 Dagger
0f 02 Mythril Knife
0e 04 Blind Knife
30 06 Mage Masher
d0 00 Platina Dagger
30 02 Main Gauche
51 04 Orichalcum
40 06 Assassin Dagger
40 02 Air Knife
82 04 Zorlin Shape

e0 08 Hidden Knife
e0 0a Ninja Knife
f0 08 Short Edge
30 08 Ninja Edge
40 0a Spell Edge
do 08 Sasuke Knife
60 0a Iga Knife
52 0a Koga Knife

e0 00 Broad Sword
e0 00 Long Sword
30 04 Iron Sword
f0 06 Mythril Sword
60 04 Blood Sword
70 02 Coral Sword
80 06 Ancient Sword
f0 00 Sleep Sword
d0 06 Platinum Sword
40 04 Diamond Sword
70 02 Ice Brand
50 00 Rune Blade
81 02 Nagrarock
81 02 Materia Blade

80 0c Defender
fo 0c Save the Queen
80 0e Excalibur
e0 0e Ragnarok
50 0c Chaos Blade

d0 10 Asura Knife
d0 12 Koutetsu Knife
d0 14 Bizen Boat
50 10 Murasame
40 12 Heaven's Cloud
30 14 Kiyomori
60 10 Muramasa
e0 12 Kikuichimoji
f0 14 Masamune
80 10 Chirijiraden

d0 00 Battle Axe
b0 00 Giant Axe
e0 00 Slasher

e0 16 Rod
92 18 Thunder Rod
91 16 Flame Rod
c0 18 Ice Rod
90 16 Poison Rod
f0 18 Wizard Rod
a0 16 Dragon Rod
b0 18 Faith Rod

d0 1a Oak Staff
70 1a White Staff
40 1a Healing Staff
e0 1a Rainbow Staff
d0 1c Wizard Staff
40 1c Gold Staff
50 1c Mace of Zeus
70 1c Sage Staff

f0 03 Flail
90 03 Flame Whip
a0 03 Morning Star
d0 03 Scorpion Tale

d1 00 Romanda Gun
a1 00 Mythril Gun
e1 00 Stone Gun
d1 02 Blaze Gun
e1 02 Glacier Gun
b1 02 Blast Gun

e0 00 Bow Gun
f0 00 Night Killer
a0 00 Cross Bow
b0 03 Poison Bow
30 03 Hunting Bow
f0 03 Gastrifitis

d0 00 Long Bow
70 00 Silver Bow
e0 00 Ice Bow
f0 00 Lightning Bow
30 00 Windslash Bow
e0 03 Mythril Bow
c0 03 Ultimus Bow
b0 03 Yoichi Bow
f0 03 Perseus Bow

80 00 Ramia Harp
60 00 Bloody Strings
f0 00 Fairy Harp

d0 00 Battle Dict
e0 00 Monster Dict
a0 00 Papyrus Plate
b0 00 Madlemgen

d0 00 Javelin
d0 02 Spear
f0 00 Mythril Spear
a0 02 Partisan
40 00 Oberisk
f0 02 Holy Lance
c0 00 Dragon Whisker
80 02 Javelin

c0 04 Cypress Rod
a0 06 Battle Bamboo
f0 04 Musk Rod
30 06 Iron Fan
60 04 Gokuu Rod
c0 06 Ivory Rod
e0 04 Octagon Rod
b0 06 Whale Whisker

e2 00 C Bag
a2 00 FS Bag
d2 00 P Bag
d2 00 H Bag

f2 00 Persia
a2 00 Cashmere
92 00 Ryozan Silk

e0 00 Shuriken
60 00 Magic Shuriken
40 00 Yagyu Darkness

60 00 Fire Ball
70 00 Water Ball
80 00 Lightning Ball

50 00 Escutcheon
e0 00 Buckler
e0 06 Bronze Shield
30 00 Round Shield
a0 06 Mythril Shield
f0 00 Gold Shield
80 06 Ice Shield
70 00 Flame Shield
60 06 Aegis Shield
60 00 Diamond Shield
d0 06 Platina Shield
d0 00 Crystal Shield
d0 06 Genji Shield
70 00 Kaiser Plate
30 06 Venetian Shield

80 00 Leather Helmet? New Data?
80 06
00 00
00 00
b6 00
06 01
2d 01
30 01
33 01
55 01
e9 01
00 02
72 02
ab 02
1d 03
00 04
55 05
56 05
8e 05
b0 05
c7 05
00 06
39 06
72 06
ab 06
cd 06
e3 06
1d 07
55 07
00 00
00 00
0x2d53f


I've done some research and have found that the values depend on the weapon type chosen and that they are split up into certain groups.
For example, swords, ninjato, knight swords, katana, rods and staves share the same graphic area. The Bytes on the left are palette stuff and the one on the right is the graphics pointers. All weapon groups I've tested use increments of 2 except Axe/Flail. I still need to test weapon types after spears & poles.
  • Modding version: Other/Unknown
¯\(°_0)/¯

RavenOfRazgriz

This is great, thanks very much Vanya.

...Though, can I get the retard-friendly version because my brain is currently a piece of mush that somehow feels like its missing something after fighting with Graphics Gale all day?  I get the feeling I'm not the only one who'll need it anyway.

Vanya

After loading BATTLE.BIN in a hex editor search for this address: 0x02D3E6
Every 2 bytes = one equipment slot corresponding to the order in the patcher.

xxyy

xx=palette
yy=graphic slot from WEP1.SPR

The specific graphic that is linked to each value depends on the item type set in the patcher.

swords, ninjato, knight swords, katana, rods and staves share the same section of WEP1.SPR
The other shared sections I know of are axes/flails, knives, & spear/poles. I haven't tested anything beyond that.
It's possible to redraw some parts of WEP1.SPR to add more graphics of certain types be overwriting some unused graphics.
  • Modding version: Other/Unknown
¯\(°_0)/¯

RavenOfRazgriz

xx is easy enough, it shares the same 0-F palette info used by FFTPatcher I assume.

You lost me on yy.  I have WEP1 opened but I don't see any correlation between the bytes in your quoted notes from Cheetah and what's actually on the sheet, unless I'm reading things horribly wrong. So, do I set the Item Type in FFTPatcher, which loads a base "table" to draw from, and then change the byte itself in Battle.bin which tells it which graphic off that table to reference?  This is what I infer when I read you talking about how things "share sections", since they seem to be grouped based in very similar graphics.  (The various sword types, rods, and staves are all similar in terms of graphic size, as are Spears/Poles, as are Flails/Axes, so this seems to be a sensible deduction.)

But even deducing this, it still doesn't tell me exactly what value to set for YY to call up a specific graphic, just that the graphics are called by the Item Type and YY together.  Is there an easy way to do this?


Vanya

Quote from: RavenOfRazgriz on February 02, 2011, 01:51:47 am
So, do I set the Item Type in FFTPatcher, which loads a base "table" to draw from, and then change the byte itself in Battle.bin which tells it which graphic off that table to reference?


This is correct. They do indeed work together.
You start with yy =00 for the first graphic in each section. So if you were to set a Rod to 00 it would look like the first sword at the top with that rod's palette. For most graphic sections you increment by 2 to get the next complete graphic, otherwise you are using the bottom of one and the top of the next. Therefore if yy = 02, you are setting the rod to the second sword graphic from the top. Axes/Flails use increments of 3.
  • Modding version: Other/Unknown
¯\(°_0)/¯

RavenOfRazgriz

That actually should make things fairly simple, knowing that.

Now that I know how to read it, it also looks like Longbows and Crossbows use increments of 3, Guns use increments of 2, and Shields use increments of 6.

This should help me greatly and now should be retard-friendly enough for almost anyone to use, barring someone who needs a visual aide.  Thanks much.

Vanya

You're welcome! ^_^
I really should finish documenting this whole thing and write it up so we know what works what doesn't and what values use what areas of WEP1.SPR
  • Modding version: Other/Unknown
¯\(°_0)/¯

RandMuadDib

hey just wondering if you ever finished documenting everything for us retard-strong out here? If not i'll try messing with it tomorrow and see if i can understand what you're saying.
I will show you the power of SARDIIIIINES!!!!

Vanya

Naw. I've been too busy dealing with some really heavy life issues.
So, by all means, feel free to continue the documentation and post back your findings. ^_^
  • Modding version: Other/Unknown
¯\(°_0)/¯

RandMuadDib

i myself am busy as well but if i get a chance to mess around with it i'll post what i find.
good luck with your 'heavy life stuff' and i hope its not too heavy
I will show you the power of SARDIIIIINES!!!!

Vanya

Thanks. I'm gonna need all the luck I can get.
  • Modding version: Other/Unknown
¯\(°_0)/¯

RandMuadDib

February 23, 2011, 02:55:44 am #15 Last Edit: February 23, 2011, 02:09:10 pm by RandMuadDib
Well here's what i've discovered so far. Its not much and i think most of it has been posted elsewhere on the site.

XY ZZ

As we know there's two bytes for each item slot. The first byte is comprised of two single-digit hex values, X and Y. The second byte is (most likely) a single two-digit value. Granted i haven't tested past daggers yet.

X controls the palette according to WEP1 in Shishi's. This controls the color of the weapon, essentially. Some palettes are more well defined than others.
Y controls the palette of the weapon effect (slashing blur, etc) of the attack, as defined in WEP2, below. While you can browse the palettes in shishi's, i'll say here that it seems to cycle various colors, including blue, red, yellow, green, brown, purple and grey (or gray).

Although now that i think about it i may have to test to see if perhaps the two ZZ digits are actually ZA, where A is the weapon sprite (determined by type) and Z is the effect sprite (also, most likely, determined by type). Needs further testing, will update with results.

Edit:  So that last thought was wrong. The two ZZ digits are definitely connected. After testing two daggers that were 00 00 and 00 10 i was expecting the same daggers with the same palettes to produce different swoosh effects, and instead i got a dagger and a pole. Definitely still XY ZZ.

Edit 2: Alright well. I finished testing the daggers. Its mostly garbage when ZZ is higher than 06, though you can definitely tell that the garbage is parts of other items (if you're looking at WEP1). When ZZ was 20, it looped back around. Some quick math revealed that each single increment of ZZ is 8 pixels. (i.e. 01 is 8 px lower than 00) Its late and i'll move on to whatever weapon group is next tomorrow. gross, ninja blades. i can't even pick one out on WEP1.
I will show you the power of SARDIIIIINES!!!!

Vanya

Are you certain about the palette being two single digit values? 'Cause that's pretty significant.
  • Modding version: Other/Unknown
¯\(°_0)/¯

RandMuadDib

February 23, 2011, 02:07:57 pm #17 Last Edit: February 23, 2011, 03:22:26 pm by RandMuadDib
I am fairly certain. There was a similar thread i saw a while back that suggested this, and i just checked to confirm. Let me see if i can find the thread.

Yup here it is.
http://ffhacktics.com/smf/index.php?topic=534.20

In fact, it was your post Vanya that led me to this conclusion.


Quote from: Vanya on September 27, 2009, 03:22:11 pm
Let's see if I'm understanding everything correctly...

XY ZZ
X = main weapon palette.
Y = projectile palette.
ZZ = specific graphic within it's group.


Although i'm not sure what you meant by projectile. I thought you meant arrows and crossbow bolts, but it turned out to be the swoosh/blur effects i mentioned before.

Edit: Another thing i've found, or at least have been confused about: When i was going through the dagger sprites, I found that there are more than one picture or perhaps frame per sprite, and i could not tell them apart from the screenshots i took in PSx. For example, a weapon with type Knife and a ZZ value of 00 seems to correspond to the first -row- of daggers in WEP1, not just one of them. I haven't yet figured out if one is used for the attack animation and the other is used for, say, weapon guard. I'm going to have to recolor them to figure it out.

Edit 2: Further testing reveals that each row is essentially the same sprite, just different frames within the sprite.
I will show you the power of SARDIIIIINES!!!!

Vanya

Quote from: RandMuadDib on February 23, 2011, 02:07:57 pm
Edit: Another thing i've found, or at least have been confused about: When i was going through the dagger sprites, I found that there are more than one picture or perhaps frame per sprite, and i could not tell them apart from the screenshots i took in PSx. For example, a weapon with type Knife and a ZZ value of 00 seems to correspond to the first -row- of daggers in WEP1, not just one of them. I haven't yet figured out if one is used for the attack animation and the other is used for, say, weapon guard. I'm going to have to recolor them to figure it out.

Edit 2: Further testing reveals that each row is essentially the same sprite, just different frames within the sprite.


That's correct. It's the same with all the weapon sprites. I think your confusion might stem from a misuse of the term sprite. In video games a sprite is a collection of images used to represent an object. It's often the case that an object needs only one image, but in this case the object doesn't technically have a sprite. It just has a graphic.
  • Modding version: Other/Unknown
¯\(°_0)/¯

RandMuadDib

Alright i've cataloged all of the weapons, their battle.bin offsets, and the ZZ values for everything. it doesnt look like i've discovered anything truly new at this point, but a proper list is always handy to have. I wont have time to post my findings for a few days as i just got promoted and i've got a terrible cold, but as soon as i have a day off i'll post the list and a few .png files for everyone.
I will show you the power of SARDIIIIINES!!!!