Category Archives: Pk2 Edit

>[Guide] Kaperucito’s ultimative Pk2 Guides For Legend 7 (2011)


>Synx’s ultimative Pk2 Guides

Meh, I’m a bit bored so I’m gonna explain how I did part of my edits of my pk2 for iSRO (thread link is on my signature), hope that people learn from it and make their own ones, or at least leave the stupid graphic pk2 editing and do something useful for the pk2 community ^^’
Let’s start with some easy stuff.

Filter for Adv. Elixirs in Stall Network
Difficulty: Easy+

This was one of the most easier things what I did, but took me a lot of research. Well not really, basically was luck while I was playing around with the Stall Network files XD

Files to edit:
– server_dep\silkroad\textdata\fmncategorytreedata.t xt
– server_dep\silkroad\textdata\textuisystem.txt

Theory

As you probably already know, the new advanced elixirs are sorted in degrees, even if the client doesnt show the degree like it does on weapons or normal wearable items, you can notice by the name. Well basically what we are going to do is add the custom filter to the stall network by hand. We can’t add a new kind of search which is not supported by the client, but we can use already-used categories and add degree filter on them. In this case we are going to use the already existing elixir category, and create a filter for search only an specific degree of the item. Let’s start.

Application

First we must understand how the stall network works. So lets open the “fmncategorytreedata.txt” (which contains the stallnetwork categories) and analyze it. Let’s take an example of the already existing elixir category:

Code:
1 WK_ALCHEMY_ELIXIR UIIT_CTL_WK_ALCHEMY_ELIXIR WK_ALCHEMY 33 0

 

Remember that you always must analyze the files of the server_dep folder in columns, since are an small database on itself. So taking a look at the columns, and searching for the strings on the server_dep files, we can guess what is the function of each column:

Code:
Service | RefCategory | CategoryName | RefCategory1 | ItemFilter | Degree

You can call them as you see more easy. That’s the way I call them XD
Now lets see what each ones does:
Service: Is on all the files from server_dep. It tells if the line is enabled or disabled basically (1 or 0)
RefCategory: Referenced name, for use on the same file and identify each category.
CategoryName: Reference name for the category. This name appear on the GUI, and is taken from the textuisystem.txt.
RefCategory1: This column specify if the line is a category of the main filter dropbox (xxx) or if is inside any main category (RefCategory).
ItemFilter: Defines which item is going to be searched on this category. It takes this info from the “fmntidgroupmapdata.txt”. Since we are not going to edit it on this guide, we don’t have to talk about this file.
Oh by the way, if the value of this column is “0”, means that this category is a main category, like “Chinese Armor” or “Event”, the ones which appear on the 1st filter dropbox on the Stall Network.
Degree: The max degree of the filter for this category. 0 disables this category. Any other number specifies the max degree that you can look for on the 3rd category of the stall network.
Yay! Naw we know what each column does (well almost XD). Now is time to add our custom category. Basing it on the info that you already have you can mount your own line. Try yourself.
Final result should look like this:

Code:
1 WK_ALCHEMY_ADVELIXIR UIIT_CTL_WK_ALCHEMY_ADVELIXIR WK_ALCHEMY 33 12

So basically what we did is add the advanced elixir to the stall network. We modified the refname and the categoryname for avoid it shows the same name as the normal elixirs. We used the itemfilter “33” since advanced elixirs are elixirs at all, and set the max degree as “12” for enable this filter to the stall network.
You can use whatever custom name you want to use, the client will read it and ask for it on the textuisystem.txt. If you dont add the reference name to the textuisystem, the client will show blank text. So we have to add the corresponding line to the textuisystem.txt. Doesn’t matter where you place it, the client will read the whole file. Final result of the customized line:

Code:
1 UIIT_CTL_WK_ALCHEMY_ADVELIXIR 0 0 0 0 0 0 Adv. Elixir 0 0 0 Adv. Elixir Adv. Elixir Adv. Elixir Adv. Elixir

So it’s done! Now import those 2 files to your media.pk2 and you now have your first customized category on your stall network! ^^
Final result:

Play around with the stall network files for get more interesting results.

Fix the “…” problem on the new underbar
Difficulty: Hard-

This was without doubt one of the things which gave me more headache. Since the last interface update which came with the Legend X, iSRO changed some of the files which are readed. One of them is the underbar file. The old location of the underbar interface file was resinfo\ifunderbar.txt. But it is not in use anymore. Instead of it, the client read the new .2dt files, which are located in the res_ui\ path of the media.pk2. This new kind of files are a bit confusing, but basically the function is the same as the resinfo files. After that guess I decided to investigate more about them, and saw many similarities with the resinfo files. Anyway, lets start with the guide.

Files to edit:
– res_ui\nifundermenubar.2dt

*Note: For this guide you will need an hex editor. Use the ones that you feel more easy to use. On this guide I’m going to use XVI32. You will also have to use the scientific calculator of Windows in hex/dec mode.

Theory

Not many people know this, but the whole Silkroad interface is stored and configured on the resinfo folder. The client reads those files and sort the interface and define which kind of item is each part thanks to them. But since the last update some parts of the interface are readed from a new path, using a new kind of interface files, the .2dt files. This files have almost the same structure as the normal resinfo files, but the most difference is that this new files are stored in hex values, so we have to use an hex editor for be able to read/edit them.
But let’s center our attention on the main problem. The new SRO Client automatically set a … on each text which goes out of the interface. This feature is cool in some parts of the interface, which before were fucked by long texts, but there are some parts of the interface which have the size of the static texts fucked, and is too small when there is really enough space for them on the interface. This is the case of the new underbar. The new underbar have enough space for show the full % exp, but the interface is messed and Joymax set a low width value for this static. What we are going to do is increase this value for let the client show the full % of exp without the … problem, so we don’t have to put the mouse over it for see our actual experience.
Let’s start ^^

Application

Same as the other guide, we have to understand how this new .2dt files works. We don’t have to analyze the whole file, since is pretty confusing, will be enough with understand the part that we want to edit. First of all we must find the X Y, width and height values of the EXP %. So lets take a look at the whole file with an hex editor. Things that we know are:
1. This part of the interface is next to the EXP static text.
2. It doesn’t have any DDJ file attached.
Basing our find on this information, we must search for it using keywords like “EXP” or just browsing around the file for find something that call our attention.

Uhmm… this looks suspicious, isn’t it? Hell yea, it must be the % interface part! We just found it!!!11!!
Now lets investigate it a bit more. The “23.45%” looks like an illustrative value for the Joymax program which generates this files, so it doesn’t affect the interface at all. What we have to use now is our intuition. I don’t want to make this guide longer than it already is, so I will skip the explanation of each value of this file (if you are interested try to guess them by yourself =3) and lets go to the part which interest us, the size of this part of the interface. It’s on this 2 lines:

This image has been resized. Click this bar to view the full image. The original image is sized 1253×41.


Here we can see some values after the “ÿÿÿÿ” which looks suspicious…
Yeah! Those are the values of the position and size of that part of the interface! Now is pure logic and a bit of small knowledge about the old resinfo files for guess what each value does. At this point forget about the ASCII part of the files, and watch only the hex part. We find hex values that we must convert to dec. Use your windows calculator for do it. I will skip also the “how to analyze it” part since my english sucks and probably no one will understand a shit. At the end we have know that:

Since the … problem happens because the width is not enough high, we have to make it higher in order to make it fits the space that it have left. The actual width value is “2B”, which translated to dec becomes into “43”. At this point I have nothing else for guide you. You must change this value to an higher value, for example “50”, which becomes into “32” value when we convert it to hex. Once we have it done, save the changes and import the file to your pk2, and see what happens =3
Yea it looks bizarre, I’m not going to show a pic, so for watch the result you have to follow the guide. At this point is more “intuition” than follow any guide. When you change the width value, you must modify too the X Position value or else the exp % static will be misplaced. Play a lot with the values and test out everything as you can until you understand how the file works and get the desired result.
And basically that’s all. Once you have it modified you only have to import this file to any other pk2 for fix this “…” annoying problem.
Final result should look like this:

This image has been resized. Click this bar to view the full image. The original image is sized 964×109.

Resinfo files edition – GM Console&Other stuff
Difficulty: Normal+

The resinfo folder from our pk2 is a whole configuration of the Silkroad interface. Editing those files we can customize almost every part of our game interface. Possibilities are infinite, so I’m going to make this guide as a general guide for resinfo file edition. Since you can do almost everything as you want once you control this files enough well, I can’t make an specific guide for everything you can do with them. For this guide I will explain how the structure of this files works and which kind of stuff we can make with them:

Files to edit:
– all the files from the \resinfo folder (Media.pk2)

Theory
As I already said, the resinfo folder contains all the files which configures the interface. We can do everything we can imagine with them. This guide will be centered on the basic things of this files, and an small example of edit something of the interface through them. By this way people can make their own edits and new stuff without need to follow any guide.
So let’s start!
*Note: Do a backup of the files you edit, I can assure you will get a lot of crashes while you play with the resinfo files XD

File structure

Code:
TEXTNAME:CIFType
{
ClientRect=RECT,"0,0,0,0"
Color=COLOR,"255,163,140,152"
DDJ=STRING,""
FontColor=COLOR,"255,255,255,255"
FontIndex=INTEGER,"0"
HAlign=INTEGER,"0"
ID=INTEGER,"12"
Rect=RECT,"172,44,18,12"
Style=INTEGER,"0"
SubSection=STRING,""
Text=STRING,"UIIT_STT_XXX"
UV_LB=POINT,"0,1"
UV_LT=POINT,"0,0"
UV_RB=POINT,"1,1"
UV_RT=POINT,"1,0"
VAlign=INTEGER,"0"
}

That’s basically the structure of any part of the resinfo files. Lets explain what each part does:
1. TEXTNAME = Indicates the reference name for this part of the interface. Sadly the client crash if you make a custom ones, so you must always use an existing ones, try always to use ones which is not in use.
2. CIFType = Most important part!!! It defines which kind of object is this part of the interface. Full list of available controls supported by the client can be found here. However I will explain latter the function of the most common ones.

To be continued later… ^^