Jump to content

Recommended Posts

I am making a mod for a farming character. So far she comes in the constant with a gardening hat and a watering can, but when it comes to select the character, it show in the description "Comes to the constant with: Nothing in hands", i would like to know how to fix this issue to make appear the "icon" of both items.

Hey there!

Make sure you note the starting items in your character's lua file like this:

TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.WALENIA = {
    "hand_of_walenia",
    "rothat",
}

Other than that (if it's a custom item or the item doesn't want to show up and you have an inventory image for it), add these lines to your modmain.lua:

TUNING.STARTING_ITEM_IMAGE_OVERRIDE.hand_of_walenia = {atlas = "images/inventoryimages/hand_of_walenia.xml", image = "hand_of_walenia.tex" }
TUNING.STARTING_ITEM_IMAGE_OVERRIDE.rothat = {atlas = "images/inventoryimages/rothat.xml", image = "rothat.tex" }

Let me know if it still doesn't want to work or check out one of my mods' scripts (Williams, Walenia, Samurai Jack, etc.)

Cheerio!

@GoregonzolaHey, I've got the problem you mentioned. I added custom items to my mod character, but at character select screen the images are blank

TUNING.STARTING_ITEM_IMAGE_OVERRIDE.hand_of_walenia = {atlas = "images/inventoryimages/hand_of_walenia.xml", image = "hand_of_walenia.tex" }
TUNING.STARTING_ITEM_IMAGE_OVERRIDE.rothat = {atlas = "images/inventoryimages/rothat.xml", image = "rothat.tex" }

Adding these 2 lines didn't help (I made sure to put in my item names and paths), can you help me out?
 

16 minutes ago, RemirZK said:

Adding these 2 lines didn't help (I made sure to put in my item names and paths), can you help me out?
 

Try:

Quote

RegisterInventoryItemAtlas("images/inventoryimages/example.xml", "example.tex")

in your modmain and see if that works.

Edited by Chesed

@ChesedFirst of all, thanks for trying to help

40 minutes ago, Chesed said:

Try:

Quote

RegisterInventoryItemAtlas("images/inventoryimages/example.xml", "example.tex")

in your modmain and see if that works.

I tried going back and forth with it (put it in modmain.lua to character's.lua and vice versa), but it doesn't seem to work either. Here's my code (I can send the whole modmain.lua and character's.lua if that'll make it easier to find out what's wrong)

TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.WILTONMOD = {
    "boneshard",
    "bonepaste",
    "completelyregularattack",
}
 
RegisterInventoryItemAtlas("images/inventoryimages/bonepaste.xml", "images/inventoryimages/bonepaste.tex")
RegisterInventoryItemAtlas("images/inventoryimages/completelyregularattack.xml", "images/inventoryimages/completelyregularattack.tex")
 
TUNING.STARTING_ITEM_IMAGE_OVERRIDE.bonepaste = {atlas = "images/inventoryimages/bonepaste.xml", image = "images/inventoryimages/bonepaste.xml" }
TUNING.STARTING_ITEM_IMAGE_OVERRIDE.completelyregularattack = {atlas = "images/inventoryimages/completelyregularattack.xml", image = "images/inventoryimages/completelyregularattack.tex" }
 

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...