In the UE4SS Error console I get a red line: [Lua::execute_file] lua_pcall returned LUA_ERRRUN => cannot open [.] main.lua [presets]: No such file or directory
To debug, I printed out the value of "file" in the for loop. It's value was "[.] main.lua [presets]"
I took a look into main.lua: local fileList = utils.getFileList(currentModDirectory .. "\\Scripts\\methods\\", "main.lua")
I took a look at the code for utils.getFileList: local handle = io.popen(string.format('dir "%s" /B /D /S', directory))
That doesn't correctly get a list of files in a directory. Please correct.
If I may offer some suggestions: either enumerate over a directory using a different method that works, or hard-code a list of files to call in main.lua, or have main.lua call a file whose entire contents is a simple list of other lua files to call.
A quick - but not comprehensive - method to fix it would be to change the line to: local handle = io.popen(string.format('dir "%s" /b/s', directory)) This method will only work for [redacted] such as [redacted], but that should [redacted] in most cases.
Thank you. :D
Edit: After using the mod for a while... this is a great mod! It adds so many features missing from the base game. Thank you so much.
I think the mod description could use a bit more information, as it appears to require some setup.
in UE4SS's mods folder, in addition to all the mods there by default, there are two loose files: mods.txt and mods.json
both of these files need to have lines added to them in order for this mod to function (from my experience). Just grabbing UE4SS and this mod and shoving it into the mods folder doesn't actually make it work.
mods.txt needs a new line above the keybinds added as TerrainToolMod : 1
mods.json needs several new lines and a comma after the previous entry { "mod_name": "Keybinds" "mod_enabled": true }, { "mod_name": "TerrainToolMod" "mod_enabled": true }
not everyone coming here has used UE4SS before, and the documentation on installing it doesn't mention modifying these files to implement other mods. Maybe it's supposed to update those files on its own, but that doesn't seem to be the case with the experimental version you mention needing to use when I attempted to use this mod with it.
There is an enabled.txt file in the mod folder. So the mod should work without modifying the mods.txt file. I think there is an incompatibility with another mod. I will check it out.
Alternatively, place an empty text file named enabled.txt inside of the MyAwesomeMod folder. This method is not recommended because it does not allow load ordering and bypasses mods.txt, but may allow for easier installation by end users.
Your mod is lua, right? is the enabled.txt file specific to the C++ api mods? I don't see a page in the documentation (now that I'm looking through it more) on installing lua mods, just the "Installing C++ Mods" section. So I'm not sure if there's a difference there for that.
great job man! do you know if i can modify somehow the width of the tool? do the entire planet flat take a lot of time:D and thanks again for the mod:)
You can do this with the shortcuts CONTROL+MIDDLE_MOUSE_BUTTON and SHIFT+MIDDLE_MOUSE_BUTTON.
Look for this in the options.lua file if you want to change the values: -- Brush scale/size -- Default size (without augment) is 350. -- 120 is the minimum size in Creative mode. -- 700 is the maximum size in Creative mode. -- 550 seems to be the size with the Wide mod augment. -- Note: these modifications do NOT work in Creative mode. BaseBrushDeformationScale_min = 120, -- default: 120 BaseBrushDeformationScale_max = 550, -- default: 550 BaseBrushDeformationScale_step = 50, -- default: 100 decrease_BaseBrushDeformationScale_text = "Decrease brush (min: 50, step: 50)", decrease_BaseBrushDeformationScale_Key = Key.MIDDLE_MOUSE_BUTTON, decrease_BaseBrushDeformationScale_ModifierKeys = { ModifierKey.CONTROL }, increase_BaseBrushDeformationScale_text = "Increase brush (max: 550, step: 50)", increase_BaseBrushDeformationScale_Key = Key.MIDDLE_MOUSE_BUTTON, increase_BaseBrushDeformationScale_ModifierKeys = { ModifierKey.SHIFT },
m8 i tried really first or write here:D if i change the value of the brush size the mod loader crash and deactivate itselfe as long as i dont reset base values.. so idk.. i can retry.ty for the reply tho
ok apparently the crush was casuality so it work but i cant set any command in the consol idk why... i need to set the attitude because i have already flattened half planet:D and with wider brush the attitude is 100 higher and its not on level:D i set it on 3050 for faster results... with modified brush tangent doesnt apply so it make ramps like vanilla:D (force attitude dont work)btw the mod work properly without modify configs so good enough:D
If you need it, I added an experimental mod (TerrainTangenToPlanet) to easily create a large terrain tangent to the planet.
EDIT: this feature is included in the main mod (from version 0.3.2). Press F9 to create a terrain tangent to the planet's curvature. (Make a save before use it!)
thanks for the reply again m8:D i have menaged that by locking the attitude that finally work at -100 compared at what i want with a 3000 wide brush... it dont have perfect polished shape but at least taking down mountains its pretty fast;) the mod is great m8 good job:)
Argh! I've been hoping the previous terrain tool mod that stopped working a while ago now would be resurrected by someone who knew what they were doing! This looks exactly what I've been looking for the last year or two now. Sadly, I'm unable to get it to work and I don't know why. There seems to be a number of other mods it's picking up in the ue4ss/Mods folder (along with the TerrainToolMod I copied to that folder) but I don't know if they should be there or not. Any help would be MUCH appreciated!
UE4SS comes with a some mods (in the ue4ss/Mods folder). And, yes, they must be there. If something doesn't work, you can check the log file (ue4ss/UE4SS.log). In the log file, you should see a line similar to: [2025-03-25 18:56:44.0213789] Starting Lua mod 'TerrainToolMod'
Hey! Awesome mod! Love that you took the effort to add a GUI! Is it possible to do something like this for the Rovers' Drill and Terrain tools? Like I want to make some roads on my planet or just go soil farming and have to fight the Rover's elevation angle thingy all the time and I end up with a roller coaster of a "road". Would love an option to just lock in on the level with horizon(tangent to planet) marker on the elevation angle HUD.
I've already tried to modify the drill behavior (on a rover), but without success. But you can possibly use the "auto" method of the mod with the "route 1" preset.
Your mod has been an absolute game changer. I can finally do all the fun stuff I wanna do without constant having to fight with uneven terrain. Doin gods work out there
Great mod! Vanilla terraforming in Astroneer is kinda really janky sometimes lol I do have a question/request tho.
Would it be possible to add a 'smoothen' function? I don't just mean flatten, like I've seen people mistake on reddit threads.
Take for example, a ramp. If I want to make the entry of the ramp gradate with the flat road I'm entering from, it sucks. Bulge here, flatten there, more bulge, more flatten, bulge, flatten, bulge, flatten. Its a miserable experience. I would love to be able to, with one tool, soften out any of those nasty sharp edges that show up when two large flat faces meet.
Around my base is another good example. I cleaned up the organic from around my starting shelter, and want to smoothen the land back off. Flatten tool and alignment mods do flatten it, to a point. But multiple flat zones colliding = really stupid looking terrain. A tool to pull down the peaks while pulling up the valleys would fix 98% of the problems i have with current Astroneer terraforming.
Thank you if you read this, hope for some feedback!
I added (in version 0.3.0) a "smoothen" method/function. It should work in most case, but it's still experimental. Note: the method works with the Terrain Tool's "Flatten mode".
So now for my question, I might be dumb but I hold right control for flatten tool, pressing F2, F3, Shift-F2 does nothing whether I'm holding the right control or not. I have the beginning canister and I can otherwise flatten terrain but it's tangent to the world vanilla.
Update: I press F after activating the terrain tool and the F2 key will force the leveling tool correctly. f3 will put it back in tangent to the slope it's on again. So yes, it works as intended.
Update 2: It is definately not working sometimes. It's not working right now at least.
Update 3: It worked again after restart, it also might be that I have to hold F2 for a second.
Does the Terrain Flatten not work on other planets? I can't seem to get it to work on other planets beside Sylva. Terrain Restoration works fine everywhere. Supper helpful mod otherwise.
25 comments
In the UE4SS Error console I get a red line:
[Lua::execute_file] lua_pcall returned LUA_ERRRUN => cannot open [.] main.lua [presets]: No such file or directory
To debug, I printed out the value of "file" in the for loop. It's value was "[.] main.lua [presets]"
I took a look into main.lua:
local fileList = utils.getFileList(currentModDirectory .. "\\Scripts\\methods\\", "main.lua")
I took a look at the code for utils.getFileList:
local handle = io.popen(string.format('dir "%s" /B /D /S', directory))
That doesn't correctly get a list of files in a directory. Please correct.
If I may offer some suggestions: either enumerate over a directory using a different method that works, or hard-code a list of files to call in main.lua, or have main.lua call a file whose entire contents is a simple list of other lua files to call.
A quick - but not comprehensive - method to fix it would be to change the line to:
local handle = io.popen(string.format('dir "%s" /b/s', directory))
This method will only work for [redacted] such as [redacted], but that should [redacted] in most cases.Thank you. :D
Edit:
After using the mod for a while... this is a great mod! It adds so many features missing from the base game. Thank you so much.
I think the mod description could use a bit more information, as it appears to require some setup.
in UE4SS's mods folder, in addition to all the mods there by default, there are two loose files: mods.txt and mods.json
both of these files need to have lines added to them in order for this mod to function (from my experience). Just grabbing UE4SS and this mod and shoving it into the mods folder doesn't actually make it work.
mods.txt needs a new line above the keybinds added as
TerrainToolMod : 1
mods.json needs several new lines and a comma after the previous entry
{
"mod_name": "Keybinds"
"mod_enabled": true
},
{
"mod_name": "TerrainToolMod"
"mod_enabled": true
}
not everyone coming here has used UE4SS before, and the documentation on installing it doesn't mention modifying these files to implement other mods. Maybe it's supposed to update those files on its own, but that doesn't seem to be the case with the experimental version you mention needing to use when I attempted to use this mod with it.
I think there is an incompatibility with another mod. I will check it out.
Look for this in the options.lua file if you want to change the values:
-- Brush scale/size
-- Default size (without augment) is 350.
-- 120 is the minimum size in Creative mode.
-- 700 is the maximum size in Creative mode.
-- 550 seems to be the size with the Wide mod augment.
-- Note: these modifications do NOT work in Creative mode.
BaseBrushDeformationScale_min = 120, -- default: 120
BaseBrushDeformationScale_max = 550, -- default: 550
BaseBrushDeformationScale_step = 50, -- default: 100
decrease_BaseBrushDeformationScale_text = "Decrease brush (min: 50, step: 50)",
decrease_BaseBrushDeformationScale_Key = Key.MIDDLE_MOUSE_BUTTON,
decrease_BaseBrushDeformationScale_ModifierKeys = { ModifierKey.CONTROL },
increase_BaseBrushDeformationScale_text = "Increase brush (max: 550, step: 50)",
increase_BaseBrushDeformationScale_Key = Key.MIDDLE_MOUSE_BUTTON,
increase_BaseBrushDeformationScale_ModifierKeys = { ModifierKey.SHIFT },
EDIT: this feature is included in the main mod (from version 0.3.2). Press F9 to create a terrain tangent to the planet's curvature. (Make a save before use it!)
Any help would be MUCH appreciated!
If something doesn't work, you can check the log file (ue4ss/UE4SS.log).
In the log file, you should see a line similar to:
[2025-03-25 18:56:44.0213789] Starting Lua mod 'TerrainToolMod'
Would it be possible to add a 'smoothen' function? I don't just mean flatten, like I've seen people mistake on reddit threads.
Take for example, a ramp. If I want to make the entry of the ramp gradate with the flat road I'm entering from, it sucks. Bulge here, flatten there, more bulge, more flatten, bulge, flatten, bulge, flatten. Its a miserable experience. I would love to be able to, with one tool, soften out any of those nasty sharp edges that show up when two large flat faces meet.
Around my base is another good example. I cleaned up the organic from around my starting shelter, and want to smoothen the land back off. Flatten tool and alignment mods do flatten it, to a point. But multiple flat zones colliding = really stupid looking terrain. A tool to pull down the peaks while pulling up the valleys would fix 98% of the problems i have with current Astroneer terraforming.
Thank you if you read this, hope for some feedback!
Note: the method works with the Terrain Tool's "Flatten mode".
<click>
gethub "file not found"
https://github.com/UE4SS-RE/RE-UE4SS/releases/tag/experimental-latest
this works though
So now for my question, I might be dumb but I hold right control for flatten tool, pressing F2, F3, Shift-F2 does nothing whether I'm holding the right control or not. I have the beginning canister and I can otherwise flatten terrain but it's tangent to the world vanilla.
Update: I press F after activating the terrain tool and the F2 key will force the leveling tool correctly. f3 will put it back in tangent to the slope it's on again. So yes, it works as intended.
Update 2: It is definately not working sometimes. It's not working right now at least.
Update 3: It worked again after restart, it also might be that I have to hold F2 for a second.