Killing Floor 2

Killing Floor 2

92 lượt đánh giá
Custom Trader Inventory
2
   
Giải thưởng
Yêu thích
Đã yêu thích
Bỏ thích
Maps and Mods: Mutators
Kích cỡ file
Đã đăng
Đã cập nhật
255.943 KB
5 Thg07, 2022 @ 6:11am
28 Thg04 @ 11:05am
26 ghi chú thay đổi ( xem )

Đăng ký để tải xuống
Custom Trader Inventory

Mô tả


Description
Trader inventory management

Features
  • remove/add items to trader;
  • can preload weapon models (no lags when someone buys weapons);
  • unlock DLC weapons;
  • correct items sorting (by price);
  • don't have to worry about adding new guns after each KF2 update;
  • add an unlimited number of items to the trader;
  • players can sell weapons excluded from trader inventory.

Whitelisted?
No. This mod is not whitelisted and will de-rank your server. Any XP gained will not be saved.

Usage (single player)
  1. Subscribe to this mutator;
  2. Create a file (*): C:\Users\<username>\Documents\My Games\KillingFloor2\KFGame\Config\KFCTI.ini
    with the following content:
    [CTI.CTI]
    Version=0

  3. Start KF2;
  4. Open console (~) and start any map with CTI (this will generate the default KFCTI.ini content):
    open KF-BioticsLab?Mutator=CTI.Mut
  5. Close the game and configure CTI as you need (see the Setup (KFCTI.ini) section below);
  6. Start KF2, open the console, start the game:
    open KF-BioticsLab?Mutator=CTI.Mut
    (replace the map and add the parameters you need).
