Cities: Skylines

Cities: Skylines

178 ratings
[DEPRECATED] Tree & Vehicle Props Patch
   
Award
Favorite
Favorited
Unfavorite
Mod
File Size
Posted
Updated
33.792 KB
10 Sep, 2020 @ 11:23pm
4 Jul, 2021 @ 2:56pm
13 Change Notes ( view )

Subscribe to download
[DEPRECATED] Tree & Vehicle Props Patch

Description
[DEPRECATED] Consider switching to Tree & Vehicle Props 2

-------------------
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

Semi-incompatible mod
Extended Managers Library:
If you are using EML, the vehicle props generated by this mod will have unwanted light effects when the game time is in the night cycle. Quistar is planning to implement similar features of this mod into EML and Prop Anarchy.

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.
62 Comments
thekingofcity 23 Dec, 2021 @ 5:09am 
Thanks for the test, I also see a load failure of this trailer in the loading screen mod. I will try 2 when it is ready for stable find it 2 :steamthumbsup:
sway  [author] 21 Dec, 2021 @ 11:27am 
This patch mod is now DEPRECATED. Consider switching to Tree & Vehicle Props 2 . As of today this patch mod still works so I will keep it on the workshop indefinitely, but it probably won't receive future updates.
sway  [author] 19 Dec, 2021 @ 1:00pm 
The name of the trailers are set by the asset creators, so nothing really can be done in this mod or Find It. A workaround is to use the custom tag feature in Find It or search by the asset's workshop ID. In the next updte Find It 2 will show an asset's workshop ID when you put the mouse on the steam icon, so it should make the search easier when you know the ID of the engine but the names of the trailers are unknown

I am able to see 658501603 in my game by searching its workshop ID

https://i.imgur.com/blDrZDl.png
thekingofcity 18 Dec, 2021 @ 7:25am 
I rescan the find it vehicle section and do find some trailers named Trailer0/1/2 Prop. They can't be simply searched by the train name. Maybe it is because of the unique name reason you pointed out? Anyway, I still can't find that particular one. :steamsad: assets id 658501603
sway  [author] 5 Dec, 2021 @ 10:46am 
@thekingofcity
Another possible case is that some asset creators choose to bundle the prop version together with the vehicle version, and this kind of props can appear in any prop category in Find It, depending on the template selected by the asset creators. The game requires every prop to have a unique name so this mod will automatically skip those vehicles for prop conversion
thekingofcity 3 Dec, 2021 @ 5:44am 
Thanks, looks like an asset problem. I could find some trailers but not that particular one.
sway  [author] 2 Dec, 2021 @ 8:09am 
Important message:

Semi-incompatible mod
Extended Managers Library:
If you are using EML, the vehicle props generated by this mod will have unwanted light effects when the game time is in the night cycle. Quistar is planning to implement similar features of this mod into EML and Prop Anarchy.
sway  [author] 29 Nov, 2021 @ 4:08pm 
@thekingofcity as far as I know it worked with vanilla train trailers and some custom trains I subscribed to. Are you able to find vanilla train trailers?
thekingofcity 29 Nov, 2021 @ 6:03am 
This mod works as per my expectation, great work! But I can't find the trailer of my train in find it. Does the mod support trailer or I should look somewhere else?
bunker13 14 Oct, 2021 @ 5:30am 
In fact, this mod you made is really my favorite mod among Cities mods and my favorite mod. because
Vehicles in Vehicle are not actually in props. But it's really nice that it props through this mod. Another thing is that I don't have to subscribe to a separate prop on the asset... it's a mod that makes my computer run smoothly. Although the loading screen mod says the prop is missing, I still like this mod. I hope you will upgrade this mod soon. This mod will probably be one of the top ranked mods in the near future. People still don't know...

*You're a really smart guy, Sway. I know what Cities users need. I like you.