Giter VIP home page Giter VIP logo

enhanceddistrictservices's People

Contributors

chronofanz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

enhanceddistrictservices's Issues

Fish Industry related problems

These are two problems detected related to the newest fishing induystry from Sunset Harbour.

  1. Fish farm will not send trucks to specific districts/factories unless you also add outside connection
  2. Fish market cant be selected as a destination in the outgoing tab

Better GUI design

Need bigger fonts at minimum.
Should also replicate the look and feel of other world info panels in the game, with a close button.
Also, we should use the dropdown box from the Industries Panel rather using our own.

EDS no dummy traffic for trains, ships and planes

Hi,
I've been using Enhanced District Services since it came out originally (I think it was January 2020 or a year before) and at some point I noticed having no dummy trains crossing my map at all. Also no ships and no planes, which was weird cos i remember starting building little villages and there already were big ships cruising in bays or planes flying over when zoomed out, and always plenty of trains. On any map.
Having 170+ mods and quite a few thousands assets was not helpful and thought it would fix itself with time. But recently, when I had to unsubscribe all mods and assets, I thought I could check this thing as well.

Obviously first mods to check were AdvancedOutsideConnection and Optimised Outside Connections. The first one changing options for dummy traffic for trains to anything between 1 and 1000000 while EDS was still on (subscribed), changed nothing. Optimised Outside Connections required restart of the game, time consuming but it has been done to no avail (changed from 4 to 1, also no option was ticked for banning dummy traffic).

Nothing helped until I removed EDS and then straight after removing i saw trains on a map.

I went on checking it in noWorkshop mode then as it was quicker there. And AdvancedOutsideConnection and Optimised Outside Connections on their own or together but without EDS being activated or subscribed to, were working fine. As soon as I added EDS, there was no dummy traffic at all - no planes anymore, no trains, no ships - all it is allowing in is trucks and cars so road dummy traffic only.
Placing any train station (I have tested passenger stations) did nothing either to bring dummy traffic on the map. only trains on train lines (so a train line had to be also created) appeared. No intercity trains from outside connections (which i guess are treated as dummy trains too) turned up.
So i left only EDS in noWorkshop mode - still nothing. No 81 tiles mod, no other mod to help me, just EDS - nothing. I have EDS and starting a map again, all trains turned up immediately, i could also see planes (on that map a bay was too far to see ships).

That obviously means that there is no import/export done by these means of transport, and no passengers arriving or tourists.
Here is a link to output log done when testing in noWorkshop mode if that helps
https://www.dropbox.com/s/t2v8y3zrfsfybey/EDS%20problem%20macluk%20output_log.txt?dl=0

And I also found EDS log file - link below:
https://www.dropbox.com/s/13jrwi8lsk3sodf/macluk%20EDS.log?dl=0

Could you check that please.

Solution to compatibility issue of Real Time mod

As reported in Steam Community, this mod is partly incompatible with Real Time by dymanoid. Using both mods will cause warehouse and other industrial buildings not sending vehicles even if their storage is full. I've inspected the mechanism of Enhanced District Services mod by investigating the source code and adding outputs to log files. I think the problem is as follows:

In MatchOffersClosest() method in TransferManagerMod.cs, the expiry time of each offer is checked. If the offer is not expired, it's disabled. The related code is on line 276 of TransferManagerMod.cs:

TransferHistory.PurgeOldEvents(material);

PurgeOldEvents() method is defined in TransferHistory.cs (line 100 to line 120):

            public void PurgeOldEvents()
            {
                var timestamp = Singleton<SimulationManager>.instance.m_currentGameTime;
                var expiry = timestamp.AddDays(-MaterialEvents.MAX_TTL);

                foreach (var list in Events.Values)
                {
                    for (int i = 0; i < list.Count;)
                    {
                        if (list[i].TimeStamp < expiry)
                        {
                            list.RemoveAt(i);
                        }
                        else
                        {
                            i++;
                        }
                    }
                }
            }

Here, the expiry is set to 30 days later to the current game time, it DOES work in the original game as the time unit of the game time is day. But with Real Time mod installed, speed of the time flow is decreased and the unit of the game time is minute. It can be verified by inspecting the timestamp variable by adding the following code:

Logger.Log($"{timestamp}");

after the definition of the timestamp variable. The observed output is:

8/10/2021 9:17:58 PM: 8/8/2021 6:54:02 AM
8/10/2021 9:17:58 PM: 8/8/2021 6:54:02 AM
8/10/2021 9:17:58 PM: 8/8/2021 6:54:02 AM
...
8/10/2021 9:17:59 PM: 8/8/2021 6:54:05 AM
8/10/2021 9:17:59 PM: 8/8/2021 6:54:05 AM
8/10/2021 9:17:59 PM: 8/8/2021 6:54:05 AM

