Files with scripts for exporting battle to FoG2?

Moderator: Pocus

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Wed Jul 08, 2020 5:02 pm

Which file contains the scripts in which it is specified which units are exported to FoG2 and the battle there?

I know that the list of units matching FoGE and FoG2 are in UNITS.CSV, but I'm interested in looking at the actual scripts in other files, if possible.

The aim is to make the units used in FoG2 less generic and more adapted and unique to the factions.

EDIT: I'm cc:ing FrenchDude in here too, for information.
FrenchDude wrote:
Wed Jul 08, 2020 4:56 am
Yep you are right kronenblatt ! I made the choice to use the Global TT mod fbecause I really like using it when playing FOG2. But if you want to use vanilla FOG2 units, it’s possible to do it as long as you follow the rule no2. If you want to use my mod AND play with Vanilla FOG2 units, you will have to change the name of a few units in the UNITS.CSV of my mod.
Luckily, most units in the FOG2TTMod have the same name has units in Vanilla FOG2, so you won’t have to change all unit names in the FOGE mod’s UNITS.CSV
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Fri Jul 10, 2020 7:42 pm

It seems to be BattleConnection.bsf, as far as I can see. And these lines in particular (211 - 260):

Code: Select all

		// Units records
		unitCount = Min(512, GetDynamicArrayLength(gBattleDesc.hParticipants)); // hard limit to not crash FOG II static arrays
		for (unt = 0; unt < unitCount; unt++)
		{
			WriteFileWriteLine(" ");
			
			GetDynamicArray(gBattleDesc.hParticipants, unt, p);
			unitID = p.id; // this is a live unit, safe and correct to access directly
			side = p.side;
			if (bSwapSides)
			{
				side = (side + 1) % 2;
			}
			
			sprintf(line, "[Unit%d]", unt);
			WriteFileWriteLine(line);
			
			Unit_Alias(unitID);
			sprintf(line, "COMMENT %d %s", Abs(Unit_GetNumeral(unitID)), gAlias);
			WriteFileWriteLine(line);
			
			sprintf(line, "ID %d", unitID);
			WriteFileWriteLine(line);
			
			sprintf(line, "SIDE %d", side);
			WriteFileWriteLine(line);
			
			BattleConn_MapUnit(unitID, squad);
			sprintf(line, "TYPE %s", squad);
			WriteFileWriteLine(line);
			
			StartString();
			Unit_PrintName(unitID, 0);
			BattleConn_ExportString("NAME");
			
			sprintf(line, "COHESIONMOD %d", Unit_EffecPct(unitID));
			WriteFileWriteLine(line);
			
			sprintf(line, "HITPOINTSMOD %d", Unit_HitsPct(unitID));
			WriteFileWriteLine(line);

			sprintf(line, "EXPERIENCEMOD %d", Unit_Liaison_GetXPMod(unitID));
			WriteFileWriteLine(line);			

			sprintf(line, "QUALITYMOD %d", Unit_Liaison_QualityMod(unitID));
			WriteFileWriteLine(line);	

			sprintf(line, "AGEOD_COST %d", Unit_Liaison_Cost(unitID));
			WriteFileWriteLine(line);				
		}
Last edited by kronenblatt on Sat Jul 11, 2020 9:36 am, edited 1 time in total.
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Sat Jul 11, 2020 9:30 am

So it could be this file AgeodBattleData.txt that saves battle export data to FoG2, looking at TYPE for each unit and comparing to column A in the SQUADS file of FoG2. Makes sense?

Code: Select all

SAVENAME 450057002700>6000200330002002500?600=6005600020067005600270037005700370002002500?600=60056000200740027001600>6004600020034001600=6000700160096007600>60002003300130003000200240034005400
BATTLEID 23076
SIDEID0 32
SIDEID1 10
MAPTYPE 0
SEEDNUMBER 742610663
REGION 0500960036005600>6005700=600
DATE -308
 
[GENERAL0]
AGEOD_ID 571211776
NAME 34009600>6004700270057003700
QUALITY 2
 
 
[GENERAL1]
AGEOD_ID 574095362
NAME 3400?60047004700960057003700
QUALITY 2
 
 
########## UNITS RECORDS ##########
 
 
[Unit0]
COMMENT 1 ID_UNI_CMC_HEAVY_INFANTRY0
ID 171442177
SIDE 1
TYPE Warband
NAME 9400>20002008400560016006700970002009400>60066001600>600470027009700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 330
 
[Unit1]
COMMENT 2 ID_UNI_CMC_HEAVY_INFANTRY0
ID 171442192
SIDE 1
TYPE Warband
NAME 94009400>20002008400560016006700970002009400>60066001600>600470027009700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 330
 
[Unit2]
COMMENT 1 ID_UNI_CIS_WAR_CHARIOTS1
ID 171442176
SIDE 1
TYPE Celtic_Chariots
NAME 9400>2000200750016002700020034008600160027009600?60047003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 293
 
[Unit3]
COMMENT 1 ID_UNI_CMC_REGULAR_INFANTRY2
ID 171442178
SIDE 1
TYPE Medium_Warband
NAME 9400>200020075001600270027009600?60027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 164
 
