Gildor's Forums

Author Topic: [UE3] Lost Ark  (Read 66614 times)
spiritovod
Global Moderator
Hero Member
*****
Posts: 1929


View Profile
Re: Lost Ark
« Reply #225 on: December 30, 2023, 15:18 »

@Serpicos: The thing about textures not loading for some models is related to obfuscated packages names and it previously was explained in this post. But even if you'll properly rename packages, for some packages you'll need to additionally rename them anyway, which would be more clear from umodel logs, when you open model or texture, and also mentioned in the base post. It's hardly related to umodel and package format in general (decompressed or not), if it's addressing "some.tfc" in the package, but it's "bdca.upk" among actual files. Because the game doesn't seem to use tfc much, you should be able to export almost all textures, though not cross-linked between packages.

@ethan048, @zarro: Please refrain from discussing modding in the topic, because it's out of scope of umodel and the forum in general. Or at least create separate topic for it.
Logged
wth203433
Newbie
*
Posts: 1


View Profile
Re: Lost Ark
« Reply #226 on: January 01, 2024, 16:46 »

i modified fontmap.xml in Binaries\Fonts\English folder
but it changes only Russian's xml file after repacking back to font.lpk with lpk_repack_test bms script
how can i replace it correctly? ty
Logged
3dartsro
Newbie
*
Posts: 20


View Profile
Re: Lost Ark
« Reply #227 on: January 01, 2024, 23:38 »

now not work umodel dont lost ark ?
Logged
d07riv
Newbie
*
Posts: 5


View Profile
Re: Lost Ark
« Reply #228 on: January 10, 2024, 17:58 »

The patch is live and .db files now come out as gibberish. Anyone knows if they changed the key, or the encryption scheme?
Logged
molenzwiebel
Newbie
*
Posts: 2


View Profile
Re: Lost Ark
« Reply #229 on: January 10, 2024, 23:09 »

The xor value used to derive the database AES key was changed in the new base build.

Old:

Code:
string BASE = "1069d88738c5c75f82b44a1f0a382762" # for steam version

New:

Code:
string BASE = "1069d88738c5c75f82b44a1f0a382768" # for steam version

(yes, only the final byte changed)
Logged
sader1992
Newbie
*
Posts: 1


View Profile
Re: Lost Ark
« Reply #230 on: January 11, 2024, 08:01 »

any idea about editing EFTable_GameMsg.db?
a small edit works, "too much edits" and the messages in the game starts to glitch and some appears empty, but a "big edit" break the file , well the file is still working ofc , but the game it self stop reading it.
I tried many different sqlite versions, including the same one that is used by Smilegate

I also tried binary edit on the file to not change the sqlite information atall , but this take too much time so I cannot do a "big edit" I could do "too much edits" which made the messages in the game starts to glitch just like when I do "too much edits" in sqlite.
I wonder how LaoTranslation edited the database , also the Chinese currently editing and adding the CN translation up to date.

maybe a custom version of sqlite ?
I would have said that there is something other than the file preventing the process , however incase of the Chinese translation they are only editing the EFTable_GameMsg file and putting it in the font.lpk, so it should be something related only to this file

I also tried to rebuild the EFTable_GameMsg with the same original entries just incase , and it didn't work , the game stop reading it (just like doing a "big edit").
it would help there was a console or an error logs, i did try to find if the game write any error logs , but no luck.

I almost consumed all my ideas , what left is decompiling the game and trying to get the sqlite files and codes from it, which I doubt I would do anytime soon.

am up for any ideas, I need fresh ideas, a fresh mind other than mine ~.
« Last Edit: January 11, 2024, 08:06 by sader1992 » Logged
tigerblade
Newbie
*
Posts: 1


View Profile
Re: Lost Ark
« Reply #231 on: January 27, 2024, 03:13 »

Hi, I'm trying to fix the game's stuttering and pop-in issues by decompressing all the graphics files, but the tool doesn't seem to work. Anyone know how to fix it?
Logged
polar105
Newbie
*
Posts: 1


View Profile
Re: Lost Ark
« Reply #232 on: February 01, 2024, 14:23 »

@spiritovod I have all of the KR files if you would like to take a further look into the issue @Icos was mentioning earlier.
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 1929


View Profile
Re: Lost Ark
« Reply #233 on: February 01, 2024, 20:31 »

@molenzwiebel: Thank you, updated it in respective scripts.

It seems like they've rolled out that new encryption method for packages to steam version, so I can take a proper look at it. Though it may take a while due to lack of free time.
Logged
Icos
Newbie
*
Posts: 12


View Profile
Re: Lost Ark
« Reply #234 on: February 01, 2024, 20:49 »

@spiritovod could you please clarify if the issue with unpacking the textures in KR version was fixed and point me the to the scripts you've mentioned?
Logged
ethan048
Newbie
*
Posts: 8


View Profile
Re: Lost Ark
« Reply #235 on: February 02, 2024, 20:20 »

@spiritovod could you please clarify if the issue with unpacking the textures in KR version was fixed and point me the to the scripts you've mentioned?
The Steam version has been resolved.
I don't think I found the AES key for the other versions.

https://cs.rin.ru/forum/viewtopic.php?f=10&t=100672
Check the link.
« Last Edit: February 02, 2024, 20:26 by ethan048 » Logged
Icos
Newbie
*
Posts: 12


View Profile
Re: Lost Ark
« Reply #236 on: February 02, 2024, 21:21 »

Thanks for the link @ethan048. I was hoping spiritovod would also update his custom version of umodel, which supports lostark, though. Looks like it's not the case yet.
Logged
ethan048
Newbie
*
Posts: 8


View Profile
Re: Lost Ark
« Reply #237 on: February 05, 2024, 06:30 »

Wow took me over a year but I finally managed to build a .upk decryptor for this game. Now time for some modding.  Cheesy

Great work.
You succeeded in the end.
I want to talk about modding, but I don't think we should talk about modding here.
Can you make a new topic ?
Logged
3dartsro
Newbie
*
Posts: 20


View Profile
Re: Lost Ark
« Reply #238 on: February 12, 2024, 22:13 »

hello guys any know lostark extract audio files Sad
Logged
Aurorans
Newbie
*
Posts: 11


View Profile
Re: Lost Ark
« Reply #239 on: February 13, 2024, 01:26 »

Spent some time diving into the code to figure out the name obfuscation algorithm. The description from @sylvester334 helped a ton with this, but also cheers to smilegate for leaving the appropriately named FFileManagerWindows::ObfuscateFilename symbol in the EFGame DLL Wink

In short, the names are shifted around by a fixed amount based on the length of the string. Certain characters are first escaped before they are obfuscated, using a pair of characters based on the position % 4 inside the input string. The following table is used for that purpose:

Code:
TABLE = {
    "Q": ["QP", "QD", "QW", "Q4"],
    "-": ["QL", "QB", "QO", "Q5"],
    "_": ["QC", "QN", "QT", "Q9"],
    "X": ["XU", "XN", "XH", "X3"],
    "!": ["XW", "XS", "XZ", "X0"],
}

If Q, -, _, X or ! appear in the input string, they will be replaced by one of these based on the position in the string, % 4. In other words, if the 3rd character (idx = 2) is a _, it will be replaced by QT (since 2 % 4 == 2, TABLE['_'][2] == "QT").

Some examples:

Code:
LV_LUT_Commander_Valtan_Extreme becomes LVQTLUTQ9COMMANDERQTVALTANQTEXNTREME
LV_ELG_Kayangel_ED_01_H         becomes LVQTELGQ9KAYANGELQNEDQN01QNH
SGintro_Warning                 becomes SGINTROQ9WARNING

Afterwards, the ascii values will be rotated according to a simple caesar cipher, where rotation is offset by the length of the escaped string. This works for all strings longer than 20 characters.

For inputs shorter than 20 characters, the input will be padded by adding a `!` and several `.`s until 20 characters are reached. This string is then escaped. The obfuscation loop then overwrites the period characters with earlier emitted characters, roughly according to the following pseudocode:

Code:
if input[i + unpadded_length] == '.' {
  input[i + unpadded_length] = output[i]
}

For deobfuscation of filenames, you simply reverse the shift, undo the escaping (by checking every pair of characters, seeing if they are in the table and the position % 4 matches the expected substitution, and then replacing the pair with the original character), and possibly split by ! if the original input was padded.

Here's an implementation in Rust capable of replicating both obfuscation and deobfuscation, matching 1-to-1 with the values produced by the game: https://gist.github.com/molenzwiebel/284318d9e963672b239f9fca901be89a. The result after renaming is pretty good!



Hello! I'm trying to implement this with the rust-script and rust itself

I run into a build warning when using rust itself. Rust-Script runs it, but doesn't build. Nothing happens when using rust-script name-obfuscation.rs.

Here's my powershell command:

Code:
rust-script name_obfuscation.rs

Running it in the Packages directory also does nothing, even if the script is located in that directory.

I am new to rust, what am I doing wrong?

Logged
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS