Usual approach when wages are calculated based on stats to within 1 is not very realistic, slightest changes in stats should not affect it. I suppose we always can round stats in calculations up to ten or even more.
And even then wages changes should not be instant, since people cannot really see stats screen, they can see only results of the job. We probably could recalculate wages every 5-15 days, not every turn.
===>>
https://github.com/XelaPy/PyTFall/issues/163Well, you're obviously right, we cannot depend on split functions across 3 different classes like we did in the past, that is close to impossible to balance and to maintain. Given time, I'd like to calculate wages (and a lot of other things) based on a complex Economy module, but that will prolly be worth a whole release version, at least the way I want it to work.
For now, we can start with some things preparing for it and making sure we have a manageable system now, as with everything else, we'll have to use OOP and more specifically a generalized object that can be accessed from any module in the game and fulfills the needs of any such module. It'll be called something like Tier and we'll have to come up with 3 or 4 per job (or group of jobs if/when possible).
For example:
tier 1:
- wage = 5
- stats = ...
- skills = ...
- constant modifiers = ...
func1():
- calculates offsets (if some worker skills are lower/higher than requirements).
and etc.
From this object, we can draw clients expectations, salary a worker expects to receive, actual result. That result will prolly return a percentage which we can modify in the job itself further based off events (matched trait, good mood and etc.).
It will also be very easy this way to add a bar (gui bar, not a business) to modify expected payment within one tier and allow tier upgrades for businesses. If that percentage falls short, reputation is lost, if it's better than expected, reputation increases. Near range will keep rep constant.
This will be easy to code, will work with the possible future Economy module (that will auto-adjust those values through demand/supply of workers based on their amounts and skills). And I think that I can code the system and you can balance it out really well. We may even come up with auto-teir system that takes the first tier and creates new once increasing demands to them... and once more, most relevant data will be at one place, instead of 3 (or more) separate places.