Exporting Monsters and Weapons to Custom Mutators

Exporting Monsters and Weapons to Custom Mutators

  • Topic closed
  • You cannot reply to this topic

Exporting Monsters and Weapons to Custom Mutators Guide on transferring weapons and monsters from one mutator to another, including working with resources and dependencies.

Geekrainian #1

    • Group: Admin
    • Posts: 800

    Posted:

    Exporting Monsters and Weapons to Custom Mutators

    Everything written below will be repeatedly corrected and formatted…

    Some time ago it was described how to transfer weapons or monsters from mutator to mutator.

    Transferring Weapons from Mutator to Mutator

    Let’s consider a situation using the example of NovaSix from hiyokomod, when we don’t want to extract animation, textures, static meshes and sounds from hiyokomod packages and insert them into our own packages.

    Looking at the contents of NovaSix\*.uc files, we see that we’re also missing AntiSirenNade.uc and DamTypeAcid.uc.

    Step 1: Copying Files

    Take these 9 files and put them, for example, in ServerPerksV5 (for simplicity, we’ll consider a situation where everything is in 1 folder, as in versions before 5.10).

    Step 2: Replacing Package Prefixes

    Now in all these 9 files we replace hiyokomod. with ServerPerksV5. (actually we’ll need to replace in 6 files).

    Step 3: Configuring Perk Dependencies

    If we look inside NovaSixFire.uc, we’ll see this function:

    unrealscript
    function projectile SpawnProjectile(Vector Start, Rotator Dir)
    {
    	local KFPlayerReplicationInfo KFPRI;
    	KFPRI = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo);
    	if (KFPRI != none)
    	{
    		if (KFPRI.ClientVeteranSkill == Class'hiyokoPerksScientist')
    			ProjectileClass=Class'ServerPerksV5.NovaSixProj';
    	}
    	else
    		ProjectileClass=Class'KFMod.M79GrenadeProjectile';
    	return Super.SpawnProjectile(Start,Dir);
    }

    Here we shoot either a NovaSix grenade or a regular M79 grenade depending on the perk. Since ServerPerks doesn’t have a Scientist perk, we can make it so that a medic can shoot from NovaSix, and for others the shot would be M79 grenades.

    We edit it like this:

    unrealscript
    function projectile SpawnProjectile(Vector Start, Rotator Dir)
    {
    	local KFPlayerReplicationInfo KFPRI;
    	KFPRI = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo);
    	if (KFPRI != none)
    	{
    		if (KFPRI.ClientVeteranSkill == Class'SRVetFieldMedic')
    			ProjectileClass=Class'ServerPerksV5.NovaSixProj';
    	}
    	else
    		ProjectileClass=Class'KFMod.M79GrenadeProjectile';
    	return Super.SpawnProjectile(Start,Dir);
    }

    If we want to make the weapon for everyone, then like this:

    unrealscript
    function projectile SpawnProjectile(Vector Start, Rotator Dir)
    {
    	ProjectileClass=Class'ServerPerksV5.NovaSixProj';
    	return Super.SpawnProjectile(Start,Dir);
    }

    Step 4: Adding to Shop

    We add to the shop as follows:

    TraderInventory=3:ServerPerksV5.NovaSixPickup

    (let 3 be the medic category, for example)

    If we want - we add it to SRVet\*.uc files for corresponding perks.

    Transferring Monsters

    Simple Monster (BloatEX)

    Decompile hiyokoZombiesMut, copy ZombieBloatEX.uc to ServerPerksV5 and that’s it.

    We can add to sandbox:

    MonsterClasses=(MClassName="ServerPerksV5.ZombieBloatEX",Mid="P")

    Monster with Own Controller (NinjaPat)

    Copy NinjaPat.uc, HardPatController.uc and BossPlasmaProj.uc to our mutator.

    In addition, we’ll also need:

    • DamTypeHHGren.uc
    • HHGExplosion.uc
    • DamTypeExpBullet.uc

    Replace hiyokomodZombie4th and hiyokomod with ServerPerksV5.

    Remove from DamTypeHHGren.uc the line:

    unrealscript
    WeaponClass=Class'ServerPerksV5.HolyGrenade'

    (otherwise we’ll have to transfer the holy grenade to our mutator as well)

    Also add:

    unrealscript
    #exec OBJ LOAD FILE=godpatvoice.uax

    at the top of NinjaPat.uc, otherwise it won’t find it.

    Working with Resources Not Contained in Standard Files

    We’ll consider a situation when there are large resource files (animation, textures, static meshes and sounds) and we need to extract resources for a specific monster from them.

    Everything will be done without third-party software, only KFEd.

    Extracting Textures

    1. Open KFEd, open the desired texture package
    2. Find the needed textures
    3. Use the Rename function to rename textures with the new package name
    4. Make sure all textures are renamed correctly
    5. Save in a new package

    Extracting Static Meshes

    1. Open KFEd, open the desired static mesh package
    2. Find the needed meshes
    3. Rename meshes with the new package name
    4. Save in a new package

    Extracting Animations and Sounds

    1. Open KFEd, open the desired animation package
    2. Find the needed animations
    3. Rename animations with the new package name
    4. If there are sounds in notifications, you need to:
      • Select the desired animation
      • Rename AnimationSet
      • Link animation and mesh
      • Add Notify, selecting type AnimNotify_Script
      • Make sure all references are updated
    5. Save in a new package

    Important Notes

    • When transferring meshes and animations, you need to delete notifications and recreate them, assigning the previous settings
    • Simply moving sounds with animations won’t work
    • After moving an animation and saving it in a new package, references to the old package will remain
    • In all other cases everything works perfectly, but with sounds, when using them in notifications, simple moving doesn’t work and problems will arise

    Result

    After completing all steps, the weapon or monster is transferred to your mutator and ready to use.


    Article by Flame

    Back