Qhimm.com Forums

Miscellaneous Forums => Archive => Topic started by: Genji on 2005-11-04 12:16:40

Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-04 12:16:40
I've made Guard Scorpion's Rifle Fire Elemental -)
Code: [Select]

000510 01 00

I've equiped Fire Armlet (Jenova helps here) and Rifle healed me.

P.S. I still haven't received file :\ Did you sent it ?

[EDIT] It seems 00x18h is elemental property
00x19h is type of attack : Shoot, Punch, Hit etc.

00x0Eh=23h changes attack type to HP or MP Based and 00x0Fh is damage.
For example if 0Fh=10h, then attack will deal 16/32 Current HP damage.
How about to make Sight Scope deal HP damage -) (j\k)

[EDIT2]
Jenova-Life have 4 moves.
How about to make Blue Flame HP Based and Non-Elemental, and Blue Light Non-Elemental and target all opponents. Jenova must be HARD.
Same for other bosses. Giving them one HP-Based attack will make battles interesting )) Excpecially Proud Clod (Boring battle ever)

00x18 ->
00 -Non Elemental
01 - Fire
02 - Ice
04 - Lightning
08 - Earth
10 - Poison (not sure)
40 - Water
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-07 04:06:56
How progress going ? I still want to test mod, but but I still haven't received file .... ))

Btw, How about to make Guard Scorpion's Rifle to deal dmg on multiple targets ? I guess I found offset to do this.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-09 14:23:24
Hi
Sorry I have been away on a break for a week.
You have lost me with the offsets, where are you starting from?
I will send that scene file to you, hopefully you can explain the offsets better and which section of the scene file you are referring to.
The scene file is split up accordingly (see http://wiki.qhimm.com/ff7 and look at the battle scene info).
So is this in the attack info section, enemy ai or something else?
Is your offset for that section or the whole file.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-09 15:39:16
It's in 'Gears'. Look for 'scene.bin format' and there will be ' Data file specification'. Look for 04C0 Offset named 'Attack Data 1'

Or here : http://wiki.qhimm.com/FF7/Battle/Battle_scenes
Look for 'Data File Format'
Attack Data stored here :
0x04C0    32 * 28 bytes    Attack Data (32 records)
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Armorvil on 2005-11-09 15:50:53
Genji, I love you. I've been waiting for this kind of info and such a link for a long time. A long, long time :D

Now, it's easy to turn Blue Light's name into something else and to make it non-elemental ^__^

Gotta love those hex-editors =)
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-09 15:58:55
Heh. Dont get excited yet -) It need testing.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Armorvil on 2005-11-09 17:08:05
I'm in the process of making Shizo's Double Breath non-elemental (because really, a character who absorbs either Fire or Ice shouldn't absorb both elements), and I noticed something.

Schizo's data is in Scene186. I opened it with my hex editor and noticed that the Attack Data is listed in the same order as the Attack names. In other words, starting at address 0x04C0, you find :

(from Schizo's right head)

Right Breath, at address 0x04c0
Right Breath 2 (its final attack),at address 0x04DC
Double Breath, at address 0x04F8
Tremor, at address 0x0514
Right Breath, at address 0x0530
Right Breath 2, at address 0x054C
Tremor, at address 0x0568

(from Schizo's left head)

Left Breath, at address 0x0584
Left Breath 2, at address 0x05A0
Double Breath, at address 0x05BC
Tremor, at address 0x05D8
Left Breath, at address 0x05F4
Left Breath 2, at address 0x0610
Tremor, at address 0x062C

(and from Jenova : DEATH)

Red Light, at address 0x0648
Tropic Wind, at address 0x0664
Silence, at address 0x0680

Now, I wonder why there are two Right/Left Breath #1 and #2, and two Tremor for each Schizo head ? Are some of them unused or what ?

EDIT :

Oh, now I get it. They had to make two Right/Left Breath and 2 Tremor because when head part dies, the one being alive changes its behavior... And that explains why Double Breath is missing :)

EDIT 2 :

I have a question... Let's say I make the Soul Fire's (you know, the flame spirits accompanying GI Nattak in Cosmo Canyon) Fire 2 into a non-elemental spell. Will the characters' Fire 2 be non-elemental too ? I don't think so, but I need to be sure...
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-10 04:46:07
Quote
Schizo's data is in Scene186. I opened it with my hex editor and noticed that the Attack Data is listed in the same order as the Attack names.

Yeah ! That why I found them. And btw, Enemy Mechanics FAQ by Terence - great help here. Download it at Gamefaqs. It have all needed information about enemies and their attacks.

Quote
I have a question... Let's say I make the Soul Fire's (you know, the flame spirits accompanying GI Nattak in Cosmo Canyon) Fire 2 into a non-elemental spell. Will the characters' Fire 2 be non-elemental too ? I don't think so, but I need to be sure...

I think you modify only Soul Fire's Fire 2. But you can test it anyway ;)
I dont have saves because I just got my PC copy. So I had testing all my ideas at Guard Scorpion's Rifle -)

[edit]
00 x 0E.
I think 11 it is a physical type damage; 22 magical type damage; 23 percentage based.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-10 08:43:11
Some good calls here, and Genji thanks for telling me which section you were referring to.

Changing the Attack name is simple but remember it cant be in standard ASCII, i think it is easier to use Ficedula's FF7TEXT program to quickly convert lots of text in a text file in to a FF7 compatible text format.

I have a save before the Gi cave if you still need it.
in fact I have lots of saves at the moment, mainly up to Temple of the Ancients but others from later in the game.

I will read Terrence's Enemy Mechanics FAQ and also take a look right now at the enemy attack info.

EDIT: Genji, are you changing these values everytime and then saving the scene.bin and then testing in game or have you tried editing in the memory realtime?
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Armorvil on 2005-11-10 13:38:01
Quote
Yeah ! That why I found them. And btw, Enemy Mechanics FAQ by Terence - great help here. Download it at Gamefaqs. It have all needed information about enemies and their attacks.


Yup ! I've been using it since your previous post, Genji :)
I always have an eye on Qhimm while my other eye checks GameFaqs ;)

Quote
I think you modify only Soul Fire's Fire 2. But you can test it anyway ;)


The bad thing is, I can't test it unless I burn an ISO : the only working platform which runs FF7 correctly is my PSX. You won't believe it, but my PC is so messed-up it can't even run FF7 PC or a PSX emulator.
I manage to make a balanced little mod for my own use, because I already burnt a patched FFVII and I use it as the base for my new changes (I took note while playing it, such as "Diminish Hell Rider VR2's strength by a few" or "Raise Reno's M-Att by a lot", this kinda things).

I'm still thinking of finding a way to test my changes on my computer though - it'd be a lot safer.

Quote
[edit]
00 x 0E.
I think 11 it is a physical type damage; 22 magical type damage; 23 percentage based.


Awesome discovery ! :D
By the way, any idea where to find the byte which sets an attack to target the whole party, as opposed to targeting a single ally ?
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-10 13:38:21
Quote
EDIT: Genji, are you changing these values everytime and then saving the scene.bin and then testing in game or have you tried editing in the memory realtime?

First. I dont have programs to edit memory. Only HEX editor.

Side note.  My game freezes when Aerith uses 'Healing Wind' =\
Is it XP problem or something other ....

EDIT :
Quote
By the way, any idea where to find the byte which sets an attack to target the whole party, as opposed to targeting a single ally ?

I think it is 00x0C ;
03 - Single Target, 07 - Multiple Target (Spliting)
00x0F - it is a damage modifier (Pwr)
00x00 - Attack accuracy
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-10 15:11:17
you can use L.Spiro's Game editor MemHack
http://www.memoryhacking.com/index.php its free and if you need advise like where to search or how to I can help.
Major tip is to look at one section in your enemy attack info and search for those values AFTER you have had one fight on that same screen, so the game has had a chance to upload the scene file to memory.


I will prepare a quick diagram with all these values (the ones you have discovered )in this evening for better viewing.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-10 16:05:17
Thanks. I will try it later.

Hmmm... I've tested No Elemental Jenova. I made Blue Light, Blue Flame and Aqualung non-elemental, went to game and equipped Water Ring.
Result : Blue Light and Blue Flame DEALS damage ! -) But no Aqualung. Aqualung healed me.

