ACTIVATE_POSITION bypasses BUILD_LENGTH

Post Reply
User avatar
Lothos
Posts: 1304
Joined: Tue May 23, 2006 8:22 pm

ACTIVATE_POSITION bypasses BUILD_LENGTH

Post by Lothos »

This is more a question

Just saw the AI do something I have never seen before. I had a command that issued a BUILD_LENGTH in the offensive.txt

It completely ignored the BUILD_LENGTH and immediately declared war on the country.

What I noticed different in this offensive.txt command than any other one I had was that the ACTIVATE_POSITION had actually values in it instead of the dummy one with 0s.

So this goes to my question, does ACTIVATE_POSITION bypass BUILD_LENGTH once its true?
User avatar
Hubert Cater
Posts: 6063
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: ACTIVATE_POSITION bypasses BUILD_LENGTH

Post by Hubert Cater »

ACTIVATION_POSITION would eve not override build length.

The only thing I can see in the code is that the country that was the target of the build length offensive is a minor already fully mobilized, or a fully mobilized major that is already a belligerent, and the other possibility is you may have another script, with another target in the same country, with no build length that was the trigger of the declaration of war.

If you can provide more context and double check that it is not a secondary script that was the cause, I can likely help you figure out what the issue might be.
User avatar
Lothos
Posts: 1304
Joined: Tue May 23, 2006 8:22 pm

Re: ACTIVATE_POSITION bypasses BUILD_LENGTH

Post by Lothos »

Hubert Cater wrote: Wed Nov 02, 2022 1:50 pm ACTIVATION_POSITION would eve not override build length.

The only thing I can see in the code is that the country that was the target of the build length offensive is a minor already fully mobilized, or a fully mobilized major that is already a belligerent, and the other possibility is you may have another script, with another target in the same country, with no build length that was the trigger of the declaration of war.

If you can provide more context and double check that it is not a secondary script that was the cause, I can likely help you figure out what the issue might be.
I think thats what I am hitting, I have Japan massing on the Burma border (Burma is fully mobilizes with the UK but NOT at war with Japan). What I keep seeing is the second I give it the BUILD_LENGTH command Japan immediately declares war on Burma/UK and starts invading and ignores the BUILD_LENGTH

Since this is in the EXE I would recomend changing the code to not look to see if the country is fully mobilized but to see if the two are actually at war since multiple states of war can exist.
User avatar
Hubert Cater
Posts: 6063
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: ACTIVATE_POSITION bypasses BUILD_LENGTH

Post by Hubert Cater »

Fair point for sure, and let me have a think on this one and double check what kind of effect it might have on the default campaigns before I commit to any potential changes.
User avatar
Hubert Cater
Posts: 6063
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: ACTIVATE_POSITION bypasses BUILD_LENGTH

Post by Hubert Cater »

I think it should be fine, I've made a change on my end for this for the next update, thanks for finding this one.
Post Reply

Return to “MODS and Scenarios”