Increasing number of figures displayed

Pi-R
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Tue Jun 08, 2010 6:08 pm

Re: Increasing number of figures displayed

Post by Pi-R » Wed Oct 03, 2018 5:08 pm

Hi Richard, I have tried my alternative version of callbacks.bsf in a test scenario, i.e. in ...\My Games\FieldOfGlory2\CAMPAIGNS\TEST\Data\Battle\Scripts.

Unfortunately this did not work. Formation for mancount=5 was still displayed as
--x--
x-x-x
--x--

Only when I placed my alternative version in ...\Programs\Steam\steamapps\common\Field of Glory II\Data\scripts (I have a FOG2 from Steam) the formation for units with mancount=5 were displayed as intended
-x-x-
x-x-x


Hi TimDee58, I have looked at how a unit with mancount=12 moves across the battlefield and see what you mean. I see the same when I use mancount = 12 with the vanilla version of callback.bsf. This is not surprisingly as I did not change anything for mancount = 12.
I have an idea what might be causing it. So will have a look to see if my assumption is correct.

Pi-R
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Tue Jun 08, 2010 6:08 pm

Re: Increasing number of figures displayed

Post by Pi-R » Wed Oct 03, 2018 6:01 pm

Hi TimDee58

My assumption turned out to be correct. The vanilla formation for mancount = 12 seems to be intended for less strict organized units according to (only initial formation displayed)

