150 StarSystemAPI system = sector.createStarSystem(
"Unknown Location");
152 system.setName(
"Unknown Location");
153 system.setType(StarSystemType.DEEP_SPACE);
154 system.addTag(Tags.THEME_UNSAFE);
155 system.addTag(Tags.THEME_HIDDEN);
156 system.addTag(Tags.THEME_SPECIAL);
161 system.setBackgroundTextureFilename(
"graphics/backgrounds/background4.jpg");
163 system.getLocation().set(4000, 2500);
165 HyperspaceTerrainPlugin hyperTerrain = (HyperspaceTerrainPlugin) Misc.getHyperspaceTerrain().getPlugin();
166 NebulaEditor editor =
new NebulaEditor(hyperTerrain);
167 editor.clearArc(system.getLocation().x, system.getLocation().y, 0, 200, 0, 360f);
172 SectorEntityToken center = system.initNonStarCenter();
174 system.setLightColor(
new Color(225,170,255,255));
175 center.addTag(Tags.AMBIENT_LS);
177 String type =
"barren";
179 PlanetAPI rock = system.addPlanet(
"site_alpha", center,
"Alpha Site", type, 0, 150, 1200, 40);
181 rock.getMemoryWithoutUpdate().set(
"$ttBlackSite",
true);
183 rock.getMarket().addCondition(Conditions.NO_ATMOSPHERE);
184 rock.getMarket().addCondition(Conditions.COLD);
185 rock.getMarket().addCondition(Conditions.DARK);
186 rock.getMarket().addCondition(Conditions.IRRADIATED);
187 rock.getMarket().addCondition(Conditions.RUINS_SCATTERED);
189 rock.getMarket().getMemoryWithoutUpdate().set(
"$ruinsExplored",
true);
196 rock.setLocation(1200, 300);
198 SectorEntityToken field = system.addTerrain(Terrain.MAGNETIC_FIELD,
199 new MagneticFieldParams(150f,
204 new Color(60, 60, 150, 90),
206 new Color(130, 60, 150, 130),
207 new Color(150, 30, 120, 150),
208 new Color(200, 50, 130, 190),
209 new Color(250, 70, 150, 240),
210 new Color(200, 80, 130, 255),
211 new Color(75, 0, 160, 255),
212 new Color(127, 0, 255, 255)
214 field.setCircularOrbit(rock, 0, 0, 75);
216 CustomCampaignEntityAPI beacon = system.addCustomEntity(
null,
null, Entities.WARNING_BEACON, Factions.NEUTRAL);
217 beacon.setCircularOrbitPointingDown(rock, 0, 2500, 60);
219 beacon.getMemoryWithoutUpdate().set(
"$ttBlackSite",
true);
226 SectorEntityToken cache = BaseThemeGenerator.addSalvageEntity(system, Entities.ALPHA_SITE_WEAPONS_CACHE, Factions.NEUTRAL);
227 cache.getMemoryWithoutUpdate().set(
"$ttWeaponsCache",
true);
228 cache.getLocation().set(11111, 11111);
237 system.generateAnchorIfNeeded();
239 NascentGravityWellAPI well =
Global.
getSector().createNascentGravityWell(beacon, 50f);
240 well.addTag(Tags.NO_ENTITY_TOOLTIP);
241 well.setColorOverride(
new Color(125, 50, 255));
242 hyper.addEntity(well);
243 well.autoUpdateHyperLocationBasedOnInSystemEntityAtRadius(beacon, 0);
247 SectorEntityToken hamatsu =
addDerelict(system, beacon,
248 "venture_Outdated",
"ISS Hamatsu",
HAMATSU_ID, ShipCondition.BATTERED, 200,
true);
249 hamatsu.getMemoryWithoutUpdate().set(
"$hamatsu",
true);
259 public static void addFleet(SectorEntityToken rock) {
260 CampaignFleetAPI fleet = FleetFactoryV3.createEmptyFleet(Factions.NEUTRAL, FleetTypes.PATROL_LARGE,
null);
261 fleet.setName(
"Unidentified Vessel");
262 fleet.setNoFactionInName(
true);
263 fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_HOSTILE,
true);
264 fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_AGGRESSIVE,
true);
265 fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_NO_REP_IMPACT,
true);
266 fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_LOW_REP_IMPACT,
true);
268 fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_NO_SHIP_RECOVERY,
true);
269 fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_ALWAYS_PURSUE,
true);
270 fleet.getMemoryWithoutUpdate().set(
"$ziggurat",
true);
275 fleet.getFleetData().addFleetMember(
"ziggurat_Experimental");
276 fleet.getFleetData().ensureHasFlagship();
278 fleet.clearAbilities();
283 fleet.setTransponderOn(
true);
286 fleet.setCommander(person);
288 FleetMemberAPI flagship = fleet.getFlagship();
289 flagship.setCaptain(person);
290 flagship.updateStats();
291 flagship.getRepairTracker().setCR(flagship.getRepairTracker().getMaxCR());
292 flagship.setShipName(
"TTS Xenorphica");
295 flagship.setVariant(flagship.getVariant().clone(),
false,
false);
296 flagship.getVariant().setSource(VariantSource.REFIT);
297 flagship.getVariant().addTag(Tags.SHIP_LIMITED_TOOLTIP);
300 Vector2f loc =
new Vector2f(rock.getLocation().x + 300 * ((
float) Math.random() - 0.5f),
301 rock.getLocation().y + 300 * ((
float) Math.random() - 0.5f));
302 fleet.setLocation(loc.x, loc.y);
303 rock.getContainingLocation().addEntity(fleet);
305 fleet.getMemoryWithoutUpdate().set(MemFlags.FLEET_INTERACTION_DIALOG_CONFIG_OVERRIDE_GEN,
315 person.setName(
new FullName(
"Motes",
"", Gender.ANY));
316 person.setFaction(Factions.NEUTRAL);
318 person.setPersonality(Personalities.RECKLESS);
319 person.setRankId(Ranks.SPACE_CAPTAIN);
320 person.setPostId(
null);
322 person.getStats().setSkipRefresh(
true);
324 person.getStats().setLevel(10);
325 person.getStats().setSkillLevel(Skills.HELMSMANSHIP, 2);
326 person.getStats().setSkillLevel(Skills.TARGET_ANALYSIS, 2);
327 person.getStats().setSkillLevel(Skills.IMPACT_MITIGATION, 2);
328 person.getStats().setSkillLevel(Skills.GUNNERY_IMPLANTS, 2);
329 person.getStats().setSkillLevel(Skills.ENERGY_WEAPON_MASTERY, 2);
330 person.getStats().setSkillLevel(Skills.COMBAT_ENDURANCE, 2);
333 person.getStats().setSkillLevel(Skills.POLARIZED_ARMOR, 2);
334 person.getStats().setSkillLevel(Skills.MISSILE_SPECIALIZATION, 2);
336 person.getStats().setSkillLevel(Skills.FIELD_MODULATION, 2);
337 person.getStats().setSkillLevel(Skills.DAMAGE_CONTROL, 2);
339 person.getStats().setSkillLevel(Skills.NAVIGATION, 1);
341 person.getStats().setSkipRefresh(
false);
346 public static SectorEntityToken
addDerelict(StarSystemAPI system, SectorEntityToken focus,
347 String variantId, String name, String
id,
348 ShipCondition condition,
float orbitRadius,
boolean recoverable) {
349 DerelictShipData params =
new DerelictShipData(
new PerShipData(variantId, condition, 0f),
false);
351 params.ship.shipName = name;
352 params.ship.nameAlwaysKnown =
true;
353 params.ship.fleetMemberId = id;
355 SectorEntityToken ship = BaseThemeGenerator.addSalvageEntity(system, Entities.WRECK, Factions.NEUTRAL, params);
356 ship.setDiscoverable(
true);
358 float orbitDays = orbitRadius / (10f + (float) Math.random() * 5f);
359 ship.setCircularOrbit(focus, (
float) Math.random() * 360f, orbitRadius, orbitDays);
362 ShipRecoverySpecialCreator creator =
new ShipRecoverySpecialCreator(
null, 0, 0,
false,
null,
null);
363 Misc.setSalvageSpecial(ship, creator.createSpecial(ship,
null));