Sign in to follow this  
Eumon

Custom Recipe? For my character.

Recommended Posts

Eumon    0

Hi I'm kinda new to this modding thing and I have a problem. Maybe I'm overthinking it but I can't seem to figure out on how to make a custom recipe.

I want this recipe to be a character specific one so only that character is allowed to craft it.

So basically I want my character to craft her own tall bird eggs. (don't ask me why lol)

Am I missing something super obvious and simple? (probably...) Because I have been trying for hours. ehehe QQ

Any help is well appreciated. 

Share this post


Link to post
Share on other sites
Aquaterion    821
AddRecipe("tallbirdegg", { Ingredient("egg", 1), Ingredient("cutgrass", 1) }, RECIPETABS.FARM, TECH.SCIENCE_ONE,nil,nil,nil,nil,"specifictag" )

you can replace the ingredient items and amount by how many you want.

change "specifictag" to a tag that only your character, for example if your character has this;

inst:AddTag("eumon")

then you can change "specifictag" to "eumon"

Share this post


Link to post
Share on other sites
Eumon    0

Yep they are in there. Is there a specific place where I have to put it? And what do I do with inst:AddTag("eumon") ?

Share this post


Link to post
Share on other sites
Aquaterion    821
7 minutes ago, Eumon said:

Yep they are in there. Is there a specific place where I have to put it? And what do I do with inst:AddTag("eumon") ?

that was just an example, on the character you want to craft it, add a tag that only they would have, to uniquely identify them. (by doing inst:AddTag("tag") in the common_postinit function)

Then in the recipe, change the text "specifictag" at the end, to the tag you chose, which makes it so only characters with that tag can craft it.

Edited by Aquaterion

Share this post


Link to post
Share on other sites
Eumon    0

 

30 minutes ago, Aquaterion said:

that was just an example, on the character you want to craft it, add a tag that only he/she would have, to uniquely identify it.

Then in the recipe, change the text "specifictag" at the end, to the tag you chose, which makes it so only characters with that tag can craft it.

Yes I added the tag and changed the text but it's still not showing up. Do I have to make a lua file for it? 

Share this post


Link to post
Share on other sites
Aquaterion    821
Just now, Eumon said:

 

Yes I added the tag and changed the text but it's still not showing up. Do I have to make a lua file for it? 

the recipe goes in modmain.lua

Share this post


Link to post
Share on other sites
Eumon    0
11 minutes ago, Aquaterion said:

the recipe goes in modmain.lua

Gah it's in there. I don't know what else to do...

Share this post


Link to post
Share on other sites
Eumon    0

Here you can have the whole thing if you don't mind. Click

Edited by Eumon
removing link

Share this post


Link to post
Share on other sites
Aquaterion    821

what is this for?

local fn = function() 
--[...]
inst:AddTag("yosh")
AddRecipe("tallbirdegg", { Ingredient("egg", 1), Ingredient("cutgrass", 1) }, RECIPETABS.DRESS, TECH.SCIENCE_ONE,nil,nil,nil,nil,"yosh" )
--[...]
end

also, the

inst:AddTag("yosh")

should go in yosh.lua un the common_postinit function

Edited by Aquaterion

Share this post


Link to post
Share on other sites
Eumon    0
4 minutes ago, Aquaterion said:

what is this for?


local fn = function() 
--[...]
inst:AddTag("yosh")
AddRecipe("tallbirdegg", { Ingredient("egg", 1), Ingredient("cutgrass", 1) }, RECIPETABS.DRESS, TECH.SCIENCE_ONE,nil,nil,nil,nil,"yosh" )
--[...]
end

also, the

inst:AddTag("yosh")

should go in yosh.lua un the common_postinit function

eheheh I don't really want to talk about it. derp

But yes thank you so much it is working now! You da best sir/madam!

Share this post


Link to post
Share on other sites
red1500z    0

 

hello, I have a problem how can I make my friend use the original recipe of the object and I mine (because if I die my friends can't crawl telltales hearts (i using google translator)

Share this post


Link to post
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
Sign in to follow this