Realistic Soil & Fertilizer Mod for Farming Simulator 25
Adds meaningful depth to farming without overwhelming complexity. Every field has its own soil health — nitrogen, phosphorus, potassium, organic matter, and pH — that changes based on what you grow, what you apply, and what the weather does. Ignore your soil and yields will suffer. Manage it well and your farm runs more efficiently.
SOIL NUTRIENTS
Each field independently tracks five values:
- Nitrogen (N) — depletes heavily from most crops, especially corn and wheat
- Phosphorus (P) — depletes more slowly, matters most for root crops
- Potassium (K) — lost in large quantities with high-yield harvests
- Organic Matter (OM) — improves long-term fertility; manure and compost build it up
- pH — affects how well nutrients are absorbed; lime and gypsum adjust it
Crops extract different amounts of each nutrient. Fallow fields slowly recover on their own.
FERTILIZER TYPES
The mod recognizes all major fertilizer types used in the base game and common mods:
Synthetic:
- Liquid Fertilizer — balanced N/P/K, quick uptake
- Solid Fertilizer — higher phosphorus, standard cost
- Digestate — biogas byproduct, strong nitrogen and potassium
Organic:
- Manure — slow-release, builds organic matter
- Slurry — liquid organic, high in potassium
- Compost — excellent organic matter boost
- Biosolids — good all-around organic option
- Chicken Manure — concentrated nutrients, builds organic matter
- Pelletized Manure — processed for easier application
pH Management:
- Lime — raises pH significantly
- Liquid Lime — slightly gentler than dry lime
- Gypsum — stabilizes pH, improves soil structure
Each type has realistic nutrient profiles with appropriate application rates in metric or imperial units.
SPRAYER RATE CONTROL
Control exactly how much fertilizer you apply per pass:
- Rate Up / Rate Down keybindings let you adjust on the fly while in the cab
- Auto-Rate mode automatically sets the application rate based on how depleted the field is — heavy deficits get more, healthy soil gets less
- Rate persists per vehicle so you don't lose your setting when you get out
HUD
A real-time soil panel shows the current field's nutrient levels at a glance:
- 6 position presets (top right, top left, bottom right, bottom left, center right, or custom)
- Custom position is draggable — put it exactly where you want it
- 4 color themes: Green, Blue, Amber, Mono
- 3 font sizes
- 5 transparency levels
- Compact mode for smaller displays
- Toggle the HUD on/off with a keybinding
- All HUD settings are per-player and don't affect other players in multiplayer
A full Soil Report is also available via keybinding, showing a detailed breakdown for the current field.
SETTINGS
All settings are in-game under Soil & Fertilizer in the game menu. In multiplayer, gameplay settings are admin-controlled. HUD/display settings are always per-player.
Toggleable systems:
- Fertility system (enable/disable the whole mod)
- Nutrient cycles
- Fertilizer costs
- Seasonal effects (nitrogen behavior changes by season)
- Rain effects (rain causes nutrient leaching)
- Plowing bonus (plowing improves soil health)
- Auto-Rate Control
- Notifications (low nutrient warnings)
Difficulty levels:
- Simple — reduced depletion, lower costs, more forgiving
- Realistic — balanced, standard rates (default)
- Hardcore — rapid depletion, higher costs, no room for neglect
Units: Switch between metric (kg/ha) and imperial (lb/ac) per player.
PRECISION FARMING COMPATIBILITY
If the official Precision Farming DLC is active, this mod automatically enters read-only mode. It does not interfere with PF soil data — it just observes. No conflicts.
MULTIPLAYER
Fully supported. The server controls gameplay settings. Each player controls their own HUD preferences. Field soil data is synced to all clients. New players joining mid-session receive a full state sync automatically.
CONSOLE COMMANDS
Type soilfertility in the developer console (tilde key) to see all commands. Key ones:
soilfertility — show all available commands
SoilEnable / SoilDisable — toggle the mod
SoilSetDifficulty 1/2/3 — set difficulty
SoilFieldInfo <fieldId> — show soil data for a specific field
SoilShowSettings — display current settings
SoilResetSettings — reset everything to defaults
SoilSaveData — force save soil data to disk
SoilDebug — toggle debug logging
COMPATIBILITY
- Works with all maps
- Works with all vehicles and sprayers
- Compatible with crop rotation mods
- No known conflicts with other mods
- Save game compatible — existing saves load normally
INSTALLATION
Extract the zip into your mods folder. Configure in-game under Soil & Fertilizer in the settings menu. No additional steps required.
===================================================================
GitHub Repository:
https://github.com/TheCodingDad-TisonK/FS25_SoilFertilizer
===================================================================
COPYRIGHT NOTICE:
All rights reserved. Unauthorized redistribution, copying,
modification, or claiming this mod as your own is strictly prohibited.
Original Author: TisonK
===================================================================
Soil fertility changes were being calculated independently on every machine in multiplayer, causing fields to desync between the host and other players over time. This hotfix ensures only the server runs the calculations.
What's fixed:
- Harvest, plowing, weather, and field ownership effects now only apply on the server and sync correctly to all players
- No more fertility desync in multiplayer or on dedicated servers
No save migration needed.
NEW FEATURES:
- Auto-Rate Control (Variable Rate): Sprayers and spreaders can now automatically adjust application rates based on the field's nutrient needs. Toggle this mode with Left Alt + Z.
- Gypsum Support: A new fertilizer type has been added! Gypsum helps stabilize soil pH toward neutral (7.0) and provides a subtle boost to Organic Matter (OM) to improve soil structure.
- Enhanced Sprayer HUD: The sprayer rate panel now features a green "AUTO" indicator when variable rate control is active, and displays your specific nutrient targets (N, P, K, pH, or OM).
TECHNICAL IMPROVEMENTS:
- Multiplayer Sync: Added dedicated network events to ensure Auto-Rate status is perfectly synchronized for all players on a server.
- Variable Math: Implemented a dynamic multiplier system that calculates the exact "Nutrient Debt" of a field to prevent under or over-application in Auto-Mode.
- Localization: Full translations added for Auto-Rate and Gypsum in all supported languages.
Previously, dragging the HUD to a new position would work in-session but the position setting dropdown had no way to reflect that — and selecting any preset would snap the HUD back.
What's New:
- New Custom option in the HUD Position setting
- Drag or resize the HUD in-game → the setting automatically switches to Custom
- Your custom position is saved and restored on every reload
- Selecting a preset from the dropdown still snaps the HUD to that position as before
No save migration needed — existing saves work as-is.
The Soil HUD position, scale, and visibility were lost every time you reloaded your save. The HUD would snap back to its default position and reappear even if you had hidden it with the J key.
What's Fixed:
- HUD position and scale now save on every game save and when exiting the game
- Hiding the HUD with the J key now persists across reloads
No save migration needed.
Two bugs were quietly causing fertilizer application and crop tracking to produce wrong results with no obvious error in-game. This update makes sure your work in the field is actually being counted.
What's fixed:
- Dry fertilizer spreaders (Pelletized Manure, etc.) now correctly update your soil values — previously the mod silently failed to register the application
- Crop detection now always reflects what's currently growing in a field, not what was there last season
No save migration needed — existing saves load normally.
The HUD and Soil Report were always showing the last harvested crop instead of what's currently growing in the field. Plant wheat after corn and both panels still said "Corn" — that's now fixed.
What's fixed:
- HUD and Soil Report now correctly show the crop currently growing in the field - Fallow fields still display "Fallow" as expected
No save migration needed — existing saves work without changes.
Full changelog -> https://github.com/TheCodingDad-TisonK/FS25_SoilFertilizer/releases/tag/v1.1.0.0
v1.0.9.0 -> v1.0.10.0 (but KM doesnt allow number 10)
The HUD has been completely rebuilt. It now shows live field data for whatever field you're standing on — no more static legend that told you nothing useful.
What's new:
- HUD now displays real-time N/P/K levels, pH, and organic matter for your current field, with color-coded status bars (Good / Low / Critical)
- Shows the field name, current crop, and whether fertilizer has been applied
- HUD is now moveable and resizable — right-click it to enter edit mode, drag to reposition, drag a corner to resize, right-click again to save
- Per-vehicle fertilizer application rate control — adjust how much each sprayer applies directly from the cab (new key bindings)
- Expanded fertilizer profile library with real-world agronomic types (urea, DAP, MAP, potash, dolomite, digestate, and more)
- Fixed a crash when using sprayer rate key bindings
- Fixed new fields starting with incorrect soil values (now matches base game)
No save migration needed — existing saves load normally.
The mod was showing healthy soil values right from the start of a new game, while the base game was simultaneously telling you your fields needed liming and fertilizing. Both systems were right — they just weren't tarting from the same place. This update fixes that.
What's fixed:
- Fields now start slightly acidic (pH ~6.0) and with moderate nutrients, matching the base game's "needs lime / needs fertilizing" starting state
- Applying lime or fertilizer now brings both systems into agreement at the same time
- Added CC BY-NC-ND 4.0 license
- Refreshed README with clearer instructions and feature descriptions
Your existing saves are not affected. Fields already tracked in your save keep their current values — only new or untracked fields use the updated starting values.
- Fixed a silent bug where fields were not being tracked correctly.
FS25 field objects do not expose a numeric field ID directly — the mod was looking in the wrong place, so field fertility data was never initialized and plow events were silently ignored.
What's fixed:
- Field fertility now correctly initializes for all fields on game load
- Plowing now properly registers on the correct field, applying soil organic matter bonuses as intended
- No save migration needed — data will re-initialize automatically
If you were seeing fertility data that never changed, or plowing that seemed to have no effect, this update
resolves both issues.
[Multiplayer Hotfix]
Bug 1 - Settings permanently locked on dedicated server:
The settings UI captured admin status only once (at first open), guarded by `soilFertilizer_initDone`. If the user database hadn't populated yet on join, all controls stayed disabled for the session. Now `updateAdminState()` is called on every frame open so admin status is always current.
Bug 2 — HUD setting changes affected all players:
`hudPosition`, `hudColorTheme`, `hudFontSize`, `hudTransparency`, `hudCompactMode`, and `showHUD` were routed through the server and broadcast to every client. Moving your HUD moved everyone else's HUD too. These settings are now marked `localOnly = true` in the schema — they bypass the network at all three layers (client send, server apply/broadcast, sync receive). Each player controls their own HUD independently, no admin required.
The ✓ checkmark character (Unicode U+2713 / decimal 10003) was used in five HookManager.lua log messages printed when hooks are installed at startup. FS25's bitmap font does not include this glyph — the engine stalled on a missing-character lookup each time the log was flushed to screen, causing a noticeable freeze right after the mod loaded.
All five occurrences replaced with plain ASCII [OK]. The "Character '10003' not found in texture font" warning is gone, and so is the freeze.
The HUD (J key) has been repurposed from a live per-field data display into a quick-reference legend. The full field data is now properly served by the Soil Report dialog.
- Fixed settings page injection that caused other mods' settings pages (Graphics, Better Contracts, etc.) to appear white/blank when SoilFertilizer was loaded
- Fixed a latent runtime error in the HUD where self:getActionName() was called but the method did not exist on SoilHUD
- Added g_fieldManager:getFieldAtWorldPosition() as the primary field lookup (Tier 0) — the most accurate FS25 API, resolving mismatches on complex or dense maps
- Added color coding for N / P / K
- Added safe string conversion for nil fieldIds
- Implemented proper RVB (Register-Validate-Bind) pattern with all required parameters
- Added missing <actions> declaration in modDesc.xml
- Implemented NPCFavor's proven field detection pattern with 500m fallback
- Added natural soil variation (±10% nutrients, ±0.5 pH, ±0.5% OM) with deterministic seeding
- Added multiplayer safety guard - only server creates fields, clients wait for sync
- Added template validation functions for all element types
- Implemented template caching to ensure consistency
- Added candidate scanning with validation before accepting templates
- Added post-clone validation to catch structural issues
- Cache resets on retry to handle mod load order changes
- Improved error messages for debugging template failures
This release fixes critical GUI injection and validation issues that prevented the settings menu from appearing reliably. The mod now works correctly in both singleplayer and multiplayer modes, even when other mods are installed.
- Fixed settings menu not appearing in game
- Fixed network settings errors in multiplayer
- Fixed module loading errors (NetworkEvents.lua)
Architecture Refactor & Multiplayer Improvements
New Modules:
- HookManager — Proper hook lifecycle management (install/uninstall) for all game hooks
- SettingsSchema — Single source of truth for all settings definitions, reducing touch points for new settings from ~10 to 1
- Constants (SoilConstants) — All magic numbers extracted into a centralized config (crop rates, fertilizer profiles, recovery rates, thresholds, timing, difficulty multipliers)
- Logger (SoilLogger) — Consistent [SoilFertilizer] log prefix across all files
Multiplayer:
- Added SoilFieldUpdateEvent — server-authoritative per-field soil data sync on harvest/fertilize
- Field data now included in full sync event for joining players
- Network sync retry logic (3 attempts, 5-second intervals) for full sync requests
Bug Fixes:
- Converted unsafe direct function replacements (Sprayer.spray, environment.update) to Utils.appendedFunction for better mod compatibility
- Added field data cleanup on ownership change (memory leak fix)
Code Quality:
- Refactored SoilFertilitySystem with clean delegate methods (onHarvest, onFertilizerApplied, onFieldOwnershipChanged, onEnvironmentUpdate)
- Simplified SettingsManager, Settings, and SoilSettingsUI by driving them from the schema
- Updated modDesc version descriptor from 92 to 105
- Added community localization improvements (PR #9)
- Added 6 missing functions
- Improved error handling with pcall()
- Improved consistent logging system
- Added nil safety checks
- Improved hook management to prevent duplicates
- Added 3 new settings (Seasonal Effects, Rain Effects, and Plowing Bonus)
- Improved GUI initialization
- Improved compatibility checks
Changelog:
- Fixed `SoilFieldInfo` command now properly initializes and returns field data
- Improved daily soil updates with weather/season effects
- Fixed small bug in settings UI
Not working:
- Visual soil indicators on map (no color changes yet)
- Crop yield effects (doesn't change harvest amounts)
- Fertilizer cost adjustments (setting exists but not implemented)
- Equipment wear/tear from soil conditions
- Soil texture/sand/clay effects
Planned:
- Crop rotation bonuses - doesn't give yield bonuses for good rotations
- Cover crop effects - doesn't recognize cover crops
- Soil compaction - from heavy equipment
- Irrigation effects - on nutrient availability
- Fields can be scanned, but will give default values for now
- Precision Farming now correctly detected and sets read-only mode.
- Fixed settings tab (When u have FS25_WorkerCosts issues WILL appear in the game)*
- Lazy initialization added to prevent crashes on servers/clients.
*Will be fixed soon!
!!! Please read this carefully !!!
When the mod is used together with mods like Precision Farming, the settings are not available in the pause menu for now. You can configure it using the console. I'm working on a proper fix for this.
You can still use the mod with other mods, but there won’t be a settings tab in the pause menu. Keep this in mind.
There might still be issues, but I have tested it on my own machine and got no errors after the changes. For this reason I pushed this version.
Please create an issue on the GitHub repo if you get any errors after this changelog!
- Fixed settings tab overlapping with other mods in pause menu
- Fixed game crash when updating before fields were scanned
- Fixed "pairs() table expected, got nil" error in SoilFertilitySystem
- Fixed multiplayer and dedicated server compatibility
- Fixed GUI injection failures causing settings menu issues
- Added full compatibility with Precision Farming mod
- Added Used Tyres mod compatibility (GUI disabled, console commands work)
- Added dedicated server support with automatic GUI disabling
- Added config file for user customization options
- Added mod conflict detection and auto-compatibility mode
- Added console-only mode for server environments
- Improved GUI spacing to prevent overlapping with other mods
- Improved field scanning with nil safety checks
- Improved error handling throughout the mod
- Improved multiplayer stability and server/client detection
- Improved logging and debug information
- Improved settings menu layout and button persistence
- Ensured fieldData always initializes as a table (not nil)
- Changed initialization order to prevent premature updates
- Changed GUI injection to avoid conflicts with other mods
- Fixed major issue with the shop screen and the in-game map
- Temporarily disabled settings via the pause menu due to ongoing conflicts
- Added compatibility for Precision Farming
- Ensured `self.fieldData` is always initialized as a table (not `nil`)
- Added type checking before using `pairs()` to iterate
- Added improved error logging for debugging
- Fixed a game crash when the mod attempted to update before fields were scanned