Bomb Filters and How Not to Shoot Yourself in the Foot

Please post here for questions and discussion about scenario design, art and sound modding and the game editor for WITP Admiral's Edition.

Moderators: wdolson, MOD_War-in-the-Pacific-Admirals-Edition

Post Reply
el cid again
Posts: 16984
Joined: Mon Oct 10, 2005 4:40 pm

Bomb Filters and How Not to Shoot Yourself in the Foot

Post by el cid again »


I implemented bomb filters for aircraft weapons. This has resulted in reports of issues in naval attacks with too many weapons!

There were a couple of different issues involved in the problem of some attacks with duplicated weapons. Although there appear to be code issues, the greater portion of these are my fault.

First, so many of the technical changes in the beta updates work so well, I trusted too much, and ignored Joe Wilkerson's Law - TEST, TEST, TEST. Don't trust until you build a test box and see it work, if it is new.

Second, every last air unit using a changed aircraft needs to be updated - or the code never sees the right data at all. Sometimes I changed a plane but not every unit using it (there are after all thousands of slots times six scenarios). That led to inconsistent code execution of attacks masking other issues - and making them harder to understand. If you change a plane it does NOT change the data in the air groups using that plane - you must do that separately AFTER you change the plane data for every group using the plane.

Third, it appears that the new code has some limits. It DOES work, at least if you keep it simple. I tried, in many cases, to get a little too sophisticated - with three, four or even five different weapon codes for a single type. Code seems to expect to manage two per aircraft. You may have more than one line with the same code - so for example N x 250 HE plus n x 100 pound HE coded for land (40) and N x 250 AP and n x 100 SAP coded for sea (22) - no problem. But try to make it a torpedo, an alternate to the torpedo, big bombs for some land targets and little ones for airfields or troops - it gets mixed up. In particular, it will combine bombs and torpedoes on naval targets at sea or in port.

The aircraft modified with filters will instantly update and backfit into existing games - but ONLY get used when you upgrade aircraft in an air unit in existing games. NEW games will always be right in respect to both aircraft and air groups.

It is possible that more sophisticated combinations than two target sets per aircraft will work. But I have not been able to show that in a testbed situation. Bottom line - if you try some combination of weapons and filters - test to see what happens - don't assume it will work as you expect. And remember - after you change a plane - look at EVERY air group that might use it to update the data in every last unit - to get consistent behavior in combat execution.
User avatar
JuanG
Posts: 906
Joined: Sun Dec 28, 2008 8:12 pm

RE: Bomb Filters and How Not to Shoot Yourself in the Foot

Post by JuanG »

Re: the point about having to update airgroup data;

There is a nice tool in the editor, under tools -> set air groups. Configured correctly, you can get it to update the device data for all the airgroups based on whatever is in the aircraft database at that point. Very handy to avoid having to manual update several hundred squadrons.

I've also been messing with the codes lately, with an experiment to disable ASW for IJ Army airgroups by leaving them with no bomb load.
User avatar
PaxMondo
Posts: 11130
Joined: Fri Jun 06, 2008 3:23 pm

RE: Bomb Filters and How Not to Shoot Yourself in the Foot

Post by PaxMondo »

ORIGINAL: el cid again


I implemented bomb filters for aircraft weapons. This has resulted in reports of issues in naval attacks with too many weapons!

But try to make it a torpedo, an alternate to the torpedo, big bombs for some land targets and little ones for airfields or troops - it gets mixed up.
MichaelM covered this in the Patch thread. You interfere with the torpedo replacement code at your peril. The filters work very much as designed, except where torpedo replacement is involved. So for any torpedo carrying ac, do not set the naval, alt naval, or port filters and everything works fine.
Pax
el cid again
Posts: 16984
Joined: Mon Oct 10, 2005 4:40 pm

RE: Bomb Filters and How Not to Shoot Yourself in the Foot

Post by el cid again »

I like the idea of a tool to update all airgroups. I even tried to use it, but it did not seem to actually change things That was a couple of years ago - perhaps I should
try again now - as there is revised software. Certainly if it does work, it is a nice idea.

Still - reviewing all air groups is not a bad thing. Information theory says for any significant data set ("over ten lines or so") there WILL BE eratta. So a review often
permits me to spot things I was not looking for, but should fix anyway. I find on the order of one error per 100 records - and I prever none. So review is a chance both
to address the issue at hand and to find other things at the same time. Not all bad.

Thanks, however, for pointing this tool out. I had forgotten it, and should try it again - just in case it can save a lot of time.

el cid again
Posts: 16984
Joined: Mon Oct 10, 2005 4:40 pm

RE: Bomb Filters and How Not to Shoot Yourself in the Foot

Post by el cid again »

Thanks for reminding me about that tool. I have not tried it for a couple of years. I could not get it to work long ago - but maybe it will now.

User avatar
inqistor
Posts: 1813
Joined: Wed May 12, 2010 1:19 pm

RE: Bomb Filters and How Not to Shoot Yourself in the Foot

Post by inqistor »

Bombload seems to correct itself (most of the time), when you change unit mission in-game. But you would better change it DB, or you can get weird results.

I see nothing wrong with torpedoes, but you HAVE TO define its replacement, or you will get hardcoded one. Also, when you are using torpedo, any bomb defined as Naval Attack will be also carried in the same strike.
Post Reply

Return to “Scenario Design and Modding”