Update #21 - Major Milestone Achieved


Big Milestone Achieved! My Modifier System Is Ready!

I’m excited to share that I’ve just finished the biggest chunk of the code for my WW1 logistics simulation game! The modifier system — which lets units, sectors, and even upgrades influence each other — is now fully functional.

Here’s what I’ve built:

Modifier System: Data-Driven and Flexible

I started by defining modifiers as data dictionaries, making it super easy to add new ones. Instead of hard-coding every single modifier effect, I can now drop in a dictionary that specifies:

- Which stat to affect

- The operation (like +5 or -10)

- Whether it recalculates every tick or only applies once

- Required states and forbidden states

- What the target entities can be (battle units, or transport units, or both, or depot workers, etc)

This means I can quickly expand the game with new events, unit upgrades, or commander effects — just by adding a new dictionary entry.

I built a ModifierFactory (a piece of code) that creates all modifier instances at the start of the game. This ensures everything is organized and easy to manage. Whether it’s a unit-level effect, a general bonus, a sector-wide debuff, or an upgrade, they can all be accessed, added or removed immediately because the are preloaded into memory and instantiated already at start.

The ModifierProcessor function is now complete. It applies all active modifiers, whether they come from unit states, sectors, upgrades, or commanders. This makes the system powerful yet simple — one function handles all cases.

Clean Separation of Modifiers

To keep things tidy, I separated modifiers into different arrays:

-modifier_unit_state for unit-specific effects

-modifier_sector_state for sector-wide impacts

-modifier_commander for commander bonuses

-modifier_upgrades for player upgrades

This lets me control when and how to implement different kinds of effects — perfect for balancing and expanding the game later.

I also took the time to refactor the unit stats into multiple layers:

-Baseline values — the original values, untouched by modifiers

-Modified values — what’s actually used in gameplay

-Delta values — how much should be changed per tick/hour

This way, I can always calculate from the original base value, avoiding rounding errors or compounding mistakes.

Plus, I added modifier snapshots — these store the values applied at the moment the modifier was added. It saves how much a modifier changed a value, so that it can be undone when the modifier is removed.

Last Time’s Blunder? Sorted Out!

Remember that head-scratcher from before — where I couldn’t figure out how to separate single-application effects from those recalculated each hour? That’s now fixed! The system properly applies single-application effects once, and repeated effects every tick. One step closer to a fully working game!

Conclusion

With this huge piece of functionality now complete, the game’s core logic is way more robust and flexible. Adding new mechanics is now a breeze, and the risk of bugs has dropped dramatically. Next up: Adding a few more modifiers for each instance to test it all out.

Then the next goal will be the upgrade system for the modules (stables, depot, hospital, etc)



For those who don't know what this is about: Quartermaster: The Forgotten Front 


This is a real-time strategy and logistics simulation set in the World War I era, focused entirely on resource management and tactical decision-making, all without firing a single shot. You’ll be working behind the scenes as a logistics officer, coordinating supply chains, allocating resources, and adapting to the constant challenges of wartime. The gameplay is largely text- and menu-driven. You make decisions by navigating through menus, managing resources, and clicking on various options. 

The game relies more on strategic planning and choices, providing a focused, immersive experience for players who enjoy a text-based, button-driven style of gameplay. You’ll manage the transport and delivery of crucial resources like ammunition, food, and medical supplies to front-line units. Random events—like bad weather, supply shortages, enemy sabotage, and vehicle breakdowns—create complex problems for you to solve as you race against time to keep your units operational and to win the war. It’s a game for players who love strategy, planning, and the thrill of managing high-stakes logistics under pressure. 

Tough Choices: You’ll constantly face manpower shortages. Send workers to repair a bridge and your depot orders might fall behind. Support the field hospital during an outbreak, and you’ll slow down vehicle repairs. Hold them back to manage resources better, and logistics might grind to a halt. Your decisions on resource management will determine whether you win the war—or at least delay defeat as long as possible.

Wishlist it: 👉 https://store.steampowered.com/app/3344310/Quartermaster/

YouTube: www.youtube.com/@FeysGameDev

Steamgroup: https://steamcommunity.com/groups/feysstudio

Leave a comment

Log in with itch.io to leave a comment.