Squad file data

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28007
Joined: Sun Dec 04, 2005 6:25 pm

Squad file data

Post by rbodleyscott »

Here is some info about the data columns in the squads file:

Name - this is the name of the unit used in scenario .BAM files and also in ArmyList.txt files
ID - this is the units index number for IDS_UNITNAME and IDS_UNITINFO strings
Type - this is the troop type ("squad type"). You can see the full list in /Data/Terrain.txt
IconID - not used
ManCount - this is the number of models in the unit
IconSIze - not used
IconHeight - not used
LOS - this is the LOS in the open x 10
CoverLOS - this is the LOS into cover x 10
Cost - this is the cost to purchase in Force Selection
DeathAngle - not used
ViewFlags - 1 can hide in the edge of a wood, 2 - can't hide in the edge of a wood (can hide further in)
AP - basic move distance x 4
Speed - move animation speed
MoveCost - a multiplier for move cost. All units have value 1 currently
FireDirectionOffset - not used
AssetFilename 0 the model name (the actual model file has "_0.s4f" appended to this).
Morale - not used (FOG2 uses a different Morale system - see MoraleState below)
Transport - not used
CanBeCarried - not used
Blocking - not used
ScoutRange - not used
HE_TileDamage - not used
SFXImpact - not used
Shots - number of shots per turn. All units have value of 1. May not work correctly if increased.
AmbushSkill - not used
TurnRate - not used
TotalMen - the number of men in the unit as the default StrengthMultiplier of 100%
UnitSize - the combat strength of the unit
BodyArmour - armour 0 = none, 50 = protected, 100 = armoured, 300 = fully armoured. Can be any value in batween.
Experience - Experience - trop quality is the average of Experience and elan. Each value can be 0 to 300
Elan - Elan
Reserve - not used

These are all capabilities:
Light_Artillery
Heavy_Artillery
Handgun
Bombs
Bow
Longbow
Crossbow
Sling
Javelins
Darts
Heavy_Lancers
Light_Lancers
Impact_Foot
Pike
Heavy_Weapon
Offensive_Spearmen
Defensive_Spearmen
Light_Spear
Swordsmen
// end of capabilities

MoraleState - morale state of the unit - 0 = steady, 1 = disrupted, 2 = fragmented, 3 = routed, 5 = destroyed
Attacking - whether the unit originally initiated the close combat or not
SeasonalMultiplier - not used
Startdate - not used
Endate - not used
General - general's name index. -1 if no general with unit.
UnitScaling - a value to compensate for models not all coming out of MAX at the same scale. 0 is equivalent to 1000.
ShaderValue - the number of variants on the texture sheet
BannerHeight - the height of the bottom of the banner above ground level.
3DViewZoom - camera zoom on the unit in 3D view boxes - e.g. the unit UI at the bottom of the battle screen
3DViewHeight - camera height in the 3D view boxes
Richard Bodley Scott

Image
Paul59
General - King Tiger
General - King Tiger
Posts: 3800
Joined: Tue Jul 21, 2015 11:26 pm

Re: Squad file data

Post by Paul59 »

Hi Richard,

I must admit that I never paid any attention to the MoraleState column before. If I set it to Disrupted does that set the starting morale state of the unit, but the unit can still recover to steady? Or is Disrupted the best that it can ever achieve?
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.
welk
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 294
Joined: Sat Sep 08, 2007 11:56 am

Re: Squad file data

Post by welk »

I tried to modify the capabilities parameter of units : i.e, for Archers, to replace 100 by 200 seems improve their bow efficacity (more casualties inflicted) : is that right ? And what is the max limit ?
Cumandante
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Wed Sep 29, 2010 5:53 pm

Re: Squad file data

Post by Cumandante »

welk wrote:I tried to modify the capabilities parameter of units : i.e, for Archers, to replace 100 by 200 seems improve their bow efficacity (more casualties inflicted) : is that right ? And what is the max limit ?
As I understand it, 100 means that 100% of the unit has that capability (in this case bows). If 50, only half the men will shoot. I have no idea what effect values over 100 have in the game.

Also, to Richard, thanks for this thread. A couple of basic guides may go a long way in helping the modding community grow.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28007
Joined: Sun Dec 04, 2005 6:25 pm

Re: Squad file data

Post by rbodleyscott »

Paul59 wrote:Hi Richard,

I must admit that I never paid any attention to the MoraleState column before. If I set it to Disrupted does that set the starting morale state of the unit, but the unit can still recover to steady? Or is Disrupted the best that it can ever achieve?
That would work, but it would probably be better to do it in scripts rather than use a customised squads file to do it for 1 scenario.
Richard Bodley Scott

