Calculating the firing arc value

Please post here for questions and discussion about general game modding.
Post Reply
prjw73
Posts: 95
Joined: Sat Feb 17, 2007 12:36 pm
Location: The Netherlands
Contact:

Calculating the firing arc value

Post by prjw73 »

I could post this question in any of the Close Combat sub-forums: How does one calculate the firing arc value? Some values are provided in the workbooks , however, I need a couple of values that are not standard.

Thanks.

Pete
prjw73
Posts: 95
Joined: Sat Feb 17, 2007 12:36 pm
Location: The Netherlands
Contact:

Re: Calculating the firing arc value

Post by prjw73 »

@Steve,

Would you be able to answer my question on how to calculate the firing arc value?

Thank you,

Pete
User avatar
SteveMcClaire
Posts: 4316
Joined: Mon Nov 19, 2007 9:31 pm

Re: Calculating the firing arc value

Post by SteveMcClaire »

Hi pete -- sorry I missed this post the first time.

Firing arc is represented as a byte (8 bit) value with each bit corresponding to a part of the arc. The least significant bit (bit 0) is the front arc and the higher bits in the byte represent arcs around the vehicle going clockwise.

In binary it would look like this:
00000001 = front arc
00000010 = right front arc
00000100 = right side arc
00001000 = right rear arc
00010000 = rear arc
00100000 = left rear arc
01000000 = left side arc
10000000 = left front arc

If you use a bitwise and to combine the ones you want to use and the resulting (base 10) value is what you put in the data file. You can use Windows Calculator in 'programmer' mode to enter the binary value with '1' in the spots you want the vehicle weapon to be able to fire in, then convert to decimal.
prjw73
Posts: 95
Joined: Sat Feb 17, 2007 12:36 pm
Location: The Netherlands
Contact:

Re: Calculating the firing arc value

Post by prjw73 »

Thank you for the explanation, Steve. It does not make much sense to me though as I am not educated in this area, but I will try and figure it out :?
prjw73
Posts: 95
Joined: Sat Feb 17, 2007 12:36 pm
Location: The Netherlands
Contact:

Re: Calculating the firing arc value

Post by prjw73 »

If I understand correctly, there are eight different 'arcs' possible, each represented by a bit. By combining bits you can combine 2 or more arcs. So it's not as accurate and customizable as I had hoped for. Knowing this, I can at least make an informed choice.
User avatar
SteveMcClaire
Posts: 4316
Joined: Mon Nov 19, 2007 9:31 pm

Re: Calculating the firing arc value

Post by SteveMcClaire »

That's correct - there are 8 pre-defined arcs and you can use any combination of them by combining bits into a mask.
Post Reply

Return to “Cross of Iron Modding”