hmm re texturing 9mm for server?

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

dangercake

Member
Sep 10, 2010
287
19
18
Carrollton, Texas
hmm, do you need to re code the actual weapon or just modify the texture file the gun uses on the server?

"note spawn with a re textured 9mm"
 
Last edited:

Gartley

Grizzled Veteran
Dec 27, 2010
2,325
349
83
UK
www.wildcardproductionstudios.co.uk
I was looking into this for an alternative to editing core files or creating a whole new weapon. This was the thread that made think about it.

At the time I tried code similar to this;

Code:
class MutRetroLAR extends Mutator;

function PostBeginPlay()
{
	class'Winchester'.default.Skins(0)=Combiner'RetroLAR_T.RetroLAR_cmb'
}

defaultproperties
{
	GroupName="KF-WeaponReskinMut"
	FriendlyName="Retro LAR Reskin Mutator"
	Description="Replace LAR skin with more ornate and fancy version. Credits to LOINz for the skin."
}

Unfortunately it just returned an error and I didn't get back round troubleshooting the problem. See if this helps any.
 

FluX

Grizzled Veteran
Oct 26, 2010
5,379
234
63
www.fluxiserver.co.uk
I have made a complete new weapon with extended files to the original but with my altered file(s). I then used CheckReplacement but this will cause duplicates later on (due to the map spawning 9mm in the randomitemspawns). I made my own randomitemspawns to get around this and replaced original with my own.
 

FluX

Grizzled Veteran
Oct 26, 2010
5,379
234
63
www.fluxiserver.co.uk
couldnt you just re code the KFGametype.uc and make it spawn with custom items?
Trust me my way is much easier. I don't think the KFGameType.uc has the capability of doing that but I have not had that much of a look inside the file. If you need help on any of mine or Gartley's ways then ask away and we'll see what we can do :)
 

Gartley

Grizzled Veteran
Dec 27, 2010
2,325
349
83
UK
www.wildcardproductionstudios.co.uk
Don't mess with core files, you'll just get version mismatches, use Flux's method combined with

Code:
class MutStartInv extends Mutator;

function bool CheckReplacement(Actor Other, out byte bSuperRelevant) 
{
	if (Other.IsA('KFHumanPawn'))
	{
		KFHumanPawn(Other).RequiredEquipment[0] = "KFMod.Single";
		KFHumanPawn(Other).RequiredEquipment[1] = "KFMod.Frag";
		KFHumanPawn(Other).RequiredEquipment[2] = "";
		KFHumanPawn(Other).RequiredEquipment[3] = "";
		KFHumanPawn(Other).RequiredEquipment[4] = "";
	}
	return true;
}

//Defaults
//RequiredEquipment[0] = "KFMod.Knife"; // Knife
//RequiredEquipment[1] = "KFMod.Single"; // Single 9mm
//RequiredEquipment[2] = "KFMod.Frag"; // Grenade
//RequiredEquipment[3] = "KFMod.Syringe"; // Syringe
//RequiredEquipment[4] = "KFMod.Welder"; // Welder

defaultproperties
{
     bAddToServerPackages=True
     GroupName="KF-Inventory"
     FriendlyName="Inventory Edit"
     Description="You start with the equipment needed for the challenge"
}

Is going to be the easiest way.