Page 1 of 1

squads.xls

Posted: Sat Nov 13, 2010 5:22 pm
by djddalton
Hi,

Thoroughly enjoying the game so far!

I have been looking through the squads.xls spreadsheet for information on individual units. It's very helpful as a reference! (especially as a shortcut to inexperienced players who want to thrash their more experienced friends :P )

However, there are some parameters that are unclear to me. (and I'm sure to many others who can be bothered to delve to such a depth for the sake of gameplay). If someone could explain to me how they (___or any of them!___) are applied it would be very helpful!

Here they are:

- Speed (can this be used to calculate move range along with AP? Obviously it is affected by terrain as well)

- APattack/HEattack (what do 1 & 0 stand for...move penalty? 1st and 2nd shot on the same target?)

- APeffective (what do 0/1/2/3/4 stand for? ranges?)

- APaccuracy [0-4] (I'm guessing this is the 'chance to hit multiplier at different ranges)

- HE effectiveness (This will be explained along with the previous 2....I assume. Comment says it is a damage multiplier)

- Move penalty 0/1 (Is this accuracy loss? Or the fact that the unit is harder to hit having moved this/last turn? what does 100 mean, a 50% reduction because it can't be 100% reduction!)

- Ambush skill (basically I want to know what ambush does to the morale depletion/effectiveness!)

Sorry if the list is a bit too long! Hope someone can help ;)

Thanks very much,

Dom

Posted: Sat Nov 13, 2010 5:29 pm
by junk2drive
In general, anything in the game files with a 0 or 1 is a switch. 0 off 1 on or reverse. For instance look at transport and can be carried. 0 means off. Vehicles that can transport will be 1. Troops that can be carried by those transports will be 1.

Posted: Sat Nov 13, 2010 5:59 pm
by djddalton
junk2drive wrote:In general, anything in the game files with a 0 or 1 is a switch. 0 off 1 on or reverse. For instance look at transport and can be carried. 0 means off. Vehicles that can transport will be 1. Troops that can be carried by those transports will be 1.
I am aware of this...with most of the parameters I have a rough Idea of what they do. I'm referring to different variables which have the same name but are distinguished by a [0] or [1]. (or in 3 cases, [0] to [4]!) Each of these variables has a different value, normally decreasing as they go up in order (since accuracy would decrease at each level, which is roughly modelled based on historical/mechanical research) I'm just hoping that someone can identify what these variables refer to and maybe even how they are applied.

Posted: Sat Nov 13, 2010 6:07 pm
by junk2drive
Edit see Merr's post below. Much better than mine :wink:

Re: squads.xls

Posted: Sat Nov 13, 2010 6:21 pm
by Merr
- Speed : animation speed ... not speed across ground but how fast the animation moves.

- APeffective - similar to armor pentration at given range. Each value (0,1,2,3,4) references the range bracket. I need to look at the code but each tile equals a range bracket value, like 0 = 0 tiles, 1 = tiles between 2-3, etc.

- APaccuracy [0-4] - same as above ... acurracy at the range bracket. A good example is the AimedShot skill, when you use aimshot it will lower the range bracket by 2 notches... meaning if the range to target was 7 tiles (range bracket 4) it will drop it to a range bracket of 2, which equals roughly 3 tiles. So shooting someone at range 7 using aimshot would be similar to shooting at someone at 3 tiles or so (again, I don't have the specifics on hand).

- Ambush skill - The % chance NOT to be spotted when shooting from cover (ie forest) or from a hilltop. A value of 85 means you have a 15% chance to be spotted.

Posted: Sat Nov 13, 2010 6:55 pm
by djddalton
Very handy - thanks for the info ;)

The tile numbers are actually in comments on the spreadsheet (1,2,4,6,7 respectively), so I know what they are now. Thanks!

If anyone can figure out what the other 2 are, I have a feeling they are quite useful!

Posted: Sat Nov 13, 2010 9:13 pm
by Merr
djddalton wrote:Very handy - thanks for the info ;)

The tile numbers are actually in comments on the spreadsheet (1,2,4,6,7 respectively), so I know what they are now. Thanks!

If anyone can figure out what the other 2 are, I have a feeling they are quite useful!
Ok, cool. The only way to discover how the numbers work is to dive into the code, which takes a while to sort out if you're unsure where to look.

With regards to the RANGE BRACKET .... here's a lamans version of that info from the code (first function in CombatTools) ;

The "default" bracket value starts at 4.
If distance = 1 , bracket = 0 .
If distance < 3, bracket = 1 .
If distance < 5, bracket = 2 .
If distance < 7, bracket = 3 .

So, there's your 0,1,2,3,4 values.

HEattack and APattack are array values ... meaning it will fall within the values shown for [0] and [1] ... code example ;
Taken from the Function CalculateDamageHE ... used to determine minimum and maximum damage ...

Code: Select all

minDam = GetAttribArray( me, "HEAttack", 0 ) ;
maxDam = GetAttribArray( me, "HEAttack", 1 ) ;
HEeffectiveness is used in some places, and under CalculateDamgeHE it's used for accuracy , code example ;

Code: Select all

accuracy = GetAttribArray(me, "HE_Effectiveness", rangeBracket) ;
Hope that helps.

Merr

Re: squads.xls

Posted: Sat Nov 13, 2010 9:57 pm
by Merr
djddalton wrote:- Move penalty 0/1 (Is this accuracy loss? Or the fact that the unit is harder to hit having moved this/last turn? what does 100 mean, a 50% reduction because it can't be 100% reduction!)
Now, MovePenalty is a % value that is multiplied against accuracy and ReactionChance ... reaction is used to determine opportunity fire, ie chance to fire at you during your turn.

Example ... But, first remember, MovePenalty is an array (falls within), so if [0]=50 and [1]=100 it will fall between 50-100, not a flat absolute.

Code: Select all

chanceToHit *= GetAttribArray(me, "MovePenalty", 0) ;
reaction code example ;

Code: Select all

				// if reacting unit moved and is not sneaking reduce chance to react
				if ( GetAttrib (me, "moved") == 1 ) //&& ( GetAttrib(me, "SneakMode") == 0 ) )
				{
					reactionChance *= GetAttribArray(me, "MovePenalty", 0) ;
					reactionChance /= 100 ;
				}
Hope that makes sense,

Merr

EDIT ... in the code examples you'll note it only uses the [0] and not a min/max between [0]-[1]... So in the above examples it will ONLY use the value for [0], absolute. So if [0]=50 then it's 50.
Since the MovePenalty is shown twice in the XLS ([0] and [1]), then it has the potential of being used as an array for code in other scripts.

Re: squads.xls

Posted: Sun Nov 14, 2010 8:08 am
by djddalton
Merr wrote:
djddalton wrote:-
Example ... But, first remember, MovePenalty is an array (falls within), so if [0]=50 and [1]=100 it will fall between 50-100, not a flat absolute.

Code: Select all

chanceToHit *= GetAttribArray(me, "MovePenalty", 0) ;
Ah, well that is a different explanation to what is given in the spreadsheet. However, it makes more sense if it is an array, since both values are proportional, and generally higher for infantry, and low for wheeled AT guns!