I need to understand these things to make a scenario...
Moderators: rbodleyscott, Slitherine Core, Gothic Labs
Re: I need to understand these things to make a scenario...
this is the situation i was referring to: the AI's gendarme unit would not attack the Neapolitan foot.
and i note, by the way, that Field of Glory has many unit classes that easily anarchy charge, regardless of the odds.-
- Field of Glory 2
- Posts: 28274
- Joined: Sun Dec 04, 2005 6:25 pm
Re: I need to understand these things to make a scenario...
Weird.fogman wrote:something's going on...
Richard Bodley Scott


-
- Field of Glory 2
- Posts: 28274
- Joined: Sun Dec 04, 2005 6:25 pm
Re: I need to understand these things to make a scenario...
Not quite the same thing as you were describing, and FOGR (on which Pike and Shot is based) doesn't.fogman wrote:and i note, by the way, that Field of Glory has many unit classes that easily anarchy charge, regardless of the odds.
Richard Bodley Scott


Re: I need to understand these things to make a scenario...
is it true that combat resolutions are all done together before a turn? i can see the rout % updated before melees are conducted. as a matter of fact i can also see in the rout % before hand if a unit will rally.
i don't get spears. there doesn't seem to be any difference whether you have 30% or 90%: having 30% gives you the same benefits as 90%.
can the combined weapons % theoretically go over 100? for example 30% swords, 80% heavy weapons. i realize some are 'free' like 'impact foot' (although it doesn't make a difference whether it's 50 or 100 in value).
i don't get spears. there doesn't seem to be any difference whether you have 30% or 90%: having 30% gives you the same benefits as 90%.
can the combined weapons % theoretically go over 100? for example 30% swords, 80% heavy weapons. i realize some are 'free' like 'impact foot' (although it doesn't make a difference whether it's 50 or 100 in value).
-
- Field of Glory 2
- Posts: 28274
- Joined: Sun Dec 04, 2005 6:25 pm
Re: I need to understand these things to make a scenario...
Combat results are queued to be displayed to the player. Otherwise everything would go by in a flash and you would not be able to take anything in. So yes, the combats are all resolved before the results of any are displayed, with the exception of combats resulting from pursuit charges, which go into the queue at a later stage.fogman wrote:is it true that combat resolutions are all done together before a turn? i can see the rout % updated before melees are conducted. as a matter of fact i can also see in the rout % before hand if a unit will rally.
That is correct, so they should not be mixed with troops that have their own POAs.i don't get spears. there doesn't seem to be any difference whether you have 30% or 90%: having 30% gives you the same benefits as 90%.
The system is based on FOGR, which envisages Spearmen as being in a concerted deep (8 ranks) phalanx and normally being in unmixed units (or perhaps with a few archers in the rear ranks, not affecting the spear POAs). One or two ranks of spearmen in front of archers or crossbowmen would normally be represented by giving the unit Light Spear capability rather than making the unit 30% Spearmen.
What mixed units did you have in mind?
They could, but depending on which capabilities are involved, anomalies could occur. In your example, for instance, 10% of the men would be getting POAs for swords and heavy weapon at the same time in the Melee phase.can the combined weapons % theoretically go over 100? for example 30% swords, 80% heavy weapons.
In other examples, as in early 16th century Polish lancer banners, there might be 50% Lancers, 50% crossbowmen, 100% swordsmen. In this case half the men are Lancers, Swordsmen, and half are Crossbows, Swordsmen. However, nobody is getting POAs for two weapons in the same "phase" of combat, as Lances only count at Impact, Swords in Melee and Crossbows in Shooting.
Richard Bodley Scott


Re: I need to understand these things to make a scenario...
i don't want the swiss to get keil bonus so i used spears and heavy weapons.
the rodeleros are swords and heavy weapons.
i've been playing around with different levels to get the right flow and have settled on a working formula.
i completely abstracted non melee weapons.
the idea is not to get the right historical proportions but how the different units interact to get the right historical flow of the battle. seminara, one of the last great medieval battles, is a fine example of that; with the battle fully shock tactics, it gives a good idea of what the engine can do in the medieval period.
the rodeleros are swords and heavy weapons.
i've been playing around with different levels to get the right flow and have settled on a working formula.
i completely abstracted non melee weapons.
the idea is not to get the right historical proportions but how the different units interact to get the right historical flow of the battle. seminara, one of the last great medieval battles, is a fine example of that; with the battle fully shock tactics, it gives a good idea of what the engine can do in the medieval period.
Re: I need to understand these things to make a scenario...
1. how do you make waterways blue?
2. there seems to be a mistake here. the fragmented Swiss unit (70% spears) with spears should get 0 and not 100 POA for spears.
2. there seems to be a mistake here. the fragmented Swiss unit (70% spears) with spears should get 0 and not 100 POA for spears.
-
- Field of Glory 2
- Posts: 28274
- Joined: Sun Dec 04, 2005 6:25 pm
Re: I need to understand these things to make a scenario...
Depends what you mean by blue. Water tiles show differently on PC and iPad. On PC they have the reflective water effect, on iPad they are blue (they use a blue tile because the iPad cannot display the reflective effect).fogman wrote:1. how do you make waterways blue?
This does appear to be a bug. As we have not used Spearmen in any of the vanilla scenarios or army lists, they have not been extensively tested, so this bug has not previously come to light.2. there seems to be a mistake here. the fragmented Swiss unit (70% spears) with spears should get 0 and not 100 POA for spears.
It is too late to correct this for the initial release of Pike and Shot Campaigns but we will correct it in the next update.
Richard Bodley Scott


