Cities: Skylines

Cities: Skylines

Not enough ratings
Parking Lot Snapping Advanced Options
By [SSU]yenyang
This guide will function as the documentation for creating custom configurations for Parking Lot Snapping.
   
Award
Favorite
Favorited
Unfavorite
Foreward
This guide functions as the documentation for adding custom configurations for Parking Lot Snapping Mod. I have written it assuming that you understand the following:
  • How to access your log file.
  • Basics of Cities Skylines code with regards to assets, AIs, and prefabs.
  • Basics of programming XML
  • Types of programming variables

The formatting of the XML files can be changed with updates to PLS. Custom configurations may need to updated or redone completely if the XML format is changed due to an update.
Abbreviations
  • PSA : Parking Space Asset
  • PLR : Parking Lot Road
  • PGR : Parking Garage Road
  • PLS : Parking Lot Snapping Mod
Asset Creator Mode
  • Use asymmetric PSAs to Log information about new PLRs to make adding PLRs easier.
  • Snapping an asymmetric PSA to a new PLR will automatically export & import a default template for the PLR which makes it seem like you can snap to any network.
  • On Prefab Initialize all assets using DummyBuildingAI will be listed in the log file to make it easier to add new PSAs.
  • Logs the distance between locked locations to help determine the width of the PSA.
Import / Export
  • Folder Path :
    • Location for exporting / importing custom PLS configurations.
  • Export :
    • Will export current configurations to the specified folder path in an XML format that PLS can read and import. Error counts reported in text box with a time stamp. More detailed error reports are in the log file.
  • Import :
    • Will read files in specified folder path and attempt to overwrite any PLS configurations form the files. Error counts reported in text box with a time stamp. More detailed error reports are in the log file.
  • Import on Start Up :
    • If you use custom configurations you should enable this setting so you don't need to reimport your custom configurations on every game load.
  • Common Import / Export Errors :
    • Cannot write file that is open. or Cannot open that file is in use by another application.
      • Try to wait a little while between export and importing configurations. Restarting your computer will resolve this issue. If you know which file is causing the problem, opening and closing it might fix it. Sometimes the problem just goes away if you wait awhile and work on other files.
PSA Workflow
  • Turn on asset creator mode
  • Run the game, and load a map with your PSA enabled
  • Find the name of the PSA in the log file. Or use Mod Tools to find the name.
  • If you've never exported then do so now.
  • Copy a PSA file, edit the file name, and change the values for <Name> and <Filename>. If you are confident you can also edit other values.
  • Close game
  • Restart game
  • If you don't have "import on game start up" enabled, then import now. You may want "import on game start up enabled" from now on. Although troubleshooting may be easier doing it manually.
  • Load a map
  • Try attaching your PSA to an appropriate PLR depending on the XML settings you used.
  • Unlock the snapping
  • Set the next PSA the right distance away from the first one you placed.
  • The log file should have the distance that the two assets were from each other so you can put that into <ParkingWidth>
  • Edit the values in the XML and reimport until the snapping is configured to your taste.

PSA File Format
  • Offset (float) : Distance from centerline for asymmetric PSAs
  • Parking Width (float) : Distance between adjacent PSAs
  • Parallel (Boolean) :
    • true - can attach to any road
    • false - cannot attach to parallel parking PLRs
  • Rotation (float : 0, 90, 180, 270) : four types of rotations for asymmetric PSAs. 180 added in V1.6.
  • Raisable (Boolean) :
    • true - allows elevation to be altered for vertical attachment to PGRs. Asset must be capable of raising from the terrain.
    • false - Asset is restricted to being attached to the terrain. Will still snap to Elevated or Bridge networks. (V1.6) Will not in V1.5.X
  • Name (String) : Must match the asset's info.name. Use asset creator mode or Mod tools to find asset's info.name.
  • Filename (string): A unique string for import / export functions. Cannot include characters inappropriate for a file name. The actual file name will be "PSA-" + unique string + ".xml"
  • Notes:
    • All assets must be originally have an AI of DummyBuildingAI,ParkingLotSnapping.ParkingSpaceAssetAI, or ParkAI (V1.6).
PLR File Format
  • Symmetric Aisle Offsets (List of Unique Floats) : Creates an aisle that symmetric PSAs attach to. + or - determine left or right.
  • Asymmetric Aisle Offsets (List of Unique Floats): Creates an aisle that asymmetric PSAs attach to. + or - determine left or right.
  • One Sided (Boolean) :
    • true - Restricts acceptable PSAs to asymmetric only.
    • false - accepts both symmetric and asymmetric PSAs.
  • Invert Offset (Boolean) :
    • true - For small PLRs that have an aisle that is on one side of the centerline and parking on the other side.
    • false - For normal PLRs.
  • Parallel (Boolean) :
    • true - Restricts attachable PSAs to only parallel parking.
    • false - Parallel, perpendicular, and angled PSAs will attach.
  • Name (String) : Must match the network's info.name. Use asset creator mode or Mod tools to find network's info.name.
  • Filename (string): A unique string for import / export functions. Cannot include characters inappropriate for a file name. The actual file name will be "PLR-" + unique string + ".xml".
  • Vertical offset (float) : Raises or lowers elevation (m_position.y) of PSAs by value. May not work if PSA asset is fixed to terrain.
  • Notes:
    • PGRs require three configurations: Ground (info.name_Data), Elevated (info.name E), and Bridge (info.name B),