Jump to content

I tried adding new clothes, but it didn't work


Tashendal

Recommended Posts

Hi. I decided to add a new type of clothing: a hard hat, jacket, and pants. Based on the standard ones: Jacket_Camo Green, Hat_Army, and Trousers_camogreen. Changed textures, drew new icons, and created the necessary files. Here is a list of files and what I wrote in them:
Folder: \media\clothing\clothingItems

Files: Jacket_CamoMP.xml, MP_Hat_Army.xml, Trousers_CamoMP.xml

I changed two lines in each file. The path to the texture:
<textureChoices>clothes\jacket\jacket_camomp</textureChoices>
<textureChoices>clothes\jacket\jacket_camomp</textureChoices>
<textureChoices>armyhelmetmp</textureChoices>

and unique GUID for each subject (im use www.guidgenerator.com/online-guid-generator.aspx)

<m_GUID>7fde9ae9-a876-46d2-ab46-24da3952c9f5</m_GUID>...

and so on

 

Folder: \media\clothing
Files: clothing.xml

In this file, I registered a new type of zombie spawn and specified the items that appear on it. Specified previously assigned Guids. Assigned a unique Guid to the zombie type.

        

<m_FemaleOutfits>
        <m_Name>ArmyCamoMP</m_Name>
        <m_Guid>e9047c42-479b-4d28-975b-7dd1af366f79</m_Guid>
        <m_Top>false</m_Top>
        <m_Pants>false</m_Pants>
        <m_AllowPantsHue>false</m_AllowPantsHue>
        <m_AllowTopTint>false</m_AllowTopTint>
        <m_AllowTShirtDecal>false</m_AllowTShirtDecal>
        <m_items>        
        <itemGUID>7fde9ae9-a876-46d2-ab46-24da3952c9f5</itemGUID>
        </m_items>
        <m_items>        
        <itemGUID>5b7f2fb6-953c-4496-91df-0a6a1d0f2273</itemGUID>
        </m_items>
        <m_items>        
        <itemGUID>edd70d8d-6f04-4a7b-9162-1f12ef96bb3b</itemGUID>
        </m_items>        
        <m_items>
        <itemGUID>b81f298c-cf92-47bf-b854-649308ba17b0</itemGUID>
        </m_items>
        <m_items>        
        <itemGUID>19504103-de6a-44bd-ac48-b9079ce0e355</itemGUID>
        </m_items>
        <m_items>        
        <itemGUID>1aad0762-7886-4295-be32-448343be62aa</itemGUID>
        </m_items>
        <m_items>        
        <itemGUID>1a437dbb-cee9-4013-8e8a-e158acf98b62</itemGUID>
        </m_items>
        <m_items>        
        <itemGUID>2b0756ac-57f3-415e-bfed-24b28d1ca4d6</itemGUID>
        </m_items>
        <m_items>        
        <itemGUID>fb86bd5f-1931-4b24-a5d7-bd6a43769991</itemGUID>
        </m_items>
        <m_items>        
        <itemGUID>cbe793fe-97d9-4585-88e0-bc18be39d714</itemGUID>
        </m_items>
        <m_items>
        <itemGUID>227cb2d5-05a5-44ed-872d-ac4ca16e80bc</itemGUID>
        </m_items>    
        </m_FemaleOutfits>

Folder: media\lua\shared\NPCs

Here I specified the probability of spawning a new type of zombie.

WPIZombiesZoneDefinition = ZombiesZoneDefinition or {};

WPIZombiesZoneDefinition.Army = {
    ArmyCamoDesert = {
        name="ArmyCamoDesert",
        chance=20,
    },
    ArmyCamoGreen = {
        name="ArmyCamoGreen",
        chance=30,
    },
    ArmyCamoMP = {
        name="ArmyCamoMP",
        chance=30,
    },
}

WPIZombiesZoneDefinition.SecretBase = {
    ArmyCamoDesert = {
        name="ArmyCamoDesert",
        chance=20,
    },
    ArmyCamoGreen = {
        name="ArmyCamoGreen",
        chance=30,
    },
    ArmyCamoMP = {
        name="ArmyCamoMP",
        chance=30,
    },
}