[Unit4]
COMMENT 3 ID_UNI_CMC_REGULAR_INFANTRY2
ID 171442180
SIDE 1
TYPE Medium_Warband
NAME 940094009400>200020075001600270027009600?60027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 164
 
[Unit5]
COMMENT 4 ID_UNI_CMC_REGULAR_INFANTRY2
ID 171442181
SIDE 1
TYPE Medium_Warband
NAME 94006500>200020075001600270027009600?60027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 164
 
[Unit6]
COMMENT 9 ID_UNI_CMC_REGULAR_INFANTRY2
ID 171442191
SIDE 1
TYPE Medium_Warband
NAME 94008500>200020075001600270027009600?60027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 164
 
[Unit7]
COMMENT 2 ID_UNI_CMC_REGULAR_INFANTRY2
ID 171442179
SIDE 1
TYPE Medium_Warband
NAME 94009400>200020075001600270027009600?60027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 164
 
[Unit8]
COMMENT 6 ID_UNI_CMC_REGULAR_INFANTRY2
ID 171442185
SIDE 1
TYPE Medium_Warband
NAME 65009400>200020075001600270027009600?60027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 164
 
[Unit9]
COMMENT 8 ID_UNI_CMC_REGULAR_INFANTRY2
ID 171442187
SIDE 1
TYPE Medium_Warband
NAME 6500940094009400>200020075001600270027009600?60027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 164
 
[Unit10]
COMMENT 1 ID_UNI_CMC_CAVALRY0
ID 171442182
SIDE 1
TYPE Noble_Cavalry_Prot
NAME 9400>20002003400160067001600<60027009700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 129
 
[Unit11]
COMMENT 2 ID_UNI_CMC_CAVALRY0
ID 171442183
SIDE 1
TYPE Noble_Cavalry_Prot
NAME 94009400>20002003400160067001600<60027009700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 129
 
[Unit12]
COMMENT 1 ID_UNI_CMC_URBAN_MILITIA0
ID 171442193
SIDE 1
TYPE Slav_Foot
NAME 9400>20002005500270026001600>6000200=4009600<6009600470096001600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 75
AGEOD_COST 65
 
[Unit13]
COMMENT 2 ID_UNI_CMC_URBAN_MILITIA0
ID 171442194
SIDE 1
TYPE Slav_Foot
NAME 94009400>20002005500270026001600>6000200=4009600<6009600470096001600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 75
AGEOD_COST 65
 
[Unit14]
COMMENT 3 ID_UNI_CMC_URBAN_MILITIA0
ID 171442195
SIDE 1
TYPE Slav_Foot
NAME 940094009400>20002005500270026001600>6000200=4009600<6009600470096001600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 75
AGEOD_COST 65
 
[Unit15]
COMMENT 4 ID_UNI_CMC_URBAN_MILITIA0
ID 171442196
SIDE 1
TYPE Slav_Foot
NAME 94006500>20002005500270026001600>6000200=4009600<6009600470096001600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 75
AGEOD_COST 65
 
[Unit16]
COMMENT 1 ID_UNI_ROM_LEGIO0
ID 168558592
SIDE 0
TYPE Hast_Princ_Vet
NAME 9400>2000200<400560076009600?600>600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 75
AGEOD_COST 355
 
[Unit17]
COMMENT 2 ID_UNI_ROM_LEGIO0
ID 168558593
SIDE 0
TYPE Hast_Princ_Vet
NAME 94009400>2000200<400560076009600?600>600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 75
AGEOD_COST 355
 
[Unit18]
COMMENT 1 ID_UNI_ROM_ALAE0
ID 168558594
SIDE 0
TYPE Hast_Princ
NAME 9400>20002001400<60016005600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 84
AGEOD_COST 280
 
[Unit19]
COMMENT 2 ID_UNI_ROM_ALAE0
ID 168558595
SIDE 0
TYPE Hast_Princ
NAME 94009400>20002001400<60016005600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 84
AGEOD_COST 280
 
[Unit20]
COMMENT 3 ID_UNI_ROM_LEGIO0
ID 168558603
SIDE 0
TYPE Hast_Princ_Vet
NAME 940094009400>2000200<400560076009600?600>600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 150
QUALITYMOD 75
AGEOD_COST 355
 
[Unit21]
COMMENT 1 ID_UNI_CMI_CAVALRY0
ID 168558602
SIDE 0
TYPE Grk_arm_cav
NAME 9400>20002003400160067001600<60027009700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 129
 
[Unit22]
COMMENT 2 ID_UNI_ROM_VELITES0
ID 168558597
SIDE 0
TYPE Velites
NAME 94009400>200020065005600<6009600470056003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 82
 
[Unit23]
COMMENT 3 ID_UNI_ROM_VELITES0
ID 168558598
SIDE 0
TYPE Velites
NAME 940094009400>200020065005600<6009600470056003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 82
 
[Unit24]
COMMENT 4 ID_UNI_ROM_VELITES0
ID 168558599
SIDE 0
TYPE Velites
NAME 94006500>200020065005600<6009600470056003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 82
 
[Unit25]
COMMENT 5 ID_UNI_ROM_VELITES0
ID 168558604
SIDE 0
TYPE Velites
NAME 6500>200020065005600<6009600470056003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 82
 
