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

[BUG] rebel sieges can invalidate CBs #114

Closed
moretrim opened this issue Feb 4, 2020 · 4 comments
Closed

[BUG] rebel sieges can invalidate CBs #114

moretrim opened this issue Feb 4, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@moretrim
Copy link
Contributor

moretrim commented Feb 4, 2020

System Information:
The attached archived save was generated on 0.4.6.1 but it reproduces locally with 0.4.6.2 on my end.

Describe the bug
In the save acquire_state is temporarily unavailable on overseas countries. The player country is Bavaria with bits all over the world, mostly inherited from a British dismantlement. Following shenanigans it is also mostly covered in (but not occupied by) rebels. Due to this the CB is valid for fabrication on some neighbouring countries, but not for overseas countries.

To Reproduce
Load the save as Bavaria and run e.g. debug cb_use acquire_state BAV GRE. The CB requirements should show green all across the board. However acquire_state cannot be picked for fabrication against Greece. Other spurious targets include Turkey, New World countries, etc.

If the game is unpaused, the CB can made available by clearing a path of rebel-free provinces from the capital to a port.

Debugging methodology
It took me a few tries to figure what's happening. I suggest using a debug decision to keep track of the number of ports:

how_many_ports = {
    potential = {}
    allow = {
        num_of_ports = 1
    }
    effect = {}
    ai_will_do = { factor = 0 }
}

Here is an example of a path I cut through the rebels from Munich to Hamburg. At this point the CB is back on the table again against overseas countries.

cut_them_down

I did not test what happens if foreign troops block the capital–port path.

Expected behaviour
Honestly I may have expected occupied ports to restrict CBs, but mere sieges definitively came off as a surprise. If this is expected behaviour, then I suppose there is no bug. If you agree occupation is a better condition I can whip up a PR for this. Should it just look out for rebel control, or any loss of control?

@moretrim moretrim added the bug Something isn't working label Feb 4, 2020
@arkhometha
Copy link
Owner

arkhometha commented Feb 4, 2020

Hi @moretrim, this is definitively not expected behaviour. Feel free to do a PR for this - I guess replacing it with any_owned_province = { has_building = naval_base } might fix it?

@moretrim
Copy link
Contributor Author

moretrim commented Feb 4, 2020

That's right.

I did further digging and it turns out that it's much harder to fudge num_of_ports if the capital is itself coastal. This might explain why this went on so long before being discovered.

moretrim added a commit to moretrim/Historical-Project-Mod that referenced this issue Feb 4, 2020
Closes arkhometha#114.

To sidestep the quirks of `num_of_ports` and spare players the
frustration of spuriously invalidated CBs, a different requirement is
used instead:

    any_owned_province = { port = yes }
moretrim added a commit to moretrim/Historical-Project-Mod that referenced this issue Feb 4, 2020
Closes arkhometha#114.

To sidestep the quirks of `num_of_ports` and spare players the
frustration of spuriously invalidated CBs, a different requirement is
used instead:

    any_owned_province = { port = yes }

A comment in cb_types lays out the situation in full for future
maintainers.
moretrim added a commit to moretrim/Historical-Project-Mod that referenced this issue Feb 4, 2020
Closes arkhometha#114.

To sidestep the quirks of `num_of_ports` and spare players the
frustration of spuriously invalidated CBs, a different requirement is
used instead:

    any_owned_province = { port = yes }

A comment in cb_types lays out the situation in full for future
maintainers.
@moretrim
Copy link
Contributor Author

moretrim commented Feb 5, 2020

Closed with #116.

@moretrim moretrim closed this as completed Feb 5, 2020
arkhometha added a commit that referenced this issue Feb 5, 2020
*	Cleanup to the Conquest of the Chaco/Desert decisions. They've been opened up to any SP or GP past a certain date if they own the correct provinces/have the right techs.
*	Small changes to provinces in the Austrian empire to guarantee they do not start with unemployment.
*	During the Anglo-Sikh war, AI UK-allied countries that are not part of the Indian subcontinent should now drop from the war without prejudice to their alliance with the UK.
* 	Fix to a vanilla bug that could cause CBs to be invalidated depending on armies sieging your capital. By @moretrim - closes #114 via #116
*	Fix to a vanilla bug that made newly released countries like Oman, Sudan or CSA that had slavery lose random slave states. Closes #96
@moretrim
Copy link
Contributor Author

moretrim commented Mar 5, 2020

I do not believe the following warrants a new issue. I can't really think of a way to fix it, and I'm mostly posting it for posterity & to demonstrate how pervasive the underlying issue is.

siege_to_coast

The country of Danzig is able to connect its capital of Lemberg (don't ask) to the Baltic coast during a war with Russia, using a siege to bypass the choke point that is Krakow. This permits the queuing of e.g. battleships in those Baltic naval bases, which is otherwise not allowed in overseas provinces:

can_build_overseas = no

The constructions persist if the connection is broken (e.g. the war ends).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants