Open Tekamthi opened 1 year ago
A quick look through the code suggests this should work as intended.
When did it last work? In what situations are you finding that this isn't working?
When I first began experimenting with civ 5 mods in or around 2016, it worked, though I had other projects that consumed my attention since. At that time, I had made a mod that gave units a promotion with this flag when they cleared a barb camp, or claimed a goody hut. AI attacked the unit as expected, and human could attack it as well, however I was trying to make it only a temporary promotion, and this was one of my first mod attempts: I could not figure out how to make it reliably disable after the desired duration or condition (i understand this much better now).
In recent testing, as human I can no longer attack an AI unit with this promotion without declaring war. I am not sure if the AI can or can't attack such a unit, but it simply does not, unlike its past behavior. My intention, if this were functional, would be to revisit the old goodyhut/barb camp mod and add VP features such as plague chance (any unit attacking would be similarly affected) and a short turn duration -- create some short, localized conflicts around the early exploration rewards.
Anyway I will look at this again, and provide some updated details w/ screenshots etc. I am pretty sure it still works in vanilla so I should be able to demonstrate the behavior side-by-side. Since opening this issue I found another discussing the underlying code at https://github.com/LoneGazebo/Community-Patch-DLL/issues/9407
1. Mod Version (X.Y.Z). Current Version: 3.7.5
3.7.5
2. DirectX Version
3. List of Other Mods
4. Describe the Issue
The 'AlwaysHostile' field in UnitPromotions table used to allow all civs to attack the AlwaysHostile promo'd unit, without declaring war. Last tested several years ago, but no longer works. Can we get this functionality back for modding?
5. Save Game From 1 Turn Before (ALWAYS ATTACH THIS IF POSSIBLE)
6. Logs (ALWAYS ATTACH THESE IF POSSIBLE)
7. CvMiniDump.dmp File (ATTACH IF REPORTING A GAME CRASH)
8. Steps to reproduce the Issue (Optional)
9. Screenshots of the Issue (Optional)