Jump to content

Spoonail

Vintarian
  • Posts

    9
  • Joined

  • Last visited

Everything posted by Spoonail

  1. Also, if your mod doesn't seem to be compiled for VS1.22 properly, try removing `obj` folder in the project. It seems Visual Studio often continues to use VS 1.21 reference caches, instead of following updated VINTAGE_STORY value and referencing 1.22 correctly. Removing obj seems to clear the cache and update the reference reliably. (I often run into this issue since frequently switch VINTAGE_STORY between 1.21 and 1.22)
  2. You don't have to create a new project. Updating the .net version in the existing .csproj file works. I mean, just open the .csproj file and replace: <TargetFramework>net8.0</TargetFramework> with: <TargetFramework>net10.0</TargetFramework> If you don't like editing the csproj directly, you can also open the project properties and set the target framework: Either way, make sure all the existing projects are updated. The official template includes two projects (the main and CakeBuild), so you need to update both. Also, the template has updated the CakeBuild package versions, so it should be worth following it in your existing projects as well. Here's a quote from Discord post by Th3Dilli (one of the dev members) describing how to do that: Original: https://discord.com/channels/302152934249070593/351624415039193098/1479916087050240142 VS 2022 didn't fail to compile for me, but caused an issue on debugging and trying to decompile the game dll. VS 2026 works without the issue, so I'd recommend updating anyway.
  3. .net10 is for VS 1.22 mods. In my opinion, the default should target the stable version of the game (therefore the target framework should be .net8), not unstable one, but it seems the dev decided otherwise. P.S. If you don't plan to create 1.22 mods for a while, installing the previous version of the template should help: dotnet new install VintageStory.Mod.BasicTemplate::0.2.1 With this version, the target frameworks is set to .net8, so there's no need to fix it manually every time you make a project
  4. `AuroraRenderer` seems to contain the logic for the temperature condition: https://github.com/anegostudios/vsessentialsmod/blob/51253adb3f200c46fe59993c7ada2e9e7f32c0ed/Systems/Weather/AuroraRenderer.cs#L77 The formula is a bit tricky, but the `tempfac` reaches its max (1.0) at -20C and reaches its min (0.0) at -5C Also note that this is not the current temperature: it's annual average (a.k.a "base" temperature,) since the mode argument to `ClimateAt` is `EnumGetClimateMode.WorldGenValues` To change the condition, you'll need to Harmony-patch the method because no parameters of the condition are exposed via external files such as json.
  5. The behavior averaging durability can be disabled from the recipe json. Add "averageDurability": false to the recipe.
  6. The JSON Patching page on the wiki states ModMaker uses the `game` domain by default: https://wiki.vintagestory.at/index.php/Modding%3AJSON_Patching > By default, when you generate a mod using ModMaker 3000™, the folder structure will use game as the domain, and use the same file name as the vanilla JSON file. This can lead to mod conflicts. But I tested ModMaker in VS1.21.6, 1.20.12, and 1.19.8, and could not reproduce the issue. It might have been the case in versions older than 1.19.
  7. I made a few changes and got it working: In `StartServerSide`: The handler and a method for Ground Storage: Changes and reasons: - Spawning the pot at fixed position was hard to debug, so changed the command to spawn it at player pos +3z - So after running the command, look south to find the spawned pot - Getting block/item by raw ID doesn't work well. Use it with `AssetLocation` always. - Actually `GetBlock(1093)` gave me one of variants of brick blocks - Meat stew requires at least 2 meat, so changed the ingredient to 2 red meat and 2 carrots - To set meal into a pot properly, you need to call `IBlockMealContainer.SetContents` - In recent VS versions, meal containers are placed in Ground Storages instead of being placed directly, so changed the code to follow the way - Create a pot stack, set meal content to it, create a Ground Storage, place the gs and set the pot stack into it
  8. You can set any client config value via the `.clientConfig` command, including the bgm volume (`musicLevel`): .clientConfig musicLevel 0 .clientConfig musicLevel 30 If you want short-hand commands, you can define custom commands in your mod's `StartClientSide` and use `ICoreClientAPI.TriggerChatMessage` to call `.clientConfig`. That should look like: public override void StartClientSide(ICoreClientAPI api) { api.ChatCommands .Create("notbgm") .HandleWith(args => { api.TriggerChatMessage(".clientConfig musicLevel 0"); return TextCommandResult.Success($"Current music level: {ClientSettings.MusicLevel}"); }); //... }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.