Project Zomboid

Project Zomboid

PZ Icons FIX
dtoxic 23 Oct, 2022 @ 2:09pm
Suggestion
You should try and use script manager to change icons,overwriting base files can usually lead to some weird mod conflicts (not saying there are any,just for us folks that use a lot of mods)

Create a *.Lua file inside Media\lua\shared (or client)

and then add the lines for changing the icons of all the things you need

function Adjust(Name, Property, Value)
Item = ScriptManager.instance:getItem(Name)
Item:DoParam(Property.." = "..Value)
end

Adjust("Base.BreadKnife","Icon","BreadKnife")


This way no conflicts will occur if some other mod messes with say Bread Knife item (durability for example)

anyways great little mod!
Last edited by dtoxic; 23 Oct, 2022 @ 2:10pm
< >
Showing 1-4 of 4 comments
Gustavo Pava  [developer] 29 Oct, 2022 @ 9:29am 
Hey friend!
Thank you so much for your help, it so kind of you. I'm pretty new at modding so every help is welcome!
I'll save this code and update my mods as soon as possible.
Again, thank you so much and I wish you all the best. :cozybethesda:
dtoxic 29 Oct, 2022 @ 9:43am 
No problem,if you need any help just drop me a msg.
Agitatio 2 Dec, 2022 @ 2:40pm 
Certainly do that next update. I was going to suggest using Item Tweaker API, but this method achieves the same result without extra requirements.

@dtoxic, what are the limitations of such approach compared to doing that through Item Tweaker API? Also, does this method still abide to load order? Or is it a hard override?
dtoxic 2 Dec, 2022 @ 3:00pm 
Both Methods as far as i know override everything that let's say you change trough *.txt (you change icon in txt trough importing module base,and have this script that changes the same icon for the same item,Script takes priority) so load order is not important at least when using my approach,i cant give you much info on Tweaker API since i never used it,but from what i have seen in other mods Tweaker adds a bit more control to certain things (you will have to read api documentation if it exists but again i don't know much about it
< >
Showing 1-4 of 4 comments
Per page: 1530 50