Need help yet again - Sorting of items and materia

  • Thread starter Thread starter DLPB_
  • Start date Start date
Status
Not open for further replies.
D

DLPB_

Guest
I do not understand the technical aspect of how the game arranges materia and items in FF7.  From what I can gather the matera and items have an ID and a table which tells it how to order.  Let's start with the materia.

In order to reduce the number of textures the game uses and to place the materia onto the correct texture (colour wise) I had to also alter the texture ID of the 5 materias.  These 5 ID's (1 byte each) are found at:

0091ABF0-0091ABF4

The problem is the game also uses these to arrange materia by colour.  So now when I choose arrange, the Summon materia is first on the list and others are not in the correct order as the original.

A way to change this via assembly would be helpful or I will have to be sloppy and alter the textures in adobe photoshop.  I have noticed 2 areas that seem to be most involved with reordering:

006CBCF3 and 0070e5da

It could also be that I am missing the point here and that the ID's I changed are just associating colour with materia and elsewhere there is code or table telling it how to go into the colour order.

===========

For items, it shouldn't be much of a problem to alter the tables so that "By name" works with my re-translated names and not the originals.  I can probably find this on my own but we will see.


Any help appreciated.
 
Last edited:
Dziugo has fixed it.  He is a God.  How the f*ck you can be this good is beyond me.

As for the problem - the table you've changed was not actually a graphic lookup table, but more like a rank lookup table. If you want to keep the actual graphics for each materia you have to somehow rollback the changes. The code:
Code: [Select]
Code:
CPU DisasmAddress   Hex dump                 Command                                                                         Comments0070E5DA  /.  55                   PUSH EBP0070E5DB  |.  8BEC                 MOV EBP,ESP0070E5DD  |.  83EC 10              SUB ESP,100070E5E0  |.  31D2                 XOR EDX,EDX0070E5E2  |.  66:8B55 08           MOV DX,WORD PTR SS:[ARG.1]0070E5E6  |.  8B5D 10              MOV EBX,DWORD PTR SS:[ARG.3]0070E5E9  |.  8B1B                 MOV EBX,DWORD PTR DS:[EBX]0070E5EB  |.  8B0C93               MOV ECX,DWORD PTR DS:[EDX*4+EBX]0070E5EE  |.  83F9 FF              CMP ECX,-10070E5F1  |.  75 0D                JNE SHORT 0070E6000070E5F3  |.  C645 F4 80           MOV BYTE PTR SS:[LOCAL.3],800070E5F7  |.  C745 FC 00000000     MOV DWORD PTR SS:[LOCAL.1],00070E5FE  |.  EB 4F                JMP SHORT 0070E64F0070E600  |>  51                   PUSH ECX                                                                        ; /Arg10070E601  |.  E8 EDD6FBFF          CALL 006CBCF3                                                                   ; \ff7.006CBCF30070E606  |.  59                   POP ECX0070E607  |.  8A80 12E67000        MOV AL,BYTE PTR DS:[EAX+70E612]0070E60D  |.  8845 F4              MOV BYTE PTR SS:[LOCAL.3],AL0070E610  \.  EB 0A                JMP SHORT 0070E61C0070E612      00                   DB 000070E613      01                   DB 010070E614      02                   DB 020070E615      03                   DB 030070E616      04                   DB 040070E617  /.  05 06070809          ADD EAX,90807060070E61C  |>  8B4D 08              MOV ECX,DWORD PTR SS:[ARG.1]0070E61F  |.  81E1 FFFF0000        AND ECX,0000FFFF0070E625  |.  8B55 10              MOV EDX,DWORD PTR SS:[ARG.3]0070E628  |.  8B02                 MOV EAX,DWORD PTR DS:[EDX]0070E62A  |.  8B0C88               MOV ECX,DWORD PTR DS:[ECX*4+EAX]0070E62D  |.  C1E9 08              SHR ECX,80070E630  |.  8B55 08              MOV EDX,DWORD PTR SS:[ARG.1]0070E633  |.  81E2 FFFF0000        AND EDX,0000FFFF0070E639  |.  8B45 10              MOV EAX,DWORD PTR SS:[ARG.3]0070E63C  |.  8B00                 MOV EAX,DWORD PTR DS:[EAX]0070E63E  |.  8B1490               MOV EDX,DWORD PTR DS:[EDX*4+EAX]0070E641  |.  81E2 FF000000        AND EDX,000000FF0070E647  |.  C1E2 18              SHL EDX,180070E64A  |.  03CA                 ADD ECX,EDX0070E64C  |.  894D FC              MOV DWORD PTR SS:[LOCAL.1],ECX0070E64F  |>  31D2                 XOR EDX,EDX0070E651  |.  66:8B55 0C           MOV DX,WORD PTR SS:[ARG.2]0070E655  |.  8B5D 10              MOV EBX,DWORD PTR SS:[ARG.3]0070E658  |.  8B1B                 MOV EBX,DWORD PTR DS:[EBX]0070E65A  |.  8B0C93               MOV ECX,DWORD PTR DS:[EDX*4+EBX]0070E65D  |.  83F9 FF              CMP ECX,-10070E660  |.  75 0D                JNE SHORT 0070E66F0070E662  |.  C645 F0 80           MOV BYTE PTR SS:[LOCAL.4],800070E666  |.  C745 F8 00000000     MOV DWORD PTR SS:[LOCAL.2],00070E66D  |.  EB 4F                JMP SHORT 0070E6BE0070E66F  |>  51                   PUSH ECX                                                                        ; /Arg10070E670  |.  E8 7ED6FBFF          CALL 006CBCF3                                                                   ; \ff7.006CBCF30070E675  |.  59                   POP ECX0070E676  |.  8A80 12E67000        MOV AL,BYTE PTR DS:[EAX+70E612]0070E67C  |.  90                   NOP0070E67D  |.  90                   NOP0070E67E  |.  90                   NOP0070E67F  |.  90                   NOP0070E680  |.  90                   NOP0070E681  |.  90                   NOP0070E682  |.  90                   NOP0070E683  |.  90                   NOP0070E684  |.  90                   NOP0070E685  |.  90                   NOP0070E686  |.  90                   NOP0070E687  |.  90                   NOP0070E688  |.  8845 F0              MOV BYTE PTR SS:[LOCAL.4],AL
Or in binary starting at 70E5DA:
Code: [Select]
Code:
55 8B EC 83 EC 10 31 D2 66 8B 55 08 8B 5D 10 8B1B 8B 0C 93 83 F9 FF 75 0D C6 45 F4 80 C7 45 FC00 00 00 00 EB 4F 51 E8 ED D6 FB FF 59 8A 80 12E6 70 00 88 45 F4 EB 0A 00 01 02 03 04 05 06 0708 09 8B 4D 08 81 E1 FF FF 00 00 8B 55 10 8B 028B 0C 88 C1 E9 08 8B 55 08 81 E2 FF FF 00 00 8B45 10 8B 00 8B 14 90 81 E2 FF 00 00 00 C1 E2 1803 CA 89 4D FC 31 D2 66 8B 55 0C 8B 5D 10 8B 1B8B 0C 93 83 F9 FF 75 0D C6 45 F0 80 C7 45 F8 0000 00 00 EB 4F 51 E8 7E D6 FB FF 59 8A 80 12 E670 00 90 90 90 90 90 90 90 90 90 90 90 90 88 45F0
Rollback rank table is located at 0070E612 and right now it does nothing - just change the numbers there. Should be something like this:
Code: [Select]
Code:
00 01 0A 09 04 05 08 07 08 09
So incoming 02 becomes 0A (as it was before).

