Create an account

ItemTweaker Extra Clothing Option Addon  

Upload: 23 Jul 2022, 17:42
Created by: Delran [X]
Uploaded by: Aqxaro
ItemTweaker Extra Clothing Option Addon

Requires: Item Tweaker API - Still works in Build 41.65

ItemTweaker Addon, Extra Clothing Options

This addon add allows to easily add multiple extra clothing options, such as "Open Jacket" or "Down Hoodie" to modded items using the ItemTweakerAPI.

Currently, the ItemTweakerAPI doesn't allow to add a parameter to a field without overriding any previous changes.
Using this add-on, multiple mods can add/replace or remove extra clothing option without completely overriding them.

The add-on will try to include extra clothing options added without using the add-on.

Usage

Place your lua script inside the media/client folder of your mod.

Usage of this framework is as follow :

-- Don't forget to include the addon
if getActivatedMods():contains("ItemTweakerAPIExtraClothingAddon") then 
	    require("ItemTweaker_ExtraClothingOptions");
else return end


-- The addon features three functions : 

-- AddOrReplaceClothingOption will replace any option with the same name with the new one

-- First parameter is the full name of the clothing item on which to add the new clothing option
-- Second parameter is the full name of the clothing item that will replace the previous one once this option is triggered ("ClothingItemExtra")
-- Third parameter is the name of the extra clothing option, you will need extra stepts to create custom ones ("ClothingItemExtraOption")
ItemTweaker.AddOrReplaceClothingOption("Base.HoodieUP", "Base.HoodieDOWN", "DownHoodie")


-- AddClothingOptionIfDoesntExists will add an new clothing option if there is no other option with the same name
-- it will do nothing otherwise

-- Usage is the same as AddOrReplace
ItemTweaker.AddClothingOptionIfDoesntExists("Base.HoodieUP", "Base.HoodieDOWN", "DownHoodie")


-- RemoveClothingOption will remove the clothing option with the given name

-- First parameter is the name of the item containing the extra clothing option
-- Second parameter is the name of the extra clothing option ("ClothingItemExtraOption")
ItemTweaker.RemoveClothingOption("Base.HoodieUP", "DownHoodie")
Changelog
  • 05/26/2022
    1. The add-on will now try to add as many options that are added using the original ItemTweaker Core API, this should reduce mod conflict and avoid the need to create patches.
    2. Fixed a bug that could cause an error due to conflict with other mods.
Known issues
  • Edditing the fields ClothingItemExtra and ClothingItemExtraOption with the ItemTweaker API after making changes this will override them, I'm currently working on a solution.
Future plans
  • Improve compatibility with mods making edits made with DarkSlayerEX's ItemTweaker that are not using this addon.
Comments
The minimum comment length is 10 characters.