Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs folder + updated docs #474

Merged
merged 7 commits into from
Aug 31, 2019
Merged

Docs folder + updated docs #474

merged 7 commits into from
Aug 31, 2019

Conversation

originalfoo
Copy link
Member

@originalfoo originalfoo commented Aug 1, 2019

  • Created new docs folder in repo root
  • Moved following files in to it:
    • BUILDING_INSTRUCTIONS.md - updated content
    • PR_REVIEW_INSTRUCTIONS.md - updated content
    • ATTACHING_DEBUGGER.md - updated content
  • Add logging instructions Document logging stuff #465
  • Explain how to flick debug switches (in LOGGING.md)
  • Refactor ATTACHING_DEBUGGER.md

Fixes #466
Fixes #465

Updated build, PR instructions, moved those and debugger instructions to new docs folder.
@originalfoo originalfoo added docs Documentation meta Build environment, github environment, etc. labels Aug 1, 2019
@originalfoo originalfoo added this to the 11.0 milestone Aug 1, 2019
@originalfoo originalfoo self-assigned this Aug 1, 2019
Cleaned up formatting
Documented most of the logging stuff, except how to flick debug switches.

Fixes #465
@originalfoo originalfoo marked this pull request as ready for review August 1, 2019 04:27
@originalfoo originalfoo added the under-review A pull request has been created and is currently being reviewed label Aug 1, 2019
@originalfoo
Copy link
Member Author

@kvakvs How are debug switches turned on and off? Also, if someone wanted to add a new switch in future, is there anything they need to be aware of?


We strongly recommend doing development work on Windows as there's much more tooling available. If you're using a Mac, set up a Boot Camp partition for Windows and use that. If you're using Linux, consult the internets.

## Install
Copy link
Collaborator

@kvakvs kvakvs Aug 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhere around this section (actually it is located down at Line 54) you can mention that the solution expects to find TLM/dependencies directory with the game C# DLLs copied into it, or a link to <Steam>/Cities_Skylines/Cities_Data/Managed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reference path is mentioned but I didn't know about the TLM/depedencies folder, will add that in.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you symlink it before trying the first build, it just finds everything and builds and never requires any references manipulation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kvakvs I've updated build docs to include note on the TLM\dependencies folder

@kvakvs
Copy link
Collaborator

kvakvs commented Aug 1, 2019

@aubergine10 At this moment the only reliable way is to visit affected csproj'ects and add another define to the defines section. Per build configuration. Less global way which only covers 1 file is to add at the top of that file.

@originalfoo
Copy link
Member Author

Not sure I understand the comment above. Is that for adding a complete new switch?

If I wanted to, for example, enable logging for parking AI, which already exists, how would that be achieved?

@kvakvs
Copy link
Collaborator

kvakvs commented Aug 1, 2019

Oh do you mean the debug switches in the XML file? I never done that, and it probably could use some usability improvements.

@krzychu124
Copy link
Member

You have to add (TLM/State/ConfigData/DebugSettings.cs):

  • default value to Switches array,
  • new DebugSwitch enum value,
  • new boolean value in section of TMPE_GlobalConfig.xml file before running game
<Debug>
    <Switches> 
        <boolean>false</boolean>
         ...
    </Switches>
</Debug>

To turn off/on features just change correct value from false to true (index is the same as in DebugSettings Switches array) and run game.
That should work while in main game menu too but I didn't tested that (change value in xml, save file and then in mod options Maintenance -> Reload global configuration)

@originalfoo
Copy link
Member Author

originalfoo commented Aug 20, 2019

Urg, this is a nasty way to do the debug switch toggles in the xml file:

  <Debug>
    <Switches>
      <boolean>false</boolean>
      <boolean>false</boolean>
      <boolean>false</boolean>
      // ...
      <boolean>false</boolean>
    </Switches>
    <ExtVehicleType>None</ExtVehicleType>
    <ExtPathMode>None</ExtPathMode>
  </Debug>

Is there any way we could add some sort of human readable hint to those elements? Even if it was just an incrementing number eg. <boolean switch="1"> ...

@originalfoo
Copy link
Member Author

This is ready for final review @krzychu124 @kvakvs

Copy link
Collaborator

@kvakvs kvakvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, looks fine
We should do something with naming the debug switches in XML, but i haven't used them and they don't create any pain for me, so kind of let it stay until we figure something out.

@originalfoo
Copy link
Member Author

Yeah, they work reliably as is so I think leave them for now.

Copy link
Member

@krzychu124 krzychu124 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@originalfoo originalfoo merged commit cb72535 into master Aug 31, 2019
@originalfoo originalfoo deleted the updated-docs branch August 31, 2019 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation meta Build environment, github environment, etc. under-review A pull request has been created and is currently being reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update build instructions docs Document logging stuff
3 participants