• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code [Question]Placing all assets into single package

JezuzChr1st

FNG / Fresh Meat
Dec 8, 2013
2
0
I'm trying to place all the assets(.uax,.utx,etc) into a single package(.u) for the purpose of decreasing the number of server packages. The file I'm trying to do this for is the LightningAR1. From what I've been able to find by adding what I have in red to GuitAR1.uc I should be able to get away with only the .u file, but I haven't been able to get it to appear in the shop after removing the files from their respective folders. Am I doing something wrong, or does this only work in certain cases like the Portal Turret?
Code:
//=============================================================================
// Lightning AR-1
// The GuitAR-1
//=============================================================================
class GuitAR1 extends KFWeapon
    config(user);

#exec OBJ LOAD FILE=KillingFloorWeapons.utx
#exec OBJ LOAD FILE=KillingFloorHUD.utx
#exec OBJ LOAD FILE=Inf_Weapons_Foley.uax
[COLOR=Red]#EXEC LOAD OBJ FILE="GuitarWep_A.ukx" Package="GuitarWep"
#EXEC LOAD OBJ FILE="GuitarWep_S.uax" Package="GuitarWep"
#EXEC LOAD OBJ FILE="GuitarWep_SM.usx" Package="GuitarWep"
#EXEC LOAD OBJ FILE="GuitarWep_T.utx" Package="GuitarWep"[/COLOR]
Just wanted to add that the LightningAR is not mine I'm just using it as my example/test. All credit to original authors.
 
You need to recompile the GuitarWep.
Change all references to the old files to the new.
I also recommend renaming the .u to ukx and placeing it in the animations folder.

Also after doing it like this you need to fix the internal references using the KF SDK.

Another way of doing it is loading all the packages in KF SDK and renaming them all to a new package. It's more work but it wont have problems with references.
 
Upvote 0
You can't simply use obj load file to load all packages into the same file because the packages may be cross-referenced (GuitarWep_A.ukx needs textures from GuitarWep_T.utx for example). Before you compile the package, you should go to KFEd and rename all of the objects in the package to match same package then only save it as one large package, that you are allowed to merge into the .u file.

Luckyly all of the content browsers (except for vertex mesh and class browser ones has not) has rename functions.
 
Upvote 0