Mr.Nathan Posted February 3, 2021 Share Posted February 3, 2021 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") Link to comment Share on other sites More sharing options...
Mr.Nathan Posted February 4, 2021 Author Share Posted February 4, 2021 (edited) 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 February 4, 2021 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now