Image
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28007
Joined: Sun Dec 04, 2005 6:25 pm

Re: Squad file data

Post by rbodleyscott »

welk wrote:I tried to modify the capabilities parameter of units : i.e, for Archers, to replace 100 by 200 seems improve their bow efficacity (more casualties inflicted) : is that right ? And what is the max limit ?
We have not tested values above 100 so I cannot say whether they will always work as expected.
Richard Bodley Scott

Image
welk
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 294
Joined: Sat Sep 08, 2007 11:56 am

Re: Squad file data

Post by welk »

I tested with 400 for Cretan archers : it works fine and my cretan archers are now really elite bowmen :mrgreen:
Cumandante
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Wed Sep 29, 2010 5:53 pm

Re: Squad file data

Post by Cumandante »

Can I add combat capabilities, or do I need to work with/edit the ones available?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28007
Joined: Sun Dec 04, 2005 6:25 pm

Re: Squad file data

Post by rbodleyscott »

Cumandante wrote:Can I add combat capabilities, or do I need to work with/edit the ones available?
You can add more, but will need to code their effects in the various combat functions, as well as add strings for them.
Richard Bodley Scott

Image
Cumandante
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Wed Sep 29, 2010 5:53 pm

Re: Squad file data

Post by Cumandante »

rbodleyscott wrote:
Cumandante wrote:Can I add combat capabilities, or do I need to work with/edit the ones available?
You can add more, but will need to code their effects in the various combat functions, as well as add strings for them.
Do you have any idea if there is a limit?

EDIT: added 12 new capabilities, didn't implement any of them yet, but there were no crashes so far. If there is a limit it is either quite relaxed or doesn't even apply to the Squads file.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28007
Joined: Sun Dec 04, 2005 6:25 pm

Re: Squad file data

Post by rbodleyscott »

Cumandante wrote:
rbodleyscott wrote:
Cumandante wrote:Can I add combat capabilities, or do I need to work with/edit the ones available?
You can add more, but will need to code their effects in the various combat functions, as well as add strings for them.
Do you have any idea if there is a limit?

EDIT: added 12 new capabilities, didn't implement any of them yet, but there were no crashes so far. If there is a limit it is either quite relaxed or doesn't even apply to the Squads file.
There is a limit on the number of unit Attribute variables. The columns in the squads file are attributes, but other attributes are also used in the code for unit variables that are not part of the Unit definition and therefore don't need to be in the Squads file.

We were at the limit and Pip has just added 64 more. He does not plan to do this again, because it causes issues with saved games. We will no doubt use many of the 64 for various purposes in future updates.

Therefore, if you want your mod to have any longevity, I suggest you don't used more than 20 new attributes - whether in the squads file or elsewhere. (The mind boggles as to how you could find even 12 new capabilities to add).

I am afraid we cannot straitjacket future development by reserving Attributes for modding use only, but I think you should be safe for quite a long while using no more than 20.
Richard Bodley Scott

Image
Cumandante
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Wed Sep 29, 2010 5:53 pm

Re: Squad file data

Post by Cumandante »

rbodleyscott wrote:Therefore, if you want your mod to have any longevity, I suggest you don't used more than 20 new attributes - whether in the squads file or elsewhere. (The mind boggles as to how you could find even 12 new capabilities to add).
I added them as a test of the engine's limits. I probably won't need that many new capabilities.
rbodleyscott wrote:I am afraid we cannot straitjacket future development by reserving Attributes for modding use only, but I think you should be safe for quite a long while using no more than 20.
Now I'm wondering what you'll use those new attributes for.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28007
Joined: Sun Dec 04, 2005 6:25 pm

Re: Squad file data

Post by rbodleyscott »

Cumandante wrote:
rbodleyscott wrote:Therefore, if you want your mod to have any longevity, I suggest you don't used more than 20 new attributes - whether in the squads file or elsewhere. (The mind boggles as to how you could find even 12 new capabilities to add).
I added them as a test of the engine's limits. I probably won't need that many new capabilities.
rbodleyscott wrote:I am afraid we cannot straitjacket future development by reserving Attributes for modding use only, but I think you should be safe for quite a long while using no more than 20.
Now I'm wondering what you'll use those new attributes for.
Even I don't know that yet. Although I have used one already, to tell the system whether a non-routed unit that has gone off the map evaded off or pursued off. (In patch 2, if it evaded off it will count 1/2 its routed value on the rout % unless it returns.)
Richard Bodley Scott

Image
urkki63
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 70
Joined: Mon Dec 26, 2016 2:27 pm

Re: Squad file data

Post by urkki63 »

MoraleState - morale state of the unit - 0 = steady, 1 = disrupted, 2 = fragmented, 3 = routed, 5 = destroyed

