unit.txt file not working fully with decisin type=2

Fury Games has now signed with Matrix Games, and we are working together on the next Strategic Command. Will use the Slitherine PBEM++ server for asynchronous multi-player.

Moderators: MOD_Strategic_Command_3, Fury Software

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

unit.txt file not working fully with decisin type=2

Post by Lothos »

If you set a decision event to TYPE=2 and #DISPLAY_ORDER= 1 and make it pop up with a message so you can answer Yes in the beginning of every turn.

Then create a unit.txt command that will spawn a unit for a neutral minor country and link it to the decision you created.

Then declare war on that minor country.

Even though you answered YES to the decision at the beginning of the turn and then DOWed that Minor on the same exact turn the unit does not spawn.
- NOTE: all unit commands to spawn a unit that are either LINKed to Decisions of TYPE=1 or not linked to anything do fire the second you declare war on the minor.
User avatar
Hubert Cater
Posts: 6094
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: unit.txt file not working fully with decisin type=2

Post by Hubert Cater »

From memory, the way DECISION events work is that if you have a unit event tied to it, and it can fire, it will fire right after the decision is made. In fact all events tied to this decision event that can fire, will fire right away after the decision is made.

However in your case, because the unit event is for a country that is not yet at war, the unit event will not fire right away.

Then because it is a type#2, the unit event will never fire because after it cycles through all events (e.g. right after the decision is made) and the unit event could not fire, the results of the decision is 'flushed' because the decision will fire again on the following turn. I think there is only an exception for Convoy events in this case.

So when you make it a decision event type=1, the unit event will fire whenever the nation is declared war upon, because the results of the decision is not flushed after the first time it cycles through events, e.g. all decision related events may still fire at a later time if they later on become satisfied.

Hopefully this makes sense,
Hubert
User avatar
Lothos
Posts: 1330
Joined: Tue May 23, 2006 8:22 pm

Re: unit.txt file not working fully with decisin type=2

Post by Lothos »

Hubert Cater wrote: Mon Jan 15, 2024 3:50 pm From memory, the way DECISION events work is that if you have a unit event tied to it, and it can fire, it will fire right after the decision is made. In fact all events tied to this decision event that can fire, will fire right away after the decision is made.

However in your case, because the unit event is for a country that is not yet at war, the unit event will not fire right away.

Then because it is a type#2, the unit event will never fire because after it cycles through all events (e.g. right after the decision is made) and the unit event could not fire, the results of the decision is 'flushed' because the decision will fire again on the following turn. I think there is only an exception for Convoy events in this case.

So when you make it a decision event type=1, the unit event will fire whenever the nation is declared war upon, because the results of the decision is not flushed after the first time it cycles through events, e.g. all decision related events may still fire at a later time if they later on become satisfied.

Hopefully this makes sense,
Hubert
It does but in this case

The event fires right at the beginning of the turn, so theoretically the event should be labeled as true for the duration of that turn.

My though was that if you then DOW that country that when it hits the unit command that the decision would still be remembered as being true since it's the same turn and was fired at the beginning.

I guess it's being flushed right away and not at the end of the turn.
User avatar
Lothos
Posts: 1330
Joined: Tue May 23, 2006 8:22 pm

Re: unit.txt file not working fully with decisin type=2

Post by Lothos »

I just realized I posted this in the wrong forum
User avatar
Hubert Cater
Posts: 6094
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: unit.txt file not working fully with decisin type=2

Post by Hubert Cater »

It is being flushed right away, I can add it to the list to maybe change that, just not sure if or when it might though.
Post Reply

Return to “Strategic Command WWII War in Europe”