So I think Fire2 from Soul Fires will be Fire Elemental. Seems spells elemental property stored somewhere else, and will affect spells casted by enemy and player.

P.S. I've fixed my problem with 'Healing Wind'.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-10 17:12:04
what was the problem with Aeris limit break?

I have a feeling attacks that are generic (magic) are in the kernal.bin file since they are stored with materia and their associated magic information and animation references.

So Ultima that you can equipt might be the same Ultima that say Jenova Synthesis uses?

Aqualung, was its attack information in that section, have you tried changing something other than elemental (type of attack, percentage based, power, etc)?
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-10 18:16:09
Starting at 0x4C0 in the scene file the enemy attack data is at 0x28 Byte sections for each attack in the order as shown in

the Attack Names Section just after it.

KEY:
Code: [Select]

 AC = Accuracy
 IA = Impact Animation
 TA = Target's Animation
 MP = MP Cost
 TY = Attack Type ?(taken from AttackHacks.txt)
 TG = Target - Single / Multiple
 ID = Attack ID
 TD = Damage Type
 PW = Power Modifier
 RT = Restore Type & Chance of Affliction
 ST = Status afflictions
 EL = Elemental Type - Fire / Ice / etc
 


Examples:


MYSTERY NINJA
SCENE FILE 70

Code: [Select]

Attack Name:FIGHT
Located at:0x4C0

<AC|IA|TA>--<MP>--------------<TY>--<TG|ID|TD|PW>
 5f 30 00 ff 00 00 23 00 ff ff ff ff 0b ff 11 10
 ff ff ff ff ff ff ff ff 00 04 ff ff                  
<RT>--------<----ST-----|-EL-->-----

SPIDER WEB
0x4F8
<AC|IA|TA>--<MP>--------------<TY>--<TG|ID|TD|PW>
 5f ff 00 ff 00 00 ff ff ff ff ff ff 0b 02 11 00    
 ff 3f ff ff 00 02 00 00 00 00 ff ff                
<RT>--------<----ST-----|-EL-->-----


GUARD SCORPIAN
SCENE FILE 82
Code: [Select]


RIFLE
0x4F8
<AC|IA|TA>--<MP>--------------<TY>--<TG|ID|TD|PW>
 64 2e 00 ff 00 00 23 00 ff ff ff ff 03 ff 11 10
 ff ff ff ff ff ff ff ff 00 20 ff ff    
<RT>--------<----ST-----|-EL-->-----


MOTH SLASHER
SCENE FILE 110
Code: [Select]


