Jump to content

[Solved] Simple way for recipe berries/juicy berries?!


Recommended Posts

Hi,

I have a simple task, that might be not as simple as it should be..

I want to change a mod that way, that in a recipe of an item we can use berries OR juicy berries (because there are worlds in which only one exists).
Perfect would be 3 berries or 7 juicy berries.

But it seems there is no standard way of doing so.. (same for the berrybush-hat which is not buildable with juicy-berrybush -.-)
So I thought I can just add a new recipe for the same thing. But does this work? It seems not..?
So I created a new thing called "thing2" (instead of "thing"). I also copied all the .tex and .xml files and renamend them to thing2.
But the problem is, that within the anim.zip the name "thing" is used, instead of "thing2", and I have absolutely no clue, how to edit those .bin files.

I already searched for anim modding, but it seems I need a scml file to change that? But I don't have scml fle of this thing, I only have the anim.zip...

So lord, please tell me there is an easier way for doing this simple task?!?!?!
 

Edited by Serpens
Link to comment
Share on other sites

thanks, I downloaded the rename tool and started the exe.

What to put as input and what as output file? I tried the anim.zip file as input, but just after that I got an error message:
"The first 4 bytes do not match "BILD".

Link to comment
Share on other sites

Make more recipes.

Two ways here:

1) Make new prefabs where the constructor function returns an already existing prefab. Give recipes to new prefabs.

I did it in: http://forums.kleientertainment.com/topic/54230-helpcould-i-make-some-different-items-to-create-the-a-same-new-item/

2) Just make new recipes.

When you make a recipe, the product is the same as its id. But you can change it.

Example:


-- Original
-- Recipe("strawhat", {Ingredient("cutgrass", 12)}, RECIPETABS.DRESS,  TECH.NONE)

local AllRecipes = GLOBAL.AllRecipes
local Ingredient = GLOBAL.Ingredient
local RECIPETABS = GLOBAL.RECIPETABS
local STRINGS = GLOBAL.STRINGS
local TECH = GLOBAL.TECH

local sortkey = AllRecipes["strawhat"].sortkey

local rec1 = AddRecipe("strawhat2", {Ingredient("berries", 3)}, RECIPETABS.DRESS, TECH.NONE)
rec1.product = "strawhat"
rec1.image = "strawhat.tex"
rec1.sortkey = sortkey + 0.05
STRINGS.NAMES.STRAWHAT2 = "Straw Hat 2"
STRINGS.RECIPE_DESC.STRAWHAT2 = "Second."

local rec2 = AddRecipe("strawhat3", {Ingredient("berries_juicy", 7)}, RECIPETABS.DRESS, TECH.NONE)
rec2.product = "strawhat"
rec2.image = "strawhat.tex"
rec2.sortkey = sortkey + 0.10
STRINGS.NAMES.STRAWHAT3 = "Straw Hat 3"
STRINGS.RECIPE_DESC.STRAWHAT3 = "Third."

 

Link to comment
Share on other sites

thank you very much :)

I tried both, but both times the invenotry image does not work.
I guess it is because it is a mod item, not a game item.
So I don't want to add a second and a third alternative, but a first and a second.
How to solve this?

Link to comment
Share on other sites

38 minutes ago, Serpens said:

I tried both, but both times the invenotry image does not work.
I guess it is because it is a mod item, not a game item.
So I don't want to add a second and a third alternative, but a first and a second.
How to solve this?

Specify the atlas to use.

local resolvefilepath = GLOBAL.resolvefilepath

rec1.atlas = resolvefilepath("images/inventoryitems/myitem.xml")

 

Link to comment
Share on other sites

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
 Share

×
  • Create New...