Jump to content
Javong

Adding new evolvedrecipe context menu

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 ?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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",}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...