Skip to content

Commit

Permalink
Documentation: Fix #4 and Reduce Mod Content (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
WuZhuoran committed Mar 23, 2024
1 parent 907df36 commit e6353b9
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 65 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"dotnet.defaultSolution": "AnimalSitter.sln"
"dotnet.defaultSolution": "AnimalSitter.sln",
"dotnet.preferCSharpExtension": true
}
4 changes: 0 additions & 4 deletions AnimalSitter/AnimalSitter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="assets\dialog.json" />
<None Include="assets\dialog.xnb" />
<None Include="assets\dialog.yaml" />
<None Include="config.json">
Expand All @@ -68,9 +67,6 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\Pathoschild.Stardew.ModBuildConfig.4.1.1\build\Pathoschild.Stardew.ModBuildConfig.targets" Condition="Exists('packages\Pathoschild.Stardew.ModBuildConfig.4.1.1\build\Pathoschild.Stardew.ModBuildConfig.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Pathoschild.Stardew.ModBuildConfig.4.1.1\build\Pathoschild.Stardew.ModBuildConfig.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Pathoschild.Stardew.ModBuildConfig.4.1.1\build\Pathoschild.Stardew.ModBuildConfig.targets'))" />
</Target>
</Project>
4 changes: 2 additions & 2 deletions AnimalSitter/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("AnimalSitter")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HP")]
[assembly: AssemblyCompany("Oliver")]
[assembly: AssemblyProduct("AnimalSitter")]
[assembly: AssemblyCopyright("Copyright © HP 2024")]
[assembly: AssemblyCopyright("Copyright © Oliver 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
52 changes: 0 additions & 52 deletions AnimalSitter/assets/dialog.json

This file was deleted.

8 changes: 4 additions & 4 deletions AnimalSitter/manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"Name": "Animal Sitter LTS",
"Author": "oliver",
"Version": "2.0.1",
"Description": "Long Time Support Mod Version for Animal Sitter Mod. Let someone else pet all those pesky animals!",
"UniqueID": "oliver.AnimalSitter",
"Version": "2.0.2",
"Description": "Long Term Support Mod Version for Animal Sitter Mod. Let someone else pet all those pesky animals!",
"UniqueID": "oliver.AnimalSitterLTS",
"EntryDll": "AnimalSitter.dll",
"MinimumApiVersion": "4.0.0",
"UpdateKeys": [ "Nexus:0" ]
"UpdateKeys": [ "Nexus:20831" ]
}
126 changes: 124 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,124 @@
# Stardew_AnimalSitter
Animal Sitter Mod for Stardew Valley with long term support.
# Stardew Valley Mod - AnimalSitter

Animal Sitter Mod for Stardew Valley with long-term support.

## Introduction

This [mod](https://www.nexusmods.com/stardewvalley/mods/20831) provide Long-Term Support for original [Animal Sitter](https://www.nexusmods.com/stardewvalley/mods/581) Mod. It includes:
* Support Stardew Valley v1.6+.
* Support SMAPI v4.0.0+.
* TODO: Add i18n Support.
* TODO: Refactor basic framework.
* Will Continue support future version of game and SMAPI.

## Getting Started

* Install the latest version of [SMAPI](https://www.nexusmods.com/stardewvalley/mods/2400).
* Unzip the mod folder into `Stardew Valley/Mods`.
* Run the game using SMAPI.
* Simply press `O` (Letter O).

## Advanced

### Configuration

Here's the default configuration:

```
"keybind": "O",
"growUpEnabled": false,
"maxHappinessEnabled": false,
"maxFullnessEnabled": false,
"harvestEnabled": true,
"pettingEnabled": true,
"maxFriendshipEnabled": false,
"verboseLogging": false,
"costPerAction": 0,
"whoChecks": "spouse",
"enableMessages": true,
"takeTrufflesFromPigs": true,
"bypassInventory": false,
"chestCoords": "73, 14",
"chestDefs": ""
```

**keybind**: The key that you press to tell your animal helper to get to work. This defaults to the "O" key.

**growUpEnabled**: This open tells your animal helper that you'd like them to use dark magic to instantly bring young animals up to the age where they can become contributing members of your farm. Default is false.

**maxHappinessEnabled**: This option tells your animal helper that you don't care how long (or where) they have to pet your animals, but their job is not done until each animal's happiness is maxed. Default is false.

**maxFullnessEnabled**: This option tells your animal helper to feed your animals. A full animal is a producing animal. Default is false.

**harvestEnabled**: This tells your animal worker to harvest the animal drops. If you like doing this yourself, then set this to false.

**pettingEnabled**: This tells your animal worker that you want your animals petted. This is the whole reason I made this mod, so it defaults to true. So if you set this to "false", please keep it to yourself. If you enjoy petting each of your animals (because you don't have a hundred of them) then set it to false.

**maxFriendshipEnabled**: This tells your animal worker whether they have to wear your "you" mask, so that the affection of the animals is directed toward you, and not the help. Defaults to false.

**verboseLogging**: This enables or disabled debug logging. Useful for troubleshooting.

**costPerAction**: This is how much to charge per action per animal. There have been some suggestions around this option, and I do have plans to introduce a more complex pricing structure in the future, but for now just make sure this includes all services that you want the animal checker to perform, and average it out over the number of actions. Defaults to 0.

**takeTrufflesFromPigs**: Whoever trainedm these pigs did an awful job, as they have a tendency to hide truffles. Where? I'm not exactly sure, but they've got 'em, trust me. With this option enabled, your farm helper will perform a TSA-approved body cavity search and find them. If you love the person who is doing your checking, or if you want your pigs to remain unviolated, or if you consider this cheating, then set it to false.

**whoChecks**: This is the name of the person (or animal) who checks your animals. Defaults to "spouse". You can also set it to "pet"-- they do a really good job, but they don't provide much feedback. You can also set this to any character in the game, which will enable dialogues with that character. If it's set to anything else, that name will be used in messages.

**enableMessages**: Thisis whether to enable in-game messages and dialogues revolving around your animal checker. It defaults to true.

**bypassInventory**: Whether to bypass your inventory when depositing animal drops, and go straight to the chests you have defined. Defaults to false.

**chestCoords**: These are the coordinates of the default chest where overflow items are placed. It defaults to (73,14) which is the tile location, when you are looking at your screen, is to the immediate right of the sell-box.

**chestDefs**: This is a bar-separated list of chest locations that you have defined for specific items. It defaults to blank, but here is an example: "430,70,14|340,7,4,FarmHouse" You can see there are 2 options.

The first specifies the item ID and the chest coordinates, this knows to check for a chest on the farm at that location. The second specifies an item id, a chest location, and a building. This will look for a chest at (7,4) in the FarmHouse (which in the starting house is the spot next to the fireplace).

### Customization

The `dialog.xnb` file will allow you to customize the dialog to your liking. I've also included the dialog.yaml source file, but the mod will read it from the XNB file. If you don't know how to do it, google "how to unpack and repack stardew valley mods".

The dialogue elements are arranged in a name_index format. If the name starts with a capital 'X', that means those messages need to stay roughly in that order and in the same format for the dialog to make sense. The number is important.

All other elements can be added to, and modified because they are used randomly at the appropriate place in the dialogue. You have to use the same "name" from the "name_id" that are already in the file, but you can add to and remove so long as all the numbers in a particular group are unique.

Also you'll see that I added a few names down at the bottom,"Shane_1", "Shane_2", "Leah_1", for example. You can add any other Stardew characters dialog to the file in that same format. Those dialogues will be merged in with the "smalltalk" group if your "whoChecks" is set to one of the characters.

Most of the notation that existing SDV dialogs use will work(for example @ is replaced by the name of the farmer). There's also notation added to use values from this mod in the dialog, they are (along with a description)

**%%animalsPet%%** - The number of animals that were petted.
**%%trufflesHarvested%%** - The number of truffles that were harvested.
**%%productsHarvested%%** - The number of other animal products that were harvested (I promise to allow more granular tracking in the future).
**%%aged%%** - The number of animals that were aged to maturity.
**%%fed%%** - The number of animals that were fed.
**%%maxHappiness%%** - The number of animals who had their happiness maxed.
**%%maxFriendship%%** - The number animals that had their friendship toward the farmer maxed out.
**%%numActions%%** - The total number of actions performed.
**%%totalCost%%** - The total costs for all animals.
**%%spouse%%** - The farmer's spouse's name (if married), the value of whoChecks otherwise.

The dialog groups in the file, and a quick explanation of when each are used:

**Xdialog** - Some specific dialogs used when the spouse or non-character check the pots.
**greeting** - Greetings the checker will use when addressing the farmer.
**unfinishedmoney** - Comments the character checker will make when they weren't able to finish on account of no money.
**freebies** - Comments the character checker will make when allowFreebies is true, and the cost of services was more than the farmer has on hand. (Not really used in this mod yet)
**unfinishedinventory** - Comments the character checker will make when they weren't able to finish on account of not having anywhere to deliver the goods. (Not really used in this mod yet)
**smalltalk & character names** - Comments that are thrown in at the end of most conversations.

## Credit

* Original [Mod](https://www.nexusmods.com/stardewvalley/mods/581) and [Code](https://github.com/jdusbabek/stardewvalley) from [John Dusbabek](https://github.com/jdusbabek)
* Unofficial Fix [Mod](http://forums.stardewvalley.net/threads/unofficial-mod-updates.2096/post-22271)

## Contribution

This project will maintain Open Source [here](https://github.com/WuZhuoran/Stardew_AnimalSitter).

We appreciate all contributions. Feel Free to raise any issues or pull requests.

## License

NOTE: Original Mod Use Apache License. In this repo, MIT License is used. Will update when necessary.

MIT @ Oliver

0 comments on commit e6353b9

Please sign in to comment.