Page 1 of 9

Tutorial on Swapping character models

PostPosted: Sat Feb 20, 2010 10:24 am
by Master Kyodai
The characters in Shenmue 1 as 2 are in files called HUMANS.AFS as their names
indicates they are simple containers AFS.

In HUMANS.AFS there are two types of files that are always in pairs:

PKF-files
PKS-files

The PKF contain textures of characters
The PKS contains the 3D model + subtitles, the game (in part).

So in fact each character as 1 Shenmue 2 has a respective PKS and PKF (model + texture)


In Shenmue 1 the characters are identified by what is called their CHARACTER ID, it is roughly four
Letters defining the person for example it defines AKIR for Ryo (Shenmue at the base was to be called
Virtua Fighter RPG where AKIRA (Akira), but I suppose you know, it was also, for example
HRSK for HARASAKI or NOZOMI HARAZAKI for Nozomi.

I've extracted all textures contained in HUMANS.AFS of like Shenmue 1 Shenmue 2 with
CHARACTER their respective ID, the best thing that you throw a glance, you'll see the files CHARACTER ID with their respective textures textures
contained in the PKF because I do not know what characters you want to edit.

I converted all the textures in PNG because normally they are formatted PVR in Dreamcast.
So you can open them from any computer.
Small precision for Shenmue 2 on CARACTER ID boils down to three letters Ryo Ryo Wong = = = SYE WON Xiuying etc ...
Same principle as Shenmue 1 rigourosly.

Faces characters + character id Shenmue 1: http://www.megaupload.com/fr/?d=D2SXJ96H

Faces characters + caracter id for Shenmue 2 Disc 1: http://www.megaupload.com/fr/?d=6E346HKA
To Shenmue 2 Disk 3: http://www.megaupload.com/fr/?d=DV0VY6CG
To Disk 4: http://www.megaupload.com/fr/?d=WWJXHK2X

Once you have located the person you want to edit it enters the core of the matter.
How to change or reverse the characters rather to use that you want for a particular scene.

You need two things.

AFS utils v2 and a hex editor.

We'll begin by taking HUMANS.AFS of Shenmue 1 that I'll put here the trees for different disks:
Disk 1 for the HUMANS.AFS is in / SCENE/01/STREAM
for the hard-2/SCENE/02/STREAM
-disk 3 / SCENE/03/STREAM
And the trees of HUMANS.AFS for Shenmue 2:

Disc 1: / SCENE/01/NPC
Disc 2: / SCENE/02/NPC
Disk 3: / SCENE/03/NPC
Disc 4: / SCENE/04/NPC

You have to put HUMANS.AFS in a folder and extract its contents (PKS / PKF) with Afs utils v2.
To make you open Afs utils, you click on Open Files, you tips on HUMANS.AFS (it should be drunk in the dropdown)
then you go into the TOOLS tab and EXTRACT ALL FILES, and you point to the folder of your choice.



To reverse a figure he'll have to change two things
The HUMANS.AFS
And his HUMANS.IDX (its index if you prefer)

Once all the files extracted HUMANS.AFS we meet well with PKF PKS and the various characters.
I prefer to give an example with the disc 4 of Shenmue 2.
I will replace Shenhua with Xiuying.
I extracted the files Humans.Afs disc 4 and I know that Caracter Id Shenhua is SIN and that of
Xiuying is SYE.

The trick will be to fake the Dreamcast by modifying pointers:
You take your hex editor (PSPad free and excellent at home) you héxedites files and PKF PKS Xiuying
namely SYE.PKF and SYE.PKS opening them (each turn) and then you replace all pointers Xiuying namely its
Character Id SYE by that of Shenhua INS and must replace them all without exception (CTLR + F for not forgetting) see example 1
Namely it must do that for PKF PKS and the character both.
Once this fact is of course backup and it does exactly the opposite for Shenhua (Character Id replace the INS by SYE etc. .....)
This second step is not mandatory, but to avoid bugs in particular in the other discs Shenmue 1
or Shenmue 2, it is better to do.

Once it is rebuilt on the HUMANS.AFS with AFS utils by doing this
CREATOR TOOLS then AFS FILE and then IMPORT XML tips list you the list of files created automatically during the extraction software and you do FILE and SAVE AFS.

Once done the HUMANS.AFS is ready so we still need to change the HUMANS.IDX

Nothing too complicated it will open with hex editor and it will reverse the Character Id Shenhua and Xiuying
see example HEXA ORIGIN OF HUMANS IDX (which corresponds to the file in its "normal" state as in the game (if you see id caracter with letters and more as in the example SYEB the small B corresponds to the character as a model for the child including flashback Xiuying Ziming with his brother in the desert when he left to join the Chi You Men, therefore, paid no attention should always use the Character Id three letters for Shenmue 2 in all cases unless you want to use the children of course.
The second example HEXA HUMANS.IDX AMENDED corresponding to file properly amended.

It ended Xiuying appear in Disk 4 of Shenmue 2 instead of Shenhua (there may be bugs of course)
but according to my tests there is none, I have to give this example because it is as valid as Shenmue 1 Shenmue 2
and the Xbox version of Shenmue 2 as well.

In the ripping compendium thread you will find a batch of SiZiOUS for Shenmue 2 which can easily recreate an iso autoboot of Shenmue 2
why we must save the game data in the DATA folder and then click on BUILT and that's all.
I hope this tutorial thee enjoyed it and you will understand easily.




Credits go to David for the guide and Sizious for the tools. Translation from french by google, i just corrected some really annoying stuff, so sorry for some odd expressions. Thanks for sharing!

PostPosted: Thu Mar 11, 2010 5:48 pm
by wude
very interesting , could be fun :-o

PostPosted: Fri Apr 16, 2010 10:54 am
by Oppy
Master Kyodai. I try to extract Human.afs with afs utilsv2. But all i get are 738 files. All named; file_1, file_2, file_3 and so on... What am i doing wrong?

PostPosted: Fri Apr 16, 2010 12:05 pm
by Master Kyodai
I suspect its the tool or your source, but most likely the tool. If all afs extractors give you "random unrelated" filenames then it is your rip, i heard some CDI rips as distributed by warez groups were compressed and edited much stuff, I always use full rips for such stuff to aviod problems and missing files.


But from the very stupid name (File1) I'd guess the tool you use can't interprete the according IDX files.

PostPosted: Fri Apr 16, 2010 12:18 pm
by dotsona
Nice tutorial Kyodai

PostPosted: Sat Apr 17, 2010 9:34 am
by Oppy
ok turns out it is the rip. Looks like il need a better one. Funny cos they work perfectly in NullDC. Kyodai can u PM me a way of getting a good rip? download or otherwise.. Im really keen to get stuck into these mods.. Also do you know if its possible to replace Character models from the game with the ones from passport? I know it was an issue earlier with chankast but i got a pretty high spec pc and nullDC is alot more stable then Chankast. Cheers

PostPosted: Sat Apr 17, 2010 2:44 pm
by Oppy
Ok, So i got another rip here. Turns out to have the same problem. I use afs explorer and get. "Missing Descripters information. Use"Modify reserved space" function to fix it. Maybe a windows 7 problem? any ideas? this happens with every afs file i have tried. yet the images still boot in NullDC perfectly.

PostPosted: Sat Apr 17, 2010 3:28 pm
by Master Kyodai
OK just did a quick try which worked fine just as expected. Imma note down what i did here so maybe you can compare if you do something different.


1. Open up AFSExplorer 3.2

( http://www.tankraider.com/userup/1271607190.zip )

2. Open your humans.afs. I take the one from the perfect dump of the japanese Shenmue. Located in Scene\01\Stream\HUMANS.AFS

Looks like this:

Image


As you can see all files have proper names. If yours does not look like this then it is probably the rip. ALso make sure you use the afs explorer i linked to, to make sure the tool is not the problem.

The perfect dump of Shenmue 1 jap is far over 2 Gigabytes, so i'd really not like to upload it unless it can't be found anywhere else. PM me if its urgent but I'd really prefer to not be the local file distributor, is there really no upload of these on Rapidshare and co?

PostPosted: Sat Apr 17, 2010 8:36 pm
by Oppy
My rips are
Rip 1 - 2.7gb (disc 1 to 3)
Rip 2 - 2.2gb (disc 1 to 3) 2.9Gb If you include the passport.

I Would really like to be able to mod the english version as i cant understand japanese. But I just found this on a shenmue translation page about opening afs files

1.Run AFS Utils and select the File > Open files... command.
2.Select the \SCENE\01\STREAM\0001.AFS file and click OK.
3.Select the 0001.AFS on the left.
4.Click on the Tools > Mass extraction... menu item.
5.Select the output folder and press OK! The 0001 directory'll be created in the output folder, this directory'll contains each file contained in the AFS file.
6.You have succesfully unpacked the intro scene files. Great job!
If you use a pirated version of the game, you won't see the original files name in the archive. SO PLEASE DON'T USE PIRATED VERSIONS OF THIS GAME. You'll unable to recongnize SRF or AHX files.

http://shenmuesubs.sourceforge.net/howto.php

I guess this means no go for me? Im hoping there is a way around it.

PostPosted: Sat Apr 17, 2010 9:38 pm
by Master Kyodai
I just checked ECHELON rip of Shenmue 1 and it didn't even come with humans.asf (Guess thats ripped).

And the post you quoted also doesn't lok too promising, i think for any serious work you'd need a perfect dump.

PostPosted: Sun Apr 18, 2010 8:22 am
by Oppy
Ok so im guessing there isno way around this. I have 2 original pal versions of shenmue for dc. but my dc is busted and i dont have an ethernet adapter. Could you Pm me with where i could find a clean english rip? if not, tell me the size a clean rip should be? including and excluding disc 4. A mate of mine is also keen to get modding as he wants to ry and remove back culling and stretch the loading screen so he can play in wide screen on NullDC with extra geometry. But he has the same rip as me.

PostPosted: Sun Apr 18, 2010 8:39 am
by Master Kyodai
Well I don't have an english full dump of Shenmue 1. Search google for Shenmue and "GDI" or "dump". I am sure it is avilable somewhere as i have seen it before.


Edit: isnt this what you are searching:#


http://snesorama.us/board/showthread.php?p=365551

PostPosted: Sun Apr 18, 2010 8:47 am
by Oppy
do you know what size a full dump would be?

PostPosted: Sun Apr 18, 2010 8:54 am
by Master Kyodai

PostPosted: Sun Apr 18, 2010 9:19 am
by Oppy
Kyodai you are a legand. To tell you the truth i had founs this site about 10 mins ago. was about to PM and ask if it woul dbe a clean dump. thanks man.