Cohesion states ?
Cohesion states ?
Is it possible to assign cohesion states (disrupted, fragmented) to units in the Scenario Editor ?
Re: Cohesion states ?
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.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Re: Cohesion states ?
Thank you very much ! I will look at your scenario and try to adapt the scripts.Paul59 wrote: ↑Tue May 05, 2020 7:48 pmNo, 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.
"Happy those who can script as they will enter FoG2 heaven"

-
- Field of Glory 2
- Posts: 28310
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Cohesion states ?
Hmm:Athos1660 wrote: ↑Tue May 05, 2020 8:10 pmThank you very much ! I will look at your scenario and try to adapt the scripts.Paul59 wrote: ↑Tue May 05, 2020 7:48 pmNo, 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.
"Happy those who can script as they will enter FoG2 heaven"![]()
Code: Select all
id = GetUnitOnTile(29,29);
SetAttrib(id, "MoraleState", 2);
SetUnitStatusFlag(id);
SetAttrib(id, "DisplayMoraleState", 2);
Code: Select all
id = GetUnitOnTile(29,29);
SetAttrib(id, "MoraleState", 2);
SetAttrib(id, "DisplayMoraleState", 2);
SetUnitStatusFlag(id);
Or, even better
Code: Select all
id = GetUnitOnTile(29,29);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
Richard Bodley Scott


Re: Cohesion states ?
rbodleyscott wrote: ↑Wed May 06, 2020 6:52 amHmm:Athos1660 wrote: ↑Tue May 05, 2020 8:10 pmThank you very much ! I will look at your scenario and try to adapt the scripts.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.
"Happy those who can script as they will enter FoG2 heaven"![]()
This code does appear to work in this scenario, but in general it really ought to beCode: Select all
id = GetUnitOnTile(29,29); SetAttrib(id, "MoraleState", 2); SetUnitStatusFlag(id); SetAttrib(id, "DisplayMoraleState", 2);
otherwise the changed morale state won't show until something causes a fresh status update.Code: Select all
id = GetUnitOnTile(29,29); SetAttrib(id, "MoraleState", 2); SetAttrib(id, "DisplayMoraleState", 2); SetUnitStatusFlag(id);
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 !
Re: Cohesion states ?
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
Thanks to both of you
