Jump to content

Recommended Posts

Doesn't anyone know how to create a new spice for Warly? I know there is a constructor that creates all the items but I'm not sure how to do all the icons for all the different foods? Do I do them manually or do I create an overlay that gets added onto the food's icon? I've never really done this texturing stuff before so it would be a huge help if you could help.

From portablespicer.lua:

Spoiler

local function ShowProduct(inst)
    if not inst:HasTag("burnt") then
        local product = inst.components.stewer.product
        local recipe = cooking.GetRecipe(inst.prefab, product)
        if recipe ~= nil then
            product = recipe.basename or product
            if recipe.spice ~= nil then
                inst.AnimState:OverrideSymbol("swap_plate", "plate_food", "plate")
                inst.AnimState:OverrideSymbol("swap_garnish", "spices", string.lower(recipe.spice)) --especially this line
            else
                inst.AnimState:ClearOverrideSymbol("swap_plate")
                inst.AnimState:ClearOverrideSymbol("swap_garnish")
            end
        else
            inst.AnimState:ClearOverrideSymbol("swap_plate")
            inst.AnimState:ClearOverrideSymbol("swap_garnish")
        end
        if IsModCookingProduct(inst.prefab, inst.components.stewer.product) then
            inst.AnimState:OverrideSymbol("swap_cooked", product, product)
        else
            local symbol_override_build = (recipe ~= nil and recipe.overridebuild) or "cook_pot_food"
            inst.AnimState:OverrideSymbol("swap_cooked", symbol_override_build, product)
        end
    end
end

 

It seems like the spices are just added as an overlay to the food by overrriding the symbol swap_garnish, so I think you only one picture of your spice and that should be enough, as it will be the same for each food. You can have a look at spices.zip to see how the developers made them.

If you have a look at inventoryimages2.tex, you can see the pictures of spices and of the spices as they are placed in front of the food (for example spice_chili_over.tex)

So you will probably need to make an anim with your spice and two inventoryimages, one of just the spice and one of the spice as it will appear with the food.

  • Like 1

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