BOLT
0x4f8
<AC|IA|TA>--<MP>--------------<TY>--<TG|ID|TD|PW>
 64 ff 00 ff 16 00 ff ff 0d 00 24 00 0f 1f 22 14    
 ff ff ff ff ff ff ff ff 02 00 ff fd                
<RT>--------<----ST-----|-EL-->-----

SLEEPEL
0x514
<AC|IA|TA>--<MP>--------------<TY>--<TG|ID|TD|PW>
 64 ff 01 ff 08 00 ff ff 03 00 24 00 0f 0b 22 00    
 ff 12 ff ff 04 00 00 00 00 00 ff fd                
<RT>--------<----ST-----|-EL-->-----

Code: [Select]

Known Values:

 AC = Accuracy

 IA = Impact Animation

 TA = Target's Animation
01 - Shiver
02 - Target flies into air and crashes to ground
03 - Flies out of battle scene (becomes invicible)
04 - invicible
ff - Normal (taking damage animation)

 TY = Attack Type ?

 TG = Target - Single / Multiple
03 - Single Target
05 - Multiple Target  

 ID = Attack ID
01 - Fire Ball
16 - Beam Gun
17 - HP Drain Animation
18 - Rude Earth Shock Attack?
19 - Explosion
1a - Tsunami
40 - Smoke Shot
50 - Waterpolo Attack
a0 - Blade Beam Limit Break Projectile

 TD = Type Of Damage - HP / MP / Percentage Based
11 - Physical
22 - Magical
23 - Magical HP\MP Based
24 - Restore Max HP Percentage.
25 - HP Restore
26 - Magical Fixed Damage * 20 (?)
60 - White Wind (Max HP Based, Barrier ignoring)
61 - ???? (Current HP of User - based)
69 - Chocobucle (Quanty of escapes - based)
83 - Level Based (L4 Suicide, L5 Death)

 PW = Power Modifier
Combined with DM = 23
21 - Damage Equal to Current HP (100%)

 RT = Restore Type
00 - Restore HP
01 - Restore MP
02 - Restore Ailment
<3F - Inflick Positive Status
<7F - Cure Status (Please explain)
<92 - Toggle Status (Mini, Toad)
FF - None

 ST = Status Afflictions (4 Bytes)*
0x00000001 Death
0x00000002 Near-Death
0x00000004 Sleep
0x00000008 Poison
0x00000010 Sadness
0x00000020 Fury
0x00000040 Confusion
0x00000080 Silence
0x00000100 Haste
0x00000200 Slow
0x00000400 Stop
0x00000800 Frog
0x00001000 Small
0x00002000 Slow-numb
0x00004000 Petrify
0x00008000 Regen
0x00010000 Barrier
0x00020000 MBarrier
0x00040000 Reflect
0x00080000 Unused
0x00100000 Shield
0x00200000 D.Sentence
0x00400000 Manipulate
0x00800000 Berserk
0x01000000 Peerless
0x02000000 Paralyzed
0x04000000 Darkness
0x08000000 Dual
0x10000000 DeathForce
0x20000000 Resist
0x40000000 Lucky Girl
0x80000000 Imprisoned

 EL = Elemental Type (2 Bytes)*
0x0000 Non Elemental
0x0001 Fire
0x0002 Ice
0x0004 Lightning
0x0008 Earth
0x0010 Poison
0x0020 Gravity
0x0040 Water
0x0080 Wind
0x0100 Holy
0x0200 Restorative
0x0400 Cut
0x0800 Hit
0x1000 Punch
0x2000 Shoot
0x4000 Shout


*Please note for multiple bytes (DWORD, etc) they are interpreted back to front
ie: 0x4000 would be seen in the file/ram as 00 00 00 40
    0x0400 would be seen in the file/ram as 00 00 00 04
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: ficedula on 2005-11-10 22:00:23
Refer to Terrence's Battle Mechanics document on Gamefaqs. Attack "types" (cut, punch...) are actually just elements. Therefore the element is a 2-byte value, containing up to 16 possible elements (well, 15+hidden, according to the Battle Mechanics).
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-10 22:07:03
NEW:
I was playing with the Sweeper enemy in scene file 81, he has a projectile attack called Smoke shot (looks like a shot of smoke  :) )
look below:
Code: [Select]
0x530:4b ff 00 ff 00 00 ff ff ff ff ff ff 03 *40* 11 18    
0x540:ff ff ff ff ff ff ff ff 00 20 ff ff


The value *40* I changed to 01 and the Projectile animation changed from a shot of smoke to a Fire projectile (like a ball of fire being shot)
I will update my post above to include this
excuse my spelling :)

Ficedula: Thanks for the update, I will read the battle faq, I just finished looking at the enemy one so when thats done it should help fill some gaps

EDIT: got the values wrong way around
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Armorvil on 2005-11-11 00:35:41
Wow, you rock, Skillster ! :D
And your spelling is perfectly fine, by the way.

I wish I could run tests on my PC too, in order to enlarge these known values... *curses his computer*

And thanks for the info, Genji :)

I have another question, if you don't mind : does changing a spell/attack's targeting also changes the animation/camera moves ? I don't think so, and it is what keeps me from trying targeting changes for my PSX patch... If you don't see a Fire 2 graphic effect for each character, it would be lame. But I could deal with the camera problem (you know, the camera shows the sole targeted character sometimes... I imagine damage for the two other party members would still be seen at the edge of the screen though). How does the game reacts when targeting is changed this way ?

