Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joeyparrish/valheim-farmcounter

A Valheim mod for tracking farm population
https://github.com/joeyparrish/valheim-farmcounter

valheim valheim-mod

Last synced: about 1 month ago
JSON representation

A Valheim mod for tracking farm population

Awesome Lists containing this project

README

        

# FarmCounter - A Valheim Mod by Joey Parrish

Source: https://github.com/joeyparrish/valheim-farmcounter

[FarmCounter Preview Video

![FarmCounter Preview Video](https://img.youtube.com/vi/DPXoDrkEHrg/hq2.jpg)](
https://youtu.be/DPXoDrkEHrg "FarmCounter Preview Video")

## About

FarmCounter lets you add special tags to a sign that will be replaced with
counts of nearby creatures.

For example, `$tame_boar` would be replaced with a count of "nearby" tamed
boars, while `$wild_deer` would be replaced with a count of "nearby" wild deer.

See [the definition of "nearby"](#defining-nearby) below.

## Installation

FarmCounter is published on both ThunderStore and Nexus Mods. Install using
your favorite mod manager.

## Tags for vanilla tameable creatures

| Creature | Tag |
| ------------- | ----------------- |
| Tame Boar | `$tame_boar` |
| Tame Piggy | `$tame_boarpiggy` |
| Tame Wolf | `$tame_wolf` |
| Tame Wolf Cub | `$tame_wolfcub` |
| Tame Lox | `$tame_lox` |
| Tame Lox Calf | `$tame_loxcalf` |

## Tag construction

A tag has a prefix and a suffix.

The prefix is either `$tame_` to count tame creatures, `$wild_` to count wild
creatures, or `$all_` to count both.

The suffix is the untranslated name of a creature. A full list can be found
in [Jotunn's docs on translation data](https://valheim-modding.github.io/Jotunn/data/localization/translations/English.html).
If the name is `$enemy_boar`, the suffix is simply `boar`.

So, for example, `$all_goblin` would count all nearby Fulings. If you're using
a mod like [AllTameable](https://www.nexusmods.com/valheim/mods/478) or
[Pokéheim](https://github.com/joeyparrish/pokeheim#readme), then any creature
could be considered tame.

## Extended tag syntax for modded creatures

Modded creatures that don't follow the normal `$enemy_` pattern in `m_name` can
still be counted. There is an extended syntax that you can use for
names that contain spaces or don't follow normal patterns.

Extended tags take the form of `${tame_...}`, `${wild_...}`, or `${all_...}`,
where the `...` part is the exact `m_name` for the modded creature. It can
contain any character but `}`.

For example, when using the
[OdinHorse](https://valheim.thunderstore.io/package/OdinPlus/OdinHorse/) mod,
there is a creature with `m_name` set to `$horse_odin`. To count tame horses,
use the tag `${tame_$horse_odin}`. Foals can be counted with
`${all_$horse_offspring}`.

For another example, [AllTameable](https://www.nexusmods.com/valheim/mods/478)
creates baby deer with `m_name` set to `Mini $enemy_deer`. To count tame baby
deer, use the tag `${tame_Mini $enemy_deer}`.

## Defining "nearby"

Valheim defines your "base" as anything in range of your workbenches, so this
mod uses a similar definition.

A creature is in range of your sign if it is range of any workbench in range of
your sign.

In vanilla Valheim, workbenches have a 20 meter range. If you're using a mod
such as [Valheim Plus](https://github.com/valheimPlus/ValheimPlus), FarmCounter
will detect the overridden distance from the other mod and use that instead.

To determine the number of nearby workbenches, you can use the special
debugging tag `$all_workbench`.

## Dependencies

Just [BepInEx](https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/).

## Incompatibilities

None that we know of!

## Multiplayer

If someone is not using the mod, they will simply see the raw tag on the sign.

## Links

- Nexus Mods: https://www.nexusmods.com/valheim/mods/1952/
- Thunderstore: https://valheim.thunderstore.io/package/joeyparrish/FarmCounter/

## Credits

FarmCounter was created by [Joey Parrish](https://joeyparrish.github.io/).