CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
576 stars 85 forks source link

Warn users on all incompatible mods #91

Closed originalfoo closed 5 years ago

originalfoo commented 5 years ago

Currently I think we only check two things:

IMO this is insufficient, given that we have a list of known incompatible mods:

https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/wiki/Incompatible-mods

We should at least put messages in game log if any of those mods are subscribed (regardless of whether they are enabled).

Ideally we should put message on screen (regardless of that 'show error' setting in mod options) to let user know they have certifiably incompatible mods installed.

krzychu124 commented 5 years ago

I can add other steamId's for checking while starting game but I will have to refactor that show popup message action because I am sure we don't want to spam user with popups πŸ˜„

I think that list of incompatible mod could be similar to localisation files - just plain text SteamId ;TITLE;Link to workshop

originalfoo commented 5 years ago

I'll create text file and submit a PR - where do you want it going? /resources?

EDIT: Agree about not spamming user. A single message will do, so long as it either contains list of detected mods or points them to where to find the list.

krzychu124 commented 5 years ago

I think /resources will be good place for it, thanks.

originalfoo commented 5 years ago

Do you need link to workshop? It can be constructed:

https://steamcommunity.com/sharedfiles/filedetails/?id=%steamid%

?

krzychu124 commented 5 years ago

Maybe not... I forgot about that πŸ˜ƒ

originalfoo commented 5 years ago

I also found a few additional incompatible mods so the wiki page was also updated :)

originalfoo commented 5 years ago

Checked over entire remaining list to make sure no more blunders. All present and correct :)

Over to you for coding magic :)

originalfoo commented 5 years ago

Just built a Steam "Collection" of all the incompatible mods - needs some images adding and stuff but should be able to get that done tomorrow. Users will be able to unsubscribe all of them with single click! Will post link when it's ready.

krzychu124 commented 5 years ago

I will try to check how to call Steam workshop browser using code

pcfantasy commented 5 years ago

@aubergine10

Advanced Traffic Congestion Report is not replaced by TMPE.

I add a pull to fix miss noiseDensity logic in TMPE, but Advanced Traffic Congestion Report will use another method to caculate trafficDensity and give to vannila Traffic Congestion Report map to show.

The two mods are either not confict and not overlap.

krzychu124 commented 5 years ago

@pcfantasy good catch, we will fix that, thank you :wink:

originalfoo commented 5 years ago

Would it be possible to bring that feature in to TMPE?

The distinction between traffic density and traffic congestion.

Currently the TMPE dynamic lane selection seems based on density, not congestion. I think DLS would work much better if it operated on congestion. And path finding in general.

Also I think it would be extremely useful if the traffic info view had two tabs; one for density and one for congestion.

When I build new roads both factors should play a role in my decision making.

For example, if I want traffic moving faster, I need to be looking at the congestion and finding the bottlenecks. Removing choke points will often have huge impact on traffic density.

Currently all I can see in game is the density info view. But that is also useful, as it shows more where people are travelling, so I know if I change a popular route I should expect some consequences.

Anyway, I will remove the Advanced Traffic Congestion Report from the various lists (txt file in main repo, wiki page, and steam collection) of incompatible mods.

But if we could get that congestion feature in TMPE it would be hugely useful I think. Also, congestion could in the future lead to increased air pollution, contrasting to density which leads to increased noise pollution.

krzychu124 commented 5 years ago

Currently the TMPE dynamic lane selection seems based on density, not congestion. I think DLS would work much better if it operated on congestion. And path finding in general.

First I have to understand how that pathfinding sorcery works πŸ˜„

Also I think it would be extremely useful if the traffic info view had two tabs; one for density and one for congestion.

Two tabs should be possible and almost everything related with GUI (time consuming research)

originalfoo commented 5 years ago

Here's a steam collection of the incompatible mods - please update mod description to include link to this (it's much easier for users to see what incompat mods they have and unsub them):

https://steamcommunity.com/sharedfiles/filedetails/?id=1658151346

krzychu124 commented 5 years ago

Great, I will update steam workshop page today.

BTW I created quick incompatible mods tester. I looked through code with dnSpy and I can see there is method to unsubscribe workΕ›hop item using steamId.

Additionally I will play with dialog window if I find some time to directly render that list and unsubscribe them using button. Would be great to open your list directly from game or fetch it using code(I've seen some methods, didn't test yet). You would update list with one click :wink:

originalfoo commented 5 years ago

Apparently Geli-Districts 3.0 is also incompatible https://steamcommunity.com/sharedfiles/filedetails/?id=927293560

I've asked on their workshop page to get in touch and let us know what the issue is.

krzychu124 commented 5 years ago

Current progress...

zrzut ekranu 112

Issues: - scrollbar not working - mousewheel working only ina area of scrollbar track,

krzychu124 commented 5 years ago

I think I will switch my implementation to one big button with text "Unsubscribe!" which will open steam workshop overlay with address to your collection of incompatible mods πŸ˜„

originalfoo commented 5 years ago

To prevent clicks and key presses filtering through to background, I think you have to do p,Use() on the event handlers.

For example:

        protected override void OnMouseDown(UIMouseEventParameter p)
        {
            if (p.buttons.IsFlagSet(UIMouseButton.Right))
            {
                Debug.Log("TMPEBB - Chameleon button - start drag");
                m_dragging = true;
                p.Use(); // mark the event as used and it should be filtered from parents/background
            }
            else
            {
                base.OnMouseDown(p);
            }
        }
originalfoo commented 5 years ago

BTW, if you change to a button that links to steam workshop, be careful - most if not all Mac users have the Steam Overlay turned off (it does weird stuff to the main menu screen and makes game unplayable).

krzychu124 commented 5 years ago

I know, but there is other problem, because if it's opened from modal it's visible (because of BringToFront()) but you can't click anything - it's transparent to events.. For example when I open it by enabling mod from Content Manager (mod check trigger on enable), it became visible on top of Content Manager but that manager dialog blocks clicks - has higher priority πŸ˜•

krzychu124 commented 5 years ago

I have managed to fix scrolling issue πŸ˜„

originalfoo commented 5 years ago

Fixed by #106