Re: I need to understand these things to make a scenario...
this is what it shows on my pc. so you can only get the blue stream if you make your scenario on the ipad?
-
- Field of Glory 2
- Posts: 28274
- Joined: Sun Dec 04, 2005 6:25 pm
Re: I need to understand these things to make a scenario...
No sorry, I was not clear what you meant. You need to place a Water tile from the base tile set (it does not look like water in the editor because the reflective surface is added later), and then a stream or river etc. overlay tile on top.fogman wrote:this is what it shows on my pc. so you can only get the blue stream if you make your scenario on the ipad?
Richard Bodley Scott


Re: I need to understand these things to make a scenario...
I need you to confirm or disprove,
if (GetUniversalVar("RoutedSide") == side)
{
killed = losses * 45;
killed /= 100;
wounded = losses - killed;
}
else
{
killed = losses / 4;
wounded = losses / 2;
// Note that this means that victors get some of their "losses" back
}
total_killed += killed;
total_wounded += wounded;
meaning: if the defeated side suffered 100 losses (killed & wounded) then the # of reported killed is 45 and the # of reported wounded is 55.
and if the victorious side suffered 100 losses (killed & wounded) then the # of reported killed is 25 and the # of reported wounded is 50. thus the victorious side gets 25 back.
if (GetUniversalVar("RoutedSide") == side)
{
killed = losses * 45;
killed /= 100;
wounded = losses - killed;
}
else
{
killed = losses / 4;
wounded = losses / 2;
// Note that this means that victors get some of their "losses" back
}
total_killed += killed;
total_wounded += wounded;
meaning: if the defeated side suffered 100 losses (killed & wounded) then the # of reported killed is 45 and the # of reported wounded is 55.
and if the victorious side suffered 100 losses (killed & wounded) then the # of reported killed is 25 and the # of reported wounded is 50. thus the victorious side gets 25 back.
Re: I need to understand these things to make a scenario...
survivors = GetAttrib(id, "TotalMen");
if (GetUniversalVar("RoutedSide") == side)
{
if (GetAttrib(id, "MoraleState") > 2)
{
captured_deserted = survivors / 2;
}
else
{
captured_deserted = survivors / 4;
}
}
else
{
if (GetAttrib(id, "MoraleState") > 2)
{
captured_deserted = survivors / 10;
}
}
total_captured_deserted += captured_deserted;
meaning: is 'survivors'
1.the # of total men minus killed/wounded,
2.total men minus killed/wounded/routed,
3.the # of routed?
the /10 seems to apply to the victorious side, which points to 'survivors' being 3.
but if the /2 or /4 apply to the defeated side, it doesn't added up...
if (GetUniversalVar("RoutedSide") == side)
{
if (GetAttrib(id, "MoraleState") > 2)
{
captured_deserted = survivors / 2;
}
else
{
captured_deserted = survivors / 4;
}
}
else
{
if (GetAttrib(id, "MoraleState") > 2)
{
captured_deserted = survivors / 10;
}
}
total_captured_deserted += captured_deserted;
meaning: is 'survivors'
1.the # of total men minus killed/wounded,
2.total men minus killed/wounded/routed,
3.the # of routed?
the /10 seems to apply to the victorious side, which points to 'survivors' being 3.
but if the /2 or /4 apply to the defeated side, it doesn't added up...
-
- Field of Glory 2
- Posts: 28274
- Joined: Sun Dec 04, 2005 6:25 pm
Re: I need to understand these things to make a scenario...
That is correct, with one exception. The first section applies to a routed side, not a defeated side. So if a side loses because of the time limit, the second section applies, not the first.fogman wrote:I need you to confirm or disprove,
if (GetUniversalVar("RoutedSide") == side)
{
killed = losses * 45;
killed /= 100;
wounded = losses - killed;
}
else
{
killed = losses / 4;
wounded = losses / 2;
// Note that this means that victors get some of their "losses" back
}
total_killed += killed;
total_wounded += wounded;
meaning: if the defeated side suffered 100 losses (killed & wounded) then the # of reported killed is 45 and the # of reported wounded is 55.
and if the victorious side suffered 100 losses (killed & wounded) then the # of reported killed is 25 and the # of reported wounded is 50. thus the victorious side gets 25 back.
Richard Bodley Scott


