From 5caa438d8fa20fbd315dd85dae3a5f28ff42af50 Mon Sep 17 00:00:00 2001 From: "Spyraxi (ReveredRedHood)" Date: Wed, 27 Dec 2023 16:03:58 -0700 Subject: [PATCH] doc: update autosave and repo readmes --- Autosave/IConfigBindings.cs | 2 +- LICENSE | 2 +- .../PluginDataPersistence.csproj | 2 +- README.md | 28 +++++-------- dist/Autosave/README.md | 40 +++++++++++++++---- dist/PluginDataPersistence/manifest.json | 2 +- 6 files changed, 47 insertions(+), 29 deletions(-) diff --git a/Autosave/IConfigBindings.cs b/Autosave/IConfigBindings.cs index 0ce9b45..5c930da 100644 --- a/Autosave/IConfigBindings.cs +++ b/Autosave/IConfigBindings.cs @@ -4,7 +4,7 @@ namespace Autosave; public interface IConfigBindings { - [Binding(120, "The amount of time between autosaves in seconds. The minimum is 15 seconds.")] + [Binding(300, "The amount of time between autosaves in seconds. The minimum is 15 seconds.")] int AutosaveDelay { get; set; } [Binding(true, "If true, warn of upcoming autosaves 5 seconds and 30 seconds beforehand.")] diff --git a/LICENSE b/LICENSE index e77236e..3434595 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Spyraxi +Copyright (c) 2023 Spyraxi (ReveredRedHood) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/PluginDataPersistence/PluginDataPersistence.csproj b/PluginDataPersistence/PluginDataPersistence.csproj index b50fb49..6751c7f 100644 --- a/PluginDataPersistence/PluginDataPersistence.csproj +++ b/PluginDataPersistence/PluginDataPersistence.csproj @@ -4,7 +4,7 @@ net6.0 PluginDataPersistence Mod utility to persist data between gameplay sessions or game saves - 0.1.0 + 0.0.1 BE667 true latest diff --git a/README.md b/README.md index f0ba0d5..490d7ce 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -# Spyraxi's Shadows of Doubt Mods (SoD v34.10+) - -**_Note:_ These mods only work for BepInEx Bleeding Edge (v667) (same as Thunderstore).** +# Spyraxi's Shadows of Doubt Mods The full READMEs for each mod can be found by clicking on their subfolder in the "dist" directory. @@ -14,21 +12,9 @@ Set up python: * Install python * Install build script deps from `./build/requirements.txt` using e.g. `pip install -r ./build/requirements.txt`. You can also install the deps inside a virtual environment beforehand with `pip install virtualenv`, `virtualenv venv`, `source venv/bin/activate` (for bash, or use the corresponding command for your shell). -When building and testing locally, run the `local.py` script with `python ./build/local.py`. The script automatically updates all versions within the `dist` directory including those in `manifest.json` (where the plugin gets packaged) to match the ones set in the `.csproj` files. When you are releasing new versions of your plugin(s), you'll only need to bump the version number in the `.csproj` file(s) prior to committing. Run `ci.py` **after** you commit to update the stored version numbers. - -One difference between the `local.py` and `ci.py` scripts is that `local.py` will copy plugin zip files to the Default profile location for Thunderstore Mod Manager. Note that you will need to manually go into Thunderstore Mod Manager and use the "Import Local Mod" button in the settings menu of the mod manager for it to recognize that the file is there. You only need to do this once, after which the mod will appear in the list and be auto-updated by running `local.py`. Edit `local.py` to change the path if you aren't using Thunderstore. - -[^1]: I can't guarantee scripts other than `ci.py` will work on Linux because I haven't tested it. I know `ci.py` works because it runs on a .NET SDK 7.0 Linux-based Docker image as part of BitBucket Pipelines. - -## Updating BepInEx dependencies for new game versions - -There is a simple script named `update-deps.py` which will copy BepInEx/interop dll files over to the dependencies submodule. See the comments in the script for more information. - -## Continuous integration +When building and testing locally, run the `local.py` script with `python ./build/local.py`. The script automatically updates all versions within the `dist` directory including those in `manifest.json` (where the plugin gets packaged) to match the ones set in the `.csproj` files. When you are releasing new versions of your plugin(s), you'll only need to bump the version number in the `.csproj` file(s) prior to committing. -There is a CI script named `ci.py` which is very similar to `local.py` but it checks to see which plugins have new versions and only packages those. The latest version numbers are stored in the `./build/shelve` directory's files. In the future I might update the CI script so that it interfaces with the Thunderstore Mod Manager API to upload new versions of your mods for you. - -You need to add $BITBUCKET_USERNAME (variable) and $BITBUCKET_APP_PASSWORD (secret) to your Pipeline to make the "upload files" step of the bitbucket-pipelines.yml script work. [See the documentation for more info](https://bitbucket.org/atlassian/bitbucket-upload-file/src/master/). You can set up a GitHub Actions script to do something similar if you are using GitHub... I haven't done that because I only host my mods on BitBucket. +Note that you will need to manually go into your mod manager and use the "Import Local Mod" button in the settings menu of the mod manager for it to recognize that the file is there. You only need to do this once, after which the mod will appear in the list and be auto-updated by running `local.py`. Edit `config.py` to change the path if you aren't using r2modman. ## Scaffolding plugins @@ -60,3 +46,11 @@ You can scaffold a new plugin that will be compatible with the build scripts usi │ └── { Plugin Name }Tests.csproj └── SpyraxiMods.sln ``` + +## Contributing + +Contributions through pull requests and issues are welcome. + +## License + +All code in this repo is distributed under the MIT License. Feel free to use, modify, and distribute as needed. diff --git a/dist/Autosave/README.md b/dist/Autosave/README.md index 8bb28a8..1f1f6d4 100644 --- a/dist/Autosave/README.md +++ b/dist/Autosave/README.md @@ -4,28 +4,52 @@ A BepInEx Bleeding Edge (v667) plugin for Shadows of Doubt ## What is it? -Adds in-game autosave functionality. +This plugin adds in-game autosave functionality. ## Installation -If you are not using r2modman or Thunderstore for installation, follow these steps: +### r2modman or Thunderstore Mod Manager installation + +If you are using [r2modman](https://thunderstore.io/c/shadows-of-doubt/p/ebkr/r2modman/) or [Thunderstore Mod Manager](https://www.overwolf.com/oneapp/Thunderstore-Thunderstore_Mod_Manager) for installation, simply download the mod from the Online tab. + +### Manual installation + +Follow these steps: 1. Download BepInEx (build artifact 667 or higher) from the official repository. 2. Extract the downloaded files into the same folder as the "Shadows of Doubt.exe" executable. 3. Launch the game, load the main menu, and then exit the game. -4. Download the latest version of the plugin from the Releases page. Unzip the files and place them in corresponding directories within "Shadows of Doubt\BepInEx...". +4. Download the latest version of the plugin from the Releases page. Unzip the files and place them in corresponding directories within "Shadows of Doubt\BepInEx...". Also, download the [SOD.Common](https://thunderstore.io/c/shadows-of-doubt/p/Venomaus/SODCommon/) dependency. 5. Start the game. -## Usage +## Usage and features + +This mod keeps track of the time since you last saved your game and saves automatically after a certain amount of time. Here are the basic settings, but you can change them: + +- The mod saves your game every 5 minutes, but it doesn't count time spent with the game paused. +- Before each automatic save, it gives you two warnings, one 30 seconds before and another 5 seconds before. +- It can tell if you're away from your keyboard/mouse while the game is active. If you are, it stops the timer until you're back. The first save after you're back still happens on time. +- It keeps up to 5 autosaves for each character, adding "- AUTO #" onto the end of the save name. After the last autosave, it will replace the oldest save as it makes each new one. +- The autosaves are named using the format "{current save name} - AUTO {#}" if you manually save your game at least once. If not, or if you turn off this setting, they're named "Autosave - AUTO {#}" instead. + +Note: The setting controlling the max number of autosaves works off of the save name, so using "Autosave - AUTO {#}" will limit the number of autosaves across all of your characters to the setting. -INSTRUCTIONS +### Configuration -### Features +Config settings include: +| Name | Description | +|------|-------------| +AutosaveDelay | The amount of time between autosaves in seconds. The minimum is 15 seconds. +ShowWarnings | If true, warn of upcoming autosaves 5 seconds and 30 seconds beforehand. +AvoidConsecutiveAfkAutosaves | If true, then do not start the next autosave timer if the player was AFK during an autosave. The timer will start when the player returns from being AFK. +NumberOfAutosavesToKeep | The number of autosaves to keep. Old autosaves will be overwritten. +UseLastSaveName | If true, autosaves will be named \"{current save name} - AUTO #\". Otherwise, autosaves will be named \"Autosave - AUTO #\" instead. -- **Heading:** Description +You can use r2modman or Thunderstore Mod Manager to easily change the plugin's config settings (via the Config Editor tab). You can also manually edit the config file in the BepInEx directory (I believe that changes you make will take effect while the game is running, but I'm not 100% positive about that). +If you have [BepInExConfigManager](https://thunderstore.io/c/shadows-of-doubt/p/TeamSpyraxi/BepInExConfigManager/) installed, you can use the in-game menu to edit the config settings. ## License -All code in this repo is distributed under the [MIT License](https://bitbucket.org/shadows-of-doubt-mods/mods/src/main/LICENSE). Feel free to use, modify, and distribute as needed. \ No newline at end of file +All code in this repo is distributed under the MIT License. Feel free to use, modify, and distribute as needed. diff --git a/dist/PluginDataPersistence/manifest.json b/dist/PluginDataPersistence/manifest.json index b3422b1..10d86b9 100644 --- a/dist/PluginDataPersistence/manifest.json +++ b/dist/PluginDataPersistence/manifest.json @@ -3,5 +3,5 @@ "website_url": "https://bitbucket.org/shadows-of-doubt-mods/", "description": "Mod utility to persist data between gameplay sessions or game saves", "dependencies": [], - "version_number": "0.1.0" + "version_number": "0.0.1" } \ No newline at end of file