Eggon Posted September 26, 2020 Share Posted September 26, 2020 Hi, is it possible to modify via a mod particular properties of standard in-game items without having to copy the whole object definition? Eg, if this is standard Stone item definiton: item Stone { Type = Normal, DisplayName = Stone, Icon = TZ_Stone, Weight = 1.5, } And I simply want to change the Weight property to 2.0, can I do it without overwriting the whole definition? Something like this: Stone.Weight = 2.0 Is it possible? How to achieve it? I haven't seen anything on this in the basic tutorials. Link to comment Share on other sites More sharing options...
ProjectSky Posted September 27, 2020 Share Posted September 27, 2020 Eggon 1 Link to comment Share on other sites More sharing options...
Eggon Posted September 27, 2020 Author Share Posted September 27, 2020 (edited) @ProjectSkythanks a lot! That worked for an item! Do you know how to access vehicles definitions in a similar way? I'm looking at the docs for the ScriptManager: https://projectzomboid.com/modding/zombie/scripting/ScriptManager.html , but there's no "getVehicle()" method and I guess vehicles are not items? the only "getVehicle()" I found on this forum related to player object and the car the player is in. I didnt find anything pn the global object either. Edited September 27, 2020 by Eggon Link to comment Share on other sites More sharing options...
ProjectSky Posted September 28, 2020 Share Posted September 28, 2020 16 hours ago, Eggon said: @ProjectSkythanks a lot! That worked for an item! Do you know how to access vehicles definitions in a similar way? I'm looking at the docs for the ScriptManager: https://projectzomboid.com/modding/zombie/scripting/ScriptManager.html , but there's no "getVehicle()" method and I guess vehicles are not items? the only "getVehicle()" I found on this forum related to player object and the car the player is in. I didnt find anything pn the global object either. Maybe VehicleScript.class, I’m not sure. 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