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

https://github.com/thecodingdad-tisonk/fs25_workercosts

Adds hourly wages for workers with skill-based pricing and configurable rates.
https://github.com/thecodingdad-tisonk/fs25_workercosts

fs25 lua modding wage worker-costs

Last synced: 2 months ago
JSON representation

Adds hourly wages for workers with skill-based pricing and configurable rates.

Awesome Lists containing this project

README

          


Realistic Worker Costs

Realistic Worker Costs


Your workers aren't free. Now your game knows it.

[![Version](https://img.shields.io/github/v/release/TheCodingDad-TisonK/FS25_WorkerCosts?style=for-the-badge&color=4caf50&label=VERSION)](https://github.com/TheCodingDad-TisonK/FS25_WorkerCosts/releases/latest)
[![Downloads](https://img.shields.io/github/downloads/TheCodingDad-TisonK/FS25_WorkerCosts/total?style=for-the-badge&color=2196f3)](https://github.com/TheCodingDad-TisonK/FS25_WorkerCosts/releases)
[![License](https://img.shields.io/badge/LICENSE-MIT-blue?style=for-the-badge)](LICENSE)
[![FS25](https://img.shields.io/badge/Farming%20Simulator-25-brightgreen?style=for-the-badge)](#)
[![Multiplayer](https://img.shields.io/badge/Multiplayer-Supported-success?style=for-the-badge)](#)
[![Languages](https://img.shields.io/badge/Languages-10-orange?style=for-the-badge)](#languages)

Donate via PayPal


[**Install**](#installation) · [**Configure**](#configuration) · [**Console Commands**](#console-commands) · [**Report a Bug**](https://github.com/TheCodingDad-TisonK/FS25_WorkerCosts/issues/new/choose) · [**Request a Feature**](https://github.com/TheCodingDad-TisonK/FS25_WorkerCosts/issues/new/choose)

---

## What This Mod Does

In vanilla FS25, hired AI workers cost nothing. That makes labor a free resource — which kills any incentive to manage your workforce strategically.

**Realistic Worker Costs** fixes that. Every AI worker you hire accumulates wages in real time and bills your farm at regular intervals. You choose how you want to pay them — by the hour or by the hectare — and you set the rate. Cheap labor, fair wages, or premium crew: the choice has consequences.

The mod ships with a full **in-game manager UI** (accessible from the pause menu), integrates with the vanilla settings screen, and exposes everything via console commands.

---

## Features

| | Feature | Detail |
|---|---|---|
| 💰 | **Two payment modes** | Hourly `$/h` or Per Hectare `$/ha` — switch at any time |
| 📊 | **Three wage tiers** | Low · Medium · High — with a custom rate override |
| 🧠 | **Skill-based multipliers** | Higher-skill workers earn 80 %–120 % of the base rate |
| 🖥️ | **In-game manager** | Dedicated pause-menu tab with 4 pages: Dashboard, Wage Settings, Worker Stats, About |
| ⚙️ | **Vanilla settings integration** | Controls also injected into the standard Settings screen |
| 🔔 | **Payment notifications** | HUD popup on every payment cycle (toggleable) |
| ⏱️ | **Real-time timing** | Wages scale with real elapsed time — not game speed |
| 👷 | **Dismissed-worker payouts** | Workers fired mid-interval still get paid for time worked |
| 🌐 | **10 languages** | EN · DE · FR · PL · ES · IT · CZ · PT · UK · RU |
| 🤝 | **Multiplayer ready** | Full support for co-op and dedicated servers |
| 💾 | **Per-savegame settings** | Each save has its own configuration |
| 🎮 | **Console commands** | Full control via the in-game developer console |

---

## Screenshots

> *The built-in manager — accessible from the pause menu.*

![Dashboard](https://github.com/TheCodingDad-TisonK/FS25_WorkerCosts/assets/dashboard-preview.png)

More screenshots

> *Wage Settings tab — configure cost mode, wage level, and see the live rate preview.*

> *Worker Stats tab — per-worker cost breakdown refreshed every 500 ms.*

---

## Installation

### From a Release (recommended)

1. Go to the [**Releases page**](https://github.com/TheCodingDad-TisonK/FS25_WorkerCosts/releases/latest)
2. Download `FS25_WorkerCosts.zip`
3. Drop the zip (do **not** extract) into your mods folder:

```
Documents\My Games\FarmingSimulator2025\mods\
```

4. Launch FS25, enable the mod in the Mod Manager, and start your save

> **Steam users:** Right-click the game → Manage → Browse local files to find your mods path if it differs.

### From Source

```bash
git clone https://github.com/TheCodingDad-TisonK/FS25_WorkerCosts.git
cd FS25_WorkerCosts
bash build.sh --deploy
```

---

## Configuration

### In-Game Manager

Open the pause menu → click the **Realistic Worker Costs** tab (the worker icon).

| Page | What's here |
|------|-------------|
| **Dashboard** | Live status: active workers, next payment countdown, farm balance |
| **Wage Settings** | Cost mode, wage level, notifications, debug toggle, reset button |
| **Worker Stats** | Per-worker cost breakdown, refreshed every 500 ms |
| **About** | How the mod works, wage reference table, current version |

### Vanilla Settings Screen

The mod also injects a **Worker Costs Mod** section into `Pause → Settings → Game` — useful if you prefer the native settings flow. A **Reset Settings** button is added to that screen's footer.

### Settings Reference

| Setting | Options | Default | Notes |
|---------|---------|---------|-------|
| **Mod Enabled** | On / Off | On | Master switch |
| **Cost Mode** | Hourly / Per Hectare | Hourly | See [Wage System](#wage-system) |
| **Wage Level** | Low / Medium / High | Medium | Ignored when Custom Rate > 0 |
| **Custom Rate** | Any number ≥ 0 | 0 | Set to 0 to use Wage Level |
| **Notifications** | On / Off | On | HUD popup on each payment |
| **Debug Mode** | On / Off | Off | Enables `[Worker Costs]` log lines |

---

## Wage System

### Payment Cycle

Workers are paid every **5 real-world minutes**. The timer runs in real time regardless of your in-game time-speed setting — 4× speed does not charge you 4× more.

Workers dismissed mid-interval are automatically settled at the next payment tick — no unpaid labour.

### Hourly Mode

```
wage = base_rate × hours_worked × skill_multiplier
```

| Tier | Base Rate | Min (skill 0%) | Standard (skill 50%) | Max (skill 100%) |
|------|-----------|----------------|----------------------|-----------------|
| Low | $15 /h | $12 /h | $15 /h | $18 /h |
| Medium | $25 /h | $20 /h | $25 /h | $30 /h |
| High | $40 /h | $32 /h | $40 /h | $48 /h |

> **Example:** 3 workers on Medium, running for the full 5-minute interval:
> `$25 × (5/60) hours × 1.0 skill × 3 workers = ~$6.25`

### Per-Hectare Mode

```
wage = base_rate × hectares_worked × skill_multiplier
```

Ideal for large field operations — you pay for output, not clock time. Note: implements that don't expose worked area data will report 0 ha and incur no charge.

### Custom Rate

Set any positive number in **Custom Rate** to bypass the tier system entirely. Set it back to `0` to resume using the Wage Level setting.

---

## Console Commands

Open the console with the **`~`** key:

| Command | Description |
|---------|-------------|
| `workerCosts` | List all available commands |
| `workerCostsStatus` | Show current mod status and active rate |
| `WorkerCostsEnable` | Enable the mod |
| `WorkerCostsDisable` | Disable the mod |
| `WorkerCostsSetWageLevel 1\|2\|3` | `1` = Low · `2` = Medium · `3` = High |
| `WorkerCostsSetCostMode 1\|2` | `1` = Hourly · `2` = Per Hectare |
| `WorkerCostsSetNotifications true\|false` | Toggle payment HUD popups |
| `WorkerCostsSetCustomRate ` | Custom rate (`0` = use Wage Level) |
| `WorkerCostsTestPayment` | Deduct a $100 test charge |
| `WorkerCostsShowSettings` | Full settings dump |
| `WorkerCostsResetSettings` | Reset everything to defaults |
| `wcReloadGui` | Reload the mod GUI without restarting |

---

## Troubleshooting

Workers aren't being charged

1. Run `workerCostsStatus` — confirm `Enabled: true`
2. Make sure AI workers are actually hired and active (not just vehicles parked)
3. Turn on **Debug Mode** and watch `log.txt` for `[Worker Costs]` lines
4. Run `WorkerCostsTestPayment` — if $100 is deducted, the payment system is working fine and the issue is worker detection

Mod doesn't appear in the Settings screen

1. Confirm the mod is enabled in the Mod Manager before loading the save
2. Check `log.txt` for any load errors
3. The mod section appears under **Pause → Settings → Game** — scroll down if needed

Settings aren't saving between sessions

Settings are stored per-savegame at:
```
Documents\My Games\FarmingSimulator2025\saves\savegame\FS25_WorkerCostsMod.xml
```
If that file is missing or can't be written, the mod falls back to defaults each load. Check folder permissions.

Per-hectare mode charges nothing

Not all implements expose worked-area data to the game's AI system. If the implement your worker is using doesn't report hectares, the mod has no area to bill — this is a limitation of the FS25 API, not a bug. Switch to Hourly mode for those workflows.

Where is the log file?

```
Documents\My Games\FarmingSimulator2025\log.txt
```
Search for `[Worker Costs]` — all mod activity (when Debug Mode is on) and any errors are tagged with this prefix.

---

## Changelog

### v1.0.4.0 — Audit & Polish
- Fixed: per-hectare mode showed mode-name string as a cost value in Worker Stats tab
- Fixed: worker cost rows showed a `+` prefix (implying income) — corrected to `-`
- Fixed: `farmId == 0` guard in payment system (spectator slot in multiplayer)
- Fixed: `WCAboutFrame` hardcoded fallback version — now reads live from `g_modManager`
- Polish: `workerCostsStatus` and `ShowSettings` commands now show `/h` or `/ha` correctly
- Polish: bare `print()` calls replaced with `Logging.info()` throughout
- Polish: all file header version numbers brought in sync

### v1.0.2.0 — Tabbed Manager UI
- Added: full in-game manager accessible from the pause menu
- Added: 4-tab inner UI — Dashboard, Wage Settings, Worker Stats, About
- Added: custom tab icon spritesheet with per-tab pictograms
- Added: per-page header icons
- Fixed: `addMoney` hook narrowed to only suppress `MoneyType.WORKER_WAGES`

### v1.0.1.x — Core Fixes
- Fixed: replaced `environment.dayTime` with real-time `dt` — eliminated ~20× overcharge at high game speeds
- Fixed: dismissed workers now receive a final payout at the next settlement tick
- Fixed: `WorkerSettingsUI` local `getTextSafe` restored after refactor

### v1.0.0.0 — Initial Release
- Hourly and per-hectare payment modes
- Three wage tiers with skill multipliers
- Vanilla settings screen integration
- Console commands
- 10-language support

---

## Languages

| Language | Code | Language | Code |
|----------|------|----------|------|
| English | `en` | Czech | `cz` |
| German | `de` | Portuguese (BR) | `br` |
| French | `fr` | Ukrainian | `uk` |
| Polish | `pl` | Russian | `ru` |
| Spanish | `es` | Italian | `it` |

---

## Contributing

Contributions are welcome! Please read [**CONTRIBUTING.md**](CONTRIBUTING.md) before opening a PR.

- Branch off `development` — never commit directly to `main`
- Test in-game before submitting
- Use the [issue templates](https://github.com/TheCodingDad-TisonK/FS25_WorkerCosts/issues/new/choose) for bug reports and feature requests

---

## License

This project is licensed under the **MIT License** — see [LICENSE](LICENSE) for details.

---


Made for the FS25 modding community · Report an Issue