(sorry for my bad English)
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-11 04:31:48
I will use Sweeper's Attack Data
My thoughts...
Code: [Select]
---------IA-TA----MC-----------------------------------
0x530:4b ff 00 ff 00 00 ff ff ff ff ff ff 03 *40* 11 18    
0x540:ff ff ff ff ff ff ff ff 00 20 ff ff

IA - Impact Animation (Animation used then attack contact it target)
TA - Target Animation
02 - (target will fly into the air and fall down)
MC - MP Cost (SURE)
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-11 06:54:22
ooh nice work Genji!
Some additional Notes.
If you Specify Multiple targets:
 - If it is a physical attack (ie punch) the enemy will attack all players with one animation and you will see IA and TA (see Genji's posrt) for all players.

- If it is a projectile attack which is single target based (fire ball for example) the enemy will;
         - make n attacking animations (n being how many players you have) followed by n projectiles and you will see IA and TA for all players.
         - make one attacking animation followed by n projectiles and you will see IA and TA for all players (example waterpolo attack).


Side Note: I found the memory location for the Enemy Attack Data if you are interested - you can change various things DURING the fight and the next attempt of using that attack will be effected (IE: I used it to test projectile animations).

I found the 2nd attack (Beam Gun in my case for scene 81) at:
0x9A90E0 so look around that area (using a ram viewer) and you will the other attacks too, note during a battle
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-14 20:45:18
Made some more tests tonight on my laptop before I realised I was editing the wrong values (as well as locking up FF7) before my battery ran out.

I found values to make players disappear, and various damage animations please see the main post above.

Main discovery is that the TA and the IA are indeed the wrong way around.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-15 05:20:49
Huh ??
You switched them ??
- MP cost IS 00x04. Not 00x05

- And IA with TA they are 00x01 and 00x02, but you put them like 00x03 and 00x02

Right breath for example :
Code: [Select]

     00  01  02  03  04
4C0  FF  FF  00  FF  0A


00x04 here is 0A. Right Breath costs 10 MP
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-15 10:17:17
you know what, oh CRAP!
I missed out a byte  :oops:
I will go back and fix those.
Strange how you can make the players invisable though, must be in the AI script to remove the player from battle after such a move for enemies like midgar zolom.

EDIT:

Looking at some of the status attacks above (spider web causes slow, sleepel causes sleep) my guess is for the byte which tells you what status will be forced open the target:
Code: [Select]
SPIDER WEB
0x4F8
<AC|IA|TA>--<MP>--------------------<TG|AN|DM|PW>
 5f ff 00 ff 00 00 ff ff ff ff ff ff 0b 02 11 00    
 ff 3f ff ff 00 02 00 00 00 00 ff ff                  
---<ST>-----------------<EL|TY>-----


My guess is that <ST> is Status aligment and here are some test numbers:
12 - Sleep
19 - Blind
3F - Slow.

I will test this tonight and confirm this.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-15 18:10:09
Strange, I set the byte i was guessing is status to 3F to test sleep
I used beam gun from the grunts on scene 81.
Strangely, after being hit the target shivers continously after both players got hit I got game over..
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-16 08:59:35
Can some Admin do me a favour, please look back to where this enemy attack data investigation started and split the thread into two?
Since now it isnt about my Hardcore Mode, and I would like other people to see this info and get involved with it.
Maybe name it "Editing Enemy Attack Data"?
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: The SaiNt on 2005-11-16 22:30:56
Did a quick skim though, done. ;)
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-17 05:19:08
Quote
Strange, I set the byte i was guessing is status to 3F to test sleep


Hmm... did you noticed that after 3F (Spider Web) goes FF FF and then offsets with 00 -> (00 02 00 00). May be they important to. For the status attack.

But in other hand. I've fully changed 'Rifle' offsets to 'Super Nova' and attack was like 'Super Nova' (percentage based, multiple targets, 4th turn) BUT no Slow, no Confuse, no Silence were added:(
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-17 08:50:55
I Think those 4 bytes you mentioned are more important than the 3f i mentioned.
possibly multiply status effects wouldnt fit in the attack data and were put in the enemy AI data?
Did you get which animations when you swapped the offset?
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Tonfa on 2005-11-18 03:35:45
Bytes 9-12 are used for camera movement during attacks. Some examples:

Code: [Select]
01 01 01 01 - Drift Turn
3C 01 3C 01 - Escape
96 00 96 00 - L4 Suicide
9F 00 9F 00 - Matra Magic
D2 00 D2 00 - Beam Gun
D3 00 D3 00 - Search Scope
D4 00 D4 00 - Tail Laser
D6 00 D6 00 - Sinking
D8 00 D8 00 - Silk
E7 00 E7 00 - Sewer/Hot Springs


Byte 18, in conjunction with bytes 21-24 is used for status infliction, as you thought.
Code: [Select]

3F, 00 02 00 00 Slow
3F, 00 10 00 00 Mini
02, 20 00 00 00 Fury


You can have attacks that inflict multiple status, for example changing byte 22 to value 12 makes attack cause Mini and Slow.

Hope this helps. I'll keep on researching the data.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: L. Spiro on 2005-11-18 07:04:53
This has all been hacked already.
I believe a certain someone’s notes describe every bit of the format, but he didn’t share his notes with me yet for whatever reason, so I have to post information that is a bit outdated, but explains the essentials anyway.

