Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 21:34

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



How To Edit EPK FiLes

Discussion on How To Edit EPK FiLes within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2008
Posts: 91
Received Thanks: 111
How To Edit EPK FiLes

The first of these elements games Tianwan a quartz games, feel good, like Chinese it was found that there are no resources in rsc. 7 X& a# {& ]4 e+ v' K3 m 7 X & a # (&] 4 e + v 'K3 m
在rsc目录下有几个epk,第一直觉是这是包文件 ,游戏资源都被打包在epk 文件中。 Rsc directory in a few epk, the first instinct is that this is a package file, the game resources are packaged in epk file.
6 s+ B: D/ ^5 F5 e查了很多地方也没有找到epk的规则(有个叫JS什么什么的工具也用epk文件名打包,但是不 是这种格式 ),到elements games官方去查也没有。 6 s + B: D / ^ 5 F5 e check a lot of places did not find epk rules (so-called JS tools packaged with epk file name, but not the format), to an official to investigate elements games also no. 下载了几个elements games出品的游戏,都是使用epk方式打包的。 Download a number of elements games games products are packaged using epk way. 9 \, J5 G+ y- q" s. m# w 9 \, J5 G + y-q "s. m # w
elements games出品了很多游戏,个个都是精品,所以才下定决心要攻破它的epk包。 produced a lot of elements games games, all are fine, so determined to break through its epk package.
: _" O- B% b* V# f+ k6 T0 T有兴趣的也可以到他们的官方网站看看 : _ "O-B% b * V # f + k6 T0 T can also be of interest to look at their official website
U2 \' O D, z, a8 W 因为很想汉化它,于是用UE打开epk进行了分析,经过一天的尝试编写出了解包和打包的算法,希望对有兴趣 汉化elements games出品的游戏的兄弟们有帮助。 U2 \ 'O D, z, a8 W because the Chinese would like it, then open with UE analyzed epk, After a day of trying to understand the preparation of a packet and package of algorithms, in the hope that Chinese interest in production of elements games games brothers help. - ^! E8 p+ ^0 @. @ - ^! E8 p + ^ 0 @. @
epk的打包和解包算法! T9 s- U. |9 r6 t epk reconciliation of the packing algorithm package! T9 s-U. | 9 r6 t
首先,elements games出品的游戏会将声音、图片、 地图 、数据等文件分别打包在epk文件中,一般打包图片的文件取名gfx.epk,包含游戏中使用的所有图片资 源。 First of all, elements games games will produce the sound, pictures, maps, data and other documents were packaged in epk document, the general picture of the file named package gfx.epk, the game contains all the images used in resources. 解开gfx一般会有font.bmp这样的图片,这是elements games专用的图片字库方式,关于图片字库在下面的字库规则中讲解,这里我先讲一下epk的文件格式。 Gfx will be solved in general font.bmp this picture, this is the picture elements games dedicated manner font on the font picture below to explain the rules of the font, click here epk me start by telling you the file format.
& I# d. C5 }* J7 C; `7 I粗略的看,epk的文件格式如下: * `; T4 g/ v4 L' F2 s & I # d. C5) * J7 C; `7 I look at a rough, epk file format is as follows: *`; T4 g / v4 L 'F2 s
header (0x20字节长) header (0x20 bytes long)
/ d9 H, M6 V3 v: c# Z3 U filename (变长,以0x00结束) / D9 H, M6 V3 v: c # Z3 U filename (variable length to the end of 0x00)
, Q# j. ]+ b0 \, U data offset point(4字节int LE) , Q # j.] + b0 \, U data offset point (4 byte int LE)
$ b4 Y4 v% f7 t/ O: v0 N data length(4字节int LE) 2 p4 w$ q" _7 s& K $ B4 Y4 v% f7 t / O: v0 N data length (4 byte int LE) 2 p4 w $ q "_7 s & K
data int zip format length(4字节int LE) ( Z, z; `. E* k! y; V% p4 q data int zip format length (4 byte int LE) (Z, z; `. E * k! y; V% p4 q
……N个上述内容…… 8 X4 J; F5 R6 b L. M8 e ... ... N of the above ... ... 8 X4 J; F5 R6 b L. M8 e
data int zip format ; L% m1 T4 O2 ^- V2 W6 O data int zip format; L% m1 T4 O2 ^ - V2 W6 O
……N个data int zip format…… ... ... N of data int zip format ... ...
/ p2 p* ]$ q. T }. o- [ @其中1 S! E# h& x5 b M9 n / P2 p *] $ q. T). O-[@ One 1 S! E # h & x5 b M9 n
filename为包内包含的文件名称, filename for the package of documents containing names,
, W5 J$ _- Y7 | data offset point为该文件内容在epk文件中的偏移值9 ?2 b$ H$ `5 d+ \+ g7 G9 v5 F* ] , W5 J $ _-Y7 | data offset point for the contents of the paper document in epk offset value of 9? 2 b $ H $ `5 d + \ + g7 G9 v5 F *]
data length为该文件被解包后的实际长度% ~. P2 }" o" [! d1 d# P% _ data length of the files are unpacked after the actual length of the% ~. P2) "o" [! d1 d # P% _
data int zip format length为该文件在epk文件中以zip格式存储的长度 data int zip format length of the document epk file in zip format to store the length of
S, u7 g3 r( n+ G这四个关键内容会根据包内文件数量重复N次。 S, u7 g3 r (n + G will be the four key elements of a document based on the number of packages to repeat N times.
0 x5 T4 W; E& S# d4 N0 E0 Y* K9 k data int zip format即为每个文件在epk文件中以zip格式存储的实际数据,一般为标准格式压缩,也有的是用最快 速度格式压缩。 0 x5 T4 W; E & S # d4 N0 E0 Y * K9 k data int zip format of each file is epk file in zip format to store the actual data, the general format as the standard compression, also took the fastest compression format . 数据段也会根据包内文件数量重复N次。 Data segment within the document will be based on the number of packets to repeat N times.
/ H5 ]5 w. i! h/ i c, V / H5] 5 w. i! H / i c, V
4 l I; B1 A+ K) [( G+ q上述是epk文件格式中的关键数据,当然如果想解包和打包epk仅仅有这些数据还不够,下面我们通过图片 详细说: 8 t7 N2 u \" b 4 l I; B1 A + K) [(G + q above epk file format is the key data, of course, if you want to unpack and pack only epk these data were not enough, we have adopted the following picture in detail: 8 t7 N2 u \ " b
5 D' D& q8 F0 R7 N 5 D 'D & q8 F0 R7 N
图中红色部分为epk文件头部分,关键数据是一个文件类型标示和一个文件个数的int(蓝色部分),我们需 要根据0x10开始的这4个字节得知包中究竟有几个文件,这里我用的比较简单的epk,这个epk只包含一 个文件,即0x01 0x00 0x00 0x00 Red part of graph paper for the first epk part of critical data is a file type label and a file number of the int (blue part), we need to start in accordance with this 0x10 byte 4 that the package is there a number of documents here I use the relatively simple epk, this document contains only one epk, that is 0x01 0x00 0x00 0x00
: k* M: t1 r; O y% k! M, H绿色部分为一个文件信息定义区,每个文件定义区的固定长度为0x98,其中为文件名预留的是0x80字节 长,但是文件名实际是按0x00作为结束的,图片中粉色部分为文件名,在0xa0开始的信息是6组int, 这6组int有3组是我们非常需要的。 : K * M: t1 r; O y% k! M, H green part of the definition of a file of information, each file of fixed length the definition of areas for the 0x98, which is reserved for the file name is 0x80 bytes long, but is based on the actual file name as the end of 0x00, the pink part of the picture file name, 0xa0 started in 6 groups of information is int, that int are six Group 3 Group is that we very much needed. 0 U, ~7 G% p# c# C4 d+ v 0 U, ~ 7 G% p # c # C4 d + v
红色部分为data offset point 8 C* R/ E4 }" x" p Red part of data offset point 8 C * R / E4) "x" p
蓝色部分为data length Data length for the blue part of
0 p% e+ M3 v. l黑色部分为data int zip format length 6 t" p5 A$ o! X/ P 0 p% e + M3 v. l black part of data int zip format length 6 t "p5 A $ o! X / P
根据包中文件的个数,绿色部分信息定义区会逐个描述每个文件。 According to the number of packets in the document, the definition of green areas will be part of the information described in each document one by one.
i9 i& W) j6 O8 X2 V5 g + ~2 l7 h/ u2 k$ S' @0 Y i9 i & W) j6 O8 X2 V5 g + ~ 2 l7 h / u2 k $ S '@ 0 Y
接下来我们看数据段 The next paragraph we look at the data
# |8 x* |3 T% M4 Q5 s ( z) k0 p C6 K0 Y: n8 ]/ A8 @ # | 8 x * | 3 T% M4 Q5 s (z) k0 p C6 K0 Y: n8] / A8 @
上图就是文件内容的数据段,数据段自data offset point开始,zip压缩格式。 The figure is above the content of the document data, data from the data offset point above the beginning, zip compressed format. 图中**高亮的两个字节0x78 0x9c表示这段数据使用DEFALUT压缩级别,也有些数据段可能会使用0x78 0x01的标示,这是标示使用BEST_SPEED压缩级别,这种方式不是十分常见。 ** Highlighted map of the two bytes 0x78 0x9c that the use of this data compression level DEFALUT, but also some data may be used above the mark 0x78 0x01, which is marked BEST_SPEED use compression level, which is not very common. 了解了epk的构造方法,我们就可以动手写程序解包和打包epk了。 Epk understanding the structure of the method, we can write procedures do unpack and pack the epk. 需要注意的是,这里所有的数值数据都是使用Intel字节序的。 Note that all the numerical data here are using the Intel byte order. . D! z" U: E( M# w5 t/ i . D! Z "U: E (M # w5 t / i
还有,我编写的epk解包和打包程序仅仅是核心算法,因为没有操作界面,现在还无法发布,如果有人需要可以 单独联系我。 In addition, I prepared and packaged epk procedures unpack only the core algorithm, because there is no user interface, and now can not publish, if anyone needs to contact me individually.
$ u" B9 u2 A% y! T$ j/ T @7 F . v" a7 U) P' P $ U "B9 u2 A% y! T $ j / T @ 7 F. V" a7 U) P 'P
bmp字库的规则) u/ B( e- _* j7 y+ r0 m bmp font rules) u / B (e-_ * j7 y + r0 m
解开epk包仅仅是第一步,我们的目的是要汉化软件 。 Epk package to solve only the first step, our aim is to finished software. 当你兴冲冲的解开所有的文件后发现并没有类似什么reource或者bdf字库文件之类的,只有一些声音图 片文件。 Excitedly when you unlock all of the documents have not found what reource similar or like bdf font files, and only some of the voice picture file. 仔细看,你会发现一些以font为文件名的bmp,比如quartz解开之后有 Look carefully, you will find some font file name for the bmp, such as quartz after unlock
' }/ ?5 R. O7 x font.bmp ') /? 5 R. O7 x font.bmp
. S$ B2 S+ A3 w$ X4 F font_backmask.bmp ( k1 b# f2 c) i# O . S $ B2 S + A3 w $ X4 F font_backmask.bmp (k1 b # f2 c) i # O
font_frontmask.bmp . _3 a% g8 I5 W/ v$ { font_frontmask.bmp. _3 a% g8 I5 W / v $ (
当然每个游戏不一定都是这几个,quartz属于比较复杂的一个,为了追求字体的效果,这个游戏用xor算 法进行了字体遮罩处理。 Of course each of these games are not necessarily, quartz is a more complicated, in order to pursue the effect of fonts, with the game xor mask algorithm to deal with fonts. 所以需要有上述多个bmp组成字库。 Therefore, the need for the composition of the above-mentioned font than bmp. 打开一个bmp看看,排列是不是很象ascii字符表的顺序? Open a bmp to see, with not very much like the sequence of ascii characters in form?
- ?6 S f& B3 v1 P# [) O x -? 6 S f & B3 v1 P # [) O x
4 f7 P- l) e5 K: T& i没错了,elements games的游戏都是这样来构造字库的,它把ascii字符表中的字符按顺序写入到一个bmp文件中,然后 在显示文字时根据文字读取相应位置的图片,比如字符串“1323”在显示时会根据ascii字符表位置(0 x31,0x33,0x32,0x33),来截取bmp中的图像得到“1323”这几个字符的图片,是不是 很BT!! 4 f7 P-l) e5 K: T & i is correct, elements games games to construct the font so that it ascii characters to the table in order to write the characters to a bmp file and then display text According to the text read at the corresponding position of the picture, such as the string "1323" in the display table based on the location of ascii characters (0x31, 0x33, 0x32, 0x33), to the interception of bmp image to be "1323" It's a few characters picture, is not BT!!
/ n B1 w1 e" C A# m. L / N B1 w1 e "C A # m. L
, D* ^2 Y/ _7 z9 {; @. M # \! Y0 g ~' n! l , D * ^ 2 Y / _7 z9 (; @. M # \! Y0 g ~ 'n! L
有人心急,要追问了,那么怎么样才能把汉字加到字库里呢? It was impatient, it is necessary to ask, then how to add character to the characters in it? 很简单,就接着图片后面继续往里加自己需要的汉字就可以了。 Very simple picture on the back and then continue to increase inside the characters they need it. 聪明的人马上就想到接下来的问题:我加入的汉字用什么值来调用呢? Smart people immediately think of the next question: I added value to what Chinese call it? ? ? 我们把这个bmp放大来看看: 2 m/ g8 o* f9 [' u+ n3 P We take a look at the bmp to enlarge: 2 m / g8 o * f9 [ 'u + n3 P
" P" d f1 H( {8 p, l "P" d f1 H ((8 p, l
看到什么了? What the? 似乎没什么特别,除了图片最上面的一些杂乱的白线。 It seems nothing special, apart from some of the top picture the white lines in a disorderly manner. 其实奥妙就在这些白线里,你仔细看,每一根白线下面正好对应一个字符,那么也就时说比如字符“1”,它应该 是在第0x31根白线下面,这样我们就知道字符表的映射方法了! In fact, the mystery of the white lines in these, you look carefully, every white line just below the corresponding character, then it said that characters such as "1", it should be the first white line below the root 0x31, so that we know character table of the mapping method! 那么我们自己来扩重这个字库,用图片编辑工具打开这个bmp,把图片尺寸加长,然后再后面加入我们需要的汉 字,每个汉字上面也都加一条白线。 Then to expand our own weight of the font, picture editing tool used to open the bmp, the image size lengthened, and then we need to insert the Chinese characters, each character also increases above a white line. 比如图片中的“单人”的白线编号是0x79 0x80,那么我们打开app文件,寻找到“Single Player”的自串,改为0x79,0x80,其余的部分补0x00,这样Single Player的调用就变成了“单人”了。 For example, the picture of the "single person" the white line number is 0x79 0x80, then we open the app file, find the "Single Player" from the string into 0x79, 0x80, fill the remaining part of the 0x00, so the call on the Single Player become a "single person" has. 当然如果你有创造力,还能想到一个更好玩的东西,那就是让一条白线划过多个汉字会如何呢? Of course, if you have creativity, but also think of a more fun things, and that is to allow a white line across a number of Chinese characters will be? & R, u. O S! V9 K6 H& o5 c! f & R, u. O S! V9 K6 H & o5 c! F

$ N+ h6 n: d$ ]$ H 7 `$ H' }& k( m* a$ t* ] $ N + h6 n: d $] $ H 7 `$ H ') & k (m * a $ t *]
答案是完全可以,而且这么做会更容易控制界面的效果: # r" w x" z9 z/ U( [" k The answer is entirely possible, and to do so would be easier to control the effects of the interface: # r "w x" z9 z / U ([ "k
5 N9 c( Q' k) M( p9 H' u 5 N9 c (Q 'k) M (p9 H' u
这是一个比较粗略的教程 ,我写这个教程的目的不只是为了针对elements games的游戏的汉化工作,我还想给大家传达一个信念,汉化不仅仅是用小狗或者UE或者我的RSCEdi tor等等的工具打开文件不停的替换字符,汉化给我们带来的是多方面的外延知识,我们应该有勇气探索新的领 域。 This is a relatively rough course, I wrote this tutorial not only for the purpose of elements games games for the Chinese work, I would like to convey to you the conviction that language is not just with the dog, or UE, or my RSCEditor tools, etc. to open the file to replace the non-stop characters, Chinese has brought us knowledge of a variety of outreach, we should have the courage to explore new territory.
lx|Mehti|xl is offline  
Thanks
9 Users
Old 04/18/2009, 18:17   #2
 
elite*gold: 0
Join Date: Jan 2008
Posts: 426
Received Thanks: 570
ehhhmmm was willn der sagen?
Ich hab nämlich kaum was verstanden^^
jakel5690 is offline  
Old 04/18/2009, 18:22   #3
 
Mazlum²'s Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 836
Received Thanks: 294
das ist ein kleiner Guide wie ihr die Datein der Characktere also den Clienten bischen verändern könnt allerdings ist es nicht sooo verständlich aber Thx von mir
Mazlum² is offline  
Old 04/18/2009, 18:42   #4
 
elite*gold: 0
Join Date: Jan 2008
Posts: 426
Received Thanks: 570
Naja ich verstehe davon nix..^^
jakel5690 is offline  
Old 04/18/2009, 18:47   #5
 
elite*gold: 20
Join Date: Dec 2008
Posts: 3,887
Received Thanks: 724
banjo du hast n thankzZ geben
heißt des das dus verstanden hast?
wenn ja, kannst du des uns mal pls erklären?^^
TheVay is offline  
Thanks
1 User
Old 04/18/2009, 18:48   #6
 
elite*gold: 0
Join Date: Oct 2008
Posts: 646
Received Thanks: 240
das heisst wenn du gut bist kannst du den sensi in Pikatchu machen oder wie???? ^^
naja eines habe ich bemerkt seine Sig is zu GROSS soll gelöscht werden wie bei mir neh VulcanRaven^^ naja wenigstens haste noch link von meinem bild dagelassen^^
nichts böse gemeint..
Platinum0000009 is offline  
Old 04/20/2009, 20:53   #7
 
elite*gold: 0
Join Date: Apr 2009
Posts: 393
Received Thanks: 149
danke hat geholfen
metinisscheise is offline  
Old 04/21/2009, 05:11   #8
 
Der-Eddy's Avatar
 
elite*gold: 400
Join Date: Nov 2008
Posts: 67,909
Received Thanks: 19,503
aber gehört das nicht zu den Guides?
leider kann ich nichts verstehen das ist so schreklich unleserlich
Der-Eddy is offline  
Old 04/21/2009, 05:54   #9
 
elite*gold: 56
Join Date: Sep 2008
Posts: 7,595
Received Thanks: 1,465
er hat es unleserlich gemacht ok
mann kann es nicht wirklich verstehen ok
aber wenn man genau hin schaut sieht mann wie es geht
gebt euch mühe und über fliegt es nicht einfach
ExtendetBurs is offline  
Old 04/21/2009, 11:09   #10
 
Albaaa's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 194
Received Thanks: 37
Loll dieser Mehti kopiert aber auch aallles -.-
Albaaa is offline  
Old 04/21/2009, 11:11   #11
 
elite*gold: 56
Join Date: Sep 2008
Posts: 7,595
Received Thanks: 1,465
Quote:
Originally Posted by Albaaa View Post
Loll dieser Mehti kopiert aber auch aallles -.-
lese es dir erst mal durch er hat es rein geschrieben das er es gefunden
hat und extra hier rein kopiert hat
ExtendetBurs is offline  
Old 04/21/2009, 11:19   #12
 
Albaaa's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 194
Received Thanks: 37
Ja ich weiß , aber er kopiert immer ! Alle seine eröffneten Treads sind kopiert !
Albaaa is offline  
Old 04/21/2009, 12:25   #13
 
elite*gold: 56
Join Date: Sep 2008
Posts: 7,595
Received Thanks: 1,465
und er macht sich wenigstens mühe es zu suchen oder hast du schon mal was in dieser richtung gefunden ? glaube weniger
ExtendetBurs is offline  
Old 04/21/2009, 12:28   #14
 
Joshii139's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 5,159
Received Thanks: 4,931
Quote:
Originally Posted by Albaaa View Post
Ja ich weiß , aber er kopiert immer ! Alle seine eröffneten Treads sind kopiert !
Wayne intressierts.
Immerhin spammt er nicht alles voll.
Joshii139 is offline  
Thanks
1 User
Old 01/02/2010, 10:20   #15
 
elite*gold: 0
Join Date: Aug 2009
Posts: 7
Received Thanks: 0
谢谢中心
a13010130 is offline  
Reply


Similar Threads Similar Threads
How to Edit .rez-Files in CA
10/11/2012 - Combat Arms - 155 Replies
Hi i want to post a little Tutorial how to edit .rez-Files in CA. Hier ein Video weil es ja einige probleme gab ^^.Sry wegen der sch....lechten Quali Camtasia Studio mag mich ned XD. http://www.youtube.com/watch?v=-ExLuaNNd8g As many of you know the textures, sounds, and models can be edited in Combat Arms. However to do so you need a certain set of tools. These tools were created by our very own B1ackAnge1. Using these tools it is possible to essentially edit any aspect of the visual...
Possible to edit .c3 files?
12/19/2009 - Conquer Online 2 - 13 Replies
Taken from google search. Qouteing some guy on some forum, forgot to copy name and such. sorry who ever you are. ------------------- Ive found myself in troubles while trying to decrypt and re-encrypt c3 files and found this guide very well explained about the use of it. By BigBoy1: ************************************************* * Editing C3 Client Side
How to Edit .KOM files?
09/25/2009 - Grand Chase Philippines - 3 Replies
Please help me~ What program do you use to edit .KOM files? Can someone post a tutorial on how to edit them? If you do then thanks, if you don't then I'll just have to find an answer myself.
How to edit .mac files?
03/27/2008 - Dekaron - 0 Replies
Hi, anyone knows how to edit the .mac files? for a better wallhack. MfG EmEx
How to edit .dat files?
06/04/2006 - Conquer Online 2 - 5 Replies
How do I edit .dat files like Pet.dat?



All times are GMT +2. The time now is 21:34.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.