I need to understand these things to make a scenario...

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

TheGrayMouser
General - Carrier
General - Carrier
Posts: 4873
Joined: Sat Nov 14, 2009 2:42 pm

Re: I need to understand these things to make a scenario...

Post by TheGrayMouser » Sat Dec 27, 2014 6:26 pm

Ok, I was just trying to clarify a little about the # men vs unitsize, as you say, unitsize is what matters, the "casualties" taken reflected as current#/original# directly effect the unitsize when calculating combat power of a unit


For modding possibilities I was musing that the current setup assumes(to some degree) larger units are simply deeper , but have the same frontage. (due to the 600 cap)
For example ( and for ease of math assume everyone is musket armed) a 1500 man German battalion fighting in 12 ranks vs a 500 man Dutch battalion in 6 ranks( 3x the size in men, 2x depth) BUT what about frontage: it would be 125 men vs 83 men, or 1.5x as great frontage. ( again assuming all musket armed or same ratio pike shot, using same method of giving fire etc) any given moment 125 men are firing their pieces vs the 83 men in the Dutch unit. The larger unit is BETTER in terms of fire power , resiliency etc but at what cost in efficiency? 3 x the expense for payback of 1.5 more men firing... 2 Units of Dutch at 2/3 cost, can throw out more firepower at any given moment.

For modding purposes, would it be possible to adjust the hard cap of 600 unitsize worth of troops that contribute to the combat?
What I would like to experiment with is floating cap based on the relative size of the unit compared to a constant(being 600 unitsize)

A crude example is:
unitsize 600 is the most efficient size for mixed infantry units. ( ie the "constant")
Units larger than size 600 are better(not linearly) but with a diminishing return so at the extreme end, a unit with , I dunno, 1800 UNIT size is only 33% more capable than a 600 size unit ie its combat cap would be "900"
I just realized that expressing this mathematically might be beyond me, this might be delving into calculus, which I haven't touched in over 20 years :) )

Just wondering if this is possible ( and also where the current caps are hidden in which BSF file)

Cheers!

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

Re: I need to understand these things to make a scenario...

Post by rbodleyscott » Sat Dec 27, 2014 6:49 pm

TheGrayMouser wrote:Ok, I was just trying to clarify a little about the # men vs unitsize, as you say, unitsize is what matters, the "casualties" taken reflected as current#/original# directly effect the unitsize when calculating combat power of a unit
Correct
For modding possibilities I was musing that the current setup assumes(to some degree) larger units are simply deeper , but have the same frontage. (due to the 600 cap)
Correct
For example ( and for ease of math assume everyone is musket armed) a 1500 man German battalion fighting in 12 ranks vs a 500 man Dutch battalion in 6 ranks( 3x the size in men, 2x depth) BUT what about frontage: it would be 125 men vs 83 men, or 1.5x as great frontage. ( again assuming all musket armed or same ratio pike shot, using same method of giving fire etc) any given moment 125 men are firing their pieces vs the 83 men in the Dutch unit. The larger unit is BETTER in terms of fire power , resiliency etc but at what cost in efficiency? 3 x the expense for payback of 1.5 more men firing... 2 Units of Dutch at 2/3 cost, can throw out more firepower at any given moment.

For modding purposes, would it be possible to adjust the hard cap of 600 unitsize worth of troops that contribute to the combat?
What I would like to experiment with is floating cap based on the relative size of the unit compared to a constant(being 600 unitsize)

A crude example is:
unitsize 600 is the most efficient size for mixed infantry units. ( ie the "constant")
Units larger than size 600 are better(not linearly) but with a diminishing return so at the extreme end, a unit with , I dunno, 1800 UNIT size is only 33% more capable than a 600 size unit ie its combat cap would be "900"
I just realized that expressing this mathematically might be beyond me, this might be delving into calculus, which I haven't touched in over 20 years :) )

Just wondering if this is possible ( and also where the current caps are hidden in which BSF file)
I suspect that you would need to mod it in several places.

The main ones are in CombatTools.BSF in the following functions:
GetCombatStrength()
CalculateShootingRating()
CalculateCloseCombatRating()
PrintEffectiveShots()

There may be others.
Richard Bodley Scott

Image

fogman
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1518
Joined: Wed Jun 20, 2012 1:29 pm

Re: I need to understand these things to make a scenario...

