First, I don't understand why you retrieve system and outpost, as you don't use it further? Is this just a copy&paste you forgot?
Probably yes. I was trying to do more advanced script with assignments, but then left it as patrol system only.
what is the Anchor returned by getAnchor()? How can I make it that it anchors say to a planet, a second IDF station I would have created, or even the enemy station, so to simulate a blockade?
getAnchor() receives location where to spawn from Corvus.java, like this: IDFMainSpawnPoint idfMainFleet = new IDFMainSpawnPoint(sector, system, 5, 5, idfstation); - the last one is anchor that will be received through getAnchor(). You can use any SectorEntityToken variable for getAnchor(), in this way you can simulate blockade, or make fleet spawn from planet.
I want to make sure I get it right:
You have defined 3 spawn points for IDF, in Corvus.java
IDFConvoySpawnPoint idfConvoy = new IDFConvoySpawnPoint(sector, system, 5, 1, spawnpoint);
IDFDefenseSpawnPoint idfDefense = new IDFDefenseSpawnPoint(sector, system, 2, 1, idfstation);
IDFMainSpawnPoint idfMainFleet = new IDFMainSpawnPoint(sector, system, 5, 5, idfstation);
Function IDFMainSpawnPoint has 5 parameters
SectorAPI sector, LocationAPI location, float daysInterval, int maxFleets, SectorEntityToken anchor
and then we have this mysterious line...
getLocation().spawnFleet(getAnchor(), 0, 0, fleet);
And this is where I'm confused... because getLocation() seems to know implicitely it should use the variable 'location', and getAnchor() will use the variable 'anchor' ...
This is what is losing me. In other languages, this line
getLocation().spawnFleet(getAnchor(), 0, 0, fleet);
would use explicitely the variables sent, so would be:
location.spawnFleet(anchor, 0, 0, fleet);
but not here. Can you confirm it works like that? Surely yes, but this is not working as I have the habit to see... You have variables sent to a function, but you don't use it directly, you use a getter (getLocation or getAnchor).