I'm trying to modify the treasure tables a bit (to give lucky charm a greater chance to proc.), so i unpacked Main.pak with lstools, modified treasuretable.txt and tried to repack main.pack.
You don't really need to create a .pak from it (unless you're trying to distribute the mod), leaving the raw file at DivOS\Data\Public\Main\Stats\Generated\TreasureTable.txt should work as well.
Lstools gave me a "bad allocation" error.
This is a known issue when you're creating large packages. While fixing it is not too hard I won't do it for multiple reasons:
- Lstools is being deprecated in favor of an in-editor plugin that is currently WIP (though I have less time to work on it than I'd like to)
- Creating packages that are over 1GB (for most people this involves repacking Main.pak/Textures.pak) is a sure sign that you're doing something Very Wrong. Doing this is never neccessary as you can pack your modifications into separate files without disturbing the original game files that are overridden anyway by paks in Mods\.
Is there any other way to do what i want to do ?
Either don't create a .pak from the files at all, or create a separate .pak (like TreasureMod.pak or something different) and only add files that you've actually changed (in this case the single TreasureTable.txt file)