Jump to content

Recommended Posts

Posted (edited)

​In this guide, I'll explain you how to edit Interface.u

  • ​​0) Prerequisites

​Before going further, you need some basics about development, about variables, functions, and so on. If you don't have, learn before, then come back here after !
​You also will use a lot of Hexa, be ready with it.
​L2 uses UnrealTournament Renderer/Engine.
Any client modification could be bannable by server owners. Be careful about it. If you wanna try some mods freely, install a L2J server on your computer.

​​Also, you'll need some extra software (all free).
​First one, is L2encdec, in order to decryp L2 files. If you don't know it, then L2 editing/modding will be hard. I'll not provide any link about it, but it can be found in any FileEdit software.
​Second, you'll need 'UT Package Tool' (aka UTPT). Here : http://www.acordero.org/projects/unreal-tournament-package-tool/
​Then, any Hex Editor ( XVI32 is a good one, but you can prefer Hex Workshop, google them to find a link, prefer latest version).

​And finally, you'll need a documentation, about UT scripting : https://mega.nz/#!jph2yZrS!CJpX9zLAK5ibG3CDWsjfN97KTycsY5WGRVDZ8xzFDy0
Read it, especially from page 27 - Script Format. READ IT ! READ IT !

Ok, lets go :
 

  • 1) Decrypt L2 file

​Un-encrypt your interface.u :

Use CMD, l2encdec.exe -d interface.u
Write down (notepad) the "Header" version, in my case, Lineage2Ver111
A new file dec-interface.u will be created
 

  • 2) Find the script

Open UTPT, then open your interface.u
Go in the "Export Tree" tab, right click, full collapse.
Then, you'll have to choice what you wanna edit.
For this guide, I'll modify the "Rank Name" under the "Name" of a Target.
So, the script to edit will be in "TargetStatusWnd", in the "HandleTargetUpdate". Right click on it, then "Decompile". You'll see the current script. If you understand nothing about it, STOP, learn about development before !!
Save the full script in a txt file. (select all, copy, open notepad, paste, save)
Find the line you wanna change, in my case, it's "NameRank = GetUserRankString(Info.nUserRank);" . I wanna change it to something like : "NameRank = GetClassType(Info.nClassID);"
In order to find what functions are available to use, go to the "Name Table" tab. About vars or attributes (nClassID in my case), I didn't found any relevant list, but we will see after (in §4).
In the "Export Table" tab, in your current selected script ("HandleTargetUpdate" in my case), right click, then  "Analise Raw Object". A  Hex table (read only) will appear. Here is the magic <3
In the menu, "Format then Auto Format". The Hex table will be 'sorted' by script lines. Find the line you wanna modify, by hovering all 'bubbles' If the interface is messed up, "Auto Format" again.
When you found it, write down (notepad) the full Hex digits related to your line. In my case, it's "0F 00 65 0D 1C C8 0D 36 E4 0D 00 5F 02 16", which refers to "NameRank = GetUserRankString(Info.nUserRank);"

  • 3) Decode the Hex data

Here is the hardest part of this guide.
​You now have to decode this Hex values, according to the PDF doc. Did you read it before ?? :)

​In the last step, we ended with a Hex data : 0F 00 65 0D 1C C8 0D 36 E4 0D 00 5F 02 16
​In my case, 0F means EX_Let, so, the data after will be assigned to the right part.
​00 means EX_LocalVariable, so the next 2 bytes will be the left part of my expression. 6F0D is my local variable (NameRank in my case).
​1C means EX_FinalFunction, so the next 2 bytes will be the address of a function. C80D is my function (GetUserRankString in my case).
36 means EX_StructMember, so a member of an object. The following 2 bytes will be the member. E40D is the member (nUserRank in my case).
00 means EX_LocalVariable, and it will be also the object (as it follows a EX_StructMember without declared object). 5F02 is my object (Info in my case).
16 is EX_EndFunctionParms, so the end of my function ( a closing parenthesis sign )

In my case, C80D will be changed, and E40D. First one is my function, 2nd one is the member of the Info object.
 

  • 4) Replace

How to find the references to replace ?
You'll have to find other existing scripts where the functions and variable you wanna substitutes are present. Decompile scripts with UTPT where functions/variables can be found (according to the retail L2 interface).
For me, as it's related to classes, I thought that it could be present in the "DetailStatusWnd.UpdateInterface" script (as it's related to the "Character Status" (Alt + T) window)
So decompile it with UTPT, then, use the "Find" function. When you found a interesting line, Analise Raw Object, Auto Format, found the Hex values related to the line, and decode it (see point 3)
In my case, I found for the variable nSubClass the following Hex value : DC 0B, and for the function GetClassStr this Hex value : E5 0B
So, C80D should be replaced with E50B and E40D by DC0B.

 

​You can use this archive https://mega.nz/#!e4AVkQKJ!d2Q7n0pFfh_mumUG7NLV193BJXlwSXhSIiS-6EZSh8U containing all H5 scripts from .u files, to see what functions/variables are existing.

  • 5) Hex editor and Crypt

Open your Hex editor. Find the initial Hex full value, and replace the Hex values according to point 4.
Save. Encrypt with l2encdec, replace the <version> in the following CMD command by the version you wrote down on point 1 (111 in my case)
l2encdec.exe -h <version> dec-interface.u
(in my case, it will be : l2encdec.exe -h 111 dec-interface.u)
A new enc-dec-interface.u will be created.
 

  • 6) Verify and Test

Open the new file (enc-dec-interface.u) with UTPT, open the target script, Decompile it, and verify that it's OK. (copy all the script text, save on txt file, check with WinMerge against the same script, but from the initial file (point 1) could be a good solution)
In your L2 client folder, delete the initial interface.u file, copy the new one (enc-dec-interface.u), rename it to interface.u
Open your L2 client, and check :)

 

 

 

Hope It will help ppl.

Any comment in this topic will be helpful to improve it !

I'll maybe add some pics later. Let me know if pics are important to understand.

Edited by Etuldan
Posted

​Hmm ?

​I wrote this guide from scratch.

​From what 'original' guide are you talking ?

​I didn't steal any content, from another website or other.

Do you have any proof about this original guide ? I guess no.

Posted

Should you send some screens with your modifications ? iam only searching for some cool and usefull modifications for IL, but its looks like i must make my own interface, so if you can up some screens it will be so cool.

BTW: if you have any interfaces can you send me in message link or screen ? :) Thx a lot :)

Posted (edited)

​@Stajirek :

​ATM, I'm only testing some things (as I'm new about interface.u editing, and I wrote this guide as soon as I understood the main part). I'm still not yet an expert in heavy modification.

​The example used for the guide was H5, but it should be equivalent for any Chronicle.

​Also, an xDat editing will be mostly required along an interface.u editing ( .u file : script, xdat : layout)

6wZS4NAu0cXu.png

​(yes, the target is a fighter, as GM I changed his class to check the modification in the TergetWnd)

Edited by Etuldan
Posted

Iam interested About interlude. I Just saw interface from nephoreon and i really like How he remake that Adena and place in iventory etc. I have no idea How to make that things but im Just going learn How to work with that by your guide and then i will try make something "like him" :D

  • 2 weeks later...
  • 2 weeks later...
  • 3 months later...
Posted

One question, if for example I want to remove a bit of hex code will it work? (im testing things out since it's the first itme i try it and i try to replace NameRank = GetUserRankString(Info.nUserRank); with NameRank = Info.Name;

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...