Cities: Skylines

Cities: Skylines

District Tool [BETA]
21 条留言
The Lord Drake  [作者] 10 月 30 日 上午 8:12 
Thanks for narrowing that down. ADS does indeed skip the Awake call on the DistrictOptionPanel. I'll have to see if there is a better way to replace that logic.

Lock can cause performance issues, but it should be reasonably safe in this context. I'll make a note to take a look at that as well though.
Finwickle 10 月 30 日 上午 7:41 
I got the following feedback from the creator of Game Anarchy:

Based on your log, this issue doesn't appear to be related to Game Anarchy, since Game Anarchy hasn't performed any code-level operations on District. From the log, the problem seems to arise during the patching phase. I took a quick look at the code for the District Tool mod and noticed that it applies a prefix patch to the lifecycle's Awake method — apparently skipping the original Awake method entirely. It seems the intention is to bind its own UI logic, but completely bypassing Awake is something that should be done with extreme caution. Additionally, it uses a “lock” inside OnGUI, which could potentially lead to performance issues.
Finwickle 10 月 30 日 上午 3:26 
Game and Harmony log can be found here: https://www.filemail.com/d/zszfiahubxpnguz
Finwickle 10 月 30 日 上午 3:10 
After a lot of reloading the game with different mod combinations, I found that the conflict is between this mod and Game Anarchy . With only those two mods (and Skyve + dependencies) I have the issue. With all my mods and this mod but without Game Anarchy I don't have an issue. With all my mods and Game Anarchy but without this mod I don't have an issue either.

No idea why they would conflict though.
The Lord Drake  [作者] 10 月 29 日 下午 5:56 
I'm sorry to hear you're having issues with it. Unfortunately that error doesn't provide any particularly helpful information. 145 is a lot of potential conflicts. If you feel like narrowing it down, I'd suggest looking at anything that modifies the game UI, specifically the bottom tray.
Any mod that just adds assets, like buildings, cars, etc, can be safely ignored.
Finwickle 10 月 29 日 下午 5:35 
I'm sorry to say that this mod is incompatible with my other mods. When I paint a specialized district, the district tool auto switches to regular district. Then when closing the menu, the tool stays active, making it impossible to select anything. I have 145 other mods active, so it's hard to figure out which one(s) causes this, and I've not (yet) tried to figure it out. It doesn't happen with only this mod and Toggle It, so not that one.

My log shows this error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> 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 GeneratedScrollPanel.GetOptionPanel (System.String templateName) [0x00000] in <filename unknown>:0
at GeneratedScrollPanel.ShowDistrictOptionPanel () [0x00000] in <filename unknown>:0
Finwickle 10 月 3 日 下午 2:26 
I've not seen an issue in game. Both District Tool and Toggle It seem to function fine. If I notice something odd, I will let you know. Thanks for the quick response!
The Lord Drake  [作者] 10 月 3 日 上午 9:40 
I've taken a look the patch ToggleIt is using, and done a quick test locally. There doesn't seem to be an actual conflict, I'm not seeing any issues with functionality in either mod when used together. I'll look into whether or not I can do something about that message to avoid confusion though.

If you do run into an issue though let me know.
Finwickle 10 月 2 日 上午 11:07 
I've created a Harmony Conflict Report from the Harmony settings in the main menu, and that tells me there might be a conflict with the Toggle It mod.

====================Start Harmony conflict report for Advanced District Snapping 0.4====================
Possible conflict with Toggle It! by methods:
--- DistrictTool.OnDisable
------ [POSTFIX] ToggleIt.DistrictToolOnDisablePatch.Postfix
====================End Harmony report====================
Finwickle 10 月 2 日 上午 11:01 
I'm back again. It seems your mod generates Harmony errors. I get a Harmony log on my desktop when using your mod. You can find this Harmony log and my game log here [www.filemail.com].

This is with many more mods (and assets) active, but those have been stable and without Harmony errors for me. I have not yet tried it without other mods.
The Lord Drake  [作者] 10 月 1 日 下午 5:03 
As yet no, it doesn't provide useful information. The loose idea is to have it act as an icon to show the relative size of the brush (there are 5 sizes total), but that functionality is unfinished. Honestly I haven't really played CS1 in years, so this mod has mostly sat on a shelf since it was made. I'd never actually fully implemented the buttons until you mentioned it.

I'm glad you're enjoying it though, nice to know people find it useful.
Finwickle 10 月 1 日 下午 3:56 
I've done a quick test. The buttons now appear and disappear correctly, which helps a lot. The buttons confuse me a bit though. They still have a tooltip of small, medium and large, but I was pleasantly surprised that the left and right buttons actually gave me more than three sizes. Very nice! But is the middle button supposed to do anything?

Apart from the confusing tooltips and middle button, this is a really great mod! I wish I found your mod sooner, because I really loved this functionality in the early years and was sad when the mod that made it happen back then, went broken. Now I have it back again!
Finwickle 10 月 1 日 上午 8:26 
Ow nice, gonna try that soon. That's for the quick update.
The Lord Drake  [作者] 10 月 1 日 上午 8:25 
@Finwickle I just released an update to fix that issue, as well as rendering problems with the buttons in general. (They actually show up now!)
Finwickle 9 月 30 日 上午 9:18 
Sadly this mod doesn't work well for me. The snapping hotkey actually works great, but the district brush buttons are broken. I get only two instead of three district brush sizes, and switching between them doesn't work, so I'm stuck with a medium brush. Also, the buttons stay there no matter which tool I select, so they interfere with the buttons when building roads or zoning. I've tested this with only Harmony, Patch Loader, Skyve, the builtin Unlock All and this mod, and no other mods and no workshop assets.

Screenshot: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3577713526
JohnL 3 月 26 日 上午 9:21 
ahhhh thank you The Lord Drake....sounds handy. :steamthumbsup:
The Lord Drake  [作者] 3 月 26 日 上午 7:52 
@JohnL Wording on the description was backwards, fixed it.
Basically this creates a hotkey you can press that will make the district brush snap to nearby networks, like roads. This makes it easier to sculpt particular shapes with the district brush.
JohnL 3 月 26 日 上午 6:38 
So what does it do? I can't seems to find the og version that explains wtf this even does.
Neverminder 1 月 14 日 下午 12:50 
wow i forgot all about this, vital mod
The Lord Drake  [作者] 2024 年 9 月 4 日 下午 4:19 
@Airen I didn't realize anyone actually used this. It kind of got left on a dusty shelf.
Airen 2024 年 8 月 8 日 上午 5:15 
Hidden gem 🥲