A possible solution is change the expiry time:

var expiry = timestamp.AddMinutes(-MaterialEvents.MAX_TTL);

After applying the modification and re-compiling the mod, the warehouses and industrial building will start releasing vehicles normally. But the side-effect is to be investigated.

Add a graphical in-game button to activate the mod.

From PhatR:

Many mods have a graphical in-game button to activate it.
CTRL-d enables disables the mod, i wouldn't mind a graphical movable button for that instead of just the hotkey.

I had this mod active and forgot, and couldn't figure out why my services were not working, and it was because i forgot about this mod.
A button (that turns the mod interface on and off like the CTRL-D does) would help remind users that your mod is active.

I am learning how mods work and eventually want to include a button to configure the various cam mods I modded and put on the workshop.

UI Improvements

From Max Shadow:

  • Allow to set policies for an entire district, not only specific buildings. Right now, If I want to prevent one RCI industrial district from sending resources to my Industries DLC district, I have to set policies for every building on one side or the other. A checkbox could be added to buildigs to "Override district policies", off by default.

  • Separate "Supply Chain In", "Supply Chain Out" and "Served Districts" into two fields for each: Allowed and Banned. Banned only works if Allowed is empty. That should make it easier to stop imports from outside connections for only one district. An alternative is to add a checkbox to every field to "Invert selection".

Shelters are not supported

It seems, that shelters are not supported. Neither warehouse can be assigned to shelter for delivery of goods nor will shelters get any cargo from Industries, except Outside Connections are increased.

Error Report Steam Dec 30 2020 / 05:24

One Mod Error message provided in the Workshop, 14h after loading the new release 1.0.24 to Steam. I did not encountered that message in my city, played again today some 30min, but all seems working smooth (21k inhabitans).

BruinKiller Error Message Report 05:24h 30.12.2020
I'm getting the following error starting today. Mod was working fine until last night. Any idea what this means, or should i find more info?

An exception was thrown by the type initializer for EnhancedDistrictServices.OutsideConnectionInfo [System.TypeInitializationException]Details:System.NullReferenceException: Object reference not set to an instance of an objectat EnhancedDistrictServices.OutsideConnectionInfo.Reload () [0x00000] in :0at EnhancedDistrictServices.OutsideConnectionInfo..cctor () [0x00000] in :0

Tim [Autor] Reply 11:3h 31.12.2020
@BruinKiller - you can go bacxk to the old version by picking up the former version from the Beta Testing thread (1.0.23) if you have concerns.

To track/analyize a bit further:

Is this a one time error you had or is this coming repeatingly ?

Was the message just popping up immediately on loading or after some time of playing ?

Are you playing with debugging of EDS on in Mod Options ? If yes, could you kindly share the log of this savegame with date/time indication, when it happend (we might find something in the log - can be pasted as text for free on pastebin [pastebin.com] or as load as a file for free on wetransfer [wetransfer.com]) ?

Did you saved to a new savegame and reloaded from there (sometimes a previous savegame does not hold certain data required and is only added/corrected during save/reload) ?

Thanks for reporting this issue and lets see, if we can find out more.

Supply Reserve Issue

Whenever I allow outside connections on warehouses regardless of what I have in the Supply Reserve box the warehouse will completely empty itself selling off all of it's contents.

Simulation hangs indefinitely on busy traffic

After #38, TransferManagerMod.MatchOffersClosest try in an endless loop to find a route that, if roads are full can always return false on StartTransfer. That's caused by while (requestAmount != 0) that always loops since it always find an (invalid) route.
That has the side effect of completely hangs the simulation and lock the game. I discovered it by simply attaching a debugger when the game was frozen.
I guess a simple decrement of requestAmount would solve, but anything else also.
I'm willing to help if needed, since I've got the mod auto-updated from Steam and have a save game that freezes after few minutes that I'd like to recover ๐Ÿ˜Ÿ I haven't found a way to download a previous version of the mod, since it was working pretty well till yesterday when I got the update.

Hidden Beta Test and Old Releases

This section holds releases for testing. If you are experienced, you can

Preparation
Save the existing Savegame to a new Savegame. Never continue playing with your exisiting file. As any mod, new versions of EDS may make your savegame incompatible to earlier versions and can cause crashed and unexpected behaviour !

