Customized Categories 1.2 - Modular. Updated Hydrocraft to 3.4
2 2

12 posts in this topic

Recommended Posts

-------------------Credits to Brybry and Blindcoder for help with getting started-------------------
------------------If I forgot anyone who helped me get this done, Let me know.-------------------

1.2: Updated Hydrocraft support to 3.4. Overwriting other CustomCategory modules is now possible.1.1: This mod is now Modular. Anyone who wishes to make use of this mod for their own mod can do so!Instructions at end of post. If someone makes use of this for their mod, It would still be recommended to leave this out of your mod, in case some people do not wish for the extra categories.

--------If anyone finds any items that do not fit in the category assigned, or found that I have missed something, please let me know.------
 
This mod aims to add new categories to vanilla and mod items for better organization.
 
The mod adds the following categories:
 
Ammunition, Carpentry, Cleaning, Comfort, Critters, Drinkable, Fillable, Edible(Perishable), Non-Perishable, Sealed, Electronics, Engineering, Farming, Fishing, Fuel, Hunting(includes Trapping-related items), Ingredient, Instruction Manual(Skill + Recipe books), Kitchenware, Martial Arts(Reserved for Custom Animations), Medical, Office, Painting, Recreation, Repair, Seeds, Smokable(Cigarettes), Survival, Terraforming, Weapon Upgrade.
 
 
With the inclusion of Hydrocraft, the following were also added:
 
All-Purpose, Animal, Animal - Caged, Animal Care, Animal - Dead, Automotive, Bones, Brewing, Chemistry, Clothcraft, Container - Component, Container - Packed, Critters - Tools, Critters - Jarred, Currency, Dog, Holiday,  Illumination, Material Working,Pack Dog, Pottery, Stone Working, Vehicle.
 
Melee Weapon Categorization takes on a slightly different approach.
They are categorized first by weapon length, then damage type, and then finally a category from above:
 
Sledgehammer: Long Blunt Weapon - Carpentry
                  Axe: Long Blade Weapon - Carpentry
                 Fork: Stabbing Kitchenware
 
Ranged Weapon Categorization is also slightly different.
               Pistol: Ranged - Gun
           Shotgun: Ranged - Long Gun
          LongBow: Ranged - Archery
 Potato Cannon: Ranged - Improvised
            Molotov: Ranged - Thrown Firebomb
 
This is what the game looks like using this mod. (Hydrocraft loaded in image)
 
CustomCategories.png
 
 
 
 
Instructions on how to make your own mod's categories. 
For other examples, see: CustomCategories\media\lua\client\CustomCategories_Base.lua

In order to make use of CustomCategories for your mod, you will need to begin your new LUA file with:    if getActivatedMods():contains("CustomCategories") then        require("CustomCategories_Core");          require("CustomCategories_Base");  --Add if you need to overwrite a Base Item.    else return end        --"Add a check like the following for any mod's CustomCategories module you wish to override."    Example: Hydrocraft.    if getActivatedMods():contains("Hydrocraft") then        require("CustomCategories_Hydrocraft");    endOnce initialized, for each item to modify follow the syntax:				CustomCategories.Database["MODULE.ITEMID"] = "CATEGORYID";Breakdown:   MODULE.ITEMID  Example -> Base.AxeBreakdown:   CATEGORYID Example -> WoodWorking, ArtsAndCraftsTo add the visible text in game, you will need to go to/create				lua/Shared/Translate/EN/IG_UI_EN.txt		If this file did not exist already, you can initialize your own using:				IGUI_EN = {			ALL_CONTENTS_HERE		}		Now that you have the file open/set up, you will need to create your Category Definition	IGUI_ItemCat_CATEGORYID = "Visible String in game",	Breakdown:   CATEGORYID Example -> WoodWorking, ArtsAndCraftsBreakdown:   "Visible String in game" Example -> "Woodworking", "Arts and Crafts"-------------------------------WORKING EXAMPLE--------------------------------------------------------To make the Base Item - Plank have a display category of "Awesome Pants Man"in your LUA file, you would assign it		CustomCategories.Database["Base.Plank"] = "AwesomePantsMan";Inside lua/Shared/Translate/EN/IG_UI_EN.txt, you would then create your display category.		IGUI_ItemCat_AwesomePantsMan = "Awesome Pants Man",That should be all there is to it.The list of CATEGORYIDs already added are in this mod's IG_UI_EN.txt.Use them as you see fit. If you see one that doesn't fit, Simply make your own in your own mod's IG_UI_EN.txt!

CustomCategories 1.0.zip

CustomCategories 1.1.zip

CustomCategories 1.2.zip

Share this post


Link to post
Share on other sites

Do I have permission to just merge it into Hydrocraft if I want to?

 

Woah, really? I have no problem with that, but I'm honestly not sure if you like the category I set everything up for. I did not entirely follow the format from your script files. The log barriers at the moment are categorized as "Survival" and the dung is "Hunting" yes.. even dog poop.... Are you referring to only the hydrocraft part of the mod? Will you keep it so it only activates when Custom Categories is loaded? I am mainly curious.

 

I am in the process of trying to make it more modder-friendly, so anyone who wants to use this, can consider it a base to add-onto. I will pass on my Hydrocraft module for you to make use of and modify how you like.

Share this post


Link to post
Share on other sites

I will have to look it all over. But I wanted to go the category route already. This could possibly save me some time.

Alright, I will finalize my work, and send you the module, and the extra bits needed to add your own for new items.

Share this post


Link to post
Share on other sites

Mod updated to 1.2.  Hydrocraft module updated to 3.4

 

Mods can now properly overwrite other defined modules.

 

Example:

CustomCategories sets CatToy to "Recreation", Hydrocraft module sets it to "Animal Care".

If you wanted to override it further, your module file should start as follows:

if getActivatedMods():contains("CustomCategories") then    require("CustomCategories_Core");      require("CustomCategories_Base");  --"Add if you need to overwrite a Base Item."else return end    --"Add a check like the following for any mod's CustomCategories module you wish to override."--"Example: Hydrocraft."if getActivatedMods():contains("Hydrocraft") then   require("CustomCategories_Hydrocraft");endCustomCategories.Database["Base.CatToy"] = "CATEGORYID";

Share this post


Link to post
Share on other sites

@DarkSlayerEX

Do you think you could help me? I have been trying to change your mod to be more specific to the way I play so I changed a lot of the categories and now none of the base game items are displaying properly and I cannot figure out why. Hydrocraft items seem to all work, though. I followed your instructions and I don't know what I am doing wrong. Maybe you can take a look?

 

Btw, I added some items that were missing if you want to copy them to your mod (mostly fruits, veggies, spices).

CustomCategories_Base.lua

CustomCategories_Hydrocraft.lua

IG_UI_EN.txt

Edited by swissheart
pressed something by mistake

Share this post


Link to post
Share on other sites

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
2 2