[Unit26]
COMMENT 1 ID_UNI_ROM_VELITES0
ID 168558596
SIDE 0
TYPE Velites
NAME 9400>200020065005600<6009600470056003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 82
 
[Unit27]
COMMENT 2 ID_UNI_CMI_LIGHT_HORSE0
ID 168558601
SIDE 0
TYPE LH_Javelin
NAME 94009400>2000200<400960076008600470002003400160067001600<60027009700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 75
 
[Unit28]
COMMENT 1 ID_UNI_CMI_LIGHT_HORSE0
ID 168558600
SIDE 0
TYPE LH_Javelin
NAME 9400>2000200<400960076008600470002003400160067001600<60027009700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 75
 
[Unit29]
COMMENT 3 ID_UNI_CMI_LIGHT_HORSE0
ID 168558605
SIDE 0
TYPE LH_Javelin
NAME 940094009400>2000200<400960076008600470002003400160067001600<60027009700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 75
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Wed Jul 15, 2020 9:13 am

I've created this simple draft mod, downloadable here, for trial purposes only. It makes, just as a test, every unit a Hast_Princ_Vet (Veteran Hastati/Principes) when exporting a battle to Field of Glory II. Although for some strange reason (probably something in FoGII) some units become Triarii anyway... But still a Roman unit. :) Or @Pocus: why could that be, you think?
ExportedBattle.jpg
ExportedBattle.jpg (127.85 KiB) Viewed 685 times
Extract from AgeodBattleData.txt:

Code: Select all

SAVENAME 450057002700>6000200130002001400>600470096007600?600>600?6003700020067005600270037005700370002001400>600470096007600?600>600?6003700020064001600360047009600?600>600020014002700=60097000200<4009600370047003700
BATTLEID 32339
SIDEID0 4
SIDEID1 52
MAPTYPE 13
NOCOAST
SEEDNUMBER 2045072880
REGION >400160026001600470056001600
DATE 0
 
[GENERAL0]
AGEOD_ID 0
 
 
[GENERAL1]
AGEOD_ID 557318144
NAME :5009600=6002700960046001600
QUALITY 0
 
 
########## UNITS RECORDS ##########
 
 
[Unit0]
COMMENT 1 ID_UNI_CMS_REGULAR_INFANTRY2
ID 154664960
SIDE 1
TYPE Hast_Princ_Vet
NAME 9400>200020075001600270027009600?60027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 164
 
[Unit1]
COMMENT 2 ID_UNI_CMS_REGULAR_INFANTRY2
ID 154664961
SIDE 1
TYPE Hast_Princ_Vet
NAME 94009400>200020075001600270027009600?60027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 164
 
[Unit2]
COMMENT 2 ID_UNI_CMD_CAMELIER1
ID 154664965
SIDE 1
TYPE Hast_Princ_Vet
NAME 94009400>200020034001600=6005600<600960056002700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 141
 
[Unit3]
COMMENT 1 ID_UNI_CMD_CAMELIER1
ID 154664964
SIDE 1
TYPE Hast_Princ_Vet
NAME 9400>200020034001600=6005600<600960056002700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 141
 
[Unit4]
COMMENT 1 ID_UNI_CMS_LIGHT_INFANTRY0
ID 154664962
SIDE 1
TYPE Hast_Princ_Vet
NAME 9400>20002003500;60096002700=600960037008600560027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 82
 
[Unit5]
COMMENT 2 ID_UNI_CMS_LIGHT_INFANTRY0
ID 154664963
SIDE 1
TYPE Hast_Princ_Vet
NAME 94009400>20002003500;60096002700=600960037008600560027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 82
 
[Unit6]
COMMENT 1 ID_UNI_CMD_LIGHT_INFANTRY0
ID 154664966
SIDE 1
TYPE Hast_Princ_Vet
NAME 9400>20002003500;60096002700=600960037008600560027003700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 100
QUALITYMOD 100
AGEOD_COST 82
 
[Unit7]
COMMENT 3 ID_UNI_CMH_HEAVY_INFANTRY0
ID 135528493
SIDE 0
TYPE Hast_Princ_Vet
NAME 940094009400>200020014002700=600?60027005600460002008400?6000700<600960047005600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 350
 
[Unit8]
COMMENT 4 ID_UNI_CMH_HEAVY_INFANTRY0
ID 135528494
SIDE 0
TYPE Hast_Princ_Vet
NAME 94006500>200020014002700=600?60027005600460002008400?6000700<600960047005600
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 350
 
[Unit9]
COMMENT 4 ID_UNI_CMH_LIGHT_HORSE0
ID 135528495
SIDE 0
TYPE Hast_Princ_Vet
NAME 94006500>2000200<40096007600860047000200:400160067005600<6009600>60002003400160067001600<60027009700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 75
 
[Unit10]
COMMENT 5 ID_UNI_CMH_LIGHT_HORSE0
ID 135528496
SIDE 0
TYPE Hast_Princ_Vet
NAME 6500>2000200<40096007600860047000200:400160067005600<6009600>60002003400160067001600<60027009700
COHESIONMOD 100
HITPOINTSMOD 100
EXPERIENCEMOD 125
QUALITYMOD 100
AGEOD_COST 75

Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

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