Tonfa, your data for Escape is wrong, and the four bytes do not relate to camera motions.


http://www.memoryhacking.com/Misc/FF7Stuff.zip

I also have all the enemy attacks, but I can not find them.


And of course statuses are 4 bytes because there are 32 statuses (one unused?), and each status is assigned a single bit.
So naturally to get more statuses into a DWORD you just flag the bit related to the status.
Thus you can make an attack inflict every status in the game by setting it to 0xFFF7FFFF.

Maybe that certain someone’s notes better explain byte 18, but it should be the chance of the status being inflicted.
I did not do enough research many years ago to fully decode it, but it should be a chance of infliction from 00-3F or 00-7F, then where it goes over this number it has a second implied meaning of some nature, similar to the way steal/drop ratios work in enemy data (if you are clueless, do your homework better).



Undocumented is the first byte, which, if under 10, is the level modulus required for the attack to hit.
Thus L4 Suicide has a 4.
I did not decode the various other meanings it has if not a level-hit indicator, but 4B (from a quick glance) most likely means it does not work on bosses.


L. Spiro
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-18 07:42:41
Wow ! O___O

Attack Data dump is great find. Lot things to study.

Quote
Undocumented is the first byte, which, if under 10, is the level modulus required for the attack to hit.
Thus L4 Suicide has a 4.

First byte stands for Accuracy I think

Quote
but it should be a chance of infliction from 00-3F or 00-7F

- 3F - Inflict Positive Status;
- 7F - Cure Status;
- 92 - Toggle Status (Mini, Toad);
If less than 3F then chance of status infliction (may be)

Type of Damage (TD):
11 - Physical
22 - Magical
23 - Magical HP\MP Based
24 - Restore Max HP Percentage.
25 - HP Restore
26 - Magical Fixed Damage * 20 (?)
60 - White Wind (Max HP Based, Barrier ignoring)
61 - ???? (Current HP of User - based)
69 - Chocobucle (Quanty of escapes - based)
83 - Level Based (L4 Suicide, L5 Death)
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-18 08:53:38
This is great stuff.
But what really cheeses me off is that after almost two/three weeks of me and Genji looking and hacking for possible bytes someone comes along and says "hey its been done already".
Where were you before?
Oh well, need to start from scratch I suppose.
I hate the way FF7 reuses the same byte for multiple things, such as below such a number in the first byte and it is the level modulas etc etc.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Tonfa on 2005-11-18 09:05:52
I suspected as much. Well, it's a great thing we have this data already. Some things:

Quote from: L. Spiro

Tonfa, your data for Escape is wrong, and the four bytes do not relate to camera motions.


Hmm? The four bytes most certainly *do* have something to do with camera motions. I tested them and managed to, for example, get the camera motion normally used by L.4 Suicide to Guard Scorpion's Rifle.

Also, the "Escape" means the Escape technique used by Prowler.

Quote

Quote
but it should be a chance of infliction from 00-3F or 00-7F

- 3F - Inflict Positive Status;
- 7F - Cure Status;
- 92 - Toggle Status (Mini, Toad);
If less than 3F then chance of status infliction (may be)


I noted that this had something to do with status accuracy soon after my first post. 3F is 100% (or very, very near 100%) status infliction from my experience, and can be used for negative statii as well.

Regarding the first byte, it stands for accuracy for most stuff. It is the level modulus for attack type 83.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: L. Spiro on 2005-11-18 09:11:10
Quote
But what really cheeses me off is that after almost two/three weeks of me and Genji looking and hacking for possible bytes someone comes along and says "hey its been done already".
Where were you before?

The first reason would be that I avoid this section like the plague.
I go into Game Tweaking to hit “Mark All Topics Read” so they don’t show an orange icon on the main list (really tired of “WAH MY GAME CRASHES”).
I know this was split once already, but it should have been placed in Tech-Related, where we normally handle exposing file formats.

I had a second reason, which almost made me not post at all, but I changed my mind and that reason no longer exists.


L. Spiro
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-18 09:29:00
Thanks anyway L.Spiro.
The attackHacks.txt will be very handy, since I hate going through the scene files looking for specific attacks.
The camera bytes; these most likely relate directly to specific motions like you mentioned which are used in other moves.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: L. Spiro on 2005-11-18 09:31:25
My second reason, although gone, has me just itching to know the answer to one question.

Weren’t you part of the remake long ago (and thus have or had access to the remake section)?


L. Spiro
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-18 09:51:35
Question :
What with Satan Slam mentioned twice ??
Before and After Finishing Touch.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-18 10:02:18
Yea I think Satan Slam and some other limit breaks (Finishing Touch) did get two mentions, but the data looks the same (looks like a mistake).

The only file of use in that selection of txt files (I must admit the collection of text files does look quite familiar) is the attackhacks.txt unfortunatly.

L.Spiro: I dont know how that effects what is happening in this thread and would prevent you from sharing your FF7 knowledge with us all.
Yes I was part of the FF7 Remake project which inevitably stalled.
I wont say anything at the moment but the way people are hacking FF7 at the moment there wont be a need for a Remake :)
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: L. Spiro on 2005-11-18 10:08:40
Some attacks have variations, for a specific example, Choco/Mog, where the actual attack is random between Choco/Mog and Fat-Chocobo.

Then there is the summon who rides the 6-legged horse (talk about a rusty memory) who may instead perform Gunge Lance.