Gentlemen,

Why are these archers STEADY, not DISTRUPTED?

Henry
Untitled-1.jpg
Untitled-1.jpg (135.79 KiB) Viewed 10689 times
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28007
Joined: Sun Dec 04, 2005 6:25 pm

Re: Squad file data

Post by rbodleyscott »

urkki63 wrote:MoraleState - morale state of the unit - 0 = steady, 1 = disrupted, 2 = fragmented, 3 = routed, 5 = destroyed

Gentlemen,

Why are these archers STEADY, not DISTRUPTED?

Henry
Untitled-1.jpg
(For good reason that I won't go into here) the game ignores values in the Morale_State and Attacking columns in the squads file.

I am afraid that if you want units to start the battle disrupted, you will need to dip your toe in the water of scripting. I am happy to show you how to do it for your scenario.
Richard Bodley Scott

Image
urkki63
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 70
Joined: Mon Dec 26, 2016 2:27 pm

Re: Squad file data

Post by urkki63 »

I am afraid that if you want units to start the battle disrupted, you will need to dip your toe in the water of scripting. I am happy to show you how to do it for your scenario.

Well, in the very beginning of the scenario, a division of 5000 Egyptians (mostly average infantry but also 500 superior light chariots) are ambushed and completely annihilated by 2500 enemy chariots. Enemy casualties were apparently minimal since they promptly wheeled around and went to do battle elsewhere.

The Egyptians had marched across the desert for a month carrying heavy loads so they must have been exhausted = disrupted. However, exhaustion was just one factor among many so I'm open to suggestions. Perhaps lowering troop quality somehow would have the same effect (can't go much lower than raw levy, though..). But if starting the battle disrupted is they way to go I'm willing to dip my toe in scripting.

Cheers!

Henry
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28007
Joined: Sun Dec 04, 2005 6:25 pm

Re: Squad file data

Post by rbodleyscott »

urkki63 wrote:
I am afraid that if you want units to start the battle disrupted, you will need to dip your toe in the water of scripting. I am happy to show you how to do it for your scenario.

Well, in the very beginning of the scenario, a division of 5000 Egyptians (mostly average infantry but also 500 superior light chariots) are ambushed and completely annihilated by 2500 enemy chariots. Enemy casualties were apparently minimal since they promptly wheeled around and went to do battle elsewhere.

The Egyptians had marched across the desert for a month carrying heavy loads so they must have been exhausted = disrupted. However, exhaustion was just one factor among many so I'm open to suggestions. Perhaps lowering troop quality somehow would have the same effect (can't go much lower than raw levy, though..). But if starting the battle disrupted is they way to go I'm willing to dip my toe in scripting.

Cheers!

Henry
The easiest way is for you to tell me exaclty which troops/team you want to be affected, send me the whole folder and I will add the necessary script - and point out the bit that does what you want.
Richard Bodley Scott

Image
Gwydion2
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 4
Joined: Fri Jan 12, 2018 5:31 pm

Re: Squad file data

Post by Gwydion2 »

I've noticed that all the chariot units have 0 Bodyarmour and these units don't show an armour level in battle.
Does that mean that the armour column is ignored on chariots, or can I add armour to improve a chariots close combat ability?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28007
Joined: Sun Dec 04, 2005 6:25 pm

Re: Squad file data

Post by rbodleyscott »

Gwydion2 wrote:I've noticed that all the chariot units have 0 Bodyarmour and these units don't show an armour level in battle.
Does that mean that the armour column is ignored on chariots, or can I add armour to improve a chariots close combat ability?
It is intended to be ignored.
Richard Bodley Scott

Image
edward77
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Wed Nov 10, 2010 9:11 pm

Re: Squad file data

Post by edward77 »

Richard,
As a newcomer to and would be scenario designer for FOG II, I must congratulate Paul for his excellent FOG II Scenario Guides which are comprehensive concise and step by step.
On a more mundane level With P&S I persisted with editing the csv file rather than the spreadsheet. This time I am going to use the spreadsheet. Sorry to be pedantic but I need to fully understand the procedure. I have FOG II with Immortal Fire and Rise of Rome. I have placed copies of both (csv & xlsx) vanilla files into my custom file and made them readable. I am using Office.org to open the spreadsheet which I assume has all the IF and RoR units. I can copy lets say the last unit on row 98, Prodromoi, 111 and place it in the next row 99 with either a new name or call it Prodromoi1. I can then edit some of the variables, mostly experience and elan at this early stage. If I then save the file as text csv it will update the original csv file. Is this correct or are there other things to do? Many thanks.
Post Reply

Return to “Field of Glory II: Modding”