Re: Files with scripts for exporting battle to FoG2?

Post by rbodleyscott » Wed Jul 15, 2020 10:00 am

This is due to code in FOG2 in /Data/scripts/LiaisonTools.BSF in the TranslateLiaisonUnitToFOGCampaignUnits() function:

Code: Select all

					// Add a proportion of triarii to pre-Marian legionary units	
					if (done == 0)
						{			
							if ((StringCompare(gLiaisonUnitData[liaisonUnitIndex].type, "Hast_Princ") == 1) || (StringCompare(gLiaisonUnitData[liaisonUnitIndex].type, "Hast_Princ_Vet") == 1))
								{
									AddProportionalFOGUnits(liaisonUnitIndex, side, unitType, army, FOGUnits, "Triarii", 2, 1);
									done = 1;
								}
						}
Richard Bodley Scott

Image

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Wed Jul 15, 2020 10:04 am

rbodleyscott wrote:
Wed Jul 15, 2020 10:00 am
This is due to code in FOG2 in /Data/scripts/LiaisonTools.BSF in the TranslateLiaisonUnitToFOGCampaignUnits() function:

Code: Select all

					// Add a proportion of triarii to pre-Marian legionary units	
					if (done == 0)
						{			
							if ((StringCompare(gLiaisonUnitData[liaisonUnitIndex].type, "Hast_Princ") == 1) || (StringCompare(gLiaisonUnitData[liaisonUnitIndex].type, "Hast_Princ_Vet") == 1))
								{
									AddProportionalFOGUnits(liaisonUnitIndex, side, unitType, army, FOGUnits, "Triarii", 2, 1);
									done = 1;
								}
						}
Thanks, Richard! That explains it. :)
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Wed Jul 15, 2020 11:43 am

rbodleyscott wrote:
Wed Jul 15, 2020 10:00 am
This is due to code in FOG2 in /Data/scripts/LiaisonTools.BSF in the TranslateLiaisonUnitToFOGCampaignUnits() function:

Code: Select all

					// Add a proportion of triarii to pre-Marian legionary units	
					if (done == 0)
						{			
							if ((StringCompare(gLiaisonUnitData[liaisonUnitIndex].type, "Hast_Princ") == 1) || (StringCompare(gLiaisonUnitData[liaisonUnitIndex].type, "Hast_Princ_Vet") == 1))
								{
									AddProportionalFOGUnits(liaisonUnitIndex, side, unitType, army, FOGUnits, "Triarii", 2, 1);
									done = 1;
								}
						}
Some questions though Richard:

1. The AddProportionalFOGUnits() function is generic and can be applied to other factions and units too?
2. Could this function even be created directly in FoGE, since it applies the same Archon script language?
3. Or if a mod for this is instead created in FoG2 (basically for more units than Triarii) can Empires Battles at all use FoG2 mods? (It seems that the TT mod can be used, but then that is a sanctioned mod.)
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

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

Re: Files with scripts for exporting battle to FoG2?

Post by rbodleyscott » Wed Jul 15, 2020 12:20 pm

kronenblatt wrote:
Wed Jul 15, 2020 11:43 am
rbodleyscott wrote:
Wed Jul 15, 2020 10:00 am
This is due to code in FOG2 in /Data/scripts/LiaisonTools.BSF in the TranslateLiaisonUnitToFOGCampaignUnits() function:

Code: Select all

					// Add a proportion of triarii to pre-Marian legionary units	
					if (done == 0)
						{			
							if ((StringCompare(gLiaisonUnitData[liaisonUnitIndex].type, "Hast_Princ") == 1) || (StringCompare(gLiaisonUnitData[liaisonUnitIndex].type, "Hast_Princ_Vet") == 1))
								{
									AddProportionalFOGUnits(liaisonUnitIndex, side, unitType, army, FOGUnits, "Triarii", 2, 1);
									done = 1;
								}
						}
Some questions though Richard:

1. The AddProportionalFOGUnits() function is generic and can be applied to other factions and units too?
It is. See the rest of the TranslateLiaisonUnitToFOGCampaignUnits() functiuon.
2. Could this function even be created directly in FoGE, since it applies the same Archon script language?
I don't really know. The two games use different versions of ARCHON. However, engine compaitibility aside, probably not, as each FOGE unit has one entry in the export file. If two entries were created, FOG2 would assume they each represented a full FOGE unit, so those units would be over-represented.
3. Or if a mod for this is instead created in FoG2 (basically for more units than Triarii) can Empires Battles at all use FoG2 mods? (It seems that the TT mod can be used, but then that is a sanctioned mod.)
There was discussion of such, but it proved impossible to get the modded version to load, as it is included in a core UI function, for which modded versions are not currently supported. Whether they will be in the future I cannot yet say.
Richard Bodley Scott

Image

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Thu Jul 16, 2020 6:50 am

rbodleyscott wrote:
Wed Jul 15, 2020 12:20 pm
I don't really know. The two games use different versions of ARCHON. However, engine compaitibility aside, probably not, as each FOGE unit has one entry in the export file. If two entries were created, FOG2 would assume they each represented a full FOGE unit, so those units would be over-represented.
Ok, I see. Well, I'm looking (for the sake of simplicity) at 1:1 unit conversion, i.e., 1 unit in FoGE gets converted into 1 unit in FoG2. But right now I'm struggling how to deduct the faction, ethnic group or area of origin for each side in the battle (within FoGE's BattleConnection.bsf), which will in turn determine which FoG2 unit to convert to.
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Thu Jul 16, 2020 7:41 am

In FoGE's BattleConnection.BSF file and the BattleConn_Export function (that creates the AgeodBattleData.TXT file and its content exporting battle details to FoG2) I trying to get information about the two sides' faction ID's/tags, ethnic groups, and areas of origin, and save these values to variables in the function. To use which units to export to for FoG2.

But somehow neither:

int playerethnic[STRING_AVG];
int otherethnic[STRING_AVG];
...
playerethnic = Faction_Liaison_SideID(gBattleDesc.factionID[playerSide][0]);
otherethnic = Faction_Liaison_SideID(gBattleDesc.factionID[otherSide][0]);


(Faction_Liaison_SideID(...) is used elsewhere in the function.)

nor:

char playerethnic[STRING_AVG];
char otherethnic[STRING_AVG];
...
playerethnic = Faction_Ethnic(gBattleDesc.factionID[playerSide][0]);
otherethnic = Faction_Ethnic(gBattleDesc.factionID[otherSide][0]);


works.

(Is there a function to retrieve a faction's area of origin?)

It seems that the function simply cannot the values to the playerethnic and otherethnic variables.

How do I collect the appropriate values and set these variables in the BattleConn_Export function?
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

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

Re: Files with scripts for exporting battle to FoG2?

Post by rbodleyscott » Thu Jul 16, 2020 10:16 am

kronenblatt wrote:
Thu Jul 16, 2020 6:50 am
rbodleyscott wrote:
Wed Jul 15, 2020 12:20 pm
I don't really know. The two games use different versions of ARCHON. However, engine compaitibility aside, probably not, as each FOGE unit has one entry in the export file. If two entries were created, FOG2 would assume they each represented a full FOGE unit, so those units would be over-represented.
Ok, I see. Well, I'm looking (for the sake of simplicity) at 1:1 unit conversion, i.e., 1 unit in FoGE gets converted into 1 unit in FoG2. But right now I'm struggling how to deduct the faction, ethnic group or area of origin for each side in the battle (within FoGE's BattleConnection.bsf), which will in turn determine which FoG2 unit to convert to.
If one is attempting to achieve equivalence between fighting FOGE battles in Empires or exporting them, a 1:1 conversion makes no sense because the two games are different, and the relative power of different units is greatly different between the FOGE battle system and FOG2. A 1:1 conversion would result in the more powerful FOGE units being significantly relatively underpowered in FOG2 compared with their efficacy in FOGE.

Moreover the diffierent nations' FOG2 conversions of the same FOGE type are also greatly differing in power in FOG2, strongly disadvantaging some nations if a 1:1 conversion was used.

So a 1:1 conversion would move the game significantly further away from equivalence between fighting FOGE battles in Empires or exporting them.

Why do you think this would be a good thing?

As to your questions in the other post, I don't personally know the answers, I just perform the conversion at the FOG2 end from the currently available data in the export file, which was the information needed to implement the current conversion system.
Richard Bodley Scott

Image

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Thu Jul 16, 2020 11:22 am

kronenblatt wrote:
Thu Jul 16, 2020 6:50 am
Ok, I see. Well, I'm looking (for the sake of simplicity) at 1:1 unit conversion, i.e., 1 unit in FoGE gets converted into 1 unit in FoG2. But right now I'm struggling how to deduct the faction, ethnic group or area of origin for each side in the battle (within FoGE's BattleConnection.bsf), which will in turn determine which FoG2 unit to convert to.
rbodleyscott wrote:
Thu Jul 16, 2020 10:16 am
If one is attempting to achieve equivalence between fighting FOGE battles in Empires or exporting them, a 1:1 conversion makes no sense because the two games are different, and the relative power of different units is greatly different between the FOGE battle system and FOG2. A 1:1 conversion would result in the more powerful FOGE units being significantly relatively underpowered in FOG2 compared with their efficacy in FOGE.

Moreover the diffierent nations' FOG2 conversions of the same FOGE type are also greatly differing in power in FOG2, strongly disadvantaging some nations if a 1:1 conversion was used.

So a 1:1 conversion would move the game significantly further away from equivalence between fighting FOGE battles in Empires or exporting them.
No such equivalence attempt is being made. As a modder, I'm merely trying to see if faction-unique units (based on the FoG2 army lists) can to a larger extent be applied when fighting FoG battles in FoG2.
rbodleyscott wrote:
Thu Jul 16, 2020 10:16 am
Why do you think this would be a good thing?
I'm not at all sure it IS in fact a good idea. I just want to try it out in order to check whether it is, and I don't see that many alternatives as a modder. FrenchDude is trying another modding approach, and hopefully one or ideally both will be good.

What alternatives do you see, either as a modder or as part of formal development?
rbodleyscott wrote:
Thu Jul 16, 2020 10:16 am
As to your questions in the other post, I don't personally know the answers, I just perform the conversion at the FOG2 end from the currently available data in the export file, which was the information needed to implement the current conversion system.
Ok, no probs Richard: hopefully Pocus or one of the FoGE guys/girls can answer and lead me in the right direction technically.
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

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

Re: Files with scripts for exporting battle to FoG2?

Post by rbodleyscott » Thu Jul 16, 2020 3:08 pm

kronenblatt wrote:
Thu Jul 16, 2020 11:22 am
What alternatives do you see, either as a modder or as part of formal development?
I have not studied how FOGE works internally, I only look at the main unit database.

Consequently I don't know how closely the different nations that use each ethnic template stick to that template. As far as I know each nation also has a list of units it can use (and by implication those it can't), but I have not looked into that.

It may be possible therefore to add additional units to the templates, and then effectively turn off some of the units in the expanded template for each nation that uses that template, thus producing something closer to the FOG2 army list for each such nation - e.g. Thracians and Dacians (Dalmatic); Bruttians, Samnites and Etruscans (Italic).

But as I say, that depends on exactly how FOGE works internally in determining which FOGE units each nation state can use. On which I am hazy.

-------------------------

The alternative would be to add additional ethnic templates, but I am not sure how much work that would be.
Richard Bodley Scott

Image

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Thu Jul 16, 2020 4:10 pm

rbodleyscott wrote:
Thu Jul 16, 2020 3:08 pm
kronenblatt wrote:
Thu Jul 16, 2020 11:22 am
What alternatives do you see, either as a modder or as part of formal development?
I have not studied how FOGE works internally, I only look at the main unit database.

Consequently I don't know how closely the different nations that use each ethnic template stick to that template. As far as I know each nation also has a list of units it can use (and by implication those it can't), but I have not looked into that.

It may be possible therefore to add additional units to the templates, and then effectively turn off some of the units in the expanded template for each nation that uses that template, thus producing something closer to the FOG2 army list for each such nation - e.g. Thracians and Dacians (Dalmatic); Bruttians, Samnites and Etruscans (Italic).

But as I say, that depends on exactly how FOGE works internally in determining which FOGE units each nation state can use. On which I am hazy.

-------------------------

The alternative would be to add additional ethnic templates, but I am not sure how much work that would be.
Would you by the way know where (in which game, file and function) the conversion process (conversion of 1 FoGE unit into 2-5 FoG2 units*), set out in the link below takes place?

https://steamcommunity.com/games/101139 ... 2631378916

Is it also in FOG2 in /Data/scripts/LiaisonTools.BSF in the TranslateLiaisonUnitToFOGCampaignUnits() function, or elsewhere?

(Away from my computer today and tomorrrow; only mobile access. Sorry, otherwise I would have checked it up myself.)

* Some of the cheaper Empires units may only map to 1 FOG2 unit, but some of the more expensive ones could potentially map to as many as 4 or 5 (cheap) FOG2 units in armies of nations that historically did not possess powerful units like Pike phalanxes or legions. Most units will have a conversion ratio somewhere between these two extremes.
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

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

Re: Files with scripts for exporting battle to FoG2?

Post by rbodleyscott » Thu Jul 16, 2020 5:40 pm

kronenblatt wrote:
Thu Jul 16, 2020 4:10 pm
Would you by the way know where (in which game, file and function) the conversion process (conversion of 1 FoGE unit into 2-5 FoG2 units*), set out in the link below takes place?

https://steamcommunity.com/games/101139 ... 2631378916

Is it also in FOG2 in /Data/scripts/LiaisonTools.BSF in the TranslateLiaisonUnitToFOGCampaignUnits() function?
Yes
Richard Bodley Scott

Image

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Thu Jul 16, 2020 5:48 pm

rbodleyscott wrote:
Thu Jul 16, 2020 5:40 pm
kronenblatt wrote:
Thu Jul 16, 2020 4:10 pm
Would you by the way know where (in which game, file and function) the conversion process (conversion of 1 FoGE unit into 2-5 FoG2 units*), set out in the link below takes place?

https://steamcommunity.com/games/101139 ... 2631378916

Is it also in FOG2 in /Data/scripts/LiaisonTools.BSF in the TranslateLiaisonUnitToFOGCampaignUnits() function?
Yes
Super: thanks!
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Fri Jul 17, 2020 6:08 am

rbodleyscott wrote:
Thu Jul 16, 2020 10:16 am
kronenblatt wrote:
Thu Jul 16, 2020 6:50 am
rbodleyscott wrote:
Wed Jul 15, 2020 12:20 pm
I don't really know. The two games use different versions of ARCHON. However, engine compaitibility aside, probably not, as each FOGE unit has one entry in the export file. If two entries were created, FOG2 would assume they each represented a full FOGE unit, so those units would be over-represented.
Ok, I see. Well, I'm looking (for the sake of simplicity) at 1:1 unit conversion, i.e., 1 unit in FoGE gets converted into 1 unit in FoG2. But right now I'm struggling how to deduct the faction, ethnic group or area of origin for each side in the battle (within FoGE's BattleConnection.bsf), which will in turn determine which FoG2 unit to convert to.
If one is attempting to achieve equivalence between fighting FOGE battles in Empires or exporting them, a 1:1 conversion makes no sense because the two games are different, and the relative power of different units is greatly different between the FOGE battle system and FOG2. A 1:1 conversion would result in the more powerful FOGE units being significantly relatively underpowered in FOG2 compared with their efficacy in FOGE.

Moreover the diffierent nations' FOG2 conversions of the same FOGE type are also greatly differing in power in FOG2, strongly disadvantaging some nations if a 1:1 conversion was used.

So a 1:1 conversion would move the game significantly further away from equivalence between fighting FOGE battles in Empires or exporting them.
Ok, so now I understand your concerns better, sorry about my slow thinking. What I meant by ”1:1 conversion” was that 1 FoGE unit will still be exported to FoG2 as 1 unit. And therein (in FoG2, that is) getting converted into 2-5 FoG2 units, sa part of FoG2 vanilla procedure.

I will not touch the conversion thereafter being made in FoG2. So no modding in FoG2; just interested in understanding what determines these conversion ratios.

I will do the modding in FoGE, and what I’m aiming at doing is to (given the current FoGE unit lists) other units, even more faction/ethnic/origin based than currently, will be written to the file that gets imported to FoG2.

But then again maybe some of the work and these changes is already made within FoG2, as part of the TranslateLiaisonUnitToFOGCampaignUnits() function in the /Data/scripts/LiaisonTools.BSF file.

Currently I’m just struggling writing the right FoGE script in order to retrieve the data on faction (tag/id), ethnicity, and/or area of origin and setting variables to these values, that can be used later on in the script to make the script more comprehensible. But that’s a question to the FoGE guys/girls and not to you. :)
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

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

Re: Files with scripts for exporting battle to FoG2?

Post by rbodleyscott » Fri Jul 17, 2020 7:16 am

kronenblatt wrote:
Fri Jul 17, 2020 6:08 am
rbodleyscott wrote:
Thu Jul 16, 2020 10:16 am
kronenblatt wrote:
Thu Jul 16, 2020 6:50 am


Ok, I see. Well, I'm looking (for the sake of simplicity) at 1:1 unit conversion, i.e., 1 unit in FoGE gets converted into 1 unit in FoG2. But right now I'm struggling how to deduct the faction, ethnic group or area of origin for each side in the battle (within FoGE's BattleConnection.bsf), which will in turn determine which FoG2 unit to convert to.
If one is attempting to achieve equivalence between fighting FOGE battles in Empires or exporting them, a 1:1 conversion makes no sense because the two games are different, and the relative power of different units is greatly different between the FOGE battle system and FOG2. A 1:1 conversion would result in the more powerful FOGE units being significantly relatively underpowered in FOG2 compared with their efficacy in FOGE.

Moreover the diffierent nations' FOG2 conversions of the same FOGE type are also greatly differing in power in FOG2, strongly disadvantaging some nations if a 1:1 conversion was used.

So a 1:1 conversion would move the game significantly further away from equivalence between fighting FOGE battles in Empires or exporting them.
Ok, so now I understand your concerns better, sorry about my slow thinking. What I meant by ”1:1 conversion” was that 1 FoGE unit will still be exported to FoG2 as 1 unit. And therein (in FoG2, that is) getting converted into 2-5 FoG2 units, sa part of FoG2 vanilla procedure.
Ah, right.
Richard Bodley Scott

Image

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Fri Jul 17, 2020 7:23 am

Also found this interesting albeit maybe obsolete thread on the topic:

viewtopic.php?f=534&t=92730&p=793750#p793750
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 992
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Files with scripts for exporting battle to FoG2?

Post by kronenblatt » Mon Jul 20, 2020 7:59 pm

When looking through the UNITS file, here's the number of occurrences for different FoG2 units. Focus is obviously on the ones occurring at least 10 times, with emphasis on the top two.

Code: Select all

Warband (Close Order)	Warband	47
Warband (Loose Order)	Medium_Warband	32
Noble Cavalry	Noble_Cavalry_Prot	30
Irregular Foot	Hillmen	22
Light Javelin Horse	LH_Javelin	19
Armoured Noble Lancers	Noble_Lancers_Arm	18
Arab Camelry	Arab_Camelry	17
Light Javelinmen	Light_Javelins	16
Cataphracts	Cataphracts	15
Elephants	Elephants	15
Light horse Archers	LH_Bow	15
Heavy Artillery	Heavy_Artillery	14
Nomad Light Horse Archers	Nomad_LH	14
Superior Warband (Close Order)	Superior_Warband	13
Imitation Legionaries	Imitation_Legion	12
Eastern Archers	Persian_Light_Archers	11
Barbarian light javelinmen	Barbarian_Light_Javelins	10
Slingers	Light_Slingers	10
Armoured Noble Cavalry	Noble_Cavalry_Arm	10
Irregular Foot	Slav_Foot	10
Armoured Cavalry	Grk_arm_cav	9
Sassanid Heavy Foot	Paighan_Foot	9
Barbarian Light Javelin Horse	Barb_LH_Jav	8
Italian Foot	Italian_Foot	8
Veteran Armoured Cavalry	Vet_Arm_Cavalry	8
Nubian archers	Kushite_Archers	7
Archers	Light_Archers	7
Indian Archers	Indian_Archers	5
Nomad_Cavalry	Nomad_Cavalry	5
Veteran Pikemen	Pike_Vet	5
Rhoxolani Cavalry	Rhoxolani_Cavalry	5
Spanish scutari	Spanish_Scutarii	5
Thureophoroi	Thureophoroi	5
Xystophoroi	Xystophoroi	5
Indian Close Fighters	Indian_Javelinmen	4
Iranian Armoured Cavalry	Persian_Cav_Jav_Arm	4
Poeni Foot	poeni_foot	4
Heavy Chariots	Carth_chariot	3
Cretan Archers	Cretan_Archers	3
Indian Heavy Chariots	Indian_H_Chariots	3
Mercenary Hoplites	Merc_Hoplites	3
Pikemen	Pike	3
Raw Hoplites	Raw_Hoplites	3
Thracian with Rhomphaia	Thracians	3
Celtic Chariots	Celtic_Chariots	2
Citizen Hoplites	Citizen_Hoplites	2
Unarmoured Horse Archers	Elamite_Cavalry	2
Falxmen	Falxmen	2
Hastati/Principes	Hast_Princ	2
Veteran Hastati/Principes	Hast_Princ_Vet	2
Indian Cavalry	Indian_Cavalry	2
Indian Elephants	Indian_Elephants	2
Indian Light Javelinmen	Indian_LF_Jav	2
Indian Forest Tribesmen	Indian_Light_Archers	2
Iranian Armoured Cavalry (Bow)	Persian_Cav_Arm_Bow	2
Pictish Spearmen	Pictish_Spearmen	2
Sparabara Foot	Sparabara_Foot	2
African (Libyan) Spearmen	African_Spearmen	1
Armoured Hoplites	Arm_Citizen_Hoplites	1
Roman Cavalry	Armoured_Cavalry	1
Massed Archers	Ass_Med_Archers	1
Assyrian-style Heavy Chariots	Assyr_H_Chariots	1
Assyrian-style Cavalry	Assyrian_Cav	1
Assyrian-style Guard Foot	Assyrian_Guards	1
Assyrian-style Medium Foot	Assyrian_M_Foot	1
Auxiliary Archers	Aux_Archers	1
Auxilia	Auxilia	1
Balearic Slingers	Balearic_Slingers	1
Barbarian light archers	Barbarian_Light_Archers	1
Barbarian Slingers	Barbarian_Light_Slingers	1
Light Javelin Horse	E_Greek_LH_Jav	1
Early Cavalry	Early_Cavalry	1
Egyptian-style Heavy Chariots	Egyp_H_Chariots	1
Egyptian Light javelinmen	Egyp_LF_jav	1
Egyptian Archers	Egyp_MedArch	1
Egyptian Spearmen	Egyptian_spearmen	1
Light Javelin Horse	Greek_LH_Javelin	1
Greek Peltasts	Greek_Peltast	1
Hoplite_Lydian	Hoplite_Lydian	1
Indian Light Horse	Indian_LH_Jav	1
Roman Legionaries	Legionaries	1
Roman Legionaries	Legionary_LRepub	1
Levy Spearmen	Levy_Spearmen	1
Light Javelin Horse	Lydian_LH_Jav	1
Picked Warband (Loose Order)	Med_Sup_Warband	1
Mede Spearmen	Mede_spearmen	1
Massed Archers	Medium_Archers	1
Nomad Cavalry	Nomad_Cav	1
Persian Immortals	Persian_Immortals	1
Eastern Slingers	Persian_Light_Slingers	1
Massed Eastern Archers	Persian_Medium_Archers	1
Poorly-Armed Slaves	Poorly_Armed_Slaves	1
Veteran Roman Legionaries	Praetorian_Guard	1
Prodromoi	Prodromoi	1
Veteran Roman Cavalry	Rom_vet_cavalry	1
Samnite Foot	Samnite_Foot	1
Scythed Chariots	Scythed_chariots	1
Fierce Nomad Light Horse	Sup_Nomad_LH	1
Thorakitai	Thorakitai	1
Massed Thracian Peltasts	Thracian_Med_Jav	1
Thracian Peltasts	Thracian_Peltast	1
Velites	Velites	1
Veteran African Spearmen (Sacred Band)	Vet_African_Spearmen	1
Veteran Hoplites	Vet_Hoplites	1
Veteran Samnite Foot	Vet_Samnite_Foot	1
Zealots	Zealots	1
I've also managed to get this to work, just as an example:

Code: Select all

			// MODDING

			unitside = side;
			if (bSwapSides)
			{
				unitside = (unitside + 1) % 2;
			}			
			if ( Faction_Liaison_SideID(gBattleDesc.factionID[unitside][0] ) == 4 )
			{
				squad = "Hast_Princ_Vet";
			}
			else
			{
				squad = "Elephants";
			}
But of course I'd like to get Ethnic Group or Area of Origin instead of the ID of the faction. Anyone has any clues on how to do this? (Including also to set that value to a variable.)
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

Post Reply

Return to “MOD”