Hello everyone,
This is my first tutorial so go easy with me. Also, I’m not a native English speaker so… some sentences may look strange ^^.
Some program I use are in French & since I don’t know the menu name in English I’ll put them in French & I’ll put the meaning in []. Feel free to tell me the way to access it in English so I can update my tutorial with your info!
1/ What you can do with this tutorial?
2/ Software needed & important information.
3/ How to access, export & import game file (PCK)?
4/ How to edit Chinese text game file with Excel?
5/ How to set up a private patch server to be able to use those edited file?
6/ The Full Process detail (to make sure you didn’t forget something)
7/ Credit
Since I don’t play the game anymore & uninstalled it I don’t have lot of screenshot left… here’s one I’ve found but this one is clearly an old one (I’ll try ask some people who still play to give me some new recent one) :
click here to show the image
-----------------------------------
1/ What you can do with this tutorial?
- Access Game File.
- Edit & Translate Game Text in whatever language you want.
- Set up a private patch server.
By accessing Game File you can also :
- Find precise info about every Deathblow and magic in the game. (formula, probability & others)
- Check future content.
But these aren’t explained here.
-----------------------------------
2/ Software needed & important information.
You’ll find in this section all the tools & website, I’ve used so far. There’s probably lot of others one & there’s also probably some easier way to do some stuff I’m doing.
You’ll also find some required step, I needed to do. It’s highly possible than some people won’t need to do them, but I’ll still put them in it.
¤ If like me you play on the Taiwan version of Kingdom Heroes ( or 三國群英傳2.5 Online in Chinese). You’ll probably need to change your non-unicode Windows 7 setting. Else, all file you’ll access will be unreadable at all.
How to :
Panneau de Configuration / Horloge, langue & Région / Région et langue / Administration / Modif les param régionaux / Chinois (Traditionnel , Taiwan).
[ Control Panel / Clock , Language & regional / Regional & language / Admin / Edit regional setting / Chinese (Traditional / Taiwan)]
¤ To set up your own patcher you’ll NEED a HTML or FTP access (remote or local)
I won’t explain how to make this but make sure you’ll have one beforehand. Else you won’t be able to use your edited file (Must be reindexed through patcher).
¤ To repatch you’ll need a true patch pck file , this file MUST be updated with your lastest change just like the pack_designer ! else your change will be overwritten by the patch content !
In my Opinion the best one is the 1.0.1.1.patch.pck because it only had 1 file in it. And so you’ll only need to update this file with the lastest one instead of multiple one.
You’ll be able to find the file here :
Code:
ftp://kh2patch.uj.com.tw/pub/kh2_10_ob_patch/patch_pack/
¤ Tools & website I’m using :
Tools :
- Rpgviewer ( Van’s House ) : This tool allow you to extract & import game file.
- Excel : Allow you to edit XML file & reexport them into XML
- 2bytes Base64 macro for Excel (Zip password : forprogramercitybysltl , 2bytesBase64v02.zip ) : Allow you to convert the edited back to 2bytes Base64 through Excel.
Websites :
- Pinyin converter ( http://www.pinyin.info/tools/converter/chars2uninumbers.html ) : Allow you to convert original XML Chinese content into something readable with excel (I know someone who don’t need to do it, but in my case, I must, so I put it there).
Google Translation ( Google Translate ) : Well I don’t speak Chinese… so I needed a base to work with.
Optional : A Friend Speaking Chinese. But if you’re like me, you probably know lot of people who speak English & Chinese so they’ll be able to help you.
-----------------------------------
3/ How to access, export & import game file (PCK)?
¤ All game File can be extracted and so accessed with rpgviewer. Even if the game isn’t in the list
Start it & set it in English if it’s in Chinese (the (L) menu then English)
File / Open / hongkong & Taiwan / Odin / 三國群英 / 6 , 7 or Online (all of them work).
Trick : Set one path to the game (example the Online) & an other path to your patch.pck file. (example the 7 )
Set up the path to your game folder & a list of all PCK file will appear.
¤ Finding the XML file with Chinese Text in it.
The PCK we are looking for is the pack_designer.PCK one
select it then do :
Addon / Archive / Advanced Extract /
Here’s you’ll get a list of all file into the PCK.
Code:
IMPORTANT : All Traditional Chinese text are in the strings/ “folder”.
IF you want to edit the Simplified Chinese text ( strings_gb “folder” )
you must set your non-unicode language to Mainland China instead of Taiwan.
Well the rest is pretty obvious , select the file then clic the appropriate button on the right for the action you want to do.
-----------------------------------
4/ How to edit Chinese text game file with Excel?
Pfiou, we’ve got our XML Chinese text file now, so let’s edit it ^^.
Depending your OS language, you may be able to open it directly with Excel, but in my case I can’t.
So I need to make a small conversion.
¤ Converting XML Chinese text file to use them in Excel (if required)
Open your XML file in NOTEPAD.
Open Pinyin converter website.
Paste the whole XML file into the converter (can take time for some huge XML file)
Press the convert button (same)
Copy the results file & replace the whole content of your XML File.
save your xml file.
All Chinese text will look like &#number; if done correctly.
Now you’ll be able to open it in Excel.
if an error still exist, check the related line. and check for :
- “&” was used in the original file and messing up, just replace it with “and” (example : P&G)
- a broken balise because of the converter, sometime the </ascii> balise become broken, just fix it by adding the missing character (example : ???/ascii> become ???</ascii>)
¤ Adding the 2bytes Base64 macro, edit file & rencode to 2bytes Base64.
All text are encoded. Which mean simply editing the text won’t change anything. So you must use this Macro to reencode the edited text.
Développeur / Visual Basic / Fichier / Importer un fichier / the base64 macro file
[Dev / Visual Basic / File / Import a file / the base64 macro file]
If you did it correctly, a new Module will appear “Module1”
Close the visual basic stuff to return to Excel.
Set up a Shortcut to the macro :
Macros / Options / select Macro1 / Touche de raccourci /
[Macros / Options / select Macro1 / Shortcut Key /]
I generally use ctrl + w because I use an AZERTY keyboard but I know some SG friend used Ctrl+z . just choose what you prefer.
Once you’ve set up the shortcut, you’re ready.
Edit the ASCII cell you want then press the shortcut to update the related Unicode 2bytes Base64 cell.
Once the file is edited at your wish. Save it in XLS then export it in XML (save as / XML)
Code:
In my opinion, you should make a save in XLS (or XLSX) format for EACH file you edit
this will make it easier because you won’t need to
reconvert the file each time you want to load it)
Once done, import this edited file in the pack_designer.pck file with rpgviewer & save replace it.
Wew, we’ve done it ! the file is translated and when I start the game…. Everything is blank ???
But wtf happening ?
Well, we still have something to do : the game need to reindex the pck file content… and to do it we must make a fake patcher ! else… every file you’ll edit will end to be blank.
-----------------------------------
5/ How to set up a private patch server to be able to use those edited file?
Code:
NOTE : Making a CLONE of your game folder is HIGHLY recommended so :
1 folder will be the game folder you use to play (original patch server).
1 folder will be used to repatch your edited pack_designer.pck with the fake server.
this will be lot easier to drag the 3 pack_designer file (dir/pck/tbl)
from one folder to another than editing the game version & patch server path at each update
¤ Making the tree on your html/ftp
easy step : you just need to copycat what’s on the original patch server :
Code:
ftp://kh2patch.uj.com.tw/pub/kh2_11_ob_patch/
Make those 4 folders in your html/ftp. Exact same name, no caps.
¤ Editing the patch.pck file & making the appropriate patch_list.
Note : I’ll consider you’re using the 1.0.1.1.patch.pck file like I do. If you don’t , you need to update all the files into the one you use with the lastest version (the original one if if didn’t change anything, or your edited one if you edited it).
Open your updated pack_designer.pck file with rpgviewer & extract the following file :
game_data\magic\EffectDataList.xml
Open the 1.0.1.1.patch.pck with rpgviewer & replace the EffectDataList.xml by the one you’ve just extracted. Save replace then quit rpgviewer.
Now you’ll need to make 2 files for the filelist (the code balise is the content of each file):
Open notepad :
file 1 :
save then rename it replace.xml
file2 :
first : Right click on the 1.0.1.1.patch.pck file then propriety, replace “EDITHERE” by the size of the file (example “864001”)
Code:
<root>
<PatchPacket>
<Unit>
<Version>1.0.1.1</Version>
<File>patch_pack/1.0.1.1.patch.pck</File>
<Size>EDITHERE</Size>
</Unit>
</PatchPacket>
<FilePatch />
</root>
save then rename it update.xml
now make a ZIP file with both file in it & name it 1.0.1.1-filelist.zip
¤ Editing the loader.xml file to point to your fake patch server.
Go to game folder (if you make a clone like I said before, go to the one you’ll only use to repatch)
open the file loader.xml with NOTEPAD.
okay. Here we can edit lot of stuff, but most of them need to be ignored. The only 2 parts we need to edit are : the <ftp> & <gamepatch> stuff.
let say your fake server is at this URL : “192.168.1.25/server/fakekh/”
You must edit :
the <Host> value to 192.168.1.25
the <Home> value to server/fakekh (no / at the end !)
UserName & PassWord must be edited if you’ve set them up on your html/ftp else keep them as anonymous.
IF it’s a HTML SERVER and NOT a FTP :
set <Port> to 80 (well if you kept the default one… else the one you’ve set)
REPLACE <Ftp> & </Ftp> balise by <Html> & </Html>
now edit GamePatch Value by “your patch version -1” so since I use the 1.0.1.1 patch file.
I replace Version var by 1.0.1.0 and File var by patch_list/1.0.1.0-filelist.zip
save it, your (clone) game now point to the fake server.
¤ Putting the file on the FTP/HTML fake patch server.
in execution folder, put a copy of your edited loader.xml
in patch_list , put your 1.0.1.1-filelist.zip file
in patch_pack , put your 1.0.1.1.patch.pck file
everything is ready. If you start your (clone) game now, it should patch the game with your file and the game loader should show “1.0.1.1” version in the bottom right corner.
-----------------------------------
6/ The Full Process detail (to make sure you didn’t forget something)
“Damn your tuto is too big, I’m totally lost, I’m almost sure I’ve forgot to do something !”
Well, then let’s me make a recap. (this recap is based on what I’m doing)
Note :
Original game = game pointing to the original patch server
Clone game = game pointing to the fake patch server
to do once :
- Install the original game and let the game loader to patch the game in full.
- Clone the whole game folder.
- Get the original 1.0.1.1.patch.pck file.
- Get all the required tools.
- Set game directory for rpgviewer.
- Set your fake patch server folder & loader.xml (in server folder & in cloned game folder)
to do each time the original game is patched by the dev :
- Let the original game be patched with lastest patch.
- Use rpgviewer to extract the file to (re)translate then reimport them into the original pack_designer.pck
- Copy the original pack_designer.pck into the Clone Game & overwrite.
- Update the 1.0.1.1.patch.pck & 1.0.1.1-filelist.zip file & upload them into your fake server
- Edit clone loader.xml Version & File to 1.0.1.0
- Update the clone game.
- Copy the patched clone pack_designer.pck , .dir & .tbl to the original game.
- Start the Original Game , Play & have fun.
-----------------------------------
7/ Credit
- UserJoy for the Game
- Luo Guanzhong for writing the RO3K
- Van for making rpgviewer
- J Sung for the first version of the 2bytes Base64 macro (can use ascii char up to 00FFhex) & the fake server set up.
- Sltl for the updated 2bytes Base64 macro (can use all ascii char, FFFFhex) & this tutorial.
Special Thanks to :
- Harold , Cutemagpies, NF & GF