Issues with the game engine (not campaign)
Moderators: BeeRockxs, Moderators
- Mekwars Server Operator
- Posts: 714
- Joined: Wed Feb 24, 2010 8:28 am
AMS and Laser AMS are showing up as "weapons" when adding BV for Gunnery/Ballistic and Gunnery/Energy. Any way to exclude these in the code?
Also wondering if the GB/GL/GM mods can simply be set to a % of the weapon's BV. Like (Weapon BV * double field)
I remember this being discussed a year or two ago, but nothing came of it.
- Posts: 176
- Joined: Tue Dec 03, 2013 4:54 am
In the loop that's totalling up weapon BV, you could add a condition to check AMS. I think you can use Mounted.getType() to get the EquipmentType, and then use EquipmentType.hasFlag() to check for flags. I believe we should have MiscType.F_AMS and MiscType.F_LAMS or something like that. Those might be in WeaponType or EquipmentType, but there should be flags to distinguish AMS and LAMS.
Member of the MegaMek Team
- MegamekNET Moderator
- Posts: 329
- Joined: Mon Nov 21, 2011 10:56 pm
That F_AMS flag is the key for both AMS weapons. Megamek checks for the F_ENERGY flag to determine if it is the laser version. I will modify MekWars to have the AMS systems ignored by the GE/GB/GM skills.
MekWars currently has two bv calculation options for the GE/GB/GM skills:
1) Add a flat bv amount per weapon of that type.
2) Add a bv amount based on the weapon's base bv multiplied by the "Pilot BV Skill Multiplier" for the difference in the Gunnery with that weapon.
This second method is also used for the Weapon Specialization skills but it applies 2 levels of Gunnery instead.
I am going to add a third method, so Gunnery Energy/Missile/Ballistic and Weapon Specialization skills will use this concept: If the pilot's skills effectively add a level of gunnery to all his weapons then he should be charged as if he had a full level of gunnery. So a 4/5GM pilot in a JVN-10N should be charged as if he was a 3/5 pilot because, he effectively is. The formula will sum the weapons that the unit gains a gunnery benefit from and divide by the sum of all weapons on the unit and apply the % to the cost for the level of gunnery. So that nasty 4/5WS:ML pilot in a STG-3G will cost the same as a 2/5 in a STG-3G. It should be in SF this week.
I had opinions/That didn't matter/I had a brain/That felt like pancake batter
I got a backyard/With nothing in it/Except a stick/A dog/And a box with something in it
The hardest button to button/ /The hardest button to button/ /The hardest button to button