Project Zomboid

Project Zomboid

布拉文的冰淇淋
 此主题已被置顶,因此可能具有重要性
Braven  [开发者] 2023 年 5 月 29 日 下午 11:53
For Modders
Here's a simple to understand, but in-depth guide for how to make your Mod compatible with the Ice Cream mod. If you need any help, you can write a comment here. However I would appreciate it if you could join my Discord server[discord.com] because it'd be much better to have a conversation there.

I ask that you subscribe to this Discussion so you don't miss out on updates. This will rarely be updated, if at all, because all of this is supposed to be future proof. However, we wouldn't want your mod(s) breaking due to an update would we?

Adding more ingredients
You can add your own custom ingredients to the ice cream recipe, be it a vanilla or custom item!
To do so, write the following code inside a function:

local scriptManager = ScriptManager.instance scriptManager:getItem("Module.ItemName"):DoParam("EvolvedRecipe = PrepareIceCreamMix:ItemAmount")

By default the mod does this using a function that gets called OnGameStart. Like this:
local CreateRecipes = function () local scriptManager = ScriptManager.instance scriptManager:getItem("Base.Chocolate"):DoParam("EvolvedRecipe = PrepareIceCreamMix:1") end Events.OnGameStart.Add(CreateRecipes)
最后由 Braven 编辑于; 2023 年 5 月 30 日 上午 12:31