Cheers!
dziugo
 
Last edited:
Just documenting some findings here:

Ordering table for items starts at 00921548 memory.

 Items with id  0069-007fh are unused.
Item 00FF is Sephiroth's sword Masamune and is hidden from item menu because it has been assigned 0099h.  0099h appears to tell the menu not to display item.

There are a total of 296 used items, 1 hidden (masamune) and 23 unused.  Total therefore of maximum number 320

You can get Masamune back in the item list by changing 2 bytes in the order table,

memory address 00921746, change bytes 9900 to 4001.

that will place it right at bottom of the item list.
 
Last edited:
I reading your menssages...your a MONSTER!!! Always thanks for your contribution in forum :)
I much interesed in this! You think with try change values of support can activate materia "booster"? I can try ...in this moment contruction of mod and want modify all possible! I surprise in never of forum talking of this materia >.>

Sorry for bad english T.T    (I'm spanish)

Ah other small question...You it's very longer time in this forum...I wanted Meteor but never website run to download T.T (in qhimm and all), in case you have this program can send? I need for comence edition for activate walk in misterious cave, in towards the Ancient Capital, but firt need this tool for activate walk, and later create funtion up for walk and enter in cave (and possible add booster xD)

Sorry for molesties,  you not obligated to answer :) and I maintain my thanks for your time

In case can help send my MP and I send email ^^
 
I am afraid at the moment I am swamped in 2 projects and a project elsewhere, but if I get time I will have a look.  Perhaps someone else here can have a look too  :mrgreen:
 
Status
Not open for further replies.
Back
Top