Installation
If you continue reading, you have understood the above information and took actions to avoid Savegame losses.

  1. Unsubscribe from the Workshop item of Enhanced District Service.
    Unsubscription is required, so that there are not two mods with the same name in Cities:Skylines. May cause odd behaviour and issues.
  2. Locate your Local Profile User path
    Locate the following directory in your Windows installation, holding your local profile: :\Users<Your Username>
  3. Locate the Appdata and Skylines folder
    Locate the following directory inside your Local Profile User path: ... AppData\Local\Colossal Order\Cities_Skylines. This is the work directory for Cities:Skylines.
  4. Locate the Mod folder
    Locate the following directory inside the Cities:Skylines path: ... \Addons\Mods

If steps #2 - #4 were done properly, Windows Explorer should now show something like this: C:\Users\Chuck Norris\AppData\Local\Colossal Order\Cities_Skylines\Addons\Mods_

  1. Download a test file from the selection below
  2. Create a Folder inside \Mods named "EnhancedDistrictService"
  3. Extract the two files inside the ZIP into the folder "EnhancedDistrictService".
  4. Start the game, make sure, that you have activated the mod in the Mod Option Manager auf Cities:Skylines.

Removal
If you decide to remove the test version and going back to the Workshop item of Enhanced District Service, simply delete the folder created under step #7. Subscribe again to the Workshop item.

Historical Releases
EDS Version 1.0.18
EDS Version 1.0.22
EDS Version 1.0.23

Latest Testing
EDS Version 1.0.24 / 10.12.2020

NRE in TouristAI.GetVehicleInfo

Not sure if this is direct issue with EDS or maybe some conflict with another mod, however a user was getting NRE's in TouristAI.GetVehicleInfo and unsubbing EDS helped resolve the issue.

