Cohesion states ?

Post Reply
Athos1660
Major-General - Elite Tiger I
Major-General - Elite Tiger I
Posts: 2680
Joined: Wed May 29, 2019 3:23 pm

Cohesion states ?

Post by Athos1660 »

Is it possible to assign cohesion states (disrupted, fragmented) to units in the Scenario Editor ?
Paul59
General - King Tiger
General - King Tiger
Posts: 3859
Joined: Tue Jul 21, 2015 11:26 pm

Re: Cohesion states ?

Post by Paul59 »

Athos1660 wrote: Tue May 05, 2020 7:32 pm Is it possible to assign cohesion states (disrupted, fragmented) to units in the Scenario Editor ?
No, but you can write a script for it in the scenario.bsf file.

My KYNOSKEPHALAI_197BC scenario has scripts to pinpoint exactly which units I wanted to start Fragmented or Disrupted, but it is often possible to use simpler scripts that affect a whole army or certain unit types.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Athos1660
Major-General - Elite Tiger I
Major-General - Elite Tiger I
Posts: 2680
Joined: Wed May 29, 2019 3:23 pm

Re: Cohesion states ?

Post by Athos1660 »

Paul59 wrote: Tue May 05, 2020 7:48 pm
Athos1660 wrote: Tue May 05, 2020 7:32 pm Is it possible to assign cohesion states (disrupted, fragmented) to units in the Scenario Editor ?
No, but you can write a script for it in the scenario.bsf file.

My KYNOSKEPHALAI_197BC scenario has scripts to pinpoint exactly which units I wanted to start Fragmented or Disrupted, but it is often possible to use simpler scripts that affect a whole army or certain unit types.
Thank you very much ! I will look at your scenario and try to adapt the scripts.

"Happy those who can script as they will enter FoG2 heaven" :-)
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28310
Joined: Sun Dec 04, 2005 6:25 pm

Re: Cohesion states ?

Post by rbodleyscott »

Athos1660 wrote: Tue May 05, 2020 8:10 pm
Paul59 wrote: Tue May 05, 2020 7:48 pm
Athos1660 wrote: Tue May 05, 2020 7:32 pm Is it possible to assign cohesion states (disrupted, fragmented) to units in the Scenario Editor ?
No, but you can write a script for it in the scenario.bsf file.

My KYNOSKEPHALAI_197BC scenario has scripts to pinpoint exactly which units I wanted to start Fragmented or Disrupted, but it is often possible to use simpler scripts that affect a whole army or certain unit types.
Thank you very much ! I will look at your scenario and try to adapt the scripts.

"Happy those who can script as they will enter FoG2 heaven" :-)
Hmm:

Code: Select all

	id = GetUnitOnTile(29,29);
	SetAttrib(id, "MoraleState", 2);
	SetUnitStatusFlag(id);
	SetAttrib(id, "DisplayMoraleState", 2);
This code does appear to work in this scenario, but in general it really ought to be

Code: Select all

	id = GetUnitOnTile(29,29);
	SetAttrib(id, "MoraleState", 2);
	SetAttrib(id, "DisplayMoraleState", 2);
	SetUnitStatusFlag(id);
otherwise the changed morale state won't show until something causes a fresh status update.

Or, even better

Code: Select all

	id = GetUnitOnTile(29,29);
	SetAttrib(id, "MoraleState", 2);
	UpdateDisplayMoraleState(id, 2);
Richard Bodley Scott

Image
Athos1660
Major-General - Elite Tiger I
Major-General - Elite Tiger I
Posts: 2680
Joined: Wed May 29, 2019 3:23 pm

Re: Cohesion states ?

Post by Athos1660 »

rbodleyscott wrote: Wed May 06, 2020 6:52 am
Athos1660 wrote: Tue May 05, 2020 8:10 pm
Paul59 wrote: Tue May 05, 2020 7:48 pm

No, but you can write a script for it in the scenario.bsf file.

My KYNOSKEPHALAI_197BC scenario has scripts to pinpoint exactly which units I wanted to start Fragmented or Disrupted, but it is often possible to use simpler scripts that affect a whole army or certain unit types.
Thank you very much ! I will look at your scenario and try to adapt the scripts.

"Happy those who can script as they will enter FoG2 heaven" :-)
Hmm:

Code: Select all

	id = GetUnitOnTile(29,29);
	SetAttrib(id, "MoraleState", 2);
	SetUnitStatusFlag(id);
	SetAttrib(id, "DisplayMoraleState", 2);
This code does appear to work in this scenario, but in general it really ought to be

Code: Select all

	id = GetUnitOnTile(29,29);
	SetAttrib(id, "MoraleState", 2);
	SetAttrib(id, "DisplayMoraleState", 2);
	SetUnitStatusFlag(id);
otherwise the changed morale state won't show until something causes a fresh status update.

Or, even better

Code: Select all

	id = GetUnitOnTile(29,29);
	SetAttrib(id, "MoraleState", 2);
	UpdateDisplayMoraleState(id, 2);


Thank you very much !
I will try it ASAP.
That will be a great addition to my testing/Scenarios !
Athos1660
Major-General - Elite Tiger I
Major-General - Elite Tiger I
Posts: 2680
Joined: Wed May 29, 2019 3:23 pm

Re: Cohesion states ?

Post by Athos1660 »

I successfully made my first "Scenario" with various cohesion states, thanks to your instruction, RBS's bits of script, Paul's Creation guide about the .bsf file and the Kynoskephalai scenario. That's very nice!!!! Very helpful.

Thanks to both of you :-)
Post Reply

Return to “Field of Glory II: Scenario Design”