Usage (server)
Note: If you don't understand what is written here, read the article Dedicated Server (KF2 wiki)[wiki.killingfloor2.com] before following these instructions.
  1. Open your PCServer-KFEngine.ini / LinuxServer-KFEngine.ini;
  2. Find the [IpDrv.TcpNetDriver] section and make sure that there is a line (add if not):
    DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload
    ❗️ If there are several DownloadManagers= then the line above should be the first ❗️
  3. Add the following string to the [OnlineSubsystemSteamworks.KFWorkshopSteamworks] section (create one if it doesn't exist):
    ServerSubscribedWorkshopItems=2830826239
  4. Start the server and wait while the mutator is downloading;
  5. When the download is complete, close the server;
  6. Create a file (*): <kf2-server>\KFGame\Config\KFCTI.ini
    with the following content:
    [CTI.CTI]
    Version=0

  7. Add mutator to server start parameters: ?Mutator=CTI.Mut and start the server (this will generate the default KFCTI.ini content);
  8. Close the server and configure CTI as you need (see the Setup (KFCTI.ini) section below);
  9. Start the server (with ?Mutator=CTI.Mut) again.

(*) Buggy config variables initialization
CTI, like many other mutators, initializes the config by relying on the unreal script feature which uses default values for each data type that is not explicitly specified. For the int type (which is used to store the config version) this is zero - detecting zero allows to understand that the mutator is being used for the first time (which means it's need to generate a config). But now the game contains a bug that initializes the config values ​​randomly if they are not explicitly set. Thus, the config may have incorrect values ​​or not be created at all. This is why I recommend explicitly set Version=0 in the config for the first time.

Unfortunately I can't do anything about it because it's a game problem (not mutator). I hope TWI fixes this someday.

Setup (KFCTI.ini)
  • bDisableItemLimitCheck: The original game does not support more than 256 trader items, adding items above this limit causes bugs. If this problem is solved (For example, if you are using a mutator that has already fixed this problem or by enabling bApplyPatch) then it can be set bDisableItemLimitCheck=True to remove the limit, otherwise it is better to leave it False.

  • Set bApplyPatch=True to fix some base classes of the game: this fixes problems when adding more than 256 items to a trader and will allow players to sell weapons that have been removed from trader inventory. Note that enabling this parameter replaces the following classes: KFAutoPurchaseHelper, KFInventoryManager, KFGFxMenu_Trader, KFGFxObject_TraderItems. There may be compatibility issues with mutators that also replace them.

  • Set bPreloadContent=True to load weapon models in advance and have no lags when someone buys weapons. In some cases (usually if there is a lot of custom content), enabling preload can cause models to disappear. It is recommended to test how this setting affects the game for your server configuration and then decide whether to enable preloading or not.

  • Set bOfficialWeaponsList=True to have an auto-updated list of all official weapons in the config (for a convenient copy-paste) or leave it False if you want a clean config without unnecessary things.

  • Set UnlockDLC to customize DLC weapon unlocks. Here are the possible values:
    • False - disable DLC unlock.
    • ReplaceFilter - changes the trader filter allowing you to buy original DLC weapons without restrictions, unlocks future DLCs as well (no need to update this mutator). However, it replaces the - KFGFxMoviePlayer_Manager class so it may not be compatible with mods that also replace it.
    • ReplaceWeapons - replaces DLC weapons with their unlocked variants. Compatible with any mods, but may require a CTI update after the release of new DLC weapons.
    • True or Auto - selects the most appropriate option automatically. Recommend putting CTI.Mut last in the mutator load queue if you use this.

  • Use [CTI.RemoveItems] to remove items from the trader inventory.
    example: Item=KFGame.KFWeapDef_Mac10 will remove MAC10 from sale.

  • Set bALL=True if you want to remove all items (can be useful if you want to set the entire sale list in the [CTI.AddItems] section yourself).
  • Set bHRG=True to remove HRG items.
  • Set bDLC=True to remove DLC items.

  • Use [CTI.AddItems] to add items to the trader inventory.
    example: Item=WeaponPackExt.KFWeapDef_XM25 will add XM25 to sale.

Notes
📌 If you need an empty list anywhere (for example, you don't want to delete some of the traders's weapons), leave at least one line there:
Item=
This is necessary to explicitly initialize the list (because of the bug I wrote about above) to avoid initialization with incorrect values.
📌 Mutator does not contain custom weapons. You must have the required weapon packs in your subscriptions to be able to add them to the trader.
📌 If you are using this mutator to add weapons, you should not use mutators from weapon packs (just having them in subscriptions is enough).

Translators:
cheungfatzong - Traditional [CHT] and Simplified [CHN] Chinese.

Sources
https://github.com/GenZmeY/KF2-CustomTraderInventory (GNU GPLv3)
112 bình luận
GenZmeY  [tác giả] 20 giờ trước 
If you're talking about the number of actions in "Usage", then thank TWI for breaking the initialization of config variables. This list was much shorter before when initialization worked as expected
GenZmeY  [tác giả] 20 giờ trước 
to do what?
tsnxmi 22 Thg05 @ 8:32am 
is this the simplest way to do this lmao?
GenZmeY  [tác giả] 21 Thg05 @ 12:34pm 
got it, thanks
DealerOfShame 21 Thg05 @ 12:16pm 
It's similar it just includes the OneDrive between the username and documents:

C:\Users\<username>\OneDrive\Documents\My Games\KillingFloor2\KFGame\Config
GenZmeY  [tác giả] 21 Thg05 @ 11:48am 
it's ok, glad it was resolved

Which config path turned out to be correct for Windows 11? I think this might help other people running kf2 on windows 11

I have not used win11 and I'm very surprised that the paths may differ in this case. These are things that haven't changed for a long time after all
DealerOfShame 21 Thg05 @ 11:20am 
It is. Sorry for the confusion!
GenZmeY  [tác giả] 21 Thg05 @ 11:12am 
omg O_o
is this windows 11?
DealerOfShame 21 Thg05 @ 11:07am 
I found it. The correct file location is in the "OneDrive" version of my Documents folder. God I hate how Windows does that sh*t. Thanks for your help!
GenZmeY  [tác giả] 21 Thg05 @ 9:39am 
Hey

Everything seems to be correct. Maybe besides the fact that you don’t need the file in steamapps, it won’t be used anyway (however, it won’t interfere)

The only thing that comes to my mind now is that during startup you still don’t have the downloaded mutator for some reason

I can suggest the following:
1. Check again that you are subscribed to this mutator.
2. Check that the mutator has been downloaded (you should have a CTI.u file in one of the subfolders here: C:\Users\<username>\Documents\My Games\KillingFloor2\KFGame\Cache\2830826239\)
3. If you have CTI.u, it’s also worth looking if there’s anything interesting in the log after trying to start the game with a mutator, it’s here: C:\Users\<username>\Documents\My Games\KillingFloor2\KFGame\Logs\ . Perhaps it will become clearer what is going wrong. If the contents of the log look unclear, you can show it to me and I will help you figure it out