Jump to content

eva08maicy02

Member
  • Posts

    11
  • Joined

  • Last visited

Posts posted by eva08maicy02

  1. 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...🤔

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

  3. 1 hour ago, Hugo Qwerty said:

    I think you just want: SuburbsDistributions["Paperbag_Jays"], without the ["all"].

     

    If that doesn't fix it, post the error message you're getting.

    OMG! It's working!
    Thank you so much for your help, I'm so happy :lol:

  4. I added my item to the zombie loot and it worked fine. This is the function I use, referring to other people's modules:

    table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "TWI.PillsHWJGreenOil");
    table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.1);
    table.insert(SuburbsDistributions["all"]["inventorymale"].items, "TWI.PillsHWJGreenOil");
    table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.1);

     

    However, when I try to spawn my items from paperbag, I get the error in debug mode. Here is my function:

    table.insert(SuburbsDistributions["all"]["Paperbag_Jays"].items, "TWI.BobaStraw");
    table.insert(SuburbsDistributions["all"]["Paperbag_Jays"].items, 50);
    table.insert(SuburbsDistributions["all"]["Paperbag_Spiffos"].items, "TWI.BobaStraw");
    table.insert(SuburbsDistributions["all"]["Paperbag_Spiffos"].items, 50);

     

    I don't understand. They are all in the same format, why do I get error in paperbag? And how do I fix it?

     

  5. 17 hours ago, Hugo Qwerty said:

    On possible way is to use the OnEat proprty:

     

    For example, vanilla cigarettes uses:  OnEat = OnEat_Cigarettes,

     

    OnEat_Cigarettes is a function that deals with happiness / stress changes from smoking.

     

    You could write your own function to just add the two items to the player's inventory, although you might need to check that the food has been completely consumed to prevent the player getting the items every time they drink 1/4 of it.

     

    Alternatively, you could create a 'TumblerAndStraw' item and return that from ReplaceOnUse, and use that in the create recipe (and create a recipe to to make a TumblerAndStraw from the two items).

     

    Since I don't know anything about functions, I'm glad I can use the second method to solve this problem: make them a set of dirty dishes, then make the recipe to wash them, use OnCreate to separate them.

     

    Your reply helped me a lot, thank you very much :lol:

  6. I want to create a drink and get a Glass Tumbler and a straw when the drink is done. I know ReplaceOnUse, but it seems to only can set one item, how do I set two?

     

    I tried setting two ReplaceOnUse and it only worked one;
    I tried "ReplaceOnUse = GlassTumbler;straw," and it makes the item all-you-can-drink;
    Maybe OnCreate also works on items? So I tried doing it on items, but it didn't work.

     

    Does anyone know how to implement it? Or know of any mod that implements it, I'd like to refer to it.

     

  7. On 4/28/2022 at 6:06 AM, Hugo Qwerty said:

    This is a bug in the vanilla code, so it can't be fixed by anyone other the Indie Stone.  The code even acknowledges the need to fix it: "TODO: this requires item images to be in media/textures - should get the image location from the texture here instead" (copied from media/lua/client/foraging/ISforageAction.lua).

     

    It's really not important, but it would be nice if this can be fixed - especially as it makes mods look bad.

    I didn't expect this to be a bug, thanks for your reply :)

  8. I'm making a recipe and I want the Result to be two new items, so I try this:
    Result:id.itemA;id.itemB,
    Turns out this doesn't work.

     

    I found two posts on the forum, they are here:

     

     

    Even though both of these articles are many years old, I still try to do it.

    I test it in debug mode then I get the error:

     

    2022-04-23_031511.jpg.22469220d4c6cfd6346ed3a14cc688d4.jpg20220423031258_1.thumb.jpg.dd0d84f5ff905f036008979139f7e9eb.jpg

     

    I checked many times and I don't know what else needs to be modified for this Lua setup to make it work...

     

  9. I am Taiwanese, my account name is eva08maicy02 on Github, and my name on Discord is eva08maicy02#4823.

    I translate Traditional Chinese (CH), and I've created several Pull requests on Github. Just to make sure it's really updated, so I'm saying hi here.

     

    Also I have a question here:
    I know the archives for the radio are in a special place and I already have an older CH archive, so I want an English version so I can check it and update it, but I only see languages other than English On Github, where can I get the English version of RadioData.txt?

  10. These common floors can be disassembled, and I know where your problem is, you are using it the wrong way, you should use the "Pick up" function so you can get these floors and then bring them back to your base to use it.

    20220227081510_1-1.thumb.jpg.b3421156a1181218251332b7ee935f99.jpg

     

    If you don't want to use it, you just want to destroy it, I think you still have to use "Pick up", then you can put it in the trash, then the trash will show "DeleteAll", you can destroy it.

    20220227081742_1-1.thumb.jpg.b5444509b5e663c2b18892ce89536190.jpg

  11. I learned that the fishing system will be redesigned in the future, so I thought of one thing: I often catch Juvenile fish in this game. They're not really effective at stopping hunger, so instead of adding them to my meals, I opted to put them in a composter to make fertilizer. But anyway, I still think it's a waste, maybe we should release these Juvenile fish.

     

    Let me start by saying that I'm not an extremist, I'm just an normal person, the reason I have this idea is that I thought of a game I played in my childhood in SFC, it's called "Kawa no Nushi Tsuri 2" . It is an fishing game from Japan, if the player catches all the fish in the game, the scene will change the season. And if the player keeps doing it, the scene will eventually turn into winter and the player will have a hard time catching fish. If the player wants an endless supply of fish, then when the player catches a Juvenile fish, the player can choose to release it and let the fish grow. In any case, such a game setting gave me a good educational meaning.

     

    So I thought maybe we could release Juvenile fish. If you're hungry so you don't want to do it, it's not going to have any bad effects. But if you do it, as a bonus, we can gain experience points for fishing, or make it easier for us to catch big fish in the next few days.

×
×
  • Create New...