Code: Select all

	if (manCount == 12)
		{
			if ((IsUnitSquadType(me, "Warriors") == 1) || (IsUnitSquadType(me, "Mob") == 1))
				{
					// Positions reorganised so that men can be removed in order
					if (moraleState == 0)
						{
							SetFormationRowXYExtended(0, 22, -24);
							SetFormationRowXYExtended(1, 20, 22);
							SetFormationRowXYExtended(2, 18, -8);
							SetFormationRowXYExtended(3, 20, 10);
							SetFormationRowXYExtended(4, -2, 24);
							SetFormationRowXYExtended(5, 0, -24);
							SetFormationRowXYExtended(6, 2, -8);
							SetFormationRowXYExtended(7, 0, 6);
							SetFormationRowXYExtended(8, -20, 24);
							SetFormationRowXYExtended(9, -22, -22);
							SetFormationRowXYExtended(10, -18, 6);
							SetFormationRowXYExtended(11, -20, -8);
						}
As you can see the first part of formations for this mancount is intended for SquadTypes Warriors and Mob, i.e. Type in Squads.csv, so for
Medium_Warband
Med_Sup_Warband
Poorly_Armed_Slaves.

The formations for the other SquadTypes are slightly less disorganized but still they are not really structured.

Code: Select all

			else
				{
					// Positions reorganised so that men can be removed in order
					if (moraleState == 0)
						{
							SetFormationRowXYExtended(0, 18, -24);
							SetFormationRowXYExtended(1, 16, 22);
							SetFormationRowXYExtended(2, 14, -8);
							SetFormationRowXYExtended(3, 16, 10);
							SetFormationRowXYExtended(4, -2, 24);
							SetFormationRowXYExtended(5, 0, -24);
							SetFormationRowXYExtended(6, 2, -8);
							SetFormationRowXYExtended(7, 0, 6);
							SetFormationRowXYExtended(8, -16, 24);
							SetFormationRowXYExtended(9, -18, -22);
							SetFormationRowXYExtended(10, -14, 6);
							SetFormationRowXYExtended(11, -16, -8);
						}
So these units are less structured but not such a mess as a mob or warriors, and they also move in that less structured way. In the vanilla Squads.cvs this applies to
Hillmen
Levies
Superior_Warband
Warband
Imitation_Legion
Medium_Warband
Med_Sup_Warband
Poorly_Armed_Slaves
Pictish_Spearmen

When you replace this by

Code: Select all

			else
				{
					// Positions reorganised so that men can be removed in order
					if (moraleState == 0)
						{																
							SetFormationRowXYExtended(0, 12, -24);
							SetFormationRowXYExtended(1, 12, 24);
							SetFormationRowXYExtended(2, 12, -8);
							SetFormationRowXYExtended(3, 12, 8);
							SetFormationRowXYExtended(4, 0, 24);
							SetFormationRowXYExtended(5, 0, -24);
							SetFormationRowXYExtended(6, 0, -8);
							SetFormationRowXYExtended(7, 0, 8);
							SetFormationRowXYExtended(8, -12, 24);
							SetFormationRowXYExtended(9, -12, -24);
							SetFormationRowXYExtended(10, -12, 8);
							SetFormationRowXYExtended(11, -12, -8);							
						}
will formations with manCount = 12 start very structured (similar to manCount = 8 and 16). As you can see I have restricted the x values to -12, 0 and 12 and for y to -24 -8 8 and 24.

However this will also change the formations to strict ones for units you may not want to have this. If you do not want this you may have to check for which SquadTypes you want to use strict formation. For example I would assume for Heavy_Foot but maybe also for some others.

Probably the formations for other moralState values than 0 should be adapted as well as else the unit will be losing its formation quite fast after becoming disordered.

Please note FUNCTION FORMATION_CALLBACK is not that difficult to adapt as almost every example is already included.

TimDee58
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 155
Joined: Wed Mar 07, 2018 1:32 am

Re: Increasing number of figures displayed

Post by TimDee58 » Thu Oct 04, 2018 1:09 am

thanks for your efforts Pierre, although because i must be old and stupid this is all greek to me (I just dont get it).

Tim
Georgia's Tale (You Tube Link) https://www.youtube.com/watch?v=qsWSme56lnc

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

Re: Increasing number of figures displayed

Post by rbodleyscott » Thu Oct 04, 2018 8:08 am

Pi-R wrote:
Wed Oct 03, 2018 5:08 pm
Hi Richard, I have tried my alternative version of callbacks.bsf in a test scenario, i.e. in ...\My Games\FieldOfGlory2\CAMPAIGNS\TEST\Data\Battle\Scripts.

Unfortunately this did not work. Formation for mancount=5 was still displayed as
--x--
x-x-x
--x--

Only when I placed my alternative version in ...\Programs\Steam\steamapps\common\Field of Glory II\Data\scripts (I have a FOG2 from Steam) the formation for units with mancount=5 were displayed as intended
-x-x-
x-x-x
It may be that you also need to include $Default.BSF in your test scenario to force the game to read the local version of Callbacks.BSF
Richard Bodley Scott

Image

Pi-R
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Tue Jun 08, 2010 6:08 pm

Re: Increasing number of figures displayed

Post by Pi-R » Sat Oct 06, 2018 11:39 am

Hi Richard,

Sorry it was just a stupid mistake on my side.
I had no BSF file in the folder for my test scenario.
Once I had copied SCENARIOTEMPLATE.BSF over and renamed it Test.bsf the scenario did use my adapted version of Callbacks.bsf.

Not that I really need this. I reverted back to the vanilla number of figures per unit quite soon after I had found out how to change it.
Besides the limitation to max 16 figures per unit, as you have already mentioned, it would need far more changes than just adding a few more formations.
But maybe all this info will help someone else who wants to continue with it and is not afraid of the code. I also started without any knowledge of the code and learned there is always someone on the forum who can help answering questions.

Thanks for your help

Pi-R

TimDee58
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 155
Joined: Wed Mar 07, 2018 1:32 am

Re: Increasing number of figures displayed

Post by TimDee58 » Sat Oct 06, 2018 11:51 am

this is great news for me, thanks guys
Georgia's Tale (You Tube Link) https://www.youtube.com/watch?v=qsWSme56lnc

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

Re: Increasing number of figures displayed

Post by rbodleyscott » Sat Oct 06, 2018 11:56 am

Pi-R wrote:
Sat Oct 06, 2018 11:39 am
Hi Richard,

Thanks for your help

Pi-R
My pleasure.
Once I had copied SCENARIOTEMPLATE.BSF over and renamed it Test.bsf the scenario did use my adapted version of Callbacks.bsf.
Interesting.
Richard Bodley Scott

Image

TimDee58
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 155
Joined: Wed Mar 07, 2018 1:32 am

Re: Increasing number of figures displayed

Post by TimDee58 » Tue Oct 09, 2018 6:38 am

@ Pierre / Richard

This Test.bsf should be placed in the new campaign folder and not in scripts or elsewhere?

As an aside is anyone out there interested in collaborating on a mod I have in mind OR would be prepared to help in giving me a .bsf / texturing tutorial (or point me in the right direction) please?
Georgia's Tale (You Tube Link) https://www.youtube.com/watch?v=qsWSme56lnc

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

Re: Increasing number of figures displayed

Post by rbodleyscott » Tue Oct 09, 2018 7:08 am

TimDee58 wrote:
Tue Oct 09, 2018 6:38 am
@ Pierre / Richard

This Test.bsf should be placed in the new campaign folder and not in scripts or elsewhere?
In the /Scenarios subfolder of the new campaign folder, along with Test.BAM
Richard Bodley Scott

Image

TimDee58
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 155
Joined: Wed Mar 07, 2018 1:32 am

Re: Increasing number of figures displayed

Post by TimDee58 » Tue Oct 09, 2018 9:26 am

call me stupid but I dont see a scenarios folder, Im working with a cloned copy of TTMod Custom Battles.

Any suggestions
Georgia's Tale (You Tube Link) https://www.youtube.com/watch?v=qsWSme56lnc

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

Re: Increasing number of figures displayed

Post by rbodleyscott » Tue Oct 09, 2018 10:38 am

TimDee58 wrote:
Tue Oct 09, 2018 9:26 am
call me stupid but I dont see a scenarios folder, Im working with a cloned copy of TTMod Custom Battles.

Any suggestions
Ah, well the Test.bsf thing is only for scenarios, not for custom battle modules. I don't know why it worked anyway.

First check that the modded version of Callbacks.BSF is in the /Data/Battle/Scripts sub-folder in your custom folder, and not somewhere else.

If it is already, then try copying
$DEFAULT.BSF from
/Data/Battle/Scripts in the main build to
/Data/Battle/Scripts in your custom folder.
Richard Bodley Scott

Image

TimDee58
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 155
Joined: Wed Mar 07, 2018 1:32 am

Re: Increasing number of figures displayed

Post by TimDee58 » Tue Oct 09, 2018 10:44 am

Yes, thats what I've done thanks...... right, I can ignore that now for a month or two while I work on Modding Army Lists / Textures / Squads / etc etc......

(At least if I get a CTD where to look first lol).

I obviously wont move my Mod into the games campaign directories until I've done an awful lot more work, I'm thinking oh, maybe the New Year (but which one lol)
Georgia's Tale (You Tube Link) https://www.youtube.com/watch?v=qsWSme56lnc

TimDee58
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 155
Joined: Wed Mar 07, 2018 1:32 am

Re: Increasing number of figures displayed

Post by TimDee58 » Tue Oct 09, 2018 10:50 am

ah wait,

Pierre renamed it Test because it was his test scenario right?

Soooo, should i rename mine to my Mods name?

(I ask many questions, not all of them are totally dumb, this one I suspect may be)

I ask because TT Mod really doesnt have a lot in its Scripts folder (literally just randomgeneralname), I didnt think mine would need to either, other than callbacks...... am I messing things up?
Georgia's Tale (You Tube Link) https://www.youtube.com/watch?v=qsWSme56lnc

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

Re: Increasing number of figures displayed

Post by rbodleyscott » Tue Oct 09, 2018 11:24 am

TimDee58 wrote:
Tue Oct 09, 2018 10:50 am
ah wait,

Pierre renamed it Test because it was his test scenario right?

Soooo, should i rename mine to my Mods name?
No. As I said before it only worked for Pierre because he was making a scenario, not a custom battles module. (And I don't really know why it worked at all).

The recommended way to force the program to read modded scripts is to copy $Default.BSF as specified above.

And as I say they should both be in:

/Documents/My Games/FieldOfGlory2/CAMPAIGNS/YourCampaignName/Data/Battle/Scripts

not in

/Documents/My Games/FieldOfGlory2/CAMPAIGNS/YourCampaignName/Scripts

or anywhere else. The game will not read any scripts that are not in exactly the right subfolder, as shown in the file tree diagram at the end of the following page:

http://archonwiki.slitherine.com/index.php/Modding

If you still can't get it to work, send me a PM and I will give you my email address so you can send me a link to allow me to download your mod and see why it isn't working. Computers are not at all forgiving, and there is probably some simple reason why it isn't working.
Richard Bodley Scott

Image

TimDee58
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 155
Joined: Wed Mar 07, 2018 1:32 am

Re: Increasing number of figures displayed

Post by TimDee58 » Tue Oct 09, 2018 12:25 pm

Thanks SO much Richard, I wont pester you (yet) BUT I shall mess around with an earlier incarnation of the Mod project that Im working on now and try out the above, I'll keep you posted about the outcome.

If it works it'll impact hugely on my current work in progress, so I'll be in touch in a few days, thanks for your forbearance (Damn, now I cant spell properly, I think)
Georgia's Tale (You Tube Link) https://www.youtube.com/watch?v=qsWSme56lnc

Mord
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 90
Joined: Fri Dec 21, 2018 9:19 am
Location: North of Innsmouth, Mordbunker HQ, Windham, ME, USA
Contact:

Re: Increasing number of figures displayed

Post by Mord » Wed Mar 06, 2019 9:28 pm

Paul59 wrote:
Thu Jul 19, 2018 12:33 pm


The TT Mod uses its own Squads.csv file, with hundreds of new units.

First off, thanks very much for the awesome mod and huge amount of work. But I don't see any Squads file in the folders. Where are they located?


Mord.

Paul59
Sr. Colonel - Wirbelwind
Sr. Colonel - Wirbelwind
Posts: 1722
Joined: Tue Jul 21, 2015 11:26 pm

Re: Increasing number of figures displayed

Post by Paul59 » Wed Mar 06, 2019 10:29 pm

Mord wrote:
Wed Mar 06, 2019 9:28 pm
Paul59 wrote:
Thu Jul 19, 2018 12:33 pm


The TT Mod uses its own Squads.csv file, with hundreds of new units.

First off, thanks very much for the awesome mod and huge amount of work. But I don't see any Squads file in the folders. Where are they located?


Mord.
See this screenshot for an example:

Image

The Squads.csv file just sits in the main mod folder, you can't miss it!
Scenario Designer - Age of Belisarius, Rise of Persia, and Wolves at the Gate.

TT Mod Creator

Mord
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 90
Joined: Fri Dec 21, 2018 9:19 am
Location: North of Innsmouth, Mordbunker HQ, Windham, ME, USA
Contact:

Re: Increasing number of figures displayed

Post by Mord » Thu Mar 07, 2019 6:41 am

Paul59 wrote:
Wed Mar 06, 2019 10:29 pm


The Squads.csv file just sits in the main mod folder, you can't miss it!
THANKS! Man, I am glad you posted that screen shot. I had an extraction problem. Normally when I open a RAR file I'll just drag the folder to where I want it extracted. I ended up closing the RAR after the drag and drop (thinking it would continue extracting normally) but it skipped some files. I was missing more than the Squads file.

I still don't see Text9, Text23, and Campaign-Copy, though. Are those new because you are updating along with the Beta?


Mord.

Paul59
Sr. Colonel - Wirbelwind
Sr. Colonel - Wirbelwind
Posts: 1722
Joined: Tue Jul 21, 2015 11:26 pm

Re: Increasing number of figures displayed

Post by Paul59 » Thu Mar 07, 2019 9:09 am

Hi Mord,

Yes, please ignore those files, they should not be in your version of the mod. I am working on the next update, and they are part of my work for that.

Cheers
Scenario Designer - Age of Belisarius, Rise of Persia, and Wolves at the Gate.

TT Mod Creator

Mord
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 90
Joined: Fri Dec 21, 2018 9:19 am
Location: North of Innsmouth, Mordbunker HQ, Windham, ME, USA
Contact:

Re: Increasing number of figures displayed

Post by Mord » Thu Mar 07, 2019 1:00 pm

Paul59 wrote:
Thu Mar 07, 2019 9:09 am
Hi Mord,

Yes, please ignore those files, they should not be in your version of the mod. I am working on the next update, and they are part of my work for that.

Cheers
Ah, trying to stay ahead of the curve! I know that feeling, I do a lot of modding for the Combat Mission games, mostly portraits. Thanks again, man! I appreciate you taking the time to clear things up. And thanks again for the killer mod, over three hundred new units! That's a ton of work!

Mord.

Post Reply

Return to “Field of Glory II: Modding”