Post by fogman » Mon Mar 16, 2015 8:41 pm

What is the maximum value for unitsize?

When a light foot unit routs, do adjacent units have a cohesion test?

Can units with 0 ap change facing?

What value of ap should be given to a unit that cannot move but can initiate combat?

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

Re: I need to understand these things to make a scenario...

Post by rbodleyscott » Mon Mar 16, 2015 9:39 pm

fogman wrote:What is the maximum value for unitsize?
There isn't any specific maximum value, although you could probably make something anomalous happen if you make it high enough. The highest unitsize used in the game currently is 1600.

Note that however large a unit is, only 600 unitsize worth of men can fight in any one direction (400 for mounted troops)
When a light foot unit routs, do adjacent units have a cohesion test?
Only light troops have to test if nearby light troops rout. So if light foot routs, the only troops that have to take a cohesion test are light foot, light horse or dragoons.
Can units with 0 ap change facing?
Yes but only 45 degrees per turn.
What value of ap should be given to a unit that cannot move but can initiate combat?
This isn't possible without a mod, because troops can only initiate close combat if they have enough AP to enter the square occupied by the enemy.
Richard Bodley Scott

Image

jomni
Sengoku Jidai
Sengoku Jidai
Posts: 1393
Joined: Thu Dec 03, 2009 1:20 am

Re: I need to understand these things to make a scenario...

Post by jomni » Tue Mar 17, 2015 1:19 am

In my japanese mod, I don't think I can recreate the sekigahara battle with my current troop set (less then 1,000 men units). the battle has more than 80,000 men on each side. I envision each unit to be about 3k men max. Am I overly ambitious? Or should I just cut up the battle into smaller parts. Or scale down the forces to 1/3 or 1/4 the size.

fogman
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1518
Joined: Wed Jun 20, 2012 1:29 pm

Re: I need to understand these things to make a scenario...

Post by fogman » Tue Mar 17, 2015 2:49 am

if a superior infantry unit of 500 men and unitsize valued at 600 takes 50 casualties, by how much does the unitsize value goes down?

if, say, a superior unit autorouts at 50% losses, is that 50% of actual number or 50% of the unitsize value? (i guess if it is perfectly proportional it would be the same thing)

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

Re: I need to understand these things to make a scenario...

Post by rbodleyscott » Tue Mar 17, 2015 8:01 am

jomni wrote:In my japanese mod, I don't think I can recreate the sekigahara battle with my current troop set (less then 1,000 men units). the battle has more than 80,000 men on each side. I envision each unit to be about 3k men max. Am I overly ambitious? Or should I just cut up the battle into smaller parts. Or scale down the forces to 1/3 or 1/4 the size.
You can simply use

SetUniversalVar("StrengthMultiplier", xxx);

to adjust the representational scale without altering UnitSize. (See line 61 of ScenarioTemplate.BSF).

So if you want the number of men in your units to be three times normal you would just specify

SetUniversalVar("StrengthMultiplier", 300);

to make it so.

This won't affect any internal combat mechanisms, it will just alter the number of men (and casualties) reported on screen.
Richard Bodley Scott

Image

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

Re: I need to understand these things to make a scenario...

Post by rbodleyscott » Tue Mar 17, 2015 8:05 am

if a superior infantry unit of 500 men and unitsize valued at 600 takes 50 casualties, by how much does the unitsize value goes down?
The UnitSize does not go down at all, it is only used to record the initial relative "size" of the unit at the start of the battle.

For combat purpose the current unitsize left is calculated when required by (UnitSize * TotalMen) / (Base TotalMen). However, the UnitSize variable is not updated after the start of the battle, only the TotalMen variable is.
if, say, a superior unit autorouts at 50% losses, is that 50% of actual number or 50% of the unitsize value? (i guess if it is perfectly proportional it would be the same thing)
50% of actual men, and yes it is the same thing.
Richard Bodley Scott

Image

fogman
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1518
Joined: Wed Jun 20, 2012 1:29 pm

Re: I need to understand these things to make a scenario...

Post by fogman » Tue Mar 17, 2015 4:35 pm

so essentially, a unit with 1000 men and unitsize 600 will last twice as long (before autorouting) as one with 500 men and unitsize 600?

what's the advantage if any of having 1000 men and unitsize 1000 vs 1000 men and unitsize 600?

