Cities: Skylines

Cities: Skylines

Unlimited Trees Mod v1.12
DRen72  [developer] 24 May, 2018 @ 2:56pm
Some additional information about UNLIMITED TREES MOD
Q: What does the basic logging option do?

A: The option turns on some basic logging to your standard game logfile. Nothing you're likely interested in unless you are having problems, it will detail some of the basic steps and progress the mod makes as it loads or unloads a map.


Q: What does the Enable Dev Level logging option do?

A: It's mainly there for me during development, It there in case someone runs into problems and wants extenstive information about each main step\task the the mod does. If I'm working with you to debug a problem I'll probably ask you turn this on. While the first logging option covers the basics this logging option is very verbose. Addtitionally turning this on will enable additional "debug" buttons on the options screen.


Q: What does the enable custom log file option do?

A: It changes the logging information that UT spits out to go to a specific log file instead of cluttering up your normal output_log.txt file. This can be quite helpful with Dev Level logging is used. The default is TreeUnlimiter_log.txt in the root of your game installation. You can change this in the .xml config file to any location and name if you really want.


Q: If I have the mod and save a million trees and then load it without the mod enabled what will happen?

A: You'll have a ton of missing trees is the short anwser but your game will otherwise be fine, if you reload the same save and turn the mod back on and reload you'll get those extra trees back, they should still be in the save even when the mod is not enabled (they just aren't loaded by the game without the mod enabled).




Q: If I have the mod enabled and don't use more then about 262,000 trees does it still effect my save, so that I may lose trees without the mod enabled?

A: As of version 1.4 No in nearly all cases you should be fine.
More Info:
The game engine in many cases randomizes where in the array it's going to store any given created tree.. so if you just create two trees, tree A might be stored at index 200,000 tree two might get stored at 1,000,000 with the mod enabled. Unless in 'ghost mode' or in the case of some massive error we down-pack trees into the first 262,144 orginal slots. Doing this means with UT enabled if you don't use more than 262k trees all of your trees will get saved in the original CO storage slots. This also mean if you disable UT and load the same map, it will load fine. If you don't use more than 262144 trees we also don't have to store much if anything extra, which saves space in your file.


Q: What happens if I save a game with UT enabled and set to 1.5 million trees but forget and have it set to only 1.0 million trees when I go to load that map at a later date?

A: What will happen is that UT will only load the first 1 million trees that are stored, it will log that there are more trees it could load if you set the scalling higher, and it will tell you in the log what was used with the save file. At present there is notification to you in the GUI about this though. For now if you see thousands of missing trees check you log - extra logging does not have to be turned on for it to print out this warning information.



Q: Does this mod increase the system requirement needed to play the game?

A: The short anwser is kind of. If you're going to put 1,000,000 trees on your 25 title object-limited map I hope you have a decent video card and aren't playing on a system with only 4GB system RAM. It does by it's very nature take up some extra system RAM just to have it loaded, we're talking in the area of 6-7mb of RAM additional for the 768k additional array enties and and then more from there for every tree object you actually create in those extra 768k entries, you can do the math, but general I found the difference between having 250k trees placed and 1million tress placed was in the range of taking up 200-300MB more of system ram. Your save files sizes will increase depending on how many you actually add, a blank flat map with 1million trees for example adds about 7mb extra in the save.

11-18-2015: Latest version adds far less overhead to save files, ie it only stores data for # of trees actually used vs the total possible (past method), so it's much more dynamic now based on how many you actually use.



Q: What mods is this mod incompatible with?

A: I personally haven't come across a specific one yet, but there may be one or two out there that maybe detour the same functions I have too. If anyone is assuming a TreeManager m_trees array as having max 262144 entries instead of pulling that value from the game dynamically there would be a problem. I don't know of anyone doing that yet. The list of detoured functions upon enabling the mod can be found in the dll or on Github, and also in your log file if you have basic logging enabled. Also there are a 4-5 detoured functions outside of the TreeManager area, one in TreeTool, NaturalResourceManager, BuildingDecorations, CommonBuildingAI, DiasterHelpers, FireCopterAI, ForestFireAI, and optionally one in WeatherManager. Basically where ever there is CO limiting the tree count to 262144, the figure needs to be swapped out.


Q: Your mod caused a problem for me!

A: Ok, that's not a question that's a statement. :) First, probably not, please try to make sure it was actually this mod and not some other issue. But maybe it did, the author isn't perfect, and maybe you have a situation or system environment that was not considered. Let's work together to figure out what might be the cause of your problem, this might entail some investigating and posting of logs on your part if asked to do so. You might even get fustrated, but believe me nobody wants an issue the mod may actually be causing addressed quicker than the authors.


