Skip to content

Commit

Permalink
doc: update autosave and repo readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
ReveredRedHood committed Dec 27, 2023
1 parent 9abf467 commit 5caa438
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Autosave/IConfigBindings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.")]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion PluginDataPersistence/PluginDataPersistence.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>PluginDataPersistence</AssemblyName>
<Description>Mod utility to persist data between gameplay sessions or game saves</Description>
<VersionPrefix>0.1.0</VersionPrefix>
<VersionPrefix>0.0.1</VersionPrefix>
<VersionSuffix>BE667</VersionSuffix>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
Expand Down
28 changes: 11 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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

Expand Down Expand Up @@ -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.
40 changes: 32 additions & 8 deletions dist/Autosave/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
All code in this repo is distributed under the MIT License. Feel free to use, modify, and distribute as needed.
2 changes: 1 addition & 1 deletion dist/PluginDataPersistence/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 5caa438

Please sign in to comment.