Several other attacks have the same types of attributes but are more subtle.
Some may just be a difference in camera motions and some may be used on off-screen or hidden objects as a way of informing them to “appear” using a specific animation.


L. Spiro
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-18 10:19:14
So for example if you do quake 3 all instead of quake 3 on a single target you get a large animation effecting all enemies, and when you do haste all etc
But how does this tie in to the attack data, or are you referring to the repeated Satan Slam mentioned above?
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: L. Spiro on 2005-11-18 10:25:34
Referring to the duplicated Satan Slam above; I didn’t quote it because while I was typing my reply, it was the bottom post, so mine should have landed directly under it.


L. Spiro
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-18 10:31:11
Quote from: The Skillster

L.Spiro: I dont know how that effects what is happening in this thread and would prevent you from sharing your FF7 knowledge with us all.
Yes I was part of the FF7 Remake project which inevitably stalled.

You didn't answer my question though...

By the way I have updated my post on page 1 which has the known bytes in the attack file all labelled with examples and known values.
Please take a look and advise on what needs updating and what I might have missed.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: L. Spiro on 2005-11-18 11:43:32
Part of the reason I considered not posting was because I am tired of myself.
It is a bit difficult to explain, but given how rusty my memory has become on this subject I was a bit afraid of posting false information.
I’m not really in my prime anymore.

So I considered letting the post go and see what would come up.
I had planned to just rehack all of this when my project gets to the point of needing it (again), and then of course I would be primed up and ready to share tons of information, but since I am not now, my confidence in sharing information is a bit low.



But I decided to just post and explain which things I know to be false, which things I know to be true, and which things I don’t remember clearly.

That’s that.



As for your post.
Well I have seen multiple times in several topics where people try to hack which bytes create which status/elemental effects, so I will first clear this up, hopefully once and for all.

Statuses:
  0x00000001 Death
  0x00000002 Near-Death
  0x00000004 Sleep
  0x00000008 Poison
  0x00000010 Sadness
  0x00000020 Fury
  0x00000040 Confusion
  0x00000080 Silence
  0x00000100 Haste
  0x00000200 Slow
  0x00000400 Stop
  0x00000800 Frog
  0x00001000 Small
  0x00002000 Slow-numb
  0x00004000 Petrify
  0x00008000 Regen
  0x00010000 Barrier
  0x00020000 MBarrier
  0x00040000 Reflect
  0x00080000 Unused
  0x00100000 Shield
  0x00200000 D.Sentence
  0x00400000 Manipulate
  0x00800000 Berserk
  0x01000000 Peerless
  0x02000000 Paralyzed
  0x04000000 Darkness
  0x08000000 Dual
  0x10000000 DeathForce
  0x20000000 Resist
  0x40000000 Lucky Girl
  0x80000000 Imprisoned

Statuses are always represented with a DWORD (32 bits) and multiple statuses can always be inflicted by setting the correct bit.
This is true for ALL cases where statuses are involved, whether on accessories, items, enemy defenses, attack inflictions, etc.

Elements:
  0x0001 Fire
  0x0002 Ice
  0x0004 Lightning
  0x0008 Earth
  0x0010 Poison
  0x0020 Gravity
  0x0040 Water
  0x0080 Wind
  0x0100 Holy
  0x0200 Restorative
  0x0400 Cut
  0x0800 Hit
  0x1000 Punch
  0x2000 Shoot
  0x4000 Shout

That list does not account for the “non-elemental” element used in blue and purple Materia and some attacks, but this element exists and linking any purple Materia to a maxed Elemental on your armor will allow you to absorb some attacks (particularly from some large monsters).

Elemental data is always 2 bytes in size, except in monster data where it is 3 to account for some extra information.


So the first thing I notice is that you should report the elemental bytes as being 2 bytes each, rather than separating them into two single-byte parts.
This applies specifically to the key below the actual data.


Sorry I can’t find my list of every enemy attack.

I am now off work and time to go home for the night.
I will be back at work tomorrow (Saturday) and can continue this discussion (and hack some things if needed) then.
I am glad you are using my software and you should take a look at the page again to see what I am planning to add.
The new hex editor will make this type of things a breeze, and will work on files too, so it will make editing them a breeze also.


L. Spiro
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-18 15:08:23
Hey I forgot you made that software (just kidding).
Thanks for the info its a great help that this has been cleared up and you have corrected us.

Your memory hacking software could do with some direct editing via the Hex viewer (viewing ram), also isnt their a way to create a way to assign a button which could say increase a value by 1 on every press?
For example to find each animation I have to set it in MemHack and then go back to FF7, note the animation and go back to MemHack and do over.

L.Spiro & Genji:
I updated my diagram/explanation on Page 1, please take a moment to check the changes and advise me of any corrections.
L.Spiro please check if I have chosen the right bytes for the Status DWord.
I noticed you can only fit one status effect in, so how do you check for multiple statuses? Do you have to switch on the appropriate bytes?
Example:
Code: [Select]

If I want Poison and Frog:
               0x00000808
What if I want 0x00000040 Confusion
               0x00000080 Silence?
Do I use       0x00000120?
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-18 15:35:31
Well knowing which byte which animation is good. But for 'hardcore mod' we need just Accuracy, MP Cost, Targeting, Damage Type and Damage Modifier, Status and Elemental modifier isnt ??

So I guess we should slowly start planning changes at bosses's attacks along with studying Enemy Attacks data.