Q: What does the Wind option do?

A: The game by default will take into account the hieght of trees and adjust the amount of wind generated in a given area based on this and how many trees are around, reducing the amount of wind the more trees that exist. If you don't want the game to do that, enabling this option will make the game ignore the trees while calculating the wind.


Q: Whatdoes the Maxiumum Tree Scaling Factor slider do?

A: It sets the maximum number of trees you can have in a save starting at roughly 1 million (4 * 262144) and increasing in chunks of 262144. Valid settings are 4,5,6,7, or 8. The value can only be changed when you are at the main menu, not during a map.

The default value is 4, it IS HIGHLY RECOMMENDED that you NOT change this, however it's there for those that really want even more trees and have the system hardware to support it. Please note that going above the 4 setting could produce performance issues or strange rendering issues depending on your system hardware or video card, you have been warned. ;)

Also don't ask for more than 2.048million trees, without redoing everything from scratch it's not possible as C\O limits the amount we can store in each custom data store entry to 16.7mb.
2million @ 8 bytes per tree is about as far as we can push it a present without getting into storing all our data outside the save itself.


Q: What does Ghost Mode do??

A: Ok so... image if you will the following scenario - it's sort of rare but it's happened:

1) You use UT on a map, you throw in say 400k trees and you save your game.
2) A month goes by and for some reason you have UT disabled.
3) You load up this same map, don't notice your extra trees are gone, and you go about your business say remove 20k trees from some area, and put them somewhere else, you save your game, your happy with your map and trees how they are atm.
4) The next day you suddenly remember the UT mod!! and enable it before loading the map because you decide you know... you want more trees dam it!
5) When you load the map your appaulled because it loaded 150k extra old trees that are still stored in the map file into your perfect map! But what you really wanted was to sort of start over and not have those trees load. In fact you'd like that old data gone so you can start over including using UT for more trees....but just not 'those' trees. You could just manually remove 150k trees...lol but that sucks.

Ghost mode enables any easier way to clear out the data happen.
1) exit to main menu.
2) enable dev level logging
3) enable ghost mode
4) Load that map again... UT will be still 'active' in the background but it will act like it's not and it will ignore all the 'extra' tree data in your file. HOWEVER the data is still not gone yet....it's just not loaded.
5) bring up the UT options screen, you'll see a button "ClearAllOurSaveDataFromThisFile". Press it. This will erase the existing data, and since the trees are not loaded they will not be re-saved when you now save this file again.
6. Save the game\map.
7. Exit to main menu, turn off Ghost Mode and dev level logging.
8. Reload the map - your old extra tree data is gone and you can go about obtaining bliss by planting a million trees.


Q: What do the extra debug panel buttons and options do?

A: Ok so only one of these is really ever meant for you the use to maybe use as detailed
with "Ghost Mode" the ClearAllOurSaveDataFromFile one.
If you mouse over them the tooltip will popup and explain what they do.
They will change over time and versions and are really just used during development, however
a couple of them I've left available cause they might have some use in helping someone troubleshoot something, or they might just be there to beta test something among a few users.