File information

Last updated

Original upload

Created by

meh321 DwemerEngineer alandtse

Uploaded by

meh321

Virus scan

Safe to use

About this mod

Stops grass from growing out of rocks, floorboards, bedrolls, crates, roads and other objects. Also allows drawing grass outside of loaded cells.

Requirements
Permissions and credits
Changelogs
Description

Stops grass from growing out of rocks, floorboards, bedrolls, crates, roads and other objects. The way it achieves this is by doing a raycast from each position where a grass would be placed, if there is something in the way there then it does not place the grass there.

Optional extended drawing distance. This will allow extending grass drawing distance almost infinitely (if your GPU can handle it).

Optional super dense grass mode.



How to configure ( super IMPORTANT !!! )

Configuration file will auto-generate the first time the game is launched with this mod. If you use MO2, the INI will be in your overwrites folder. 
Open configuration file in Data/SKSE/Plugins/GrassControl.ini

I won't list every option, you can read about them yourself in the file, but here are some important ones.

Ray-cast-enabled = trueEnable or disable raycasting. This is the thing that prevents grass from growing from inside objects.
Super-dense-grass = falseEnable or disable dense grass. It is recommended to try use MinGrassSize setting instead and install more dense grass mods. If it's still not enough then you can try enabling this.
Use-grass-cache = falseEnable or disable caching of grass. If enabled it will create files in /Data/Grass/ directory. Once grass has been generated it will instead load from this file instead of generating again every time. This can speed up load times a lot after you have already been in the cell first time. IMPORTANT: If you change anything about your mods or grass related settings you need to delete every file in that directory so that grass can be generated again, or you will not see any changes or even have bugs like floating grass (if terrain is changed) or grass in objects (if object placement is changed). If you only change drawing distance it's not required to delete cache files.
Extend-grass-distance = falseIf enabled this will allow you to extend grass drawing distance much beyond regular amounts. Grass will start to be drawn even in unloaded cells.
Overwrite-grass-distance = 6000Overwrites grass drawing distance! Set the drawing distance for grass here. Set this negative if you don't want this mod to overwrite distance setting.
Overwrite-grass-fade-range = 3000Overwrites how long the grass fades out! Set the distance here. It should usually be at least about half of Distance or the fade out of grass will be too sudden. Set this negative if you don't want this mod to overwrite fade setting.
Overwrite-min-grass-size = -1If set to a non-negative value then this mod will overwrite iMinGrassSize setting. I added this so all the grass settings can be in one place.
Global-grass-scale = 1.0 Apply this scale to every piece of grass everywhere. For example 0.5 makes all grass pieces half the size it should be.


How to precache all grass in version 3 or later

What this will do: get rid of any performance or stability issues caused by this mod. It will also get rid of grass flickering sometimes when you change cells. If you had NPCs spawning strangely in front of you with the Extended Grass Distance setting then it will get rid of that as well.

Warning before you begin: this can take a long time and generate up to several GB of files, maybe more than an hour based on your mod setup and PC. Some people with heavy load orders reported 2.5 hours generation time and 7-8 GB of files generated.

A video tutorial of this process by biggie_boss can be found here


1. In config file set the following options:

Use-grass-cache = true
Only-load-from-cache = true

2. Check the mod page and comments for the grass mod are using to see if it is compatible with generating a grass cache. If there isn't any mention, you can check by opening up the grass mod in SSEdit and clicking on the grass records, at the top there is a record called object bounds, if any are (0, 0, 0) then the mod will need to be updated. This can be done yourself in the CK.

For MO2 users:
Spoiler:  
Show
3. Make sure you have the latest version of MO2.
4. Download the optional MO2 plugin from files section and put it in your /plugins directory of MO2 install. Make sure to restart MO2 if you had it open.
5. Open MO2 and disable any mods that conflict, that are listed under compatibility. Then, click the puzzle piece icon. There should be a new option "Precache Grass". If it's not there check to make sure you installed the plugin correct.
6. Click the button and wait, if the game crashes or is closed before grass generation is finished MO2 will restart the game automatically until the whole process is finished. While the cache is generating a load screen with appear along with a message box in game saying that generation is occurring. Progress can be checked by opening the console (not recommended, might crash more) or looking at NGIO-NG.log.
7. A popup will appear with the message "Grass generation finished successfully!" when generation is completed. Once it's done your grass cache should be in the overwrite folder, make a new mod out of it and call it "Grass Cache" or whatever you want, while keeping the .cgid files in the grass folder. Make sure to check for .fail files in your grass folder as you will see blank areas in the corresponding cells. Check crash logs and regenerate with problem mods removed.
8. Any time you change anything with your load order (such as landscape edits, grass edits, object placements, even grass config changes) you will need to remake the cache by running the "Precache Grass" option again. If you change only Overwrite-grass-distance and Overwrite-grass-fade-range, then you don't have to remake cache as they only affect drawing distance. 


For other users (not MO2):
Spoiler:  
Show
3. Open your mod manager and disable any mods that conflict, that are listed under compatibility. 
4. Create a new empty text file in Skyrim root folder (same place where SkyrimSE.exe is), the file name to create is PrecacheGrass.txt
5. Start game normally, when you reach main menu it will start to pre-generate all grass. If the game crashes then start it again to resume.
6. At the end you will have all the grass in /Data/Grass folder. These files may take up to several GB!  While the cache is generating a load screen with appear along with a message box in game saying that generation is occurring. Progress can be checked by opening the console (not recommended, might crash more) or looking at NGIO-NG.log
7. A popup will appear with the message "Grass generation finished successfully!" when generation is completed. Check for .fail files in your grass folder as you will see blank areas in the corresponding cells. Check crash logs and regenerate with problem mods removed.
8. Any time you change anything with your load order (such as landscape edits, grass edits, object placements, even grass config changes) you will need to remake the cache by creating another PrecacheGrass.txt file in the main folder. If you change only Overwrite-grass-distance and Overwrite-grass-fade-range then you don't have to remake cache as they only affect drawing distance.


If you always crash in exact same cell over and over (can't continue at all) then it means something is very wrong with your mods in that cell. If you go there normally without this mod you would also always crash there. I recommend looking at crash logs to see what mod could be causing an issue for you there. You can also add that worldspace to exceptions list in this grass mod's config, but that means you won't have grass in that whole worldspace (might not matter since you would crash there always anyway).

Updating a cache
There are two ways to update a cache:
  • Updating individual cells:
    Spoiler:  
    Show
    When you have installed a new mod the affect certain cells, this might be more convenient, if you are more knowledgeable . First, delete the old files for the area, you can find the corresponding files by either opening the mod xEdit/SSedit and check what cells it edits or loading the area the area and using More informative Console and clicking on something in the direct area and hitting shit to view the cell/worldspace info, there you well cell listed as x, y. Another helpful resource for finding cells coordinates is this map. Now, find the corresponding .cgid file named WorldSpacex0001y0001.cgid, with the same x and y and delete it. Now set Updating-Cache to true or [Grass]bGenerateGrassDataFiles to true and load the cell or use the console command cow x y. 
  • Updating an entire worldspace: 
    Spoiler:  
    Show
    Either move or rename your existing grass folder and add the worldspace you wish to generate to Only-pregenerate-world-spaces, then generate the new files and copy them over to the old folder and replace the old files, then move/rename the folder back. Or delete the old files manually and set Updating-Cache to true (next update), if you have not generate this worldspace already also set Updating-Cache to true and the worldspace to Only-pregenerate-world-spaces.


Possible issues

Mod will only take effect after you move away couple of cells over (or fast travel somewhere else). Same for uninstalling.

Possible increased load time or stutter when changing cells. Precache all grass to get rid of this problem.

If you are already using mods that increase density of grass and enable super dense mode in configuration, it may become ridiculously dense.

Some grass mods add very Wide grass meshes such as clovers in the new 3D Pine Grass mod (which is excellent by the way, go check it out). That means the wide grass can still spread over to a blocked part such as floorboards when the middle placement point is not in floorboards (hopefully that explanation was not too confusing). Same way even some vanilla grass can still clip if the mesh is placed in a point that is not blocked but very close to a wall or rock or something, some edges of the plant can still clip in that case.

Sometimes you will see a bigger bush placed in a rock or on the road. That's because it's not a grass and actually placed object in CK. I can't do anything with that. You could make a esp mod that moves or deletes those.

If generating a Grass Cache finishes quicker than expected or instantly completes with a success message, then double check Only-pregenerate-world-spaces. Make sure that the worldspaces are the same line as Only-pregenerate-world-spaces. For example look at 
Skip-pregenerate-world-spaces = DLC2ApocryphaWorld;DLC01Boneyard;WindhelmPitWorldspace.

If grass generation continuously starts or completes automatically when using MO2, check if you have Root Builder installed. If you have it installed add
PrecacheGrass.txt as an exclusion in Root Builder.

When using Extend-grass-distance or NGIO's DynDOLOD-Grass-Mode 2, grass may disappear when reloading save, either from dying or manually. This is caused by an issue with how the game reloads saves, it can be fixed by using Clean Save Auto-reloader.

When using Extend-grass-distance or NGIO's DynDOLOD-Grass-Mode 2, it very strongly recommended to use Only-load-from-cache = true as otherwise the mode will not function completely properly and you will encounter issues.

If you are experiencing performance issue or in general for better performance it is recommended to use Grass FPS Booster and lower your Grass LOD density in DynDOLOD and using grass LOD mode 1 in DynDOLOD 

I recommend to check NGIO-NG.log and any crash logs at Documents/My Games/Skyrim Special Edition/SKSE/ if you are having any abnormal issues. 

If you encounter some other problems check Known issues under issues and check other users comments, if you can't find a solution let me know in the comments.

Compatibility
  • Seasonal Grass Cache for Seasons of Skyrim is not supported by this mod, for support use Grass Cache Helper NG. Make sure to disable this mod.
  • Skyrim Souls causes Grass Caching to get stuck on the main menu. Disable while caching, it can be re-enabled after the cache is generated.
  • TrueHUD and Auto Parallax causes crashing while generating the grass cache. Disable while caching, can be re-enabled after the cache is generated.
  • Skyrim at War will cause crashes while generating disable it while generating the cache, it can be re-enabled after the cache is generated.
  • BEES has been reported to be causing crashes for some and not for others, disable it and the mods the rely upon if you are experiencing crashing. 
  • Immersive Dawnguard Dayspring Pass causes crashing while generating a cache and should be disabled. 
  • EasierRider's Dungeon Pack may crash while generating a cache for the worldspaces added, add the worldspaces to Skip-pregenerate-world-spaces. The worldspaces for the mod are: ;ERDPStonehillRefugeWorld01;ERDPStonehillRefugeWorld02;ERDPWelkinspireWorld01;ERDPRimewakeGrottoWorld01;ERDPIsleofAshes;ERDPGrimrootHollowWorld01
  • The Echoes of the Vale Creation crashes while caching, add the following to Skip-pregenerate-world-spaces: ;FVECampResolveWorld01;FVEInitiatesRestWorld01
  • The Bard's College Expansion creation crashes while caching, add the following to Skip-pregenerate-world-spaces: ;kgcBardDragonLair;kgcBardDungeon01Part01;kgcBardPocketDimension;kgcBardPocketDimensionPlayer;

Requirements

Skyrim Script Extender (SKSE64)

Address Library for SKSE Plugins

Installing

Make sure the framework above is installed properly.

Install this mod with a mod manager or manually. The DLL file from this mod should go here:
Data/SKSE/Plugins/

It should be safe to install or uninstall mid-playthrough. You may have to move around a bit before this mod will start to take effect.


Uninstalling


Uninstall with your mod manager or remove the DLL file from above path. You may have to move around a bit before the grass goes back to normal.


Credits
Source Code

Fuzzles from skyrimmods discord - helped with testing
ws from skyrimmods discord - helped with testing A LOT.
AL - created MO2 plugin for precaching grass.
DoubleYou - helped with testing and finding stuttering bug.