Maris Posted June 17, 2020 Share Posted June 17, 2020 If I change icon: item:setTexture(new_icon); everything is fine but after reloading the game there is old icon. If I change weight: item:setWeight(0.5); item:setActualWeight(0.5); everything is fine but after reloading the game there is old weight. Link to comment Share on other sites More sharing options...
ProjectSky Posted June 18, 2020 Share Posted June 18, 2020 try this local function test() local item = getScriptManager():getItem("Base.Axe") item:setWeight(0.5) item:setActualWeight(0.5) item:setTexture(icon); end Events.OnPreMapLoad.Add(test) not tested it, i think it should work Maris 1 Link to comment Share on other sites More sharing options...
Maris Posted June 19, 2020 Author Share Posted June 19, 2020 Oh, thanks, but I meant changes to exact single separate item in inventory. Your code affects ALL (new) items in the world. Btw I found a way to save weight: item:setActualWeight(0.33) item:setCustomWeight(true) But I still can't save custom changed icon of vanilla item (not custom item from my mod). 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