DMFan79 Posted May 18, 2023 Share Posted May 18, 2023 Hi, I'm trying to override the percentage repaired by gears when used on the propeller in SW. I used another mod as a proxy to test the command: TUNING.REPAIR_GEARS_WORK = 15 Once in game, nothing changes when I try to repair the engine. The amount is the same as before. So I tried another route: inst.components.repairer.workrepairvalue = 15 But then I get an error, because the object "inst" hasn't been instanced yet. Maybe the repair value is set only when the item drops... Any idea? Link to comment https://forums.kleientertainment.com/forums/topic/147852-override-items-repair-value/ Share on other sites More sharing options...
ClumsyPenny Posted May 18, 2023 Share Posted May 18, 2023 The "repairer" component is typically used for repairing things like walls, in the case of Gears I believe it's used to repair Broken Clockworks, so that's not what you're looking for. The Iron Wind uses the "fueled" component for its durability, so an item that can be used to restore that kind of durability uses the "fuel" component, which Gears have. 4 hours ago, DMFan79 said: But then I get an error, because the object "inst" hasn't been instanced yet. You had the right idea, but you have to access "inst" somehow. Thankfully, AddPrefabPostInit exists for this kind of thing. Here's what you could do: AddPrefabPostInit("gears", function(inst) inst.components.fuel.fuelvalue = -- Put your value here end) By default the fuel value of Gears is TUNING.TOTAL_DAY_TIME, which should be 480 seconds, if I remember correctly. You can use a TUNING value if you want, or simply put a number, it's up to you! 1 Link to comment https://forums.kleientertainment.com/forums/topic/147852-override-items-repair-value/#findComment-1635639 Share on other sites More sharing options...
DMFan79 Posted May 18, 2023 Author Share Posted May 18, 2023 Well... what can I say? It works like a charm... My kudos to you. Thanks a lot. 1 Link to comment https://forums.kleientertainment.com/forums/topic/147852-override-items-repair-value/#findComment-1635644 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