• 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 Mut: Per Server Stats

I've made some tweaks to a modified version of the mutator(Not sure which version it is based on) to add refill functions for multiple guns with secondary ammunition. A problem I've encountered is that the trader doesn't get the ammo prices even if I set it statically.
Spoiler!
 
Upvote 0
It is kinda odd though, I did a copy and paste for the adding the MyBuyable info then modified the code using TWI's as a reference. MyBuyable.ItemAmmoCost is what sets the ammo price, it is quite strange that it grabs all the other info for MyBuyables just fine.

Code:
MyBuyable.ItemName      = MyPickup.default.SecondaryAmmoShortName;
MyBuyable.ItemDescription   = KFWeapon(CurInv).default.Description;
MyBuyable.ItemCategorie     = KFLR.EquipmentCategories[MyPickup.default.EquipmentCategoryID].EquipmentCategoryName;
MyBuyable.ItemImage     = KFWeapon(CurInv).default.TraderInfoTexture;
MyBuyable.ItemWeaponClass   = KFWeapon(CurInv).class;
MyBuyable.ItemAmmoClass     = KFWeapon(CurInv).default.FireModeClass[1].default.AmmoClass;
MyBuyable.ItemPickupClass   = MyPickup;
MyBuyable.ItemCost      = (float(MyPickup.default.Cost) *  KFV.static.GetCostScaling(KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo),  MyPickup)) / DualDivider;
[COLOR=Lime]MyBuyable.ItemAmmoCost      =  10;//MyPickup.default.AmmoCost *  KFV.static.GetAmmoCostScaling(KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo),  MyPickup)                                          *  KFV.static.GetMagCapacityMod(KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo),  KFWeapon(CurInv));[/COLOR]
MyBuyable.ItemFillAmmoCost  = (int(((MaxAmmo - CurAmmo) *  float(10/*MyPickup.default.AmmoCost*/)) /  float(KFWeapon(CurInv).default.MagCapacity))) *  KFV.static.GetAmmoCostScaling(KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo),  MyPickup);
MyBuyable.ItemWeight        = KFWeapon(CurInv).Weight;
MyBuyable.ItemPower     = MyPickup.default.PowerValue;
MyBuyable.ItemRange     = MyPickup.default.RangeValue;
MyBuyable.ItemSpeed     = MyPickup.default.SpeedValue;
MyBuyable.ItemAmmoCurrent   = CurAmmo;
MyBuyable.ItemAmmoMax       = MaxAmmo;
MyBuyable.bMelee            = (KFMeleeGun(CurInv)!=none || MyBuyable.ItemAmmoClass==None);
MyBuyable.bSaleList     = false;
MyBuyable.ItemPerkIndex     = MyPickup.default.CorrespondingPerkIndex;
 
Upvote 0
Hello everybody,In newest SP we can see weapon categories, but i don't have see this categories i have see old classic weapon classes without categories.
hope,you will help me
sorry for my very bad English

have you add in serverperksV5.ini categories section
Code:
TraderInventory=3:UnitedMut.MP5MPickupEx
TraderInventory=2:KFMod.BenelliPickup
TraderInventory=1:KFMod.Magnum44Pickup
TraderInventory=1:KFMod.Dual44MagnumPickup
TraderInventory=3:KFMod.M4Pickup
TraderInventory=0:KFMod.ClaymoreSwordPickup
TraderInventory=5:KFMod.HuskGunPickup
TraderInventory=6:KFMod.M4203Pickup
WeaponCategories=Category1
WeaponCategories=Category2
WeaponCategories=Category3
WeaponCategories=Category4
WeaponCategories=Винтовки
WeaponCategories=Огонь
WeaponCategories=Гранатометы
WeaponCategories=Бомбы-Гранаты
WeaponCategories=Остальное
 
Upvote 0
My server allows it to change during mid-wave (says it'll change for next trader time) and when im in the trader (this is without choosing perk mid-wave) it also wants to wait till next.
Yes I can also change during mid-wave, and it notices me it will change AFTER THE END OF THE WAVE, however my hobby was changing perk at trader. ;)

However when I am at trader after wave 2, I can change perk IMMEDIATELY at trader.

BTW Let me play your server when I have time. :)
 
Last edited:
Upvote 0
BTW Let me play your server when I have time. :)
Server is up 24/7 unless I have it down temporarily for updates (which is rare these days) or when the control panel it runs on is having network problems. Hope to see you there :)

Have this problem too.. Change perk in trader time - sometimes immediately sometimes says that in next wave only.

will check about it only wave 1 problem or other waves too.
Sounds like it is just me, i'll just redo the perk changing system back to the one someone coded up previously as the fix at the time (old one I used and works great).
 
Upvote 0
Open SRKFQuickPerkSelect.uc and remove strings:
Code:
 for( i=j; i<ArrayCount(PerkSelectIcons); ++i )
 {
     PerkSelectIcons[i].Image = None;
     PerkSelectIcons[i].Index = -1;
 }

we find:
Code:
 if ( Sender.IsA('KFIndexedGUIImage') && KFIndexedGUIImage(Sender).Index>=0 )
and replace:
Code:
 if ( Sender.IsA('KFIndexedGUIImage') )

Next we find:
Code:
  MaxPerks = Min(S.CachePerks.Length,ArrayCount(PerkSelectIcons));
and replace:
Code:
  MaxPerks = Min(S.CachePerks.Length,8);

Original posted prototype22

this is cosmetics, as the mutator doesn't allow perk selection during trade time...
 
Upvote 0