Like gruntmaster1 said, you can enable free transfer for the station's cargo. If you don't want the station to become overpowered, you can always make the factory require resources to run.
I've been working on making customization easier for non-coders for the next update. AddOmniFac.java now has all the relevant settings with comments describing what they do.
If you want to use this now, here's the updated file. It should be compatible with 1.4, but you would need to start a new game for the changes to take place:
package data.scripts.world;
import com.fs.starfarer.api.campaign.CampaignFleetAPI;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;
import com.fs.starfarer.api.campaign.SectorGeneratorPlugin;
import com.fs.starfarer.api.campaign.StarSystemAPI;
import java.util.*;
@SuppressWarnings("unchecked")
public class AddOmniFac implements SectorGeneratorPlugin
{
private static final String STATION_NAME = "Omnifactory";
private static final String STATION_FACTION = "neutral";
// Responsible for creating the spawnpoint and adjusting factory settings
// If you wish to modify a default, uncomment and change the relevent line
private static void initStation(SectorEntityToken station, StarSystemAPI system)
{
OmniFac factory = new OmniFac(station);
// Should the player be able to freely take goods from the factory?
//station.getCargo().setFreeTransfer(false);
// Sets if 'X added to station' messages appear. Defaults to true.
//factory.setShowAddedCargo(true);
// Sets if 'Limit for X reached' messages appear. Defaults to true.
//factory.setShowLimitReached(true);
// Sets if buggy goods should be removed from memory. Defaults to false.
//factory.setRemoveBrokenGoods(false);
// Sets ship production time modifier. Defaults to 1.0.
//factory.setShipProductionTimeModifier(1.0f);
// Sets weapon production time modifier. Defaults to 1.0.
//factory.setWeaponProductionTimeModifier(1.0f);
// Sets the minimum amount of crew for the factory to function. Defaults to 0.
//factory.setRequiredCrew(0);
// Sets factory supply consumption per day. Defaults to 0.
//factory.setRequiredSuppliesPerDay(0f);
// Sets factory fuel consumption per day. Defaults to 0.
//factory.setRequiredFuelPerDay(0f);
// Sets how many of each fighter to produce. Retroactive. Defaults to 3.
//factory.setMaxHullsPerFighter(3);
// Sets how many of each frigate to produce. Retroactive. Defaults to 2.
//factory.setMaxHullsPerFrigate(2);
// Sets how many of each destroyer to produce. Retroactive. Defaults to 2.
//factory.setMaxHullsPerDestroyer(2);
// Sets how many of each cruiser to produce. Retroactive. Defaults to 1.
//factory.setMaxHullsPerCruiser(1);
// Sets how many of each capital ship to produce. Retroactive. Defaults to 1.
//factory.setMaxHullsPerCapital(1);
// Sets how many stacks of each weapon to produce. Defaults to 0.5.
//factory.setMaxStacksPerWeapon(0.5f);
system.addSpawnPoint(factory);
}
// This will try to create the station in the following places (in order):
// 1. If the system is Corvus, at Corvus IV
// 2. If not Corvus, a planet with no existing satellites
// 3. If no free planets, orbit adjacent the Abandoned Storage Facility
// 4. If no Abandoned Storage Facility, orbiting the system's star
private static void createStation(StarSystemAPI system)
{
SectorEntityToken station;
// We are in the Corvus system (not a TC), so use Corvus IV
if ("Corvus Star System".equals(system.getName()))
{
station = system.addOrbitalStation(
system.getEntityByName("Corvus IV"), 315,
300, 50, STATION_NAME, STATION_FACTION);
}
// Not in Corvus, find a good candidate for station placement
else
{
SectorEntityToken tmp;
List planets = new ArrayList(system.getPlanets());
List stations = system.getOrbitalStations();
// Why is this even IN there?
planets.remove(system.getStar());
// Remove all planets that have stations around them
for (int x = 0; x < stations.size(); x++)
{
tmp = (SectorEntityToken) stations.get(x);
if (tmp.getOrbit() != null)
{
planets.remove(tmp.getOrbit().getFocus());
}
}
// Are there any free planets?
if (!planets.isEmpty())
{
station = system.addOrbitalStation(
(SectorEntityToken) planets.get(0), 315,
300, 50, STATION_NAME, STATION_FACTION);
}
else
{
tmp = system.getEntityByName("Abandoned Storage Facility");
// Does the Abandoned Storage Facility exist?
if (tmp != null)
{
station = system.addOrbitalStation(tmp.getOrbit().getFocus(),
315, 300, 50, STATION_NAME, STATION_FACTION);
}
else
{
// I give up, just use the star
if (system.getStar() != null)
{
station = system.addOrbitalStation(system.getStar(), 315,
7250, 50, STATION_NAME, STATION_FACTION);
}
// Just in case somehow there's no sun in this system
else
{
station = system.addOrbitalStation(system.createToken(0f, 0f),
0, 0, 50, STATION_NAME, STATION_FACTION);
}
}
}
}
// Finally, create the factory
initStation(station, system);
}
@Override
public void generate(SectorAPI sector)
{
List systems = sector.getStarSystems();
// This generator ran before SectorGen, delay until a system is created
if (systems.isEmpty())
{
Timer deferredAdd = new Timer(true);
deferredAdd.scheduleAtFixedRate(new DeferredAdd(sector), 1000, 1000);
}
else
{
StarSystemAPI system = (StarSystemAPI) systems.get(0);
createStation(system);
}
}
private static class DeferredAdd extends TimerTask
{
SectorAPI sector;
public DeferredAdd(SectorAPI sector)
{
this.sector = sector;
}
@Override
public void run()
{
CampaignFleetAPI player = sector.getPlayerFleet();
if (player != null)
{
StarSystemAPI system = (StarSystemAPI) player.getContainingLocation();
if (system != null)
{
createStation(system);
this.cancel();
}
}
}
}
}