Jump to content

Two items don't work


eva08maicy02

Recommended Posts

I have two types of items that don't work here.


1. Soap
I created two soaps, here are my settings in the item file:

    item MajesticOliveSoap
    {
        DisplayCategory     = Household,
        Type                = Drainable,
        UseDelta            = 0.05,
        UseWhileEquipped    = FALSE,
        DisplayName         = Majestic Olive Soap,
        Icon                = MajesticOliveSoap,
        Weight              = 0.1,
        cantBeConsolided    = TRUE,
    }
    
    item MajesticCarbolicSoap
    {
        DisplayCategory     = Household,
        Type                = Drainable,
        UseDelta            = 0.05,
        UseWhileEquipped    = FALSE,
        DisplayName         = Majestic Carbolic Soap,
        Icon                = MajesticCarbolicSoap,
        Weight              = 0.1,
        cantBeConsolided    = TRUE,
    }

I went into the game to test and didn't get any errors, but they still don't work, the game doesn't treat them as soap:
2022-05-16_225856-1.thumb.jpg.c7765d1bca0574701d0ba00db9780d33.jpg
I first thought of the Vitamins example, so maybe I could make my soap work by putting "Soap" at the beginning of the item ID? It turned out to be a failed attempt.
Then I remembered the Lua settings, so I checked out ISWashClothing.lua and ISWashYourself.lua. If it just needs to add my item ID, I know how to do it (like bleach), but it's not as easy as I thought, I didn't find "Soap2" in it, so it already Beyond what I can comprehend, I have no clue right now.

 

 

2. Tape and white glue 
I created two tapes and two glues, here are my settings in the item file:

	item Glue_Mew-Mew
	{
		Weight		= 0.1,
		Type		= Drainable,
		UseDelta	= 0.2,
		UseWhileEquipped	= FALSE,
		DisplayName	= Glue(Mew-Mew),
		Icon		= Glue_Mew-Mew,
		Tooltip		= Tooltip_Stationery,
		SurvivalGear= TRUE,
    }
	
	item Glue_NanPaoResins
	{
		Weight		= 0.2,
		Type		= Drainable,
		UseDelta	= 0.1,
		UseWhileEquipped	= FALSE,
		DisplayName	= Glue(Nan Pao Resins),
		Icon		= Glue_NanPaoResins,
		Tooltip		= Tooltip_Stationery,
		SurvivalGear= TRUE,
    }
	
	item OPPTape
	{
		Weight		= 0.3,
		Type		= Drainable,
		UseDelta	= 0.05,
		UseWhileEquipped	= FALSE,
		DisplayName	= OPP Tape,
		Icon		= OPPTape,
		Tooltip		= Tooltip_Stationery,
		SurvivalGear= TRUE,
    }
	
	item PVCTape
	{
		Weight		= 0.3,
		Type		= Drainable,
		UseDelta	= 0.05,
		UseWhileEquipped	= FALSE,
		DisplayName	= PVC Tape,
		Icon		= PVCTape,
		Tooltip		= Tooltip_Stationery,
		SurvivalGear= TRUE,
    }

Then I tested in debug mode, get some to the main inventory using the items list, no errors at all during the process, but I still can't use the stuff I created to repair the weapon, it's showing red, and I don't Know where the problem is.
2022-05-16_011651-1.thumb.jpg.6b2826628ed9c3cee5aeca368a7fe380.jpg

 

I found a lot of similar mods in the workshop, but they all just make vanilla soap/tape/glue, not create an item that is the same as vanilla soap/tape/glue. So I guess they might not be possible?
 

Link to comment
Share on other sites

Line 3030 of ISWorldObjectcontextMenu is:

local barList = playerInv:getItemsFromType("Soap2", true)

 

I don't know, but if you name your soap Soap2 as well - but put it in a different module - would that work?  If the game is only checking Type - and not Full Type - maybe you could trick the game without editing the code.

Link to comment
Share on other sites

5 hours ago, Hugo Qwerty said:

Line 3030 of ISWorldObjectcontextMenu is:

local barList = playerInv:getItemsFromType("Soap2", true)

 

I don't know, but if you name your soap Soap2 as well - but put it in a different module - would that work?  If the game is only checking Type - and not Full Type - maybe you could trick the game without editing the code.

 

Your assumption was interesting, so I do it: I changed the ID of one of my soaps to Soap2. There are no errors after entering the game, but it still doesn't work.

I whimsically tried another approach:
I copied the paragraph in ISWorldObjectcontextMenu.lua that mentions the Soap2 setting, and changed it to my item ID, but that didn't work, it made the context menu "Wash" disappear. So I think "Soap2" here is not the item ID.

 

Thanks for your reply, although it still doesn't work, I'm enjoying these attempts :lol:

 

By the way, while waiting for anyone to reply, I also discovered that my soap doesn't have "Edit Item" in debug mod:
2022-05-18_100549-1.thumb.jpg.c23c7f14188d7c6d602e7e2763300f5f.jpg
This is weird as my item format is the same as Soap 2, so I think there might be something missing...🤔

Link to comment
Share on other sites

  • 5 months later...

Did you happen to find a solution to your problem? i have the same problem,trying to create a Can of Liquid Cleaning product by poring 4 Liquid cleaners into 1 Can and vice versa,can't seem to get washing menu nor to pour it into the can,presumably because the game considers them 2 different types of liquids?

Link to comment
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
×
×
  • Create New...