Tree & Vehicle Props Patch

If you liked this item, please rate it up on Steam Workshop page.

Author: sway

Last revision: 4 Jul, 2021 at 21:56 UTC (1)

File size: 32.77 KB

On Steam Workshop

Description:

This mod patches Elektrix’s Tree and Vehicle Props mod(TVP) to reduce loading time and memory usage, fix the vehicle prop render distance issue, and add Find It 2 support. Elektrix has retired from modding in July 2020.

This mod won’t corrupt your save and you can unsubscribe it anytime. As long as TVP is still subscribed and enabled, the generated props won’t disappear.

What this mod does

– Change how the game and TVP handle vehicle prop illumination map to reduce loading time and memory usage

– Set the render distance of generated vehicle props to be the same value as the original vehicles, so large props like airplanes and ships won’t disappear easily when you zoom out

– Make Find It 2‘s custom & vanilla filters work with the props generated by TVP. Find It 2 will also create new prop filter tabs for generated vehicle and tree props.

– Patch the "Remove tree prop sway" issue in TVP. With this patch mod, that option in TVP will only remove sway from custom tree props. The original trees will not be affected

– Add options to skip prop conversion for vanilla vehicles and trees. You can also customize the list of trees and vehicles to convert or to skip(see below). This patch mod now has its own mod settings page

– Reduce error message logging in TVP

If you are not using the vehicle prop conversion feature in TVP, this patch mod won’t reduce any loading time or memory usage

Remember to enable it in the content manager. Find "TV Props Patch" in the mod list.

Converted vehicle props will lose their submesh

The game doesn’t allow props to have submesh. This limitation is not caused by this patch mod or the original TVP mod. Even if you don’t use this patch mod, the issue still exists. Aircraft props will lose their rotors and propellers, and cars with semi-transparent windows will look glitchy. Some asset creators will make a "building" version of their vehicle with submesh as a work-around. Use those buildings.

You can use Sineptor²o’s Propeller and Rotor prop pack to add propellers and rotors to those generated aircraft props.

TVP causing the "Duplicate Prefab Name" error

Some asset creators choose to bundle the prop version together with the vehicle/tree version, so the original TVP mod fails to create a prop with the same name and causes the "Duplicate Prefab Name" error after your game is loaded. This patch mod will automatically skip those vehicles and trees to avoid the errors.

Basic test result on my PC

About 150 workshop vehicles. Only ~10 workshop trees. 32GB RAM.

Without TVP or this mod

Custom assets loaded 3400 assets
Loading speed 236.8 assets / second
Custom assets loading time 0:14 minutes:seconds
Total loading time 2:51 minutes:seconds
Peak memory usage
RAM 17.3 GB
Virtual memory 25.5 GB

With TVP

Custom assets loaded 3401 assets
Loading speed 226.2 assets / second
Custom assets loading time 0:15 minutes:seconds
Total loading time 15:28 minutes:seconds
Peak memory usage
RAM 22.6 GB
Virtual memory 30.4 GB

With TVP and this mod

Custom assets loaded 3401 assets
Loading speed 223.8 assets / second
Custom assets loading time 0:15 minutes:seconds
Total loading time 3:19 minutes:seconds
Peak memory usage
RAM 17.6 GB
Virtual memory 25.8 GB

Read the description and get the required items, please

If you get this error, it means you sub to this mod but you are not using the original TVP mod. This mod is a patch. It won’t work without the original TVP mod.

A Mod caused an error [System.Exception]

Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> HarmonyLib.HarmonyException: Patching exception in method static System.Reflection.MethodBase TVPropPatch.LoadingExtensionPatch::TargetMethod() —> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.IO.FileNotFoundException: Could not load file or assembly ‘CS-TreeProps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.
File name: ‘CS-TreeProps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’

at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception

For troubleshooting, please share your output log files

Follow this guide to see how to share your output log files.

Source code is available on Github[github.com]

Skipping assets

In mod settings you can choose to skip all vanilla trees and/or vehicles. You can also choose what vanilla/workshop assets to skip by following the steps below:

1. Start a new game or load your saved game with the mod enabled.

2. Open the TVPropPatchConfig.xml file using any text editor. The mod will keep track of every trees and vehicles that has ever been loaded in this xml file(including assets that are deleted or no longer subscribed). If you don’t know where the xml file is, the mod settings page will show the path to the file.

3. In the xml file, you will see something like this:

<SkippedVehicleEntries>
<SkippedEntry Name="Tractor" Skipped="false" />
<SkippedEntry Name="2379603801.2012 Toyota Sienna_Data" Skipped="false" />
</SkippedVehicleEntries>

<SkippedTreeEntries>
<SkippedEntry Name="Tree2" Skipped="false" />
<SkippedEntry Name="2267982040.Murraya Bush Tiny_Data" Skipped="false" />
</SkippedTreeEntries>

You can skip an asset by changing "false" to "true". If you want to skip most assets, use the "replace all" feature in your text editor.

Notice: Do not go back to the game and toggle the "skip vanilla trees/vehicles" checkboxes after you open the xml file. Otherwise your new changes will be lost. Toggle the checkboxes before you open the xml file.

4. Save the xml file. Quit the game(exit to desktop). Next time the mod will automatically skip every asset marked as Skipped="true". Already placed props will disappear.

To reset the configuration, just delete the xml file and repeat the steps.

Download
Required items:

Click the title to search on this site.


Harmony 2.0.4-4 (Mod Dependency)Steam Workshop
Tree and Vehicle PropsSteam Workshop
Revisions:

Old revisions of this mod are available below. Click the link to download.