Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
178c0fb
fix: stop unconditionally consuming RMB in TaxHUD mouse handler
TheCodingDad-TisonK May 28, 2026
676df2f
chore: bump version to 1.1.4.1
TheCodingDad-TisonK May 28, 2026
1ec2b21
chore: add release zip v1.1.4.1
TheCodingDad-TisonK May 28, 2026
d55b6f1
fix: enter HUD edit mode via TM_HUD_DRAG key binding, not RMB
TheCodingDad-TisonK May 28, 2026
7f3fff5
chore: rebuild zip with correct HUD edit mode key binding fix
TheCodingDad-TisonK May 28, 2026
5935767
l10n: add Danish translation (DJWestDK, native speaker)
TheCodingDad-TisonK Jun 3, 2026
2ef308f
Add Gemini agent house-rules pointer
TheCodingDad-TisonK Jun 27, 2026
16ddd9c
Remove GEMINI.md (does not belong in the mod repo)
TheCodingDad-TisonK Jun 27, 2026
8ff9989
fix: gate annual tax deduction to server for multiplayer
TheCodingDad-TisonK Jul 1, 2026
1b77f69
feat: add recordExpense public write API for companion mods
TheCodingDad-TisonK Jul 2, 2026
fb4486b
feat: SettingsHub bridge for the FarmTablet System Settings app
TheCodingDad-TisonK Jul 2, 2026
0faa04d
chore: bump to 1.1.4.2 for ecosystem pre-release
TheCodingDad-TisonK Jul 3, 2026
f97fe05
docs: add VISION/ROADMAP/TODO scaffolds ahead of the ecosystem audit
TheCodingDad-TisonK Jul 8, 2026
7c95616
docs: fill VISION/ROADMAP/TODO from ecosystem audit baseline
TheCodingDad-TisonK Jul 8, 2026
0279b54
docs: reconcile TODO/ROADMAP - F15 MP tax bug already fixed on dev (8…
TheCodingDad-TisonK Jul 9, 2026
4eee6c7
fix: SettingsHub bridge passes selfPersisted so the hub mirrors for d…
TheCodingDad-TisonK Jul 9, 2026
6038209
feat: StateLedger + MasterHUD bridges (bedrock, delegate-when-present)
TheCodingDad-TisonK Jul 9, 2026
9b19058
feat: mirror SCS irrigation operating cost as a deductible expense (S…
TheCodingDad-TisonK Jul 17, 2026
b9fe2ca
docs: mark SCS-011 irrigation-expense mirror done; note test-harness gap
TheCodingDad-TisonK Jul 17, 2026
4d894a7
docs: SCS-011 in-game verified (Irrigation Operations debit fires on …
TheCodingDad-TisonK Jul 17, 2026
9d8860e
chore: bump version to 1.1.5.0
TheCodingDad-TisonK Jul 17, 2026
f101911
docs: reconcile TODO/ROADMAP with v1.1.5.0 (StateLedger/MasterHUD/Set…
TheCodingDad-TisonK Jul 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added FS25_TaxMod.zip
Binary file not shown.
35 changes: 35 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Roadmap: FS25_TaxMod

> Ecosystem role: **Markets and Economy** · Part of the Realistic Farming connected suite
> Status: FILLED from the ecosystem audit/baseline.
> Forward-looking only. Shipped history lives in CHANGELOG.md and the releases.

## How to use this file
- Populate the milestones below from the audit baseline once it lands.
- Each item should be small enough to map to a `TODO.md` entry.
- Keep it honest: near-term is committed, mid-term is intended, long-term is aspirational.

## Current baseline
- Version at baseline: v1.1.3.0
- Audit reference: ecosystem-dev-tracking Point 1-5 (FS25_TaxMod, 2026-06-30)
- Baseline date: 2026-06-30

## Near-term (next release cycle)
- [x] MP tax bug (F15): DONE on development (commit 8ff9989d). Annual-tax `addMoney` gated on `getIsServer`; `applyDailyTax` only accumulates. Re-verify the release asset matches dev HEAD (asset modDesc was mislabeled 1.1.4.1).
- [x] StateLedger `TaxMod_Data` bridge live (delegate-when-present); `modSettings/` save kept as the safety copy. Shipped v1.1.5.0. (Fully retiring the FS22 path is a later cleanup.)
- [~] SettingsHub: 5 settings registered (selfPersisted), shipped v1.1.5.0; removing TaxSettingsUI.lua + UIHelper.lua (ESC injection) still open.

## Mid-term (this season)
- [ ] NetworkSync channel `TaxMod_Sync` for settings broadcast on admin change. Not built yet.
- [x] MasterHUD `TaxMod_HUD` registered (delegate-when-present; TaxHUD keeps its own draw/update/mouse logic). Shipped v1.1.5.0.
- [ ] Decide the fate of `returnPercentage` (vestigial in the annual model).

## Long-term / aspirational
- [ ] Richer tax model (brackets, deductions, or period options) without breaking MP correctness.

## Cross-mod / ecosystem dependencies
- [~] Bedrock migrations: 3/4 done (StateLedger + MasterHUD + SettingsHub, v1.1.5.0); NetworkSync remaining.
- [ ] FarmTablet TaxApp (reads `g_currentMission.taxManager`).

## Deferred / parked
- Consuming a peer earnings API instead of reading `farm.money` directly: parked; direct read is correct and simpler for v1.
32 changes: 32 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# TODO: FS25_TaxMod

> Ecosystem role: **Markets and Economy** · Part of the Realistic Farming connected suite
> Status: FILLED from the ecosystem audit/baseline, kept current.
> Convention: `[ ]` open · `[~]` in progress · `[x]` done · `[!]` blocked. Newest at the top of each section.

## From the ecosystem audit (Arissani)
- [x] StateLedger `TaxMod_Data` bridge live (delegate-when-present); own `modSettings/` save kept as the safety copy per the ecosystem pattern. Shipped v1.1.5.0. (Fully retiring the FS22 createXMLFile path is a later cleanup.)
- [~] SettingsHub bridged (selfPersisted, v1.1.5.0); removing TaxSettingsUI.lua + UIHelper.lua (ESC injection) is still open (ESC retained as the standalone fallback meanwhile).
- [ ] Decide: keep or remove `returnPercentage`.

## Bugs
- [x] MP tax bug (F15): RESOLVED on development (commit 8ff9989d, 2026-07-01). The annual-tax `addMoney` is gated on `getIsServer` (main.lua:226); `applyDailyTax` only accumulates and moves no money. Note: the mislabeled pre-release asset (modDesc 1.1.4.1) predates this, so re-verify against dev HEAD before release.

## Features / enhancements
- [~] Bedrock 3/4 built (delegate-when-present): StateLedger + MasterHUD + SettingsHub (v1.1.5.0). NetworkSync (`TaxMod_Sync`) still open.

## Cross-mod integration
- [x] SCS-011 irrigation-expense mirror: DONE + IN-GAME VERIFIED 2026-07-17 (`src/integrations/CropStressIrrigationExpense.lua`, commit 9b19058). Reads the SCS B3.2b facade (`getIrrigationSystems` / `getIrrigationCostsEnabled`) once per in-game day and records ONE aggregated "Irrigation Operations" debit via `recordExpense` (bookkeeping only, no money moved; SCS already charges it, so no double-charge). Attributes to `g_currentMission:getFarmId()` (the same local player farm SCS's FinanceIntegration debits; corrects the brief's pivot-ownership OI-1). Depreciation wired but neutral at 0 (OI-2: needs a capital value + useful life from the balance pass). Verified in-game: -€40 Irrigation Operations debit fired on the day change, no errors. Deployed, not released (batched). Soft follow-ups: confirm the amount equals SCS's actual daily deduction; check the `M0` month stamp in the ledger display.
- [ ] TaxMod has NO self-test harness (verify gap). SCS-011 was verified via Lua 5.1 parse + the SCS-side getter test + in-game; stand up a `tools/test/` harness (mirror SoilFertilizer/SCS) before the next real logic build.
- [x] StateLedger: `TaxMod_Data` bridge live (delegate-when-present). Shipped v1.1.5.0.
- [ ] NetworkSync: `TaxMod_Sync` (settings broadcast). Not built yet.
- [x] MasterHUD: `TaxMod_HUD` registered (delegate-when-present). Shipped v1.1.5.0.
- [x] SettingsHub: 5 settings registered (selfPersisted). Shipped v1.1.5.0.

## Docs / localization
- [ ] Keep all 26 languages in step for any new setting.
- [ ] Update README/version on each release.

## Blocked / waiting on
- [~] Bedrock migrations: 3/4 adopted (StateLedger/MasterHUD/SettingsHub, v1.1.5.0); NetworkSync remaining.
- [!] MasterHUD GUI-visibility suppression policy (waits on: audit answer on whether MasterHUD or each panel guards GUI visibility).
41 changes: 41 additions & 0 deletions VISION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Vision: FS25_TaxMod

> Ecosystem role: **Markets and Economy** · Part of the Realistic Farming connected suite
> Status: FILLED from the ecosystem audit (Point 1-5, ecosystem-map, notes).
> Last updated: 2026-07-08

## 1. One-line purpose
Recurring farm taxation: an annual (and optional daily) tax charged against the farm's finances, so profit carries an ongoing liability instead of just accumulating.

## 2. Problem it solves
FS25 has no taxation. Money accrues with zero ongoing cost, so once a farm is profitable there is nothing pulling against the balance. TaxMod adds a realistic recurring tax so wealth management and reinvestment actually matter.

## 3. Design pillars
- **Multiplayer-correct.** Tax deductions are server-authoritative. A period's tax is charged once for a farm, never once per connected client.
- **Finance-based.** The tax scales off the farm's own money/finances, read from base-game farm data.
- **Configurable rates.** Tax rate and cadence are settings; defaults stay reasonable.
- **Standard persistence.** State lives in the standard save surface, not a non-standard subfolder.

## 4. Role in the ecosystem
- Public handle on `g_currentMission.taxManager` (getfenv alias `g_TaxManager`), set in `Mission00.load`.
- Reads from (consumes): base-game farm finances via `g_farmManager:getFarmById(...).money` directly. It does NOT consume a peer economy API (it is not a confirmed consumer of getEarningsForFarm/getFertilizerSpendForFarm; that was architectural intent, not v1 behaviour).
- Read by (consumers): FarmTablet TaxApp, via the mission handle read contract.
- Core-API registration status (specced in Point 1-5, not yet wired):
- StateLedger (save/load): planned, module `TaxMod_Data`. Replaces the non-standard `modSettings/FS25_TaxMod.xml` and the FS22 createXMLFile/loadXMLFile usage.
- NetworkSync (MP state): planned, channel `TaxMod_Sync` (settings broadcast on admin change).
- MasterHUD (overlays): planned, `TaxMod_HUD` (TaxHUD already owns its draw/update/mouse logic).
- SettingsHub (admin settings): planned, 5 settings. Removes TaxSettingsUI.lua + UIHelper.lua (the ESC-menu injection).

## 5. Explicit non-goals
- Does not consume peer economy mods for its base. It reads farm money directly rather than another mod's earnings API.
- Not a subsidy or income system (that is IncomeMod). TaxMod only takes money.
- The HUD layout stays client-local.

## 6. Success criteria
- A period's tax is deducted exactly once per farm, correct in multiplayer.
- Persistence moves to the standard save surface; no reliance on a `modSettings/` subfolder that may not exist.
- Settings are admin-gated with no ESC-menu injection remaining after the SettingsHub move.

## 7. Open questions for the audit
- `returnPercentage` is still in the settings table and save surface but no longer drives the annual tax model. Keep for backward compat or remove?
- MasterHUD: TaxHUD already guards on `g_gui` visibility itself. Should MasterHUD suppress draws when the GUI is visible, or does each panel keep handling that?
Loading