how do I give commanded shots the image of dragoons?

how do i make determined horse into plain horse?

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

Re: I need to understand these things to make a scenario...

Post by rbodleyscott » Tue Mar 17, 2015 4:55 pm

fogman wrote:so essentially, a unit with 1000 men and unitsize 600 will last twice as long (before autorouting) as one with 500 men and unitsize 600?
No, they will last exactly the same amount of time. In effect the TotalMen variable is used only (a) for reporting to the player (b) for keeping track of what proportion of the unit's original strength remains active. Damage to a unit is calculated in terms of UnitSize and the actual number of men lost is back-calculated from that. So if you inflict a certain amount of damage on each unit, the unit assigned twice as many men for the same unitsize will suffer twice as many men lost.

This is because the TotalMen is meant to be proportional (on a not completely linear basis) to the UnitSize, so it makes no sense to have two infantry units of UnitSize 600 with different numbers of men in them.
what's the advantage if any of having 1000 men and unitsize 1000 vs 1000 men and unitsize 600?
The UnitSize 1000 unit can lose 40% of its men before it suffers any loss of fighting capability. (UnitSize above 600 for infantry just give extra spare ranks at the back).
how do I give commanded shots the image of dragoons?
If you mean the 2D image in the UI, change there IconID in the Squads file to Dragoons.

If you mean the unit model, change their AssetFilename in the Squads file to Dragoons.
how do i make determined horse into plain horse?
Change their Type in the squds file to Horse.

Note that the program uses Squads.csv, but it is easier to edit the Squads.xlsx file (because it is formatted) then use Save As and pick ".CSV (Comma delimited)" from the Save as type drop down list to save a Squads.csv version of your amended file.
Richard Bodley Scott

Image

fogman
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1518
Joined: Wed Jun 20, 2012 1:29 pm

Re: I need to understand these things to make a scenario...

Post by fogman » Tue Mar 17, 2015 6:26 pm

what i wanted to do is having a commanded shot unit that looks like dragoon (not act like dragoons), because i find the look too big, i'm not sure which one of your cases apply.

I want to use a limbered artillery unit as a objective point: it will have a certain unitsize but has no fighting or movement capability and no ability to unlimber. what modifications are needed?

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

Re: I need to understand these things to make a scenario...

Post by rbodleyscott » Tue Mar 17, 2015 6:45 pm

fogman wrote:what i wanted to do is having a commanded shot unit that looks like dragoon (not act like dragoons), because i find the look too big, i'm not sure which one of your cases apply.
The second. (Although the dragoon model is larger than the commanded shot model, and has horses, so I may be misunderstanding you).
I want to use a limbered artillery unit as a objective point: it will have a certain unitsize but has no fighting or movement capability and no ability to unlimber. what modifications are needed?
If I understand you correctly, just clone the current Limber units in the Squads file, call them something different and unique in the name column (no spaces!), give them unique ID numbers in the ID column, then change the AP to 0 and increase the UnitSize to whatever you like. That will give you a unit that has significant effect on the victory level, but has no movement and is captured on contact. You will also need to add appropriate IDS_UNITNAME and IDS_UNITINFO strings matching the units' ID numbers to the text1.txt file.

(Normal limber units can only unlimber because they have gun units loaded on them. So if you make a limber unit and don't load guns on it, it won't be able to unlimber).
Richard Bodley Scott

Image

fogman
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1518
Joined: Wed Jun 20, 2012 1:29 pm

Re: I need to understand these things to make a scenario...

Post by fogman » Mon May 18, 2015 2:55 pm

if I change the rout thresholds, it will not show on the screen text (still shows 40% and 60%). It would be a good idea to display the friendly rout thresholds, and the value (UnitSize as a percentage of the total army) of each unit.

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

Re: I need to understand these things to make a scenario...

Post by rbodleyscott » Mon May 18, 2015 4:32 pm

fogman wrote:if I change the rout thresholds, it will not show on the screen text (still shows 40% and 60%).
You need to pass a custom string to StandardScenarioUI() in DrawScenarioUI() in the scenario script, instead of "IDS_SCENUI_VC_STANDARD". Your custom string could also include the player side rout thresholds. To include a line-feed in the string you need to use the "~" (tilde) character.

You also need to include

Return 1

