CONDITION_POSITION question

Please post here for questions and discussion about modding for Strategic Command.
Post Reply
User avatar
Lothos
Posts: 1255
Joined: Tue May 23, 2006 8:22 pm

CONDITION_POSITION question

Post by Lothos »

I have the following condition for a resource

; - Moscow - Range 30 - 1 Unit - Allies - USSR
#CONDITION_POSITION= 221,65 [30,30] [1,1] [2] [116]
; - New York - Range 30 - 1 Unit - Allies - USA
#CONDITION_POSITION= 10,104 [30,30] [1,1] [2] [115]

What I am noticing is that it is firing on the first turn in 1939 even though both USSR and USA are neutral.

I would have expected since the condition is looking for Allied units and they are not in the allies yet that the condition would have been false but it appears to ignore the fact they are still neutral.

Yes I can use a VARIABLE_CONDITION but this uses an AND instead of an OR for the condition and I figured using CONDITION_POSITION in this way would get me the OR I needed.
User avatar
BillRunacre
Posts: 6601
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: CONDITION_POSITION question

Post by BillRunacre »

They will count as Allied even though they are not yet fully Mobilized.

How about if you had two separate scripts, one triggered if the USA is fully mobilized and the USSR neutral, the other being if the USA is neutral and the USSR fully mobilized?

There is a slight chance both countries could enter the war in the same turn, so that would be a downside of this option.

Can you give me a better idea of what the events are to do, as that might help my thought process with trying to come up with a better solution?
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
User avatar
Hubert Cater
Posts: 5997
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: CONDITION_POSITION question

Post by Hubert Cater »

In this case they lean Allied, even if not fully mobilized, so yes the condition would be satisfied.

Best thing to do is to qualify it with the VARIABLE_CONDITION if you don't want the not fully mobilized Allied units to be taken into account.
User avatar
Lothos
Posts: 1255
Joined: Tue May 23, 2006 8:22 pm

Re: CONDITION_POSITION question

Post by Lothos »

BillRunacre wrote: Fri Jun 24, 2022 1:51 pm They will count as Allied even though they are not yet fully Mobilized.

How about if you had two separate scripts, one triggered if the USA is fully mobilized and the USSR neutral, the other being if the USA is neutral and the USSR fully mobilized?

There is a slight chance both countries could enter the war in the same turn, so that would be a downside of this option.

Can you give me a better idea of what the events are to do, as that might help my thought process with trying to come up with a better solution?
I am trying to cut down on repetitive events sucking up event numbers so that I may use them later.

I keep seeing several identical events to handle a country being neutral, war, surrender etc.... with the same exact text and sub events which is very inefficient.

I discovered that using the ALIGNMENT command (for example) on a specific hex (a minors capital) to check if it was neutral was way easier that doing multiple checks to see if they are neutral leaning allies or neutral leaning axis. This trick worked with the surrender of Norway event which had multiple copies checking to see if they were leaning toward the Axis or Allies and then have the same exact sub events. Just checking to see if their capital was neutral solved that problem.

I also found (in Spain's regard) it was better to use a CONDITION_POSITION command to see if they became active on either Axis or Allies. This allowed me to eliminate multiple identical events with a simple check to see if Spain specifically had any allied units or axis units near its capital (which would always happen once they get involved in the war). This was to simplify the Spanish ports being given to Germany events and then having them returned to Spain.

I tried to use this same style with detecting the USSR and USA being active. I just assumed that since they are neutral still that their units would not be detected as allied.
Post Reply

Return to “Scenario Design and Modding”