Using squads.csv to create minimum ranges... But?

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Using squads.csv to create minimum ranges... But?

Post by GottaLove88s »

Squads.csv has 5 statistics for APEffective, 5 for APAccuracy and 5 for HEeffective... The titles for APAccuracy imply that the 5 values represent different distances to the target, ie. the 1st value is the APaccuracy for 1 square away, the 2nd for 2 squares, the 3rd 4 squares, the 4th 6 squares, the 5th 7+ squares...

Using this, I've tried to setup a minimum AP range for warships and coastal guns... initially setting the values of each of the first three numbers to zero. However, doing it that way, the BA engine ignores that there are any fourth and fifth values, and reports "out of range" or some such error, no matter the distance to target...

So then I've tried a low and meaningless, dummy "1" value, as the 1st number, which tricks BA into actually checking that it can open fire at the greater ranges...

However, I've noticed that these units sometimes seem to be capable of targeting units less than 6 squares away, even though the 2nd, 3rd & 4th values (ie. ranges 2-5 squares) for APEffective, APaccuracy and HEeffective are still set to zero...

Any ideas why this is happening? Does BA's game engine use the squads.csv data for different ranges? Or might it be creating it's own values, based on some of the data? Confused. :oops: :?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Using squads.csv to create minimum ranges... But?

Post by GottaLove88s »

Btw do the intermediate squares take the higher accuracy or the lower one?

ie. If 2nd value of APaccuracy is the accuracy for 2 square range, and 3rd value is accuracy for 4 square range, does the accuracy over 3 squares take the 2nd value (2-3 square range) or the 3rd value (3-4 square range)?

Thanks!
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9928
Joined: Wed Mar 23, 2005 10:35 pm

Re: Using squads.csv to create minimum ranges... But?

Post by pipfromslitherine »

I don't think we have any concept of minimum ranges - you would need to tweak the scripts to allow for those situations.

The ranges are inclusive and above, so the brakets are (from memory) 1, 2, 3/4, 5/6, 7+ (I think it is made explicit in the advanced tooltips unit descriptions?)

Cheers

Pip
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Using squads.csv to create minimum ranges... But?

Post by GottaLove88s »

So, for example, if I set a 152mm Coast Gun to...

APeffective 1 [1 square], 0 [2 squares], 0 [3-4 squares], 100 [5-6 squares], 75 [7+ squares]
APaccuracy 1 [1 square], 0 [2 squares], 0 [3-4 squares], 80 [5-6 squares], 60 [7+ squares]

Would BA's default AP direct fire code cause it to have neglible effect at 1 square (have to include a number >0 for 1 square, otherwise BA won't let it fire at any range), no effect at all from 2-4 squares, but then solid arty attacks at 5+ squares...? Or does it do something less simple...?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9928
Joined: Wed Mar 23, 2005 10:35 pm

Re: Using squads.csv to create minimum ranges... But?

Post by pipfromslitherine »

I would expect so, yes.

Cheers

Pip
Post Reply

Return to “Battle Academy : Modders Corner ”