added the ability to pass arguments to the cake script

This commit is contained in:
Ell 2023-12-08 13:37:12 +01:00
parent f4c2dd7f3c
commit 89c48215e9

View file

@ -8,6 +8,8 @@ To create a mod, all you have to do is create a repository [from this template](
To run and publish your mods, you can use the included [Cake](https://cakebuild.net/) script, which includes tasks to build, run and publish your mod. To install the required dependencies, you have to run `dotnet tool restore` in the folder that your mod's project file is in. Then, you can run `dotnet cake --target Run` to build your mod, copy it to Tiny Life's mods folder, and run the game, all in one simple command.
The Cake script also includes some additional tasks and arguments. The `Clean` task removes all development mods from your game's mods folder, and the `args` argument can be used to pass additional arguments to the game for the `Run` target. For example, you can launch into a save directly and enable some cheats automatically by adding the argument `--args="--save TestSave --cheats EditWorld ShowNonBuyable"`
The game's API is **fully documented**. The documentation is easily accessible by opening any of the API's files in your IDE. The most updated version can be found on this site as well.
If you have any questions, don't hesitate to [ask on the Discord](https://link.tinylifegame.com/discordweb) or [start a discussion](https://github.com/Ellpeck/TinyLifeExampleMod/discussions) about it.
@ -15,7 +17,7 @@ If you have any questions, don't hesitate to [ask on the Discord](https://link.t
## Distributing mods
To distribute your mod to other people, you can simply run `dotnet cake --target Publish`. This task will automatically create a `zip` archive that you can share.
If you want other players to try out your mod, you can also share it on [the Steam workshop](https://steamcommunity.com/app/1651490/workshop/). To do so, make sure you have Steam open in the background, and make sure that your mod's `zip` archive is in the game's `Mods` folder. Then, go to the rightmost tab in the game's Options menu and select "Share Mod on Steam Workshop", and then follow the instructions there.
If you want other players to try out your mod, you can also share it on [the Steam workshop](https://steamcommunity.com/app/1651490/workshop/). To do so, make sure you have Steam open in the background, and make sure that your mod's `zip` archive is in the game's mods folder. Then, go to the rightmost tab in the game's Options menu and select "Share Mod on Steam Workshop", and then follow the instructions there.
It's recommended that, in addition to Steam workshop, you also publish your mod elsewhere, like on GitHub releases or [the itch community](https://itch.io/board/1032686/mods), as not every player has access to Steam workshop.