add readme, update ways to run

This commit is contained in:
2026-03-15 21:28:29 +01:00
parent ec89baded7
commit ea0eed03e2
5 changed files with 96 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
{ {
"total": 56092, "total": 66247,
"sessions": [ "sessions": [
{ {
"begin": "2026-03-11T23:50:47+01:00", "begin": "2026-03-11T23:50:47+01:00",
@@ -20,6 +20,51 @@
"begin": "2026-03-14T16:53:26+01:00", "begin": "2026-03-14T16:53:26+01:00",
"end": "2026-03-14T17:36:35+01:00", "end": "2026-03-14T17:36:35+01:00",
"duration": 2589 "duration": 2589
},
{
"begin": "2026-03-15T14:05:14+01:00",
"end": "2026-03-15T14:07:31+01:00",
"duration": 136
},
{
"begin": "2026-03-15T14:07:37+01:00",
"end": "2026-03-15T14:10:04+01:00",
"duration": 146
},
{
"begin": "2026-03-15T14:10:10+01:00",
"end": "2026-03-15T14:30:11+01:00",
"duration": 1201
},
{
"begin": "2026-03-15T14:58:59+01:00",
"end": "2026-03-15T15:35:46+01:00",
"duration": 2207
},
{
"begin": "2026-03-15T15:55:03+01:00",
"end": "2026-03-15T15:56:54+01:00",
"duration": 111
},
{
"begin": "2026-03-15T16:11:45+01:00",
"end": "2026-03-15T16:45:08+01:00",
"duration": 1719
},
{
"begin": "2026-03-15T17:28:55+01:00",
"end": "2026-03-15T17:49:07+01:00",
"duration": 1212
},
{
"begin": "2026-03-15T18:06:10+01:00",
"end": "2026-03-15T18:38:52+01:00",
"duration": 1611
},
{
"begin": "2026-03-15T20:33:08+01:00",
"end": "2026-03-15T20:53:09+01:00",
"duration": 1201
} }
] ]
} }

17
.vscode/launch.json vendored
View File

@@ -3,22 +3,9 @@
"configurations": [ "configurations": [
{ {
"name": "Vintage Story Client", "name": "Vintage Story Client",
"type": "coreclr", "type": "dotnet",
"request": "launch", "request": "launch",
"preLaunchTask": "build mod", "projectPath": "${workspaceFolder}/ChestPreview/ChestPreview/ChestPreview.csproj"
"program": "${env:VINTAGE_STORY}/Vintagestory.dll",
"args": [
"--tracelog",
"--dataPath",
"${env:VINTAGE_STORY_DATA}",
"--addModPath",
"${workspaceFolder}/ChestPreview/ChestPreview/bin/Debug/Mods",
"--addOrigin",
"${workspaceFolder}/ChestPreview/ChestPreview/assets"
],
"cwd": "${env:VINTAGE_STORY}",
"console": "integratedTerminal",
"stopAtEntry": false
} }
] ]
} }

16
.vscode/tasks.json vendored
View File

@@ -16,20 +16,24 @@
"type": "process", "type": "process",
"dependsOn": ["check env"], "dependsOn": ["check env"],
"dependsOrder": "sequence", "dependsOrder": "sequence",
"options": {
"env": {
"VINTAGE_STORY": "${env:VINTAGE_STORY}"
}
},
"args": [ "args": [
"build", "build",
"${workspaceFolder}/ChestPreview/ChestPreview/ChestPreview.csproj", "${workspaceFolder}/ChestPreview/ChestPreview/ChestPreview.csproj",
"-c", "-c",
"Debug", "${input:buildConfig}",
"/property:GenerateFullPaths=true", "/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign" "/consoleloggerparameters:NoSummary;ForceNoAlign"
], ],
"problemMatcher": "$msCompile" "problemMatcher": "$msCompile"
} }
],
"inputs": [
{
"id": "buildConfig",
"type": "pickString",
"description": "Build configuration",
"options": ["Debug", "Release", "Version22"],
"default": "Debug"
}
] ]
} }

View File

@@ -6,7 +6,6 @@
<OutputPath>bin\$(Configuration)\Mods\mod</OutputPath> <OutputPath>bin\$(Configuration)\Mods\mod</OutputPath>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Configurations>Debug;Release;Version22</Configurations> <Configurations>Debug;Release;Version22</Configurations>
<VintageStoryDataPathArgs></VintageStoryDataPathArgs>
<VS_CONFIGLIB Condition="'$(VS_CONFIGLIB)' == ''">$([System.Environment]::GetEnvironmentVariable('VS_CONFIGLIB'))</VS_CONFIGLIB> <VS_CONFIGLIB Condition="'$(VS_CONFIGLIB)' == ''">$([System.Environment]::GetEnvironmentVariable('VS_CONFIGLIB'))</VS_CONFIGLIB>
<ConfigLibAvailable Condition="'$(VS_CONFIGLIB)' != '' and Exists('$(VS_CONFIGLIB)')">true</ConfigLibAvailable> <ConfigLibAvailable Condition="'$(VS_CONFIGLIB)' != '' and Exists('$(VS_CONFIGLIB)')">true</ConfigLibAvailable>
<DefineConstants Condition="'$(ConfigLibAvailable)' == 'true'">$(DefineConstants);CONFIGLIB</DefineConstants> <DefineConstants Condition="'$(ConfigLibAvailable)' == 'true'">$(DefineConstants);CONFIGLIB</DefineConstants>
@@ -14,8 +13,12 @@
<PropertyGroup Condition="'$(Configuration)' == 'Version22'"> <PropertyGroup Condition="'$(Configuration)' == 'Version22'">
<TargetFramework>net10.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>
<VINTAGE_STORY>$(VINTAGE_STORY_22PRE2)</VINTAGE_STORY> <VINTAGE_STORY>$(VINTAGE_STORY_22)</VINTAGE_STORY>
<VintageStoryDataPathArgs> --dataPath "..\VintageStory22Data"</VintageStoryDataPathArgs> <VINTAGE_STORY_DATA>$(VINTAGE_STORY_DATA_22)</VINTAGE_STORY_DATA>
</PropertyGroup>
<PropertyGroup>
<VintageStoryDataPathArgs> --dataPath "$(VINTAGE_STORY_DATA)"</VintageStoryDataPathArgs>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

32
readme.md Normal file
View File

@@ -0,0 +1,32 @@
# ChestPreview
## Requirements for the solution
- .NET 8 SDK for 1.21
- .NET 10 SDK when building `Version22` for 1.22
- Vintage Story install - 1.21 or 1.22, with environment variables describing the paths.
- env vars described below
### Required env vars
- `VINTAGE_STORY`: path to the 1.21 game install (on Windows default is %appdata%/VintageStory)
- `VINTAGE_STORY_DATA`: path to the 1.21 game data directory (on Windows default is %appdata%/VintageStoryData)
- `VINTAGE_STORY_22`: for 1.22 (`Version22` configuration)
- `VINTAGE_STORY_DATA_22`: for 1.22 (`Version22` configuration)
- `VS_CONFIGLIB`: path to `configlib.dll`. If not set, will compile with a warning and without configlib support
## Running
If you know what you're doing, `dotnet build` etc obviously will work. This was created with the official mod template.
### VS Code with `C# Dev Kit` extension
- select appropriate solution configuration: `F1` (run command) -> `.NET: Select a configuration`
- for 1.21 select `Debug` or `Release`, for 1.22 select `Version22`
- run action `Start debugging` or `Start without debugging` (might be `f5` and `ctrl+f5` by default).
### Visual Studio
- use configuration picker at the top - `Debug` or `Release` for 1.21, `Version22` for 1.22
- set ChestPreview project as the startup project
- run