Jump to content
eva08maicy02

Two items don't work

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?
 

Share this post


Link to post
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.

Share this post


Link to post
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...🤔

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...