Jump to content

Recommended Posts

Posted

Hello all. I'm trying to finish up my first mod and I'm having trouble adding a healing-over-time effect to my liquid (reishi tincture). I want to have to heal something like 1 hp over 6 in-game hours.

So far everything works correctly except the healing effect is instant. 

I notice that the json file for the poultice has these properties:

Spoiler

            propertiesByType: {
                "*-reed-honey-sulfur": {
                    health: 4,
                    applicationtimesec: 3,
                    maxapplicationtimesec: 10,
                    effectdurationsec: 10,
                    ticks: 10,
                    cancelinair: false,
                    cancelwhileswimming: false,
                    delaytocancelsec: 0.5
                },

 

I tried using those in various parts of my json file to no success. The healing was always instant.

 

Cant anyone tell what I'm doing wrong, how to make the healing slower, or how one would go about finding a solution?

Thanks a ton for reading

 

  json file below

Spoiler

{
    code: "reishitinctureportion",

    class: "ItemLiquidPortion",
    matterState: "liquid",

    variantGroups: [
        {
            code: "mushroom",
            states: [ "reishi", "shiitake" ]

        }
    ],

    attributes: {
        handbook: {
            ignoreCreativeInvStacks: true
        },
        distillationPropsbytype: {
            "*": {
                distilledStack: {
                    type: "item",
                    code: "reishitincture:reishitinctureportion-{mushroom}"
                },
                ratio: 0.1
            }
        },
        waterTightContainerProps: {
            containable: true,
            itemsPerLitre: 100,
            nutritionPropsPerLitre: {
                satiety: 100,
                intoxication: 0.03,
                foodCategory: "Vegetable"    
        health: 1
            },

            allowSpill: true,
            whenSpilled: {
                action: "DropContents",
                stack: { type: "item", code: "reishitincture:reishitinctureportion-{mushroom}", states: ["reishi", "shiitake" ] }
            },
            texturebytype: {
                "*-reishi": { base: "game:block/food/pie/fill-redmeat", alpha: 180 },
                "*-shiitake": { base: "game:block/food/pie/fill-carrot", alpha: 180 }
            }
        }
    },

    shape: { base: "game:item/liquid" },

    texturebytype: {
        "*-reishi": { base: "game:block/food/pie/fill-redmeat", alpha: 180 },
        "*-shiitake": { base: "game:block/food/pie/fill-carrot", alpha: 180 }
    },

    creativeinventoryStacks: [
        {
            tabs: [ "general", "liquids", "reishitincture" ],
            stacks: [
                {
                    type: "block",
                    code: "game:woodbucket",
                    attributes: {
                        ucontents: [
                            {
                                type: "item",
                                code: "reishitincture:reishitinctureportion-{mushroom}",
                                states: [ "reishi", "shiitake" ],
                                makefull: true
                            }
                        ]
                    }
                }
            ]
        }
    ],

    maxstackSize: 5000,
    materialDensity: 200,

    guiTransform: {
        translation: { x: 0, y: 1, z: 0 },
        rotation: { x: 123, y: -33, z: -13 },
        origin: { x: 0.5, y: 0, z: 0.5 },
        scale: 1.4
    },
    fpHandTransform: {
        translation: { x: 0, y: 0, z: 0 },
        rotation: { x: 25, y: 157, z: -5 }
    },
    tpHandTransform: {
        translation: { x: -1.5, y: -1, z: -1.4 }
    },

    transitionableProps: [ {
        type: "Perish",
        freshHours: { avg: 3360 },
        transitionHours: { avg: 48 },
        transitionedStack: { type: "item", code: "game:rot" },
        transitionRatio: 0.01
    } ]
}

 

Posted

Screenshot2025-10-24172423.png.10051d11f1f2a1166ee1360c72312afe.png

 

Update. When I use the behaviors[] section with the liquid reishi tincture, it acts like a poultice with correct healing-over-time but only when the liquid is outside a container and selected from the hot bar as in the screenshot. 

I thought maybe the liquid being in a bowl would have it's own itemcode that I could use but the ID of the bowl doesn't change regardless of what liquid is inside. 

Is there a way to get the healing over time effect to happen when the liquid IS INSIDE the bowl?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.