at the end of DrawScenarioUI() in the scenario script, otherwise the program will use the default version of the function.

For an example of doing this, see Lostwithiel.BSF in the ECW campaign.

Lines 373-378

Code: Select all

FUNCTION DrawScenarioUI()
	{
		StandardScenarioUI("IDS_SCENUI_VC_LOSTWITHIEL_PARLIAMENT", 0);
		
		return 1; // DrawScenarioUI() must return a non-zero value so that the main program knows it exists and therefore not to use the default version.
	}
The second parameter to StandardScenarioUI() being 0 stops that function from adding any other standard strings to the end of your custom string.

IDS_SCENUI_VC_LOSTWITHIEL_PARLIAMENT is define in the Text1.txt file in the ECW campaign folder, line 90

Code: Select all

IDS_SCENUI_VC_LOSTWITHIEL_PARLIAMENT, "Object - get as many of your troops off ~the right-hand side of the map as possible ~without your army breaking. This will occur if:~a) 40% of your troops are routed~and 25% more than the enemy have lost, or ~b) 60% of your troops are routed.",
You can, of course, define your custom string to say anything you like.
Richard Bodley Scott

Image

fogman
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1518
Joined: Wed Jun 20, 2012 1:29 pm

Re: I need to understand these things to make a scenario...

Post by fogman » Mon May 18, 2015 4:57 pm

thanks, i'll have a look.

fogman
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1518
Joined: Wed Jun 20, 2012 1:29 pm

Re: I need to understand these things to make a scenario...

Post by fogman » Thu Jun 11, 2015 4:49 am

If the first and second rout thresholds are made to be of the same value, will that be an issue for the program?

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

Re: I need to understand these things to make a scenario...

Post by rbodleyscott » Thu Jun 11, 2015 7:13 am

fogman wrote:If the first and second rout thresholds are made to be of the same value, will that be an issue for the program?
Probably not.
Richard Bodley Scott

Image

fogman
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1518
Joined: Wed Jun 20, 2012 1:29 pm

Re: I need to understand these things to make a scenario...

Post by fogman » Thu Jun 11, 2015 6:27 pm

how do you make several scenarios belong to a 'campaign'? for example i want to create several what-if scenarios for a campaign named 'lords of saxony 1631' using the breitenfeld order of battle as the basis for the units file.

tangentially, how do you make several already built scenarios belong to a same campaign? for example, i want to group breitenfeld, lutzen and nordlingen into one campaign named 'the rise and fall of sweden'. I suppose the 3 separate text1 and unit files will have to be consolidated, which means among other things that the unitID for the added units will have to be renumbered, which begs the question: how does that affect the already built scenarios if the unitID are renumbered?

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

Re: I need to understand these things to make a scenario...

Post by rbodleyscott » Thu Jun 11, 2015 7:31 pm

fogman wrote:how do you make several scenarios belong to a 'campaign'? for example i want to create several what-if scenarios for a campaign named 'lords of saxony 1631' using the breitenfeld order of battle as the basis for the units file.
Each of your scenarios is presumably already in a campaign folder. Just copy them all into one of the "campaigns'" scenarios folder.

Or do you mean you want them to CARRYOVER from one scenario to the next?
tangentially, how do you make several already built scenarios belong to a same campaign?
As above
for example, i want to group breitenfeld, lutzen and nordlingen into one campaign named 'the rise and fall of sweden'. I suppose the 3 separate text1 and unit files will have to be consolidated, which means among other things that the unitID for the added units will have to be renumbered, which begs the question: how does that affect the already built scenarios if the unitID are renumbered?
The units are referenced in the .BAM files using the string in the Name column rather than the ID. So as long as you don't change the name in the Name column, and they are unique, the .BAM files should still work. (No promises, back everything up before you try it).

If you do have to change the names in the squads file, you should be able to carefully do a search and replace on the .BAM files using a text editor. (AVOID using "Replace all" - it often has unforeseen effects).
Richard Bodley Scott

Image

fogman
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1518
Joined: Wed Jun 20, 2012 1:29 pm

Re: I need to understand these things to make a scenario...

Post by fogman » Thu Jun 11, 2015 9:32 pm

When clicking on historical in the game, the player is presented with several campaigns, or rather battles grouped thematically, this is what I want to achieve. Is that the meaning of carryover?

Post Reply

Return to “Scenario Design”