CitiesSkylinesMods / TMPE

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

settings for verbose log #1538

Closed kianzarrin closed 2 years ago

kianzarrin commented 2 years ago
  <Debug>
    <Switches>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
    </Switches>
    <ExtVehicleType>None</ExtVehicleType>
    <ExtPathMode>None</ExtPathMode>
  </Debug>

Its hard to set the specific debug switch. I have to read the code and then count the lines to turn on the switch. it would be nice to be able to set these in the maintenance tab. that way I don't have to reload config all the time either :)

    public class DebugSettings {
        private int nodeId_ = 0;
        public static int NodeId => GlobalConfig.Instance.Debug.nodeId_;
        private int segmentId_ = 0;
        public static int SegmentId => GlobalConfig.Instance.Debug.segmentId_;
        private int startSegmentId_ = 0;
        ...

Also I have no way of setting debug log for specific segment/node/... even from the global config file. so we need these options too

kianzarrin commented 2 years ago

@aubergine10 @krzychu124 is there anyway of setting the segmentId_ for verbose logs that I am not aware of?

krzychu124 commented 2 years ago

afaik it was used only for specific testing, like you have got a problematic savegame, know the segment or node and want to log only data related to that segment or node (so you are compiling the mod with hardcoded values). If you could expose instance somewhere (Lifecycle object via property then you could use mod tools to set it). Anyways I see much better way, just require a basic tool to read id of entity(segment/node) you clicked

kianzarrin commented 2 years ago

it can help a lot with routings and path finding.

krzychu124 commented 2 years ago

I'll try to refactor my experiment from my other mod and include it into TM:PE as a debug tool