Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition adoption of writing system on modifier #105

Merged

Conversation

moretrim
Copy link
Contributor

@moretrim moretrim commented Jan 29, 2020

The purpose of the establish_writing_system decision (typo in the name
fixed in this change) is to remove the crippling lacks_writing_system
modifier when applicable. However the decision is only conditioned on
the related lacking_writing_system flag and not the modifier itself.

Should a country lose the flag in some fashion, it would be stuck with
the debilitating modifier for the rest of the game. I don't believe that
this status can realistically be achieved in most games, though it is
not entirely outside the realm of possibility either. For instance an
organised ARO (aka Biafra) that managed impossibly high literacy
through colonial shenanigans might become eligible for colonial_legacy
after release.

With this change the condition for the establish_writing_system
decision correctly reflects its effect, namely by targeting the
lacks_writing_system modifier. On top of that the modifier is also
consistently removed whenever the flag is.


This PR has been tested in artificial conditions, in countries with and without a writing system. (Events and Westernisation through RP points via console.)

The purpose of the `establish_writing_system` decision (typo in the name
fixed in this change) is to remove the crippling `lacks_writing_system`
modifier when applicable. However the decision is only conditioned on
the related `lacking_writing_system` flag and not the modifier itself.

Should a country lose the flag in some fashion, it would be stuck with
the debilitating modifier for the rest of the game. I don't believe that
this status can realistically be achieved in most games, though it is
not entirely outside the realm of possibility either. For instance an
organised `ARO` (aka Biafra) that managed impossibly high literacy
through colonial shenanigans might become eligible for `colonial_legacy`
after release.

With this change the condition for the `establish_writing_system`
decision correctly reflects its effect, namely by targeting the
`lacks_writing_system` modifier. On top of that the modifier is also
consistently removed whenever the flag is.
@moretrim
Copy link
Contributor Author

For full disclosure I ran into this when I was working on a submod that Westernises every uncivilised country at the start of the game. I tried to make the submod as agnostic as possible to support as many mods as possible, but I ran into this.

As a consequence this PR is more for my own benefit than the mod's, though I still think it improves the codebase overall.

Copy link
Owner

@arkhometha arkhometha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @moretrim, thanks for the commit.

Even if not a big deal, it eases your work and apparently can potentially detect the situations you described. One thing though, perhaps would be better to make it so checks either the flag or the modifier for the potential part? This way if a country is left stuck with the flag (and not the modifier) for some reason they can also get rid of it. But that's a change I can make myself.

@arkhometha arkhometha merged commit 08714b0 into arkhometha:Development Feb 1, 2020
arkhometha added a commit that referenced this pull request Feb 3, 2020
* Fixed to Welsh Liberal party early end date. From #97 by @Libeccio-DD
* Tweaks for the Zanzibar cores #101 and Alaskan Frontier decision #102 by @Libeccio-DD
* Fixes to the Life Rating visual scale and to several graphics #107 by @thiagodesacosta
* Fixes for potential problems if a country was somehow stuck with the lacks_writing_system modifier by @moretrim - #105
* Fix Fort  position in Niigata so they do not overlap with Sado. Closes #104
* Fix for Greater Germany events not distributing provinces to existing countries - they will do it now. Made a few tweaks to the order of the released countries. If Austria has Bohemia/Sudetes/Lower Silesia cores when the event fires, Germany should get these as cores (and inherit them). Again, this is all a temporary solution until I fix the mess over Austrian cores. Closes #108
* Changed the requirement for building the Panama canal from the TNT invention to the "Drilling and Blasting" tech to avoid the invention's conditions delaying the construction of the canal. Closes #109
* National focus map mode fix by @Libeccio-DD - #112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants