[NFP] hey buddies 'Work ethic bug fix' mod is developed

The work ethic bug means your Holy Sites stop benefiting from Work Ethic when pillaged and this persists even when repaired, it's been a real annoyance for some months now. I haven't tested this but if it fixes it that is awesome!
 
And this does... what? Even with a translation, it's not clear what "bug" this fixes.
Reworked ethic work belief does not work after repairing a Lavra?!

The mod basically changes the CollectionType from "COLLECTION_OWNER" to "COLLECTION_CITY_DISTRICTS" and the RequirementType from "REQUIREMENT_DISTRICT_TYPE_MATCHES" to "REQUIREMENT_PLOT_DISTRICT_TYPE_MATCHES".

It seems to work just fine and corrects the problem from my testing. Well done @Namhyeok ! :thumbsup: (If you are the mod author 태연 on Steam)

I think you could also simplify the mod to the following and achieve the same result:
Code:
INSERT INTO Types
       (Type,                 Kind)
VALUES ('DYNMOD_WORK_ETHIC',  'KIND_MODIFIER');
 
INSERT INTO DynamicModifiers
       (ModifierType,          CollectionType,              EffectType)
VALUES ('DYNMOD_WORK_ETHIC',  'COLLECTION_CITY_DISTRICTS',  'EFFECT_ADJUST_DISTRICT_YIELD_BASED_ON_ADJACENCY_BONUS');

UPDATE Modifiers SET ModifierType = 'DYNMOD_WORK_ETHIC', SubjectRequirementSetId = 'BWE_OBJECT_IS_HOLY_SITE'
WHERE ModifierId = 'WORK_ETHIC_ADJACENCY_PRODUCTION_MODIFIER';

INSERT INTO RequirementSets
       (RequirementSetId,           RequirementSetType)
VALUES ('BWE_OBJECT_IS_HOLY_SITE',  'REQUIREMENTSET_TEST_ALL');

INSERT INTO RequirementSetRequirements
       (RequirementSetId,          RequirementId)
VALUES ('BWE_OBJECT_IS_HOLY_SITE', 'REQUIRES_PLOT_HAS_HOLY_SITE');

There's no need to account for UDs anymore (e.g. Lavra) as the game has done that automatically for some time now.
 
Last edited:
Reworked ethic work belief does not work after repairing a Lavra?!

The mod basically changes the CollectionType from "COLLECTION_OWNER" to "COLLECTION_CITY_DISTRICTS" and the RequirementType from "REQUIREMENT_DISTRICT_TYPE_MATCHES" to "REQUIREMENT_PLOT_DISTRICT_TYPE_MATCHES".

It seems to work just fine and corrects the problem from my testing. Well done @Namhyeok ! :thumbsup: (If you are the mod author 태연 on Steam)

I think you could also simplify the mod to the following and achieve the same result:
Code:
INSERT INTO Types
       (Type,                 Kind)
VALUES ('DYNMOD_WORK_ETHIC',  'KIND_MODIFIER');
 
INSERT INTO DynamicModifiers
       (ModifierType,          CollectionType,              EffectType)
VALUES ('DYNMOD_WORK_ETHIC',  'COLLECTION_CITY_DISTRICTS',  'EFFECT_ADJUST_DISTRICT_YIELD_BASED_ON_ADJACENCY_BONUS');

UPDATE Modifiers SET ModifierType = 'DYNMOD_WORK_ETHIC', SubjectRequirementSetId = 'BWE_OBJECT_IS_HOLY_SITE'
WHERE ModifierId = 'WORK_ETHIC_ADJACENCY_PRODUCTION_MODIFIER';

INSERT INTO RequirementSets
       (RequirementSetId,           RequirementSetType)
VALUES ('BWE_OBJECT_IS_HOLY_SITE',  'REQUIREMENTSET_TEST_ALL');

INSERT INTO RequirementSetRequirements
       (RequirementSetId,          RequirementId)
VALUES ('BWE_OBJECT_IS_HOLY_SITE', 'REQUIRES_PLOT_HAS_HOLY_SITE');

There's no need to account for UDs anymore (e.g. Lavra) as the game has done that automatically for some time now.

Wait, the fix is just swapping like a few .xml tags around? How is this taking Firaxis multiple patch cycles to deal with? :confused:
 
Wait, the fix is just swapping like a few .xml tags around? How is this taking Firaxis multiple patch cycles to deal with? :confused:
It’s likely they are trying to fix what is breaking it under the hood. Only they can fix what causes certain modifiers to break in district pillage.

I was thinking last week “I wonder if work ethic could use this other modifier type to give the same result” and this mod author seems to have taken that line of thinking. (There are other effects in the game that grant bonus yield based on adjacency that don’t break on pillage. See: golden age effects.)
 
Wait, the fix is just swapping like a few .xml tags around? How is this taking Firaxis multiple patch cycles to deal with? :confused:
Just like the forest fire bug, someone put in a patch that was just a few lines of code and Firaxis still hasn't gotten around to it yet. And remember how long it took to fix the stealing Great Works bug.
 
I wonder if some similar trick can be done to get rid of the faith purchase bug.

Some modder in CPL seems know what is wrong and they say it's in ProductionPanel.lua. They even released a fix for those who use the Better Balanced Start mod. I wish it can be ported to benefit those who are not using BBS mod.

Here is their fix for those who are interested.
 
I turned the mod on mid game but didn’t do anything; mode wasn’t loaded I think it may not be save game compatible meaning you have to start a new game with it like an insurance policy and not after the fact.. :(
 
It is. But some people are playing long games so it is still an issue...
That's always been the case, though, going back to 2016. Updates will always have the possibility of breaking save games. It's going to be worse now, of course, with the monthly updates. I wouldn't even consider this a bug, though, as it's a problem with deprecated code. In any event, making a mod with BBS's modified ProductionPanel.lua should be pretty straightforward. Btw, does legacy access not work anymore?
 
That's always been the case, though, going back to 2016. Updates will always have the possibility of breaking save games. It's going to be worse now, of course, with the monthly updates. I wouldn't even consider this a bug, though, as it's a problem with deprecated code. In any event, making a mod with BBS's modified ProductionPanel.lua should be pretty straightforward. Btw, does legacy access not work anymore?

It updated twice so now even legacy breaks it.
 
Hi, could you send a copy of this mod to me? I have used your mod in a game and I accidentally deleted it yesterday. And the link of steam workshop is unavailable now.
Thank you so much.
 
Hi, could you send a copy of this mod to me? I have used your mod in a game and I accidentally deleted it yesterday. And the link of steam workshop is unavailable now.
Thank you so much.

Isn't the work ethic bug fixed?
 
There is still the problem of not enjoying from Work Ethic when a Holy Site with all the building was already built in conquered city after you convert them to your faith.

Spoiler Here a proof :

Upthere: City banner with the right faith.
On the side: Holy Site does not display the +6 Production.
In the middle: Proof I chose the Work Ethic belief.

That game, I went to go to see how far the Tourism boost from monopolies went. So far: +2,265%, in a game where many cities are stuck in a 0 Loyalty but unable to go free since free city are not even loaded (only an Arabian logo without color)... In a game where I could resurect Mali but was still not there after liberation. By forcing a unit to wolk inside Mali territory, I managed to declare war where Dido (myself) show up for reaction, and then Mali was fully accessible again for diplomacy and trade.
All that to: declare peace, trade him a snow city, then declare war to conqueer his capital so I can grab that luxury meanwhile having still a Malian civilization where I could have Tourism.


Fortunately, pillaged Holy Site works (and even seems to give back Work Ethic).

I think it is because the Holy Site never update. I will try to see if some Wood planting / chopping can force them to update.
 
Last edited:
Top Bottom