System.NullReferenceException: Object reference not set to an instance of an object
at TouristAI.GetVehicleInfo (uint16,CitizenInstance+,bool,VehicleInfo+) <0x003c7>
at TouristAI.StartPathFind (uint16,CitizenInstance+) <0x0052f>
at TouristAI.SetTarget (uint16,CitizenInstance+,uint16,bool) <0x00971>
at CitizenAI.SetTarget (uint16,CitizenInstance+,uint16) <0x0003e>
at OutsideConnectionAI.StartConnectionTransferImpl (uint16,Building+,TransferManager/TransferReason,TransferManager/TransferOffer,int,int,int) <0x02131>
at OutsideConnectionAI.StartConnectionTransfer (uint16,Building+,TransferManager/TransferReason,TransferManager/TransferOffer,int,int,int) <0x0008d>
at OutsideConnectionAI.StartTransfer (uint16,Building+,TransferManager/TransferReason,TransferManager/TransferOffer) <0x0004b>
at TransferManager.StartTransfer (TransferManager/TransferReason,TransferManager/TransferOffer,TransferManager/TransferOffer,int) <0x00643>
- at (wrapper dynamic-method) TransferManager.DMD<DMD<MatchOffers_Patch1>?-1208015744..MatchOffers_Patch1> (TransferManager,TransferManager/TransferReason) <0x0077c>
at TransferManager.SimulationStepImpl (int) <0x00070>
at SimulationManagerBase`2.SimulationStep (int) <0x0004c>
at TransferManager.ISimulationManager.SimulationStep (int) <0x00024>
at SimulationManager.LateUpdateData (SimulationManager/UpdateMode,single,single) <0x0017d>
at SimulationManager.Managers_LateUpdateData (SimulationManager/UpdateMode,single,single) <0x000c5>
at LoadingManager/<LoadSimulationData>c__IteratorB.MoveNext () <0x00b99>
at AsyncTask.Execute () <0x000a8>

This can happen if tourist is spawned but vehicle not assigned, for example. There are several other situations in which it can happen. In any case, it would be good to add some null checks or try..catch around this part of the code.

Full log: output_log(15).txt

Feature Suggestion: District View menu

While EDS is a great tool, it can be difficult to see if a district is being served by a service building - as I have discovered several times when a new district has burnt down. A basic District View menu would make it much easier to assign service buildings.

Rough layout suggestion:
image

The "Filter Menu" should have some basic filters - ability to filter by building type, whether the building is inside the selected district, whether it's assigned to the district, and whether it's on / off / has a status condition (e.g., power plant out of fuel, landfill full). Ability to search by building name might also be useful.

The Building Details panel could be the same elements as the default per-building EDS menu, though a button to quickly assign selected building(s) to the active district would be super useful as well.

Option to reserve vehicles

From Steam comments: Is it possible to add an option to reserve a % of the vehicles for the Supply Chain exclusively?

Default Settings for Buildings in Mod Option

From the Comment Section in Steam:

Add a default setting for buildings; maybe controllable via Mod Option Panel to define specific actions for service buildings.

Loud thinking eg. "Section Default Values"
Police Station: Always "All Local Areas" ( ) / If in District, Homedistrict Only ( ) / Always Copy the last setting ( )
Industry Warehouse: Outgoing All Outside Connection always deactivated ( ) / Incoming All Outside Connection always deactivated ( ) / Always Copy the last setting ( )

etc...

Export via train / ship seems broken if supply chain mod is enabled

My city layout heavily relies on export via ship or train - ports and stations are placed near all industrial parks.
In vanilla, a lot of export works via those buildings.
As soon as I enable the supply chain support, the exports via water / train stops and seems to be replaced by trucks.
Not only does it break down my traffic system but I also think that cannot be the intention of the mod.
I'd wish at least vanilla behavior but honestly, I would love a configuration where one can choose the types of outgoing connections for the district.

Number of issues

  1. snowfall boiler stations get fuel but you can't choose district lie power station.
  2. power station and boiler station sometimes does not get any fuel.
  3. receycling center of green cities dlc, exports goods besides sending out garbage trucks - no different tab for exports and served district for garbage trucks.
  4. industries dlc mail - like in 3 there are post vans that serve citizen, and there are trucks that goes to the sorting facility and outside connections - this should be seperated. Also cant micro manage mail from post office to sorting center and vice versa.
  5. chosen vehicles of a certain building are not saved, everytime i load the game it returns to default.

@chronofanz besides that thanks for a great, game changing mod. if you are missing a dlc regarding the issues i mentioned please contact me.

Dramatic Exportation drop (showed on the exportation tab)

Hi!

I just want to report a problem that a lot of users have reported on the Steam page of the mod. Everytime the EDS is active, exportations drop dramatically.

To test the newest version, I built a city with a 70k population, almost no commercial zone, a big generic industry and a DLC oil industry zone.

This is what the outside connection tab showed when I had EDS. I let the game run by almost 10 years, and this was the numbers it showed.

Exportation
1

Importation
2

And this happened when in that same city, I uninstalled the EDS mod. I let the game run by 3 or 4 weeks.
Exportation
3

Importation
4

Exportations without the mod reached almost 10 k at the end of 10 years.

I loaded the game several times and the result always was similar, the mod provokes an exportation drop.

However, this exportation drop doesn't seem to affect generic industry income, but it's harder to make your DLC industries work properly.

updating the mod

@chronofanz I am trying to update the mod to support post offices and in general support a single building with more then one vehicle type that has diffrenet transfer reason, they way you made the mode require extnsive changes, icluding new tabs and check if the building has more the one transfer reason and changing all the chekcs you are making for normal buildings.

Are you still updating the mod?

Errors in the EDS Log file

5/23/2020 6:28:46 PM: 'AutoSave' failed to load.
System.NullReferenceException: Object reference not set to an instance of an object
at SavePanel.Refresh () [0x00000] in :0 [Serialization]

5/23/2020 5:58:45 PM: Unexpected type '' detected. No resolver handled this type. Skipping -1 bytes. [Packer - Internal]
5/23/2020 5:58:45 PM: 'AutoSave' failed to load.
System.IO.InvalidDataException: Unknown type to deserialize
at ColossalFramework.Packaging.AssetSerializer.DeserializeHeader (System.Type& type, ColossalFramework.Packaging.PackageReader reader) [0x00000] in :0
at ColossalFramework.Packaging.PackageDeserializer.Deserialize (ColossalFramework.Packaging.Package package, ColossalFramework.Packaging.PackageReader reader) [0x00000] in :0
at ColossalFramework.Packaging.Package.DeserializeAsset (System.IO.Stream stream) [0x00000] in :0
at ColossalFramework.Packaging.Package.Instantiate (ColossalFramework.Packaging.Asset info) [0x00000] in :0
at ColossalFramework.Packaging.Package+Asset.Instantiate () [0x00000] in :0
at ColossalFramework.Packaging.Package+Asset.Instantiate[SaveGameMetaData] () [0x00000] in :0
at SavePanel.Refresh () [0x00000] in :0 [Serialization]

EDS.log

Mod marked as incompatible at Steam after last update

Hi @chronofanz

i've just spotted that your Enhanced Disctrict Services had ben marked as incompatible at Steam.

Reason: Issue with importing since the last update to the mod. It's been causing a bunch of headaches for a lot of players.

Maybe it is possible you do an update to solve the issue and get rid of the 'incompatible' flag...

Taxi and taxi stand issue

@chronofanz - Hey, since the latest update taxis try to park in the taxi stand but fails and then try again and again (infinite loop of trying). Also no one seems to use taxis at all only few, It is very wierd. If a person wants to use a taxi from his district to go to another one can he use it? Does the taxi only response to calls inside the district to an area inside the district?

Mod not working on existing saves

Policies are set for all services, but they ignore it. supply chains don't work at all. warhouses keep importing and exporting although distrcit only.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.