Like made Rifle multi-target, Sight Scope inflict 'Darkness' :p
Some bosses will be interesting with HP Based attacks.

And I wanted to ask you. Will you modify WEAPONs stats ? Ruby can be paralysed. Isnt funny ?

Hardcore is Hardcore -)

Quote

Code: [Select]

If I want Poison and Frog:
               0x00000808
What if I want 0x00000040 Confusion
               0x00000080 Silence?
Do I use       0x00000120?


Hmm... maybe 0x000000C0 (4h + 8h = Ch)

About 'Cure Status'.
This will cure status (positive or negative). For example:
Code: [Select]

7F FF FF 01 00 00 00 - Cures 'DEATH' (Life)
7F FF FF 08 00 00 00 - Cures 'POISON' (Poisona)
7F FF FF 00 87 17 30 - Cures 'DEATH FORCE', 'RESIST','SHIELD','BARRIER','MBARRIER','REFLECT','REGEN','HASTE','SLOW','STOP' (DeSpell)
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Tonfa on 2005-11-18 15:49:10
I have started compiling a list of all enemy attack data, it's complete up to Scene 117 now. We should be able to find out some more things based on this.

http://www.freewebs.com/tonfastuff/FF7EnemyAttackData.txt

I will add more later, my eyes are tired of looking at hex code right now.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-18 16:02:29
Wow I have been planning to do this too but you beat me. So I leaving everything to you :P
Thanks ;)
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-18 16:06:07
Genji: I forgot it was in Hex :) So you will probably be right, dare you to try fitting all the statuses into one DWORD?

We do need to start working on the bosses.
You have mentioned some changes to the first boss.
I think percentage attacks WILL effect players no matter what level they are, so more of those please :)
Time to start making suggestions/ideas for each boss in turn.
So next up:
Air Buster!

Everyone:
I took the attackdatahack.txt and converted it to a spreadsheet for easier viewing and editing
http://parvez-halim.demonweb.co.uk/attackshacks.xls

Please feel free to add enemy attack data and to make improvements and also add known values.

Tonfa: I just has a look at your work, NICE ONE!
Can I integrate this into my spreadsheet?

Genji: Nice find with the Cure Status work!
Genji, If 7F is for curing status's included in the status DWORD, what is 3F - to apply?
Code: [Select]
Spider Web
<AC|IA|TA>--<MP>--------------<TY>--<TG|ID|TD|PW>
 5f ff 00 ff 00 00 ff ff ff ff ff ff 0b 02 11 00    
 ff*3f*ff ff 00 02 00 00 00 00 ff ff                
<RT>--------<----ST-----|-EL-->-----
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Tonfa on 2005-11-18 17:35:12
Quote from: The Skillster

Tonfa: I just has a look at your work, NICE ONE!
Can I integrate this into my spreadsheet?

Genji: Nice find with the Cure Status work!
Genji, If 7F is for curing status's included in the status DWORD, what is 3F - to apply?
Code: [Select]
Spider Web
<AC|IA|TA>--<MP>--------------<TY>--<TG|ID|TD|PW>
 5f ff 00 ff 00 00 ff ff ff ff ff ff 0b 02 11 00    
 ff*3f*ff ff 00 02 00 00 00 00 ff ff                
<RT>--------<----ST-----|-EL-->-----


Sure, of course you can, if it's of any use.

And...I'm not Genji, but value 3F in byte 18 means 100% (or very, very close to 100%) chance of applying status.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Skillster/RedSarg99 on 2005-11-18 18:05:32
Quote from: Genji
Code: [Select]
7F FF FF 01 00 00 00 - Cures 'DEATH' (Life)
7F FF FF 08 00 00 00 - Cures 'POISON' (Poisona)
7F FF FF 00 87 17 30 - Cures 'DEATH FORCE', 'RESIST','SHIELD','BARRIER','MBARRIER','REFLECT','REGEN','HASTE','SLOW','STOP' (DeSpell)

Genji is quoting 7F to Cure these statuses, and your quoting 3F as 100% success rate in Applying negative statuses.
so <=3F is to apply the status effect (resist, shield, regen, sleep)
and <=7F is to remove the status effect (poisana, esuna)
and 92 is the toggle on off.
More of less is what your saying?
BTW isnt these the same as what was quoted for accuracy>????
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Tonfa on 2005-11-18 18:18:38
Yes. Values in range 01-3F are status infliction, both positive and negative, you can have an attack that causes Haste and Mini for example.  The higher the value, the higher the accuracy, of course.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: L. Spiro on 2005-11-19 06:45:06
Quote from: The Skillster
Your memory hacking software could do with some direct editing via the Hex viewer (viewing ram),
Very soon.
I am currently working on just that.
It will allow you to edit by typing directly into the RAM, with ASCII, Unicode, and raw hex input.
But it will be a little while before release.
I am really putting everything into this new hex editor, making sure it is the best one out there.
And that means I am competing against some pretty hefty hex editors.


Quote
also isnt their a way to create a way to assign a button which could say increase a value by 1 on every press?
For example to find each animation I have to set it in MemHack and then go back to FF7, note the animation and go back to MemHack and do over.
Suggestions are always welcome and I usually implement almost all of them.
Look for this type of feature in an upcoming version.


Quote from: The Skillster
I noticed you can only fit one status effect in, so how do you check for multiple statuses? Do you have to switch on the appropriate bytes?
Example:

Quote from: Genji
Hmm... maybe 0x000000C0 (4h + 8h = Ch)

Well almost.
For a simple example such as that, addition does work and you do get the correct result, but the means to the end is technically flawed.
If Confusion = 0x00000040 and Silence = 0x00000080, then (Confusion + Silence) = 0x000000C0 (= Confusion/Silence).
But what if (Confusion + Confusion)?
You would get 0x00000080 from just addition.
The correct way to combine statues is with the bitwise OR operator.
(Confusion + Confusion) == (0x00000040 | 0x00000040) == 0x00000040 (still Confusion).

There aren’t many calculators that have an OR operator, but you can use addition for any case where two of the same statuses are not being added together.
But if you were to write a program that uses this information (such as an editor) you need to use the | operator.
Code: [Select]
m_dwStatus |= Confusion;  // Add “Confusion” status.
Remove statuses with this:
Code: [Select]
m_dwStatus &= ~Confusion;  // Remove “Confusion” status.




Tonfa and Genji, I knew byte 18 was something along those lines but could not remember clearly.
Just another bit of info that may help.
It is entirely likely that byte 18 uses the same generic formula as drop/steal ratios in enemy data.
That is, the final chance percent would not be ((Byte_18) / 0x3F), but rather ((Byte_18 + 1) / 0x40).

Thus “Slow” has a 39.0625% chance rather than a 39.68253968253968253968253968254% chance.

For values between 0x40 and 0x7F (inclusive) you subtract 0x40 from it and then use the formula above to determine the chance of removing the status(es).



Also, the last two bytes are “specials”.
They contain data related to:
 0x0001 Attack MP instead of HP
 0x0002 ?
 0x0004 ?
 0x0008 ?
 0x0010 Drain Damage Dealt
 0x0020 Drain HP/MP
 0x0040 Blade Beam
 0x0080 Ignore Status
 0x0100 Miss if Not in “Death” Status
 0x0200 Reflectable
 0x0400 Piercing (Unblockable)
 0x0800 Angel Whisper/Pulse of Life
 0x1000 ?
 0x2000 Critical Hits
 0x4000 ?
 0x8000 ?

They are combined the same way as statuses and elements except for one thing.
Rather than each bit being set, the effects apply if the bit is NOT set.

Thus Magic Hammer (0xFDEE) has the following properties:
0xFDEE =
1111110111101110 =
Attack MP instead of HP,
Drain Damage Dealt,
Reflectable






I’m not done yet.




Byte 13 is the target information.
 0x00 Target Self and only Self
 0x01 Only One Target Allowed
 0x02 Target Enemy By Default
 0x04 Target All (Ignores 0x01)
 0x08 Can Switch Between 1 Target and All Targets if Both Are Valid Options
 0x10 Only Target Default Team
 0x20 ?
 0x40 Hits Everyone (Allies and Foes)
 0x80 Random Targets Within Valid Group




More may come as I remember things.


L. Spiro
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-19 07:23:48
Quote
They are combined the same way as statuses and elements except for one thing. Rather than each bit being set, the effects apply if the bit is NOT set.


So to get right number we must use formula like (FF FF - [combination of offsets]). For 'Magic Hammer' it will be: FF FF - 02 11 = FD EE.
02 11 here is combination of 00 01, 00 10 and 02 00.
Right ?
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: L. Spiro on 2005-11-19 07:47:59
As far as coding is concerned, you would add a special attribute this way:
Code: [Select]
m_dwAttribs &= ~ATTRIBUTE;
Where “ATTRIBUTE” is the numerical value of the attribute you wish to add and m_dwAttribs defaults to 0xFFFF.
It might not be 0xFFFF when you perform the above operation, but it should start out initially as 0xFFFF.
Then you can perform the above operation as many times as you please to add any special attributes you wish.
To remove an attribute:
Code: [Select]
m_dwAttribs |= ATTRIBUTE;


That is for code.
If you want to do this by hand outside of programming, grab Microsoft® Calculator, set it to advanced mode, set it to “Hex” mode, check “Word”, type the value for the attack (FDEE), and then hit ~.
Microsoft® Calculator will show 211, which is the same result you got.
It works out the same way as what you did, but uses bitwise math to ensure correct results.
Likewise you can type 211 and hit ~ to get FDEE.
This would be the fastest way to convert these numbers by hand.


L. Spiro
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Tonfa on 2005-11-19 12:33:51
The enemy attack list is now done up to Scene 140. I'll add some more tonight.

EDIT: Really tired, no more progress tonight. However something occured to me while taking a quick look at some attack data.

EDIT2: Ignore this. I fail when I'm tired.

EDIT3: Finished!! Whew.

EDIT4: I need to edit the data inside Kernel.bin to confirm a suspicion I have about 0x0002 for bytes 27-28. However I can't seem to find a program for decompressing kernel.bin...any suggestions?

EDIT5: How can Limit Breaks be edited, and where are they located? They are not in kernel.bin according to Gears.
Title: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: Genji on 2005-11-23 07:00:04
Wow nice... Full list of enemy moves.
Title: Re: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: ARMs on 2006-05-30 10:48:42
OMG Thank you guys a million.  I have been testing these days for 2 weeks now and I managed to figure alot of stuff out but i didn't realize you guys have done so much already. 

Now i must look for your Hard core mod thread.
Title: Re: Enemy Attack Data [Split from Skillster's Hardcode Mode]
Post by: VincentVal on 2006-05-30 18:24:20
Don't revive topics!!!