amazingGob Posted September 25, 2025 Share Posted September 25, 2025 I want to add a perk for my character where they can water the farm soil just by standing on it, i'm not sure where to start Link to comment https://forums.kleientertainment.com/forums/topic/168176-how-to-water-farm-by-walking-on-it/ Share on other sites More sharing options...
FerniFrenito Posted September 26, 2025 Share Posted September 26, 2025 3 hours ago, amazingGob said: I want to add a perk for my character where they can water the farm soil just by standing on it, i'm not sure where to start -- modmain.lua GLOBAL.AddWater = function() local vec = GLOBAL.ThePlayer:GetPosition() local moisture_value = 50 GLOBAL.TheWorld.components.farming_manager:AddSoilMoistureAtPoint(vec.x, vec.y, vec.z, moisture_value) end I had a hard time finding it. That code makes the land you're standing on water once. You don't need to set it to GLOBAL, but you can test it by calling AddWater() in the console. 1 Link to comment https://forums.kleientertainment.com/forums/topic/168176-how-to-water-farm-by-walking-on-it/#findComment-1837326 Share on other sites More sharing options...
amazingGob Posted September 27, 2025 Author Share Posted September 27, 2025 On 9/26/2025 at 4:14 AM, FerniFrenito said: -- modmain.lua GLOBAL.AddWater = function() local vec = GLOBAL.ThePlayer:GetPosition() local moisture_value = 50 GLOBAL.TheWorld.components.farming_manager:AddSoilMoistureAtPoint(vec.x, vec.y, vec.z, moisture_value) end I had a hard time finding it. That code makes the land you're standing on water once. You don't need to set it to GLOBAL, but you can test it by calling AddWater() in the console. thank you! it works perfectly !! 1 Link to comment https://forums.kleientertainment.com/forums/topic/168176-how-to-water-farm-by-walking-on-it/#findComment-1837423 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