-- total chance can be over 100% we don't care as we'll roll on the totalChance and not a 100 (unlike the specific outfits on top of this)
WPIZombiesZoneDefinition.Default = ZombiesZoneDefinition.Default or {};

table.insert(WPIZombiesZoneDefinition.Default,{name = "ArmyCamoDesert", chance=3});
table.insert(WPIZombiesZoneDefinition.Default,{name = "ArmyCamoGreen", chance=5});
table.insert(WPIZombiesZoneDefinition.Default,{name = "ArmyCamoMP", chance=5});

Folder: media\lua\shared\Translate - spit

 

Folder: media\scripts\clothing

here I specified the item characteristics and icon name

 

item Jacket_CamoMP
    {
        Type = Clothing,
        DisplayName = Military Police Camo Jacket,
        ClothingItem = Jacket_CamoMP,
        BodyLocation = Jacket,
        Icon = JacketCamoMP,
        BloodLocation = Jacket,
        RunSpeedModifier = 0.93,
        CombatSpeedModifier = 0.95,
        BiteDefense = 40,
        ScratchDefense = 60,
        NeckProtectionModifier = 0.5,
        Insulation = 0.5,
        WindResistance = 0.35,
        FabricType = Cotton,
        WaterResistance = 0.5,
        Weight = 2,
    }
    item Trousers_CamoMP
    {
        Type = Clothing,
        DisplayName = Military Police Camo Pants,
        ClothingItem = Trousers_CamoMP,
        BodyLocation = Pants,
        Icon = TrousersCamoMP,
        BloodLocation = Trousers,
        BiteDefense = 20,
        ScratchDefense =30,
        Insulation = 0.55,
        WindResistance = 0.4,
        WaterResistance = 0.50,
        FabricType = Cotton,
    }
        item MP_Hat_Army
    {
    Type = Clothing,
    DisplayName = Military Police Helmet,
    ClothingItem = MP_Hat_Army,
    BodyLocation = Hat,
    Icon = HelmetArmyMP,
    CanHaveHoles = false,
    BloodLocation = Head,
    BiteDefense = 100,
    ScratchDefense = 100,
    ChanceToFall = 10,
    Insulation = 0.3,
    WaterResistance = 0.3,
    }

Folder: media\textures
here are the icons and texture of the helmet:

ArmyHelmet.png

Item_HelmetArmyMP.png

Item_JacketCamoMP.png

Item_TrousersCamoMP.png

 

Folder: media\textures\Clothes\Jacket

Texture jacket: Jacket_CamoMP.png

 

Folder: media\textures\Clothes\Trousers_Mesh

Texture trousers: Trousers_CamoMP.png

I know it's not exactly the right texture and path. camouflage pants are on a different path. I got them mixed up a bit. it doesn't matter now, because it's not just the pants that are the problem.

 

and folder: \media

File: FileGuidTable.xml

here I re-registered the GUIDs of new items.

<?xml version="1.0" encoding="utf-8"?>
<fileGuidTable>
    <files>
        <path>media/clothing/clothingItems/MP_Hat_Army.xml</path>
        <guid>5b7f2fb6-953c-4496-91df-0a6a1d0f2273</guid>
    </files>
<files>
        <path>media/clothing/clothingItems/Jacket_CamoMP.xml</path>
        <guid>7fde9ae9-a876-46d2-ab46-24da3952c9f5</guid>
    </files>
<files>
        <path>media/clothing/clothingItems/Trousers_CamoMP.xml</path>
        <guid>edd70d8d-6f04-4a7b-9162-1f12ef96bb3b</guid>
    </files>

</fileGuidTable>

 

and now the crux of the problem. none of this helped. the desired type of zombie appears, but there are no three new items on it - only those that were originally in the game. what did I forget to do? maybe you will notice the mistake you made? maybe I forgot to add another file or made a mistake with the model? I don't work all three items: helmet, jacket and pants.

 

please help me, I have been struggling with this problem for about a day and tried a lot of things. unfortunately, nothing helps. I know, activity on the forum is low and hints are rarely given. if you understand the essence of the issue-help, do a good deed.

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...