-
- Field of Glory 2
- Posts: 28274
- Joined: Sun Dec 04, 2005 6:25 pm
Re: I need to understand these things to make a scenario...
survivors = the current # of total men. Which is the value of total men at the start of the battle, minus killed/wounded. Note that the value of total men at the start of the battle is not the BaseAttrib from the Squads file, but the adjusted value after the CustomizeUnits() function is applied at the start of the battle. (This value is returned by the StartingStrength() function).fogman wrote:survivors = GetAttrib(id, "TotalMen");
if (GetUniversalVar("RoutedSide") == side)
{
if (GetAttrib(id, "MoraleState") > 2)
{
captured_deserted = survivors / 2;
}
else
{
captured_deserted = survivors / 4;
}
}
else
{
if (GetAttrib(id, "MoraleState") > 2)
{
captured_deserted = survivors / 10;
}
}
total_captured_deserted += captured_deserted;
meaning: is 'survivors'
1.the # of total men minus killed/wounded,
2.total men minus killed/wounded/routed,
3.the # of routed?
the /10 seems to apply to the victorious side, which points to 'survivors' being 3.
but if the /2 or /4 apply to the defeated side, it doesn't added up...
Also the defeated side if the game was ended by the time limit. But it only applies to routed units, because of the "if (GetAttrib(id, "MoraleState") > 2)". It is assumed that not all routers will return to the colours, even on the victorious side.the /10 seems to apply to the victorious side
The routed side, not the defeated side. /2 if the unit is routed, /4 if not.but if the /2 or /4 apply to the defeated side, it doesn't added up..
Richard Bodley Scott


Re: I need to understand these things to make a scenario...
i'm not clear on why there are 3 cases for captured/deserted.
the side that doesn't rout (which could be both sides): captured_deserted /10
the side that routs: captured_deserted/4 or /2 (I don't see how you determine one or the other divisor)
what applies if both routs?
does the determination of which side wins the scenario (on a 'strategic' level) in case of a theoretical draw has any bearing?
the side that doesn't rout (which could be both sides): captured_deserted /10
the side that routs: captured_deserted/4 or /2 (I don't see how you determine one or the other divisor)
what applies if both routs?
does the determination of which side wins the scenario (on a 'strategic' level) in case of a theoretical draw has any bearing?
Re: I need to understand these things to make a scenario...
can the divisor be a non-integer? (if yes, decimal with comma or dot?)
can the results.bsf be made to apply differently to different scenarios in a campaign?
can the results.bsf be made to apply differently to different scenarios in a campaign?
-
- Field of Glory 2
- Posts: 28274
- Joined: Sun Dec 04, 2005 6:25 pm
Re: I need to understand these things to make a scenario...
Which divisor is used depends on whether the unit is itself already routing when the army morale cracks. ("MoraleState" > 2)fogman wrote:i'm not clear on why there are 3 cases for captured/deserted.
the side that doesn't rout (which could be both sides): captured_deserted /10
the side that routs: captured_deserted/4 or /2 (I don't see how you determine one or the other divisor)
Looking at the code I think neither side would suffer the routing penalties on reported losses.what applies if both routs?
Not on the reported losses, no.does the determination of which side wins the scenario (on a 'strategic' level) in case of a theoretical draw has any bearing?
Richard Bodley Scott


-
- Field of Glory 2
- Posts: 28274
- Joined: Sun Dec 04, 2005 6:25 pm
Re: I need to understand these things to make a scenario...
The engine does not support floating point variables or floating point arithmetic in any way. All variables can only hold integers. You have to divide by an integer, and the result will always be rounded down to the nearest integer.fogman wrote:can the divisor be a non-integer? (if yes, decimal with comma or dot?)
However it is easy to get round this by multiplying the variable by 100 at the start of the series of operations, and then dividing by 100 at the end (which or without an addition to make it round up and down normally).
Not directly.can the results.bsf be made to apply differently to different scenarios in a campaign?
However, you could create a Universal Variable and assign a different value to it in each scenario script, then branch the logic in Results.BSF according to the value in that Universal Variable.
Richard Bodley Scott


Re: I need to understand these things to make a scenario...
can the program do operations with rationals?
for exemple, intead of,
variable/1.5,
one writes
variable*2/3
for exemple, intead of,
variable/1.5,
one writes
variable*2/3
-
- Field of Glory 2
- Posts: 28274
- Joined: Sun Dec 04, 2005 6:25 pm
Re: I need to understand these things to make a scenario...
No, you would need to do the multiplication first.
Variable *= 2;
Variable /= 3;
Variable *= 2;
Variable /= 3;
Richard Bodley Scott

