• 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/

Custom Trader Tutorial - I am having an issue getting unresolved reference

riotlord-sl33p

FNG / Fresh Meat
Sep 15, 2018
2
0
40
Good afternoon, any insight will be appreciated.


I have created a few test weapons. I wanted to make a custom mutator for my dedicated server so my friends and I can play with some weapons and custom perks we design.

My issue is after creating a custom trader (following both Tripwire's tutorial and I saw a video on youtube also.) They are failing to not show.

Even though I am able to copy the default trader and then create a sub arch. It is not showing when referencing it in the code. My weapons work fine when I add them through the console, but the trader fails to load. The game mode also fails to load but I think that is a direct result of the compile 'warning'.

FYI; I copied the location directly from Killingfloor 2's SDK as the tutorial explained.

GameInfo : really simple
Code:
class sl33pGameInfo_Survival extends KFGameInfo_Survival;

defaultproperties
{
    GameReplicationInfoClass=class'sl33pSurvival.sl33pGameReplicationInfo_Survival'   
}

ReplicationInfo
Code:
class sl33pGameReplicationInfo_Survival extends KFGameReplicationInfo;

defaultproperties
{
    TraderItems=KFGFxObject_TraderItems'sdo.CustomTrader' 
}


Looking at the log I get the below:


TLDR; - KFGame.KFGameReplicationInfo:TraderItems: unresolved reference to 'KFGFxObject_TraderItems'sdo.CustomTrader''



[0017.26] Log: Loading global macros for sl33pSurvival
[0017.29] Warning: Z:\Steam\steamapps\common\killingfloor2\Development\Src\sl33pSurvival\Classes\sl33pGameReplicationInfo_Survival.uc(5) : Warning, ObjectProperty KFGame.KFGameReplicationInfo:TraderItems: unresolved reference to 'KFGFxObject_TraderItems'sdo.CustomTrader''
[0017.29] Warning: Z:\Steam\steamapps\common\killingfloor2\Development\Src\sl33pSurvival\Classes\sl33pGameReplicationInfo_Survival.uc(5) : Warning, Invalid property value in defaults: TraderItems=KFGFxObject_TraderItems'sdo.CustomTrader'
[0017.29] Log: Success: Compiled 6 line(s), 2 statement(s).
 
So I assume you have added your custom weapons to the sub archetype trader within sdk?

You have also clicked the little button to update the trader at the top when you are all done then saved your sub archetype? (*Hint RT click sub archetype trader and export as text file to have a list of weapons to add into mutator Default properties-a different way to go about it, that's all)

So if you close sdk. Then reopen and load up your custom subarchetype the custom weapons are listed and saved properly?

Being that you are using a game type and have extended base game and replication info(hopefully you also made matching Localization files for the custom weapons)... did you place all your custom .u files within (C:\Steam\steamapps\common\killingfloor2\KFGame\Bre wedPC) prior to compiling the custom game type?

Good Luck
 
Last edited:
Upvote 0
I am going to try this tomorrow morning. I just got back from work... doing 8 hours straight of java hurts my eyes. ;( I have a question, I wanted to make this for my dedicated server to play with my friends. As I am making them custom weapons based off weapons we used in other games. Is this approach good for this or should I be going about it a different way?
Is using a mutator a better option? And if so, should I just add the object in the default properties similar to how its in the TEXT file ones I export it from the SDK.

Sorry if everything is jumbled, I am extremely tired lol.
 
Upvote 0
Whatever works for you and you are more comfortable with. Some would say a mutator is easier, others a gametype. There are pro's and con's for each. I guess whichever route has the most documentation to help if you run into trouble. Feel free to reach out to me if you get stuck I will try and help.

Good Luck!


b_350_20_000000_E90F1A_FFFFFF_5FE90F.png

 
Upvote 0
You might find it easier to use a pre-existing mutator for this: https://steamcommunity.com/sharedfil...searchtext=tim
It is generally preferable to make your mod a Mutator rather than a GameInfo if possible, purely for compatibility reasons. You can only run a single game mode, but you can run many mutators concurrently.

The warning you're getting is a serious warning that is likely preventing your mod from being loaded, as you suggested. The unresolved reference means it can't find the trader archetype you created. You may have typed the (class or package) name incorrectly in the defaultproperties.
 
Upvote 0