quistar-lab / treeanarchy Goto Github PK
View Code? Open in Web Editor NEWTree Anarchy. This is a rewrite of the original Unlimited Trees mod in order for tree snapping to function
License: MIT License
Tree Anarchy. This is a rewrite of the original Unlimited Trees mod in order for tree snapping to function
License: MIT License
Tree ruining calls two mathf method... If ruining is removed.. should improve fps..
Though I'm not sure if to keep this as an option or to permanently remove it.
It seems certain trees in mountainous areas are still positioned below the terrain.
Here is the error repor
error.log
output_log.txt
t
These options specifically:
The main Tree Anarchy
option is about being able to place trees anywhere, then immediately below there's options for hiding/deleting trees... which is the opposite of the purpose of tree anarchy?
Would these options be better expressed as a drop-down, something like:
Trees under buildings/networks should: [drop down menu]
And the menu items would be:
I'm assuming here that user want's consistent effect if they are using anarchy - eg. they want same thing for all trees.
If user has Real Time mod activated, would it be possible to make burnt trees grow back slower?
Currently they grow back the same "day" but would be nice touch if they could (optionally) be made to grow back slower (eg. 2-3 days)...
Note: This only started happening after update on 5th Dec 2021.
When the mod is loaded it's throwning an exception which is breifly visible on the main menu screen but then disappears as soon as city loading screen appears.
ArgumentException: Label not marked
at System.Reflection.Emit.ILGenerator.label_fixup () [0x00000] in <filename unknown>:0
at System.Reflection.Emit.DynamicMethod.CreateDynMethod () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at MonoMod.RuntimeDetour.Platforms.DetourRuntimeMonoPlatform.GetMethodHandle (System.Reflection.MethodBase method) [0x00000] in <filename unknown>:0
at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.Pin (System.Reflection.MethodBase method) [0x00000] in <filename unknown>:0
at MonoMod.RuntimeDetour.DetourHelper.Pin[MethodInfo] (System.Reflection.MethodInfo method) [0x00000] in <filename unknown>:0
at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2& finalInstructions) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchProcessor.Patch () [0x00000] in <filename unknown>:0
at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00000] in <filename unknown>:0
at TreeAnarchy.TAPatcher.EnableTreeInstancePatch (HarmonyLib.Harmony harmony) [0x00000] in <filename unknown>:0
at TreeAnarchy.TAPatcher.EnableCore () [0x00000] in <filename unknown>:0
at CitiesHarmony.API.HarmonyHelper.DoOnHarmonyReady (System.Action action) [0x00000] in <filename unknown>:0
at TreeAnarchy.TAMod.OnEnabled () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at ColossalFramework.Plugins.PluginManager.AddPlugins (System.Collections.Generic.Dictionary`2 plugins) [0x00000] in <filename unknown>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
ColossalFramework.Plugins.PluginManager:AddPlugins(Dictionary`2)
ColossalFramework.Plugins.PluginManager:LoadPlugins()
Starter:Awake()
Will try and attach log file, but it's pretty huge...
Ever since, i think v1.2.4 I receive this message after updating TreeAnarchy, whenever I start up Cities
A Mod caused an error [System.Exception]
Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
at TreeAnarchy.TALocale.GetLocale (System.String name) [0x00000] in :0
at TreeAnarchy.TAOptionPanel.ShowTreeAnarchyOptions (ColossalFramework.UI.UIPanel panel) [0x00000] in :0
at TreeAnarchy.TAOptionPanel.SetupPanel (ColossalFramework.UI.UIPanel root) [0x00000] in :0
at TreeAnarchy.TAMod.OnSettingsUI (UIHelperBase helper) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception
Testing to see if compression is necessary, and will it affect save/load time drastically
I think your Option should have the either same setting as the 'Lock Forestry Resource' mod or should inform that there is another Mod active doing the same and pathing that one out...
ATM both conflict each other... 'Lock Forestry Resource' mod is on locked status and TreeAnarchy not... but 'Lock Forestry Resource' mod is used for locking
btw... it would be nice to have a shortcut for this to activate/deactivate and an visible indicator ingame (maybe recolor the Landscaping UI icon or Forest Brush UI button if that one is installed
Should function like the prop snapping.
I get this error message when loading after Airports update.
A Mod caused an error [System.Exception]
Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: IL Compile Error ---> System.FormatException: Method virtual System.Void TreeTool::RenderOverlay(CameraInfo cameraInfo) cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) TreeTool:TreeTool.RenderOverlay_Patch0 (TreeTool,RenderManager/CameraInfo): IL_0140: call 0x00000045
at HarmonyLib.Memory.DetourMethodAndPersist (System.Reflection.MethodBase original, System.Reflection.MethodBase replacement) [0x00000] in :0
at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00000] in :0
--- End of inner exception stack trace ---
at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00000] in :0
at HarmonyLib.PatchProcessor.Patch () [0x00000] in :0
at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00000] in :0
at TreeAnarchy.TAPatcher.EnableTreeVariationPatches (HarmonyLib.Harmony harmony) [0x00000] in :0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in :0
at ColossalFramework.Plugins.PluginManager.AddPlugins (System.Collections.Generic.Dictionary`2 plugins) [0x00000] in :0
My save was using this unlimited tree: revisited mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2378914031
Loading a save made using that mod with this mod seems to temporarily resets the tree liimit to 250k, and deleting trees in block-shaped are if the trees are over the limit
I will turn off anarchy to place roads and other things on the map (see pic)
and trees will not collide with whatever I am placing, which is my expected behavior.
When reloading my game however any trees that were colliding with these placed objects are now visible. I might just be misunderstanding how to use this mod, but just in case it is a bug want to report it here :)
This can be done ten times faster and easier with a single option in the menu and with a fair amount of code.
After a while - and i can't say if there is any specific action causing it - the game stucks... to explain:
The UI can be clicked but nothing can be selected on the map nor can i unpause the game. I can open any kind of menu and activate any tool... but they are not working... Every time i had this (third time now) i was using Forest Brush and the only tree relevant mod i've changed is yours.
Only option i have after such a stuck is to close the game to desktop using the menu
Please find attached my logs
output_log.txt
TMPE.log
Second Point i had: I excluded Tree Movement Control, as it's functions seems to be included in Tree Anarchy... but for me the Trees do not rotate then...
Users are reporting exceptions when writing to log file (primarily contested access - antivirus perhaps? - but also other reasons, the usual slings-and-arrows of IO access). Not a problem in itself - quite expected for file IO - but the mod currently isn't catching any logfile writing exceptions and thus crashes out (usually resulting in a simulation error and inability to play the game).
Cities Skylines uses .Net 3.5 Framework which is quite old and the CLR used does not support the CPU enhancements we have today, especially when it comes to SSE2 or AVX2 special instructions.
Drawing trees requires a lot of math, and with the original limit of 262144 trees, this wasn't too much of a problem, but with Unlimited Trees mods, we need to account for the possibly increased trees of up to millions.
Running a loop through 262144 is fast and can be completed within 50ms, but if its looped through 1 million trees, then that 50ms will become 200ms and maybe more due to branching and threading synchronizations.
My proposed solution is to go around this and add a wrapper to my mod to create access to SSE2 and AVX2. This doesn't come with a caveat and that is, there is a performance hit when switching between managed and unmanaged codes. BUT, I'm certain that the switch will be negligible compared to the current IL codes being generated by the old CLR2.0 (.Net3.5 Framework).
An example would be Unity functions Mathf.Min/Max. These functions, when compiled into IL results in around 10 instructions with branches. But if using AVX or SSE special instructions, the same results can be achieved using just 3 assembly instructions.
That would be a ~5x improvement over the original methods. And worth considering.
This seems to be a problem with the saving serializer method with posY not being saved.
Trees that are on fire somtimes turn invisible...
Trees over a road always seem to turn invisible (these were manually placed over grass verge with tree anarchy enabled):
This tree was manually placed over a building asset:
The asset did not contain a tree (it was just seating):
However, the tree trunk remains visible for burning trees that are over normal terrain:
So the issue seems to be that when burning tree is on a building/network (where normally the game would hide it, but I've used anarchy to keep them visible) the tree trunk is turning invisible?
That being said, here's another example of tree manually placed over a building (blue border shows building footprint) which hasn't turned invisible...
Although that specific building doesn't paint pavement under it, hence normal terrian being visible within its footprint.
Log files:
00PropAnarchyDebug.log
00TreeAnarchyDebug.log
oEManagerDebug.log
output_log.txt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.