I'm creating a mission like randomBattle and I want to get each ship and add a hullMod as the ship is added to the player's fleet. How should I do this? I think I'm close but its not quite working. Here's what I've tried so far.
BattleCreationContext batContext = api.getContext();
CampaignFleetAPI playerFleet = batContext.getPlayerFleet();
FleetMemberAPI ship = api.addToFleet(FleetSide.PLAYER, "astral_Elite", FleetMemberType.SHIP, false);
api.addBriefingItem("ship is " + ship.getVariant().getHullMods());
ship.getVariant().addMod("some_HullMod");