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.


Topics - kruci

Pages: [1]
1
Here are some command line FF7 utils which I created becouse I needed them.
I didnt wanted release them....  but maybe usefull for someone....

http://kruci.wz.cz/FF7utils.zip
ff7de    extract/import 'dialog part' from unpacked level
ff7lgp  extract/add(add to end or replace)/recreate(=add, but keep same LGP file order) LGP files
ff7tut   extract/import texts from .tut files to txt(tutorials files)
ff7wmes  extract/import text from mes file to txt(world map text)
ff7te    extract/import 'dialog part' to txt(no specials tag, all are still chars...)

you can try find usage by running it trought command line...:P
ff7de and ff7lgp I used for distributing translation of ff7 to our language(bat file in installer).


Some duples files
http://kruci.wz.cz/Duples.zip
Duples means that some levels have same or very similar text
ffsameDIRS.bat  copy those with same/similar text to diferent dirs.
but beware, somewhere is diference in "one word", but change meaning of sentence
I have those difference somewhere, but in my native language...:P

2
Hi,
I found chocobo text Male / Female
Good for translator...

Its in script of frcyo level.

this code is there 20 times.
Code: [Select]
87B : [80 D0 62 2D] - set byte(D0)[62]=2D ;M
87F : [80 D0 63 41] - set byte(D0)[63]=41 ;a
883 : [80 D0 64 4C] - set byte(D0)[64]=4C ;l
887 : [80 D0 65 45] - set byte(D0)[65]=45 ;e
88B : [80 D0 66 00] - set byte(D0)[66]=00
88F : [80 D0 67 00] - set byte(D0)[67]=00
893 : [10 19] - gotoNext 8AD
895 : [80 D0 62 26] - set byte(D0)[62]=26 ;F
899 : [80 D0 63 45] - set byte(D0)[63]=45 ;e
89D : [80 D0 64 4D] - set byte(D0)[64]=4D ;m
8A1 : [80 D0 65 41] - set byte(D0)[65]=41 ;a
8A5 : [80 D0 66 4C] - set byte(D0)[66]=4C ;l
8A9 : [80 D0 67 45] - set byte(D0)[67]=45 ;e

but its always same and is no need of recompiling script
you only need search and replace(20 times)
HEX string to search in unpacked frcyo

Code: [Select]
80 D0 62 2D 80 D0 63 41 80 D0 64 4C 80 D0 65 45 80 D0 66 00 80 D0 67 00 10 19 80 D0 62 26 80 D0 63 45 80 D0 64 4D 80 D0 65 41 80 D0 66 4C 80 D0 67 45

so, now find submarine text(it maybe not text, but some reference to TEX files?!):P

3
Scripting and Reverse Engineering / Script question
« on: 2007-11-15 20:25:46 »
I didnt find info how scripts works...

I was searching for fix for my "default run"
but I ended in skript actions...

as this..
this is skript of objekt(person), whitch move to Cloud, with speed MSPED ( 00, 00, 10/4 )
If I change those MSPED values, it works, but not from begin, it works after I press CANCEL for first time.
(dont work from begin, becouse default values somewhere?)

the question is
how game jump to those scripts Section n°12 (nara2) Script n° 3/4 ?
those skripts works with CANCEL pressed/relased... so CANCEL is trigger?
(I readed somewhere that Script n° 2 is for pressing X button)

Code: [Select]
****** Section n°12 (nara2) Script n° 0 ******
000 : [A1 07] - CHAR ( 07 )
002 : [7E 01] - TLKON ( 01 )
004 : [C7 01] - SOLID ( 01 )
006 : [A4 00] - VISI ( 00 )
008 : [16 60 00 00 D7 01 00 1A] - if SWord(60)[0000] != 01D7 then(00) goto 28
010 : [16 20 00 00 C9 01 03 12] - if SWord(20)[0000] != 01C9 then(03) goto 28
018 : [A5 00 00 99 04 44 0F 00 00 76 01] - XYZI ( 00, 00, 99, 04, 44, 0F, 00, 00, 76, 01 )
023 : [7E 00] - TLKON ( 00 )
025 : [C7 00] - SOLID ( 00 )
027 : [A4 01] - VISI ( 01 )
029 : [00] - RET
02A : [C7 01] - SOLID ( 01 )
02C : [16 60 00 00 D7 01 00 0D] - if SWord(60)[0000] != 01D7 then(00) goto 3F
034 : [16 20 00 00 C9 01 03 05] - if SWord(20)[0000] != 01C9 then(03) goto 3F
03C : [AA 01] - MOVA ( 01 )
03E : [12 02] - gotoPrev 3C
040 : [00] - RET

