Jump to content

Adding new evolvedrecipe context menu


Javong

Recommended Posts

Hi i have the following problem.

 

When i create a new evolvedrecipe named NewRecipe the ingame context menu is showing:

"Create ContextMenu_EvolvedRecipe_NewRecipe"

instead of:

"Create NewRecipe"

The solution i found is to add "ContextMenu_EvolvedRecipe_NewRecipe = "NewRecipeName" to "gamefolder\media\lua\shared\Translate\EN\ContextMenu_EN.txt".

 

Is there an easy way to make this work, so it can be used by a mod without adding the line to original game file ?

Link to comment
Share on other sites

You should be able to make a .txt file in "yourmod\media\lua\shared\Translate\EN\" with just that line, save and change the extension from .txt to .lua.

 

Unfortunately this won't work :(

I created: "evorecipetest\media\lua\shared\Translate\EN\mod_evorecipetest_EN.lua"

Content: ContextMenu_EvolvedRecipe_NewRecipe = "New Recipe"

 

Context menu is still "Create ContextMenu_EvolvedRecipe_NewRecipe" instead of "New Recipe"

 

I attached an "evorecipetest" mod, install it and...

* Right click spoon or fork -> click "Provide Test Items"

* Right click Bowl -> Context menu : "Create ContextMenu_EvolvedRecipe_NewRecipe"

evorecipetest.zip

Link to comment
Share on other sites

Hrm, well I gave it a shot and couldn't get it to work...

 

Sorry about the bad information earlier, I didn't realize that the context menu files were .txt and not .lua. I changed it back to a .txt, but still no luck. Here's what I tried:

 

mod_evorecipetest_EN.txt

ContextMenu_EN = {	ContextMenu_EvolvedRecipe_NewRecipe = "New Recipe",}

There doesn't seem to be a way that I can find to edit the contents of the Translate folder within the mod structure. There may be a way you can do it with lua, but I'm horrible with that so I really don't know. The only workable solution I know of is by editing the ContextMenu_EN.txt directly like you've already found, as undesirable as it is for a mod to edit the actual game files.

Link to comment
Share on other sites

Sweet! Looks like the way to do this is to add a new file to:

 

"evorecipetest\media\lua\shared\Translate\EN\ContextMenu_EN.txt"

 

(note: the file has to be named ContextMenu_EN.txt for it to work)

 

With contents:

ContextMenu_EN = {	ContextMenu_EvolvedRecipe_NewRecipe = "New Recipe",}
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
×
×
  • Create New...