Yes it's mod, it looks like bug i just do not know is it my non-existing knowledge of coding that causing it or it's real bug.
Relics mod is in question. So, first Purifiers convoy (and any other after) that (17 days after game start) come and drop goods at Purifier station drop 0 crew of all type. If you take one and put it in place of your ship crew it will turn ship crew to 0 too. Purifiers convoy should only bring Purifier weapons and ships. No crew and no supply, but it brings supply too. Here is code:
package data.scripts.pur.world;
import java.util.List;
import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.Script;
import com.fs.starfarer.api.campaign.CampaignFleetAPI;
import com.fs.starfarer.api.campaign.CargoAPI;
import com.fs.starfarer.api.campaign.FleetAssignment;
import com.fs.starfarer.api.campaign.LocationAPI;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;
import com.fs.starfarer.api.fleet.FleetMemberType;
import data.scripts.world.BaseSpawnPoint;
@SuppressWarnings("unchecked")
public class PurConvoySpawnPoint extends BaseSpawnPoint {
private final SectorEntityToken convoyDestination;
public PurConvoySpawnPoint(SectorAPI sector, LocationAPI location,
float daysInterval, int maxFleets, SectorEntityToken anchor,
SectorEntityToken convoyDestination) {
super(sector, location, daysInterval, maxFleets, anchor);
this.convoyDestination = convoyDestination;
}
private int convoyNumber = 0;
@Override
protected CampaignFleetAPI spawnFleet() {
CampaignFleetAPI fleet = getSector().createFleet("pur", "pur8");
getLocation().spawnFleet(getAnchor(), 0, 0, fleet);
CargoAPI cargo = fleet.getCargo();
if (convoyNumber == 1) {
cargo.addWeapons("relics_blazo_h", 2);
} else {
// addRandomWeapons(cargo, 2);
if ((float) Math.random() > 0.75f) cargo.addWeapons("relics_exo_h", 2);
if ((float) Math.random() > 0.75f) cargo.addWeapons("relics_zaap_h", 2);
}
addRandomShips(fleet.getCargo(), (int) (Math.random() * 4f));
Script script = null;
script = createArrivedScript();
Global.getSectorAPI().addMessage("The Purifiers Supply fleet is arrived in system. Heading for Gate station.");
fleet.addAssignment(FleetAssignment.DELIVER_RESOURCES, convoyDestination, 1000);
fleet.addAssignment(FleetAssignment.GO_TO_LOCATION_AND_DESPAWN, convoyDestination, 1000, script);
convoyNumber++;
return fleet;
}
private Script createArrivedScript() {
return new Script() {
public void run() {
Global.getSectorAPI().addMessage("All Purifiers cargo has been successfully delivered to Gate station.");
}
};
}
private void addRandomWeapons(CargoAPI cargo, int count) {
// List weaponIds = getSector().getAllWeaponIds();
for (int i = 0; i < count; i++) {
String weaponId = (String) weapons[(int) (weapons.length * Math.random())];
int quantity = (int)(Math.random() * 4f + 2f);
cargo.addWeapons(weaponId, quantity);
}
}
private void addRandomShips(CargoAPI cargo, int count) {
// List weaponIds = getSector().getAllWeaponIds();
for (int i = 0; i < count; i++) {
if ((float) Math.random() > 0.7f) {
String wing = (String) wings[(int) (wings.length * Math.random())];
cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, wing, null);
} else {
String ship = (String) ships[(int) (ships.length * Math.random())];
cargo.addMothballedShip(FleetMemberType.SHIP, ship, null);
}
}
}
private static String [] ships = {
"relics_pusher_h_Hull",
"relics_egler_h_Hull",
"relics_solver_h_Hull",
"relics_arwar_h_Hull",
"relics_ringer_h_Hull",
"relics_carrioner_h_Hull",
"relics_intersepter_h_Hull",
"relics_sidewayer_h_Hull",
"relics_plower_h_Hull",
};
private static String [] wings = {
"relics_chaser_h_wing",
"relics_hiter_h_wing",
"relics_charger_h_wing"
};
private static String [] weapons = {
"relics_exo_h",
"relics_blazo_h",
"relics_zaap_h",
};
}
I guess is something that i did, but just in case.
Oh yes, i do not is this important but when convoy deliver goods he do not write this "All Purifiers cargo has been successfully delivered to Gate station."