****** Section n°12 (nara2) Script n° 1 ******
000 : [33 01] - UC ( 01 )
002 : [4A 01] - MENU2 ( 01 )
004 : [2F 01 6F 00 00 00 51 00 19 00] - WSIZW ( 01, 6F, 00, 00, 00, 51, 00, 19, 00 )
00E : [40 01 05] - message( window=01, mes=05 )
011 : [33 00] - UC ( 00 )
013 : [4A 00] - MENU2 ( 00 )

****** Section n°12 (nara2) Script n° 2 ******
000 : [00] - RET

****** Section n°12 (nara2) Script n° 3 ******
000 : [B2 00 00 10] - MSPED ( 00, 00, 10 )
004 : [00] - RET

****** Section n°12 (nara2) Script n° 4 ******
000 : [B2 00 00 04] - MSPED ( 00, 00, 04 )
004 : [00] - RET


And by the way...
do anyone know, where are submarine mingame text, and gender of chocobo text(male/female)?
(they arent easy to found, so I ask... cant find nowhere, and debugger sometimes crashed... so I neeeed debug more, but I failed.. debuder crashed... ...:P)

4
FF7 Tools / [FF7] Scene.bin Lookup Table updater
« on: 2007-09-27 18:54:58 »
Here program witch I made, becouse we needed it.

What it does:
Update Scene.bin Lookup table in unpacked 3rd file of kernel.bin. Update is based on header data from scene.bin

Why it does it:
if you change scene.bin, headers can differ. You can see mosters in bad places, other monster instead boss,.... So Lookup table is not actual to current scene.bin. It need update.

What it need:
Scene.bin
unapcked 3rd file of kernel.bin

How to use:
ff7StoK [Scene.bin] [unpacked 3rd file of kernel.bin]
default file names are scene.bin and kernel.bin2
it doesnt care if that are not right files

example:
ff7StoK
;try open files scene.bin and kernel.bin2, if found, update kernel.bin2 based on data in scene.bin

ff7StoK SOMEfilename
;try open files SOMEfilename and kernel.bin2, if found, update kernel.bin2 based on data in SOMEfilename

ff7StoK SOMEfilename SomeFilename2
;try open files SOMEfilename and SomeFilename2, if found, update SomeFilename2 based on data in SOMEfilename

output:
none if succesfull
some error message if error.

bugs:
currently none

Where:
here http://kruci.wz.cz/ff7stok.7z
or zip here http://kruci.wz.cz/ff7stok.zip

Tech info:
http://forums.qhimm.com/index.php?topic=5759.msg74232#msg74232
http://forums.qhimm.com/index.php?topic=6391.msg80497#msg80497

technical update:
in original scene.bin last block has 11files
in original 3rd file of kernel.bin is for last block F5h-FFh
but this mean according to links above FF minus F5=10files or F5 to FE files (10files)
(FF minus 0 = 255files, files from 0 to FE = 255files, but scene.bin has 256files)
so last is FFh instead of "100h".

last file of scene.bin(256th file) contain only FFh chars.(5,251-256 are same)


I can release source code too, if anyone wants, but this program is simply.

5
Hi,
do anyone know where is submarine minigame text?
or ideas where it can be?

I am searching for
MISSION INCOMPLETE (COMPLETE)
TARGET XX/XX (XX is number)
SCORE

doesnt looks like texture not in scene.bin, sub.lgp, ff7.exe
(but maybe coded else than fftext?)

sub.lgp only TEX - help, indicators, FONTS
FF7.exe
----- Submarine Mini Game BEGIN -----
names of TEX files
----- Submarine Mini Game END -----
Some "functions" pos: (%i, %i, %i)  rot: (%i, %i, %i)  dir: (%i, %i, %i),...

actualy submarine has data somewhere else, becouse sub.lgp contain only TEX.(models, battlefield missing, text,.. )

6
Hi,
here is default run patch.

What it does:
Your character default run instead of walking. If you want walk you must press and hold CANCEL.

Errors:
When Cloud runnig away from Aeris, if he run, aeris dont catch him, if he walk, Aeris catch him.
This can be at more places. Game think that you are walking, but you are running.

Not tested much so USE ON YOUR OWN RISK
If you test it, please report bug/no errors...

Where:
(patch only works on version 1.02, size 5882880bytes )
Here http://kruci.wz.cz/FF7run.exe
Unpatch here http://kruci.wz.cz/FF7unrun.exe
Patch for some unknow reason dont work, if is not in any directory.
(You must have patch in any directory, if patch dont work and give Runtime error 76)

Where YAMP version:
http://kruci.wz.cz/DefaultRun.rar
(get YAMP here here)

Works(tested):
(not work correctly with dziugo Always run)
Access direction table in Gold Saurcer.
Wall market gym minigame - squats.

Technical details:
(Based on dziugo always run patch, without his work, no my patch)

Changed two jumps from 0x74 to 0x75(JE to JNE)
Code: [Select]
0x0063767d(0x236a7d in EXE file) - looks like ANIMATION switch
0x00634992(0x233d92 in EXE file) - looks like SPEED switch


7
Hi,
Anyone know how translate tutorial files .tut ? Or format of .tut files.
Curretly it looks like 18Bytes header, with pointer 2Bytes to tutorial text, so max 9 tutorials.
If pointer dont point to tutorial FFh is there.
Section looks similar to this (hex)  maybe script opcodes?(FF terminate symbol of text)
120A000A001000"Some fftext"FF1000"some fftext"FF0711
FF07070711 on end, or something else between text, ...

Looks like no length indicator? Or is somewhere else?
So is posible change strings length with?


8
Scripting and Reverse Engineering / FF7 Text encoding
« on: 2007-08-14 21:47:41 »
Did anyone has complete text encoding table.
Someone sure have more than here:
http://wiki.qhimm.com/FF7/Text_encoding
wiki is uncomplete.

I need know some colors(DB, DD), and others (E3,E4,E9, .... )
For example, DB is rainbow color, but I found it from cosmo, so anyone has some ficedula documentation?
On his page is not much documentation though he did a lot programs.

9
Hi,
Becouse we want translate FF7 to our language, I tested some programs.

Translation procedure whitch looks best
flevel.lgp
Unpack with cosmo with decompresing
//Export text with sapphire  ??!sapphire color/chars bugs
...
//Import text with sapphire
Import with emerald
(edit fcyo with cosmo/loveless)
kernel2.bin
edit with Teioh
ff7.exe
convert with fftext
HEX edit
convert(reverse) with fftext
pictures ???
Export with Highwind to PNG
Import with Highwind
new chars
replace some allready existing not used char with new one
edit menu_us.lgp(TEX with fonts)


Window.bin editing(char lenght) ??

Here some results of testing and questions.

Some my comment to programs
(feel free to add comment, I am waitnig for them )

Working with LGP files
Emerald(1.1.6,polish)
can export/import of level files many at once(can pack levels, cant unpack)
?Import has two modes, whats differnce(yes/no choice on some polish text)?

Lgptools(1.60)
!bug on non english windows
fast unpack, can decompres alll files during extracting
weird patch system(not clear, or made patch from not unpacked levels?)
self patch dont work
?function Pack only repack archive, where was adding on end?(didnt pack new created flevel.lgp with unpacked levels)

Highwind(1.20)
!bug on non english windows
?higher HW requirements(RAM must be higher then created/opened archive)? Otherwise Highwing crash.

Translating flevel.lgp
all programs have some wrong(bad text, bad chars) text in some levels

Sapphire(1.3.0.3)
export/import text from levels
slow decompresiing if files comppresed
create file lista.txt in unusal place(must check if not addin lista.txt too)
cant import text to fcyo
dont know some color/chars to right decode

Cosmo(0.95c)
direct text editing, can edit kernel2.bin
"Keep changes" message forever.
Qhimm compession should be default, 8bit comppresion bugged?
Good patch system whitch search only text difference
Self patch dont work
Some weird behavior(bugs?), must be good setting?

Loveless(2.4)
Only possible working only trought find&replace?
can edit text window size
even with "preview" trought a lot of levels crash
?Cant work with cosmo created archive

Translating kernel2.bin
Teioh (2.1)
no comment, looks good and working

Text in FF7.exe
FFtext
HEX editing after using FFtext
Size of text can be changed(can add more text, if I am carefull), but (start) position of text?

Translating/editing pictures
No program can keep 4bit color? No program can create "same" TEX?
Biturn
Bad transparency color
Only like pink color? Giving it everywhere.(yeah its transparency color, but it give it in file where trans. color must not be)

Textool
access violation error at TEX-BMP
BMP-TEX same as Biturn

Jenova Birth
only export, transparency to pink(if no transparency no pink)

Lgptools(1.60)
cant create TEX with transparency color?

Highwind
export to 24bit color PNG
looks like keep something from header of original TEX, only one with good transparency importing?
Imported files(created TEX) has changed palete
Imported files(created TEX) are bigger or smaller(not same size as original)

10
Gameplay Modding / FF8 limit changing
« on: 2007-07-22 14:11:11 »
Hi,
I did some lame hack of FF8 to change limits to 32767.
Looks like its work.
Healing with 32767(char had 12000/18000) looked weird(like it health numbers go trought zero)
In battle, menu screen you see only 4 last digits. (In status, juntion, item screen its ok).

I did some testing, but this doesn mean, that I messed something
USE ONLY ON YOUR OWN RISK
If you test it please post result of testing.
ONLY FF8 (latest version)geforce version is patched.
patch here(is patching FF8.exe, so make backup)
2 versions(quick made, so maybe I change something later)
first only comparsions changed (looks like best choice)
http://kruci.wz.cz/ff8limitpatch.exe
second all changed(some weird changed too)
http://kruci.wz.cz/ff8limitpatch2.exe


Some tech report
First, i diassembled ff8.exe, then I was searching for all 9999 numbers and changing them to 32767. I suppose that all nuber whitch is 9999 is some limit.

Healing with 32767(char had 12000/18000) looked weird(like it health numbers go trought zero)
I think its due going over max value 32767(12000+32767) where should be negative numbers.

(I can only some asm, and a lot of forget:P)

9999=270f hexadecimal

adress with limits
8F781
8F850
91137 -battle damage limit(even healing/item in battle limit)
91589
9167C
91FB1
95954 -some kind of 9999 limit function
95A1A -changing this alone increase HP limit(maybe there death computing too, but absolutly not sure)
95E6D

What it ca be
Using healing items in items menu, using healing magic in magic menu
GF HP
HP/GF HP after level up.
(HP/GF HP after game start.)


some whitch only move 9999
C9A13
C9A5D

Damage can be 65535(FFFF hex), but with using this, if you get healing to higher then 270f, I think you will not be healed, healt will be decreasing(tested with FFFF)

code usualy looks like this, so sure here is some limit
Code: [Select]
;some computing of edx
cmp edx, 0000270F
mov esi, edx
jle 0048F7A0
mov esi, 0000270F
jmp 0048F7A0

similar to above
Code: [Select]
add ecx, 0000270F
cmp esi, ecx
jle 00491145
mov esi, ecx
jmp 0049114F

limit function
Code: [Select]
mov eax, dword ptr [esp+04]
cmp eax, 0000270F
jle 0049595F
mov ax, 270F

?death computing too, maybe I am absolutly wrong
Code: [Select]
:00495A1A cmp edx, 0000270F
:00495A20 jle 00495A27
:00495A22 mov edx, 0000270F
:00495A27 xor eax, eax
:00495A29 mov word ptr [esi+00000174], dx
:00495A30 mov ax, word ptr [ebp+00]
:00495A34 movsx ecx, dx
:00495A37 cmp ecx, eax ;in DX is some 9999limited number compared with some number
:00495A39 jge 00495A46 ;and if DX is greater or equal
:00495A3B mov word ptr [ebp+00], dx
:00495A3F mov word ptr [esi+00000172], dx
:00495A46 xor edx, edx ; make it zero
;some function,...
;some some interesting but not changable,
:00495A78 cmp edx, 000000FF
:00495A7E jle 00495A85
:00495A80 mov edx, 000000FF
:00495A85 mov byte ptr [esi+000001BB], dl
:00495A8B xor edx, edx

some 9999 number, but not compare
Code: [Select]
:004C99FD mov eax, 01CFE0E8
:004C9A02 mov ecx, 00000026
:004C9A07 mov esi, edx
:004C9A09 mov edi, eax
:004C9A0B add edx, 00000098
:004C9A11 repz
:004C9A12 movsd
:004C9A13 mov word ptr [eax], 270F
Code: [Select]
:004C9A57 mov [ebp+12], 270F
:004C9A5D call 0049A740

11
Archive / Sapphire and emerald
« on: 2007-01-21 15:32:17 »
Hi
Have anyone lates versions of program sapphire and emerald for final fantsy, I have some old(sapphire 1.2.9, emerald 1.1.6), in whitch i get some errors.
I didnt find them anywhere.

Pages: [1]