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

Military access is reversed #1553

Open
cetvrtak opened this issue Oct 8, 2022 · 4 comments
Open

Military access is reversed #1553

cetvrtak opened this issue Oct 8, 2022 · 4 comments
Labels
bug Something isn't working coding good first issue Good for newcomers

Comments

@cetvrtak
Copy link
Collaborator

cetvrtak commented Oct 8, 2022

Vic2 military_access = yes relations entry for a country means the country has military access in target country, while HoI4 only has give_military_access = yes command.

We need to reverse this, Vic2 military access TARGET needs to have give_military_access = yes in HoI4 country history file, instead of source country.

@Idhrendur Idhrendur added bug Something isn't working good first issue Good for newcomers coding labels Oct 8, 2022
@Idhrendur Idhrendur added this to the Immediate fixes milestone Oct 8, 2022
@vedant-jad99
Copy link

Hi, can I take this issue, please?

@Idhrendur
Copy link
Member

Please do! Ask any question you need, and when complete create a pull request. There's some automated tools and one of the experienced team members will give a code review, then we'll merge it in.

@vedant-jad99
Copy link

The message is a bit ambiguous, could please clarify the context? I understood from the code that give_military_access = yes is present OutHoi4Country.cpp but I am a bit confused as to what exactly needs to be changed.

@Idhrendur
Copy link
Member

It'll need to be elsewhere, and looks to be a little more complex than I had first assumed.

The function HoI4::Country::convertRelations() is where we convert Vic2 relationship-related stuff to HoI4 relationship-related stuff by instantiating a new HoI4::Relations. You'll need to remove the part of the HoI4::Relations that transfers military access.

You'll need to add a setter to HoI4::Relations for military access. Then add a function to HoI4::World that loops over all Vic2 countries, gets their relations, and sees if they contain military access. If they do, translate the Vic2 tags to HoI4 tags, look up the relevant HoI4 country, and update its relationships with the military access.

It's a lot of steps, so if that's too complex a first task for the converter, feel free to drop it.

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

No branches or pull requests

3 participants