Mr.Nathan

[HELP] Problem with item icon

Recommended Posts

Mr.Nathan    0

I added an item to the character, a weapon to be specific. The item works fine and did not cause any problems, exactly until the moment when I decided to add it as a component of another weapon. The item does not display an icon as a component, but it does have an icon in the inventory. Also, the item is not displayed as a starting item.

I'll attach some of the code from modmain.lua.

Quote

STRINGS.NAMES.SHADOWTACHI = "Shadow Tachi"
AddRecipe("shadowtachi", {Ingredient("brokentachi", 1),Ingredient("nightmarefuel", 3)}, GLOBAL.RECIPETABS.MAGIC, GLOBAL.TECH.MAGIC_THREE, nil, nil, nil, nil, "ronin", "images/inventoryimages/shadowtachi.xml", "shadowtachi.tex")

STRINGS.NAMES.BROKENTACHI = "Broken Tachi"
local recipe_brokentachi = AddRecipe("brokentachi", {Ingredient("twigs", 1),Ingredient("moonrocknugget", 1)}, GLOBAL.RECIPETABS.WAR, GLOBAL.TECH.SCIENCE_ONE, nil, nil, nil, nil, "ronin", "images/inventoryimages/brokentachi.xml", "brokentachi.tex")

 

1.jpg

2.jpg

Share this post


Link to post
Share on other sites
Mr.Nathan    0

Uh, well, I figured it out a bit.
If anyone needs a solution of the problem: here is the code that adds an icon to the start screen. 

The code is in modmain.lua

Quote

TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.RONIN = {"brokentachi"} 
    local mymodstartingitems = {
        brokentachi = {atlas = "images/inventoryimages/brokentachi.xml"},
    }
TUNING.STARTING_ITEM_IMAGE_OVERRIDE = type(TUNING.STARTING_ITEM_IMAGE_OVERRIDE) == "table" and GLOBAL.MergeMaps(TUNING.STARTING_ITEM_IMAGE_OVERRIDE, mymodstartingitems) or mymodstartingitems

Also for craft.The change is highlighted and underlined : 

Quote

STRINGS.NAMES.SHADOWTACHI = "Shadow Tachi"
AddRecipe("shadowtachi", {Ingredient("brokentachi", 1, "images/inventoryimages/brokentachi.xml"),Ingredient("nightmarefuel", 3)}, GLOBAL.RECIPETABS.MAGIC, GLOBAL.TECH.MAGIC_THREE, nil, nil, nil, nil, "ronin", "images/inventoryimages/shadowtachi.xml", "shadowtachi.tex")

STRINGS.NAMES.BROKENTACHI = "Broken Tachi"
local recipe_brokentachi = AddRecipe("brokentachi", {Ingredient("twigs", 1),Ingredient("moonrocknugget", 1)}, GLOBAL.RECIPETABS.WAR, GLOBAL.TECH.SCIENCE_ONE, nil, nil, nil, nil, "ronin", "images/inventoryimages/brokentachi.xml", "brokentachi.tex")

 

Edited by Mr.Nathan
I quickly realized what needed to be changed for the craft to work. I thought it was not a good idea to create a new replie.

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