Compare commits

..

No commits in common. "ffa3860258aff39e92387b0dda90deb88dd2e70c" and "83c146ceccb33c26e0bc87fa1ce253a68e762fb4" have entirely different histories.

2 changed files with 5 additions and 7 deletions

View file

@ -2,8 +2,6 @@
This page sums up a few of the basics that you'll need to know if you want to make a mod for Tiny Life. This page sums up a few of the basics that you'll need to know if you want to make a mod for Tiny Life.
## Creating mods ## Creating mods
Tiny Life mods are created using the .NET platform and the C# programming language, which means you need to have the [.NET SDK](https://dotnet.microsoft.com/en-us/download) installed. You can find the required version in the [dependency version history](#dependency-version-history) below.
To create a mod, all you have to do is create a repository [from this template](https://github.com/Ellpeck/TinyLifeExampleMod) by pressing the green "Use this template" button. Then, you can open the project contained in it using Visual Studio, Rider or any other kind of C# IDE. The code that is already there contains some examples. Once you're done checking them out, you can just delete them and start fresh. To create a mod, all you have to do is create a repository [from this template](https://github.com/Ellpeck/TinyLifeExampleMod) by pressing the green "Use this template" button. Then, you can open the project contained in it using Visual Studio, Rider or any other kind of C# IDE. The code that is already there contains some examples. Once you're done checking them out, you can just delete them and start fresh.
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 directory 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 directory, and run the game, all in one simple command. 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 directory 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 directory, and run the game, all in one simple command.
@ -16,7 +14,7 @@ If you have any questions, don't hesitate to [ask on the Discord](https://link.t
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 post it to [the community](https://itch.io/board/1032686/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 post it to [the community](https://itch.io/board/1032686/mods).
## Updating mods ## Updating mods
To change the version of Tiny Life that your mod is compiled against, simply go into [the project file](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/ExampleMod.csproj) and change the `TinyLifeApi` version. Note that some other dependencies might also have been updated, which needs to be [taken into account](#dependency-version-history). To change the version of Tiny Life that your mod is compiled against, simply go into [the project file](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/ExampleMod.csproj) and change the `TinyLifeApi` version. Note that some other dependencies might also have been updated, which needs to be [taken into account](https://github.com/Ellpeck/TinyLifeExampleMod#dependency-version-history).
## Where's the source code? ## Where's the source code?
The NuGet package for the Tiny Life API just contains a [reference assembly](https://docs.microsoft.com/en-us/dotnet/standard/assembly/reference-assemblies) so that people can't just download the game from NuGet and play it. Since most of the public API is documented, you won't have to look at the source code in most cases, anyway. The NuGet package for the Tiny Life API just contains a [reference assembly](https://docs.microsoft.com/en-us/dotnet/standard/assembly/reference-assemblies) so that people can't just download the game from NuGet and play it. Since most of the public API is documented, you won't have to look at the source code in most cases, anyway.
@ -24,4 +22,4 @@ The NuGet package for the Tiny Life API just contains a [reference assembly](htt
Technically, you can [download the game](https://tinylifegame.com/) and then decompile it to see the implementation's code, but due to its license, copying it is not allowed. Technically, you can [download the game](https://tinylifegame.com/) and then decompile it to see the implementation's code, but due to its license, copying it is not allowed.
## Dependency version history ## Dependency version history
Since the mod is compiled against the same dependencies as Tiny Life, it also needs to have the same versions of those dependencies for mods to work correctly with the game. Each update to the template repository is [tagged](https://github.com/Ellpeck/TinyLifeExampleMod/tags) with the game's version number. If you want to develop for a certain version, just check that tag's [project file](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/ExampleMod.csproj) to see the required dependency versions, as well as the required .NET version. Since the mod is compiled against the same dependencies as Tiny Life, it also needs to have the same versions of those dependencies for mods to work correctly with the game. Each update to the template repository is [tagged](https://github.com/Ellpeck/TinyLifeExampleMod/tags) with the game's version number. If you want to develop for a certain version, just check that tag's [project file](https://github.com/Ellpeck/TinyLifeExampleMod/blob/main/ExampleMod.csproj) to see the required dependency versions.

View file

@ -2,12 +2,12 @@
Welcome to the Tiny Life Modding API! On here, you can find the full modding API documentation, a bunch of modding tutorials, as well as an online version of the game's changelog. Welcome to the Tiny Life Modding API! On here, you can find the full modding API documentation, a bunch of modding tutorials, as well as an online version of the game's changelog.
## What next? # What next?
- To install a mod, custom lot or custom household, check out the [custom content installation](~/articles/getting.md) tutorial. - To install a mod, custom lot or custom household, check out the [custom content installation](~/articles/getting.md) tutorial.
- To create your first mod, check out the [modding basics](~/articles/mod_basics.md) tutorial or the [example mod](https://github.com/Ellpeck/TinyLifeExampleMod). - To create your first mod, check out the [modding basics](~/articles/mod_basics.md) tutorial or the [example mod](https://github.com/Ellpeck/TinyLifeExampleMod).
- This site features a web version of the modding API's [documentation](xref:TinyLife) as well, which is a verbatim copy of the XML documentation that you can find in the API's source. - This site features a web version of the modding API's [documentation](xref:TinyLife) as well, which is a verbatim copy of the XML documentation that you can find in the API's source.
## Contributing # Contributing
If you've made a mod for Tiny Life before, and you think you know what you're doing, you can help others by contributing your own tutorial articles or improving existing ones. You can get started doing so by [submitting a pull request](https://github.com/Ellpeck/TinyLifeWeb/pulls). If you found an error in the game's API documentation, you can also [submit an issue](https://github.com/Ellpeck/TinyLifeWeb/issues). If you've made a mod for Tiny Life before, and you think you know what you're doing, you can help others by contributing your own tutorial articles or improving existing ones. You can get started doing so by [submitting a pull request](https://github.com/Ellpeck/TinyLifeWeb/pulls). If you found an error in the game's API documentation, you can also [submit an issue](https://github.com/Ellpeck/TinyLifeWeb/issues).
Thank you for supporting Tiny Life's custom content community! Thank you for supporting Tiny Life's custom content community!