projectmayhem Posted June 7, 2023 Share Posted June 7, 2023 Doing a little customizing to tweak the game more towards my preferences and one of the first steps I want to do is cause flint to be mined from rocks and use the flint to make arrow heads, which then are used to make arrows. I've got all the coding in, but the flint has a white box with a "?" in it for the icon, but the arrow head icon shows up just fine. I'm probably missing something simple, but I've stared at it long enough that I decided to reach out for help. Here is the main append in the items.xml to add both items. I copy/pasted Oil Shales item and changed the material to Mstone for both. Once in game, the Arrow Head icon shows fine, but the Flint doesnt. I saw in another mod they were using the CustomIcon tag, so I tried that as well and still no dice. I've got both icons in the \UIAtlases\ItemIconAtlas path. First one is named resourceArrowhead_icon.png and the second one is named resourceFlint_icon.png Can anyone spot what is causing the flint not to load? I've watched the console while loading and it doesnt give any errors. Both files are 360x360. Arrow Head is 90 kbs and Flint is 20 kbs. If there is more info you need that I am missing just let me know, I am going to continue staring at it. <append xpath="/items"> <item name="resourceFlint"> <property name="HoldType" value="45"/> <property name="CustomIcon" value="resourceFlint_icon"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="Material" value="Mstone"/> <property name="Stacknumber" value="6000"/> <property name="EconomicValue" value="10"/> <property name="EconomicBundleSize" value="10"/> <property name="Group" value="Resources"/> </item> <item name="resourceArrowhead"> <property name="HoldType" value="45"/> <property name="CustomIcon" value="resourceArrowhead_icon"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="Material" value="Mstone"/> <property name="Stacknumber" value="6000"/> <property name="EconomicValue" value="10"/> <property name="EconomicBundleSize" value="10"/> <property name="Group" value="Resources"/> </item> </append> Link to comment Share on other sites More sharing options...
projectmayhem Posted June 7, 2023 Author Share Posted June 7, 2023 (edited) I figured out a solution, but not the reason behind the problem. I re-named my flint icon, then copy/pasted the arrow head icon. Copied the image from the renamed flint to the copied arrow head. Renamed the copied arrow head to resourceFlint_icon.png and it works fine. the file size for the flint did jump from 20 kb to 140 kb , so I'm assuming it's something to do with the image file not really being a png even though the file extension was png. Edited June 7, 2023 by projectmayhem (see edit history) Link to comment Share on other sites More sharing options...
Cranberry Monster Posted June 7, 2023 Share Posted June 7, 2023 My number one screw-up with icons has always been failure to note what I typed in upper or lower case in the icon names. This is case sensitive in 7d2d, and if it doesn't match exactly, you don't get the icon. My number two screw-up would probably be failing to set the custom icon and getting a different icon because the item in question extended something that did have an icon set. If I recall correctly, if your icon name matches your item exactly, it should use that icon by default (in your case, you'd delete the "_icon" part of the filename). I don't really do it, but it's the way things work in the vanilla game. 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