• 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 Enable upk download to client cache directory with mutator

oldschool

Grizzled Veteran
May 1, 2015
377
37
NYC
osghc.com
I'd like to add some custom content in the same way that Marco had used with his Slotmachines Mod. Within his mod he has a mutator and support package stotmachines_rc.upk. That file contains custom textures and assets referenced in the mutator code. If installed properly on a dedicated server the support package gets downloaded to the client's cache file enabling proper usage of said assets and textures in game.

I know I can use the workshop and have clients subscribe to do this same thing but I would like to understand the proper method of enabling this support file without using the workshop via code in the source files in the same manner marco was able to. Every now and then a new player will join and without knowing they need to be subscribed and my custom content isn't downloading to their cache directory. if i could get it to do it automatically that would solve my problem.

This is a problem I have come across due to the limitations of TW current setup with content distribution and modded content. A good example of this is .int file distribution not being currently supported via workshop. If you add a custom weapon to the trader that weapon name will not show properly in game as their is no reference to it in the default .int directory and no way to distribute this addition via workshop.

Clients without the properly referenced addon info in their .int directory will be unable to read what custom weapon was added to trader along with description and so forth.

Any suggestions regarding this situation would be greatly appreciated. Thank you.
 
Marco fixed the issue by forcing the server to update the client on the package references and make them force load it.

Exactly my point. I'm trying to figure out how he forced the client to download the support package to their cache via scripting.

Example: If I just reference in my code...

Code:
defaultproperties
{
   VisibleMaterial=MaterialInstanceConstant'[COLOR=#FFFF00]1049.Skin.ZED_Gorefast_M[/COLOR]'
   CharacterMonsterArch=KFCharacterInfo_Monster'[COLOR=#FFFF00]1049.arch.ZED_Gorefast_Archetype[/COLOR]' 
   DoshValue=750
   XPValues(0)=500.000000
   XPValues(1)=500.000000
   XPValues(2)=750.000000
   XPValues(3)=750.000000
   SprintSpeed=660.000000
   Health=18500
        BaseDamage=125.f
        MaxHitRange=220.f
        MomentumTransfer=25000.f
        MyDamageType=class'KFDT_Slashing_Gorefast'
   Name="GoreFiend"

}
The 2 highlighted lines reference my support package. The custom zed is added to game via mutator. Both files are on server and redirect for client to download but the client only downloads the mutator. How would I force the secondary package to download to client?! Is their a flag or Global instance needed?
 
Upvote 0