From 7033595a90784a42d381d522a1204da597adb649 Mon Sep 17 00:00:00 2001 From: Tim Riddell Date: Thu, 26 Mar 2026 20:30:24 +1300 Subject: [PATCH] Initial project scaffold for VS Vineyard mod Sets up C# .NET 8 project with modinfo.json, ModSystem entry point, full asset directory structure, .gitignore, and README. Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 19 +++++++ README.md | 72 ++++++++++++++++++++++++ VSVineyard.csproj | 39 +++++++++++++ resources/assets/vsvineyard/lang/en.json | 8 +++ resources/modinfo.json | 15 +++++ src/VSVineyardModSystem.cs | 31 ++++++++++ 6 files changed, 184 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 VSVineyard.csproj create mode 100644 resources/assets/vsvineyard/lang/en.json create mode 100644 resources/modinfo.json create mode 100644 src/VSVineyardModSystem.cs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..636b28c --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +# Build output +bin/ +obj/ +releases/ + +# IDE +.vs/ +.vscode/ +*.user +*.suo +.idea/ +*.iml + +# OS +.DS_Store +Thumbs.db + +# Logs +*.log diff --git a/README.md b/README.md new file mode 100644 index 0000000..aed49b6 --- /dev/null +++ b/README.md @@ -0,0 +1,72 @@ +# VS Vineyard + +A Vintage Story mod adding viticulture and winemaking mechanics. + +## Features (Planned) + +- Grape vine blocks with seasonal growth stages +- Grape harvesting and pressing into juice +- Fermentation and barrel aging system +- Multiple wine varieties with stat effects +- Wild grape vines in world generation + +## Development Setup + +### Prerequisites + +- [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) +- Vintage Story installed + +### Environment Variable + +Set `VINTAGE_STORY` to your game installation path: + +**Linux:** +```bash +export VINTAGE_STORY="$HOME/.local/share/vintagestory" +``` + +**Windows (PowerShell):** +```powershell +$env:VINTAGE_STORY = "$env:APPDATA\Vintagestory" +``` + +Add this to your shell profile so it persists. + +### Build + +```bash +dotnet build # Debug build +dotnet build -c Release # Release build + creates releases/vsvineyard-x.x.x.zip +``` + +### Install for Testing + +Symlink or copy the `releases/*.zip` into your Mods folder: + +**Linux:** `~/.config/VintagestoryData/Mods/` +**Windows:** `%APPDATA%\VintagestoryData\Mods\` + +## Project Structure + +``` +VSVineyard/ +├── src/ C# source files +├── resources/ +│ ├── modinfo.json Mod metadata +│ └── assets/ +│ └── vsvineyard/ +│ ├── blocktypes/ Block JSON definitions +│ ├── itemtypes/ Item JSON definitions +│ ├── textures/ PNG textures +│ ├── shapes/ 3D model JSON +│ ├── recipes/ Crafting/cooking recipes +│ ├── worldgen/ World gen patches +│ └── lang/ Localization strings +├── releases/ Built mod zips (git-ignored) +└── VSVineyard.csproj +``` + +## Contributing + +This is a group project — feel free to open issues or PRs! diff --git a/VSVineyard.csproj b/VSVineyard.csproj new file mode 100644 index 0000000..dc80307 --- /dev/null +++ b/VSVineyard.csproj @@ -0,0 +1,39 @@ + + + net8.0 + VSVineyard + VSVineyard + 0.1.0 + enable + enable + + + + + + $(VINTAGE_STORY)/VintagestoryAPI.dll + false + + + $(VINTAGE_STORY)/Mods/VSSurvivalMod.dll + false + + + + + + + + + + + + + + + + + diff --git a/resources/assets/vsvineyard/lang/en.json b/resources/assets/vsvineyard/lang/en.json new file mode 100644 index 0000000..f358942 --- /dev/null +++ b/resources/assets/vsvineyard/lang/en.json @@ -0,0 +1,8 @@ +{ + "block-vsvineyard-grapevine-*": "Grape Vine", + "item-vsvineyard-grapes-*": "Grapes", + "item-vsvineyard-grapejuice": "Grape Juice", + "item-vsvineyard-wine-*": "Wine", + "block-vsvineyard-winebarrel": "Wine Barrel", + "block-vsvineyard-winepress": "Wine Press" +} diff --git a/resources/modinfo.json b/resources/modinfo.json new file mode 100644 index 0000000..8e4c306 --- /dev/null +++ b/resources/modinfo.json @@ -0,0 +1,15 @@ +{ + "type": "code", + "modid": "vsvineyard", + "name": "VS Vineyard", + "version": "0.1.0", + "description": "Adds viticulture and winemaking to Vintage Story — grow grape vines, harvest grapes, press juice, ferment and age wine in barrels.", + "authors": ["VSVineyard Contributors"], + "website": "", + "dependencies": { + "game": "1.19.0" + }, + "side": "Universal", + "requiredOnClient": true, + "requiredOnServer": true +} diff --git a/src/VSVineyardModSystem.cs b/src/VSVineyardModSystem.cs new file mode 100644 index 0000000..c1547ea --- /dev/null +++ b/src/VSVineyardModSystem.cs @@ -0,0 +1,31 @@ +using Vintagestory.API.Common; +using Vintagestory.API.Server; +using Vintagestory.API.Client; + +namespace VSVineyard; + +public class VSVineyardModSystem : ModSystem +{ + public override void Start(ICoreAPI api) + { + base.Start(api); + api.Logger.Notification("[VS Vineyard] Mod loaded successfully."); + + // TODO: Register block/item/entity classes here as they are added + // api.RegisterBlockClass("GrapeVine", typeof(BlockGrapeVine)); + // api.RegisterItemClass("Grapes", typeof(ItemGrapes)); + // api.RegisterBlockEntityClass("WineBarrel", typeof(BlockEntityWineBarrel)); + } + + public override void StartServerSide(ICoreServerAPI api) + { + base.StartServerSide(api); + // TODO: Server-side logic (recipes, world gen, network handlers) + } + + public override void StartClientSide(ICoreClientAPI api) + { + base.StartClientSide(api); + // TODO: Client-side logic (GUI, rendering, HUD) + } +}