Changes

Jump to navigation Jump to search

FF8/Menu sp2

4,053 bytes removed, 18:27, 15 April 2019
Content of face1.tex and face2.tex: added link to info of what is in card textures
This page will be for Battle memory structures. This is consistent with the memory structure of the PC version. PSX may or may not reflect these structures.by MaKi<br/>updated by Sebanisu
== Command Defaults == Each command type has default execution values that can, in some cases, be overridden. These come from This file is a hard-coded structure in the executablemapping file for atlas textures like icons.tex
== Layout of '''icon.sp1''': ==
=== Header ===
'''(4 x (PointerCount + 1))''' bytes
{| class="wikitable"
! Offset
! DefaultSizeOf! Name! Description
|-
| 0h0| AnimationUInt32| PointerCount| Number of entries
|-
| 1h4| Damage CalculationStruct Pointer[PointerCount]|-Pointers| 2h| Command PropertiesSeek locations for entry groups
|}
== Queued Actions = Pointer === When a command is selected either by a player character or an enemy the action is inserted into a priority queue. Up to 64 actions can be queued. On each update loop, the main Queue function will pop off the next action with the lowest priority and execute it in FIFO order within priority bands.  Queue entries have the following structure in memory:'''4''' bytes
{| class="wikitable"
! Offset
! ValueSizeOf! Name! Description
|-
| 0
| Action Priority (limits/counters 0, player chosen spells 6)UInt16|-Pointer| 1| Queue position within priority bandSeek location for entry group
|-
| 2
| Attacker actor IDUInt16|-Count| 3| Action command index (e.g CMD_MAGIC = 0x02)|-| 4| Action attack index (e.g Bolt = 0x21). (This index is absolute, not command relative)|-| 6| Action target maskNumber of entries in group
|}
== AI Structure = Entry Group ==='''(8 x Count)''' bytes <br/>There At pointer's location there will be '''Struct Entry[Count]'''. Example of an entry group is a single block the direction pad is in eight pieces. Four of memory that holds AI information them are unpressed and four are pressed versions. It has four entries for the direction pad depending on the current running script. Each Actor "owns" this while their scripts are executingdirections it is highlighting.
=== Entry ===
'''8''' bytes
{| class="wikitable"
! Offset
! FunctionSizeOf|-! Name| 0h| Actor Index|-| 4h| Script Position|-| 8h| Remaining Stack Space (initially 200h)|-| 0Ch| Current AI OpCode|-| 10h| OpCode Lower Nybble! Description
|-
| 14h0| OpCode Upper NybbleByte|xPos|Pixel X coordinate in image atlas
|-
| 18h1| First Group TypeByte|yPos|Pixel Y coordinate in image atlas
|-
| 1Ch2| Second Group TypeByte[2]|UNK|Unknown data
|-
| 20h4| OpCode Lower Nybble (related to group 1?)Byte|Width|Width of entry in pixels
|-
| 24h5| OpCode Lower Nybble (related to group 2?)Byte|Offset X|Offset of X coordinate for when drawing
|-
| 28h6| Mask Byte|Height|Height of ''non-null'' values entry in Group 1pixels
|-
| 2Ah7| Mask of ''non-null'' values in Group 2|-| 2Ch - 50h| Group 1 of variables|-| 54h - 78h| Group 2 of variables|-Byte| 7Ch - 27ChOffset Y| Stack Offset of valuesY coordinate for when drawing
|}
Invalid Entries will have '''X''' and '''Y''' of '''zero'''. The top '''16x16''' pixel area is blank. Everything in '''icon.tex''' is aligned to a '''8x8 grid'''. Some entry groups leave out connecting pieces I think you are expected to fill in the blank. Some things like the menu border and menu background don't appear to be listed in this file.
== Active Character Data =End of file===Everything at and beyond file pointer '''4272 {0x10C0}''' appears to be garbage.
This is an array that each playable character maintains an instance == Layout of'''face.sp2''' and '''cardanm.sp2''': ==
Both '''face.sp2''' and '''cardanm.sp2''' have the same layout. Main difference is '''face.sp2''' has '''32''' valid and '''64''' total entries. '''cardanm.sp2''' only has '''11''' valid entries and '''1''' invalid, as it has no dims. In each of the card texture files the final slot is the '''Triple Triad''' card back. If the entry had dims they would be X='''192''',Y='''128''', W='''64''', H='''64'''.
 
=== Header ===
{| class="wikitable"
! Offset
! style="background: rgb(204,204,204)" colspan="2" | ValueSizeOf! Name! Description
|-
| 000h0| colspan="UInt32| Count| Number of entriesCount can be more than the actual images in the texture.<br/>'''face.sp2''': There are 8 images per texture in 2" | Character IDtextures, and there are 32/64 valid entries. 1 is blank.<br/>'''cardanm.sp2''': There are 11 images pre texture in 10 textures, and there are 11/12 valid entries. The 12th entry is the card back but it's missing dims. 
|-
| 001h4| colspan="2" | Cover Chance|-| 002h| colspan="2" | Strength|-| 003h| colspan="2" | Vitality|-| 004h| colspan="2" | Magic|-| 005h| colspan="2" | Spirit|-| 006h| colspan="2" | Speed|-| 007h| colspan="2" | Luck|-| 008h| colspan="2" | Phys Attack|-| 00Ah| colspan="2" | Phys Def|-| 00Ch| colspan="2" | Mag Attack|-| 00Eh| colspan="2" | Mag Def|-| 010h| colspan="2" | Current HP|-| 012hUInt32[Count]| colspan="2" | Max HPLocations|-Seek location for each entry| 014h}| colspan="2" | Current MP|-| 016h| colspan="2" | Max MP|-| 018h| colspan="2" | Timer|-| 01Ch| colspanEntry ="2" | Counter Attack Action Index|-| 01Eh| colspan="2" | Counter Attack Chance|-| 021h| colspan="2" | Some sort of divisor?|-| 023h| colspan="2" | Character Flags (Underwater, Long Range, HP&lt;-&gt;MP, etc)|-| 024h| colspan="2" | Eight entries of three '''16''' bytes...|-{| 03Ch| colspanclass="2wikitable" | Attacking Elements|-! Offset| 03Eh! SizeOf| colspan="2" | Halved Elements! Name|-| 040h| colspan="2" | Nullified Elements|-| 042h| colspan="2" | Absorbed Elements|-| 044h| colspan="2" | Attacking Elements! Description
|-
| 048h
| colspan="2" | Immune Statuses
|-
| 04Ch
| colspan="2" | Enabled Command Menu (16 entries of 6 bytes)
|-
| 0ACh
| colspan="2" | Limit Actions for current Limit Level
|-
| 0B4h
| colspan="2" | Enabled Limit Data (three entries in Attack Data format(0x1C))
|-
| 108h
| colspan="2" | Enabled Magics (54 entries of 8 bytes)
|-
| style="background: rgb(204,204,255)" rowspan="7" |
| 0
| Magic IndexUInt32| Count| Number of entries at this locationAlways '''1'''
|-
| 1h4| MP Costbyte| xPos| Pixel X coordinate in image atlas
|-
| 2h5| All Countbyte| yPos| Pixel Y coordinate in image atlas'''face.sp2''': Invalid entries seem to have '''yPos>=Texture.Height'''.<br />Detected switch from '''face1.tex''' to '''face2.tex''' when '''yPos<previous.yPos'''.
|-
| 3h6| Quad Enabled?byte[2]| UNK| Unknown'''face.sp2''': '''{0x20,0x36}''' on the valid entries. '''{0x60,0x36}''' on invalid entries.<br />'''cardanm.sp2''': '''{0x20,0xB6}''' on the valid entries. '''{0x00,0x00}''' on the invalid entry.
|-
| 4h8| Quad Count?UInt16| Width| Width of entry in pixelsPossible this is really a '''byte''' with a '''0 x-offset'''.
|-
| 5h10| Target DataUInt16|-| 6h| Properties|-| 2C8h| colspan="2" | Enabled Summons (format like above)|-| 348h| colspan="2" | Enabled ESkills (format like above)|-| 408hHeight| colspan="2" | First 11 bytes Height of Weapon Dataentry in pixels|Possible this is really a '''byte''' with a '''0 y-| 40Dh| colspan="2" | Status of weapon added to Attacking Statuses above|-| 410h| colspan="2" | Weaponoffset'''s Accuracy|-| 418h| colspan="2" | Additional Attack Elements|-| 41Ch| colspan="2" | Four sets of two DWords : (Stat to increase, Increase value)|-| 43Ch| colspan="2" | Gil Bonus granted by this character.
|-
| 43Dh12| colspan="2" | Encounter rate ""byte[4]|-UNK| 43EhUnknown| colspan="2" | Chocobo Chance ""'''face.sp2''': '''{0x00,0x00,0x8E,0x00}''' on most. Last one has all '''{0x00}'''<br />|-| 43Fh| colspan="2" | PreEmptive Chance ""'''cardanm.sp2''': '''{0x00,0x00,0xAE,0x00}''' on most. Last one has all '''{0x00}'''
|}
== Actor Battle Data = End of file === Similar to Active Character Data, but more detailed'''face. This data is dependent on who is performing the current action and only one instance sp2'''File ends with '''byte[16]''' of it exists during each action and all stats are relative to the performing actor and current action unless otherwise noted. Addresses 200h and above will change for each target of the action.'''{0x00}'''
=== Content of '''face1.tex''' and '''face2.tex''' ===
{| class="wikitable"
! OffsetName! style="background: rgb(204,204,204)" colspan="2" | ValueFile|-!X| 0h!Y| colspan="2" | Index!Width|-| 4h| colspan="2" | Level|-| 8h| colspan="2" | Formation Entry (Enemy A, Enemy B, etc)|-| 0Ch| colspan="2" | Command Index|-| 10h| colspan="2" | Action Index|-| 14h| colspan="2" | Action Animation Base (for relative to absolute animation indexes)|-| 18h| colspan="2" | Allowed Targets (Active and targetable)|-| 1Ch| colspan="2" | Active Allies?|-| 20h| colspan="2" | Command Animation (player characters only)|-| 24h| colspan="2" |[[FF7/Battle/Attack_Effect_Id_List|Attack Effect]]|-| 28h| colspan="2" | Command Index (again)|-| 2Ch| colspan="2" | Action Index (again)|-| 30h| colspan="2" | Self Mask|-| 38h| colspan="2" | MP Cost|-| 3Ch| colspan="2" | Action Accuracy|-| 40h| colspan="2" |[[FF7/Battle/Damage_Calculation|Damage Calculation]]|-| 44h| colspan="2" |[[FF7/Battle/Elemental_Data|Action's Element]]|-| 48h| colspan="2" | Action's Power|-| 4Ch| colspan="2" | Phys/Mag Attack Power|-| 50h| colspan="2" | Action's Target(s) Mask|-| 54h| colspan="2" | Normal Impact Sound|-| 58h| colspan="2" | Critical Impact Sound|-| 5Ch| colspan="2" | Miss Sound|-| 60h| colspan="2" | Single Target Camera|-| 64h| colspan="2" | Multi Target Camera|-| 68h| colspan="2" | Action Reaction Animation Index|-| 6Ch| colspan="2" |[[FF7/Battle/Attack_Special_Effects|Attack Special Effects]]|-| 78h| colspan="2" | Non-self target mask?|-| 80h| colspan="2" |[[FF7/Battle/Status_Effects|Inflicting Status(es)]]|-| 84h| colspan="2" |[[FF7/Battle/Status_Effects|Curing Status(es)]]|-| 88h| colspan="2" |[[FF7/Battle/Status_Effects|Toggling Status(es)]]|-| 8Ch| colspan="2" | Chance to inflict Status|-| 90h| colspan="2" | Command Properties (details pending)|-| 94h| colspan="2" | Target Mask|-| 98h| colspan="2" | Attack Index position in scene data (enemy only)|-| A0h| colspan="2" |Action Accuracy function (upper nybble of [[FF7/Battle/Damage_Calculation|Damage Calculation]])|-| A4h| colspan="2" |Action Damage function (lower nybble of [[FF7/Battle/Damage_Calculation|Damage Calculation]])|-| ACh| colspan="2" | Quad Magic Count?|-| B0h| colspan="2" | Number of attack damage calculations?|-| B4h| colspan="2" | Follow-up action count (Tifa's Limits, Finishing Touch, etc)|-| B8h| colspan="2" | Number of Targets?|-| BCh| colspan="2" |[[FF7/Battle/Attack_Special_Effects|Attack Additional Effects]]|-| C0h| colspan="2" | Additional Effect Modifier|-| C4h| colspan="2" | Attack Power|-| C8h| colspan="2" | Actor's current status|-| D0h - D7h| colspan="2" | Follow-up Action(s)|-| D8h| colspan="2" | Actor's Strength|-| DCh| colspan="2" | Used during String display?|-| E0h| colspan="2" | Number of successful hits|-| F0h| colspan="2" | Character-specific action properties (mp absorb, hp absorb, etc)|-| F8h| colspan="2" | Related to enabled magic. Also ACh above.|-| FCh| colspan="2" | Multiple hit count|-| 100h - 1FFh| colspan="2" | large unused gap|-| 200h| colspan="2" | ???|-| 204h| colspan="2" | Character Map (players only)|-| 208h| colspan="2" | Current Target Index|-| 20Ch| colspan="2" | Formation Slot|-| 210h| colspan="2" | Target's Phys/Mag Def (whichever attack type is)!Height
|-
| 214hSquall Leonhart| colspan="2" face1.tex|0|0|32| Damage done to target48
|-
| 218hZell Dincht| colspan="2" face1.tex|32|0|32| Properties of attack48
|-
| style="background: rgb(204,204,255)" rowspan="8" Irvine Kinneas|face1.tex|64|0| 132| missed48
|-
| 2Quistis Trepe| Physical if set; Magical if unsetface1.tex|96|0|32|48
|-
| 4Rinoa Heartilly| Attempt Stealface1.tex|128|0|32|48
|-
| 20Selphie Tilmitt| Won't Missface1.tex|160|0|32|48
|-
| 4000Seifer Almasy| Physical Barrierface1.tex|192|0|32|48
|-
| 8000Edea Kramer| Magical Barrierface1.tex|224|0|32|48
|-
| 40000Laguna Loire| ???face1.tex|0|48|32|48
|-
| 800000Kiros Seagill| ???face1.tex|32|48|32|48
|-
| 220hWard Zabac| colspan="2" face1.tex|64|48|32| More properties (heal, critical, damage MP, etc)48
|-
| 224hLion| colspan="2" face1.tex|128|48|32| Target's reaction animation48
|-
| 228hMiniMog| colspan="2" face1.tex|160|48|32| Target's status48
|-
| 22ChBoko| colspan="2" face1.tex|192|48|32| Target's status immunities48
|-
| 230hAngelo| colspan="2" face1.tex|224|48|32| Damage level to current Action48
|-
| style="background: rgb(204,204,255)" rowspan="8" Quezacotl|face2.tex|0|0| 132| Death (if not immune)48
|-
| 2Shiva| Always hit?face2.tex|-32| 40| Double (Damage &amp; Accuracy)32|-| 8| Normal (Never checked)|-| 10| Half (Damage &amp; Accuracy)48
|-
| 20Ifrit| Null (won't miss?)face2.tex|64|0|32|48
|-
| 40Siren| Absorb (won't miss?)face2.tex|96|0|32|48
|-
| 80Brothers| Full-Healface2.tex|128|0|32|48
|-
| 234hDiablos| colspan="2" face2.tex|160|0|32| Target condition flags (back exposed, multiple targets, etc)48
|-
| 238hCarbuncle| colspan="2" face2.tex|192|0|32| Status(es) to add to Target48
|-
| 23ChLeviathan| colspan="2" face2.tex|224|0|32| Status(es) to Cure from Target48
|-
| 240hPandemona| colspan="2" face2.tex|0|48|32| Status(es) to Toggle from Target48
|-
| 244hCerberus| colspan="2" face2.tex|32|48|32| All Target's statuses that will be affected from action48
|-
| 248hAlexander| colspan="2" face2.tex|64|48|32| Sound to play (determined from hit/critical/miss sounds above)48
|-
| 24ChDoomtrain| colspan="2" face2.tex|96|48|32| Action Animation to use (varies from single/multiple targets)48
|-
| 254hBahamut| colspan="2" face2.tex|128|48|32| Target's Level48
|-
| 258hCactuar| colspan="2" face2.tex|160|48|32| Target's HP48
|-
| 25ChTonberry| colspan="2" face2.tex|192|48|32| Target's MP48
|-
| 260hEden| colspan="2" face2.tex|224|48|32| Action's final Accuracy48
|}
There is one blank space in '''face1.tex''', I skipped that entry.
=== Content of '''mc00.tex'''-'''mc09.tex''' ===
Each level on the [https://finalfantasy.fandom.com/wiki/Final_Fantasy_VIII_Triple_Triad_cards fandom wiki page]is in the same order of the contents of the tex files. The cardback is always the bottom right of each texture.
Anonymous user

Navigation menu