Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 67 68 [69] 70 71 ... 93

Author Topic: [0.96a] Console Commands v2023.05.05  (Read 1536595 times)

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2846
  • Your Friendly Forum Friend
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1020 on: April 19, 2021, 04:12:17 PM »

Having an issue with officer respeccing under Officer Management: level 6 officers that have been respecced can only level back up to 5.
IIRC Lazy has said that is a limitation of the respec command. Basically it copies all the info for the officer and makes a new one
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too

Szasz

  • Captain
  • ****
  • Posts: 314
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1021 on: April 20, 2021, 09:45:05 AM »

Is there a command that removes or alters conditions on a planet? Some lazy mod left its own 'hydrated' condition on a colony that breaks the compatibility of the save.
Logged

Szasz

  • Captain
  • ****
  • Posts: 314
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1022 on: April 20, 2021, 02:57:24 PM »

Yes, use 'removeCondition <condition ID>' for that. You need to be at the market you're removing it from, IIRC.
Thanks. Wasn't sure it existed. Command list should be updated.
Logged

Father

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1023 on: April 21, 2021, 04:59:57 AM »

Hello. Just a quick question; It seems the code for spawning an
asteroid belt will not work anymore. I'm not sure if it's because of the new update or not but, when the code is run it seems to not recognise "AddAsteroidBelt". Anyway cheers.
Logged

PersistantFlame

  • Ensign
  • *
  • Posts: 4
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1024 on: April 21, 2021, 07:31:27 AM »

Hello there, a couple questions:

Is there a way to spawn gates using this mod? If so, which command(s) do I use?

Also which commands do I type to change a planet's type (e.g., a barren to a terran)? Does this work with unknown skies planets?
Logged

Üstad

  • Commander
  • ***
  • Posts: 131
    • View Profile
Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
« Reply #1025 on: April 21, 2021, 03:46:09 PM »

Hello there, a couple questions:

Is there a way to spawn gates using this mod? If so, which command(s) do I use?

Also which commands do I type to change a planet's type (e.g., a barren to a terran)? Does this work with unknown skies planets?

Ok, so I did a bit of digging around and testing on my own, and this code will spawn a gate within a star system (have not tested in a nebula).

Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "inactive_gate", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }

It would be nice to have a nice reference page for these blocks of code. Just sayin'


Tried to use the code to add a stable point but I got the error in the screenshot.

[attachment deleted by admin]
Logged

evzhel

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1026 on: April 21, 2021, 07:20:58 PM »

Removing all d-mods in fleet
Code
runcode import com.fs.starfarer.api.combat.ShipVariantAPI; import com.fs.starfarer.api.fleet.FleetMemberAPI; import com.fs.starfarer.api.impl.campaign.DModManager; for (FleetMemberAPI member : Global.getSector().getPlayerFleet().getFleetData().getMembersListCopy()) { ShipVariantAPI variant = member.getVariant(); List<String> dmods = new ArrayList<String>(); for (String id : variant.getHullMods()) { if (DModManager.getMod(id).hasTag(Tags.HULLMOD_DMOD)) { if (!variant.getHullSpec().getBuiltInMods().contains(id)) { dmods.add(id); } } } for (String id : dmods) { DModManager.removeDMod(variant, id); } }

Some hammerheads and sunders in tutorial are special, with their d-mods actually built-in, they require rebuilding at starport, that changes their mount point types too.
[close]
« Last Edit: April 21, 2021, 07:26:43 PM by evzhel »
Logged

Flacman3000

  • Commander
  • ***
  • Posts: 202
  • A man cannot put his shaft into the unknown.
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1027 on: April 23, 2021, 01:31:20 AM »

Anyone know of commands to remove remnant beacons or other beacons?
Logged
Ryzen 7 2700x, 1080ti, 16GB DDR4 RAM and playing SS on a SSD - Always stay ahead because when you're ahead you're rear anatomy is open to interpretation.

Kurtdovah

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1028 on: April 24, 2021, 02:14:40 AM »

Hello, how can I put a command Surveyall like the ancien version of this mod? Thank you  :)
Logged

mrpeters

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1029 on: April 24, 2021, 05:19:39 AM »

Hello, how can I put a command Surveyall like the ancien version of this mod? Thank you  :)

Unsure exactly what you mean, but surveyall exists, you just have to write "survey all" with a space between.
Logged

The_White_Falcon

  • Ensign
  • *
  • Posts: 34
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1030 on: April 24, 2021, 09:07:02 PM »

Was wondering it would be possible to add a colony industry modifier to make them improved (without having to add/use story points).  I.E.  something like "addindustry farming soil_nanites alpha_core improved"

add improved farming
Code
runcode import com.fs.starfarer.api.campaign.SpecialItemData; String marketName = "Your_Market_Name"; String industryID = "farming"; IndustrySpecAPI spec = Global.getSettings().getIndustrySpec(industryID); if (spec == null) { Console.showMessage("Error - industry not found: " + industryID); return; } MarketAPI market = CommandUtils.findBestMarketMatch(marketName); if (market == null) { Console.showMessage("Error - market not found: " + marketName); return; } market.addIndustry(industryID); Industry industry = market.getIndustry(industryID); industry.setImproved(true); industry.setAICoreId("alpha_core"); industry.setSpecialItem(new SpecialItemData("soil_nanites", null));
[close]
improve spaceport
Code
runcode import com.fs.starfarer.api.campaign.SpecialItemData; String marketName = "Your_Market_Name"; String industryID = "spaceport";  MarketAPI market = CommandUtils.findBestMarketMatch(marketName); if (market == null) { Console.showMessage("Error - market not found: " + marketName); return; } if (market.hasIndustry(industryID) == false) { Console.showMessage("Error - market does not have industry " + industryID); return; } Industry industry = market.getIndustry(industryID); industry.setImproved(true); industry.setAICoreId("alpha_core"); industry.setSpecialItem(new SpecialItemData("fullerene_spool", null));
[close]

Artifacts will be installed, but won't have any effect if their conditions are not met, e.g. soil nanites installed on farming if the planet has volatiles or transplutonic ore deposits.
[close]

Thank you for the code! ;D
Logged

Grindfather

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1031 on: April 25, 2021, 07:44:18 PM »

Anyone know of any commands to increase colony size?
Logged

Ramdat

  • Ensign
  • *
  • Posts: 26
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1032 on: April 25, 2021, 08:21:58 PM »

Anyone know of any commands to increase colony size?
Dock at the planet you want to change and use this:

Code
setmarketsize x

Where x is the desired size.
Logged

Dal

  • Commander
  • ***
  • Posts: 146
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1033 on: April 25, 2021, 10:54:38 PM »

It would be great to have a command to add Marine XP. I don't know what my other 4000 marines are doing while raiding for blueprints but it sure isn't getting any practice in.
Logged

Puddz

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1034 on: April 26, 2021, 07:09:34 PM »

So I'm trying to spawn in a planet and two moons. But I want the main planets orbit to make sense. Make sense in the case that it orbits the star at the right velocity depending on how far away the fleet is compared to the star. But I dont know how to change this code to swap from using the orbit days to the system I want.

Code
runcode SectorEntityToken fleet = Global.getSector().getPlayerFleet(); String planetName = "YourPlanetName"; String moonName = "YourMoonName"; String moonName2 = "YourMoonName2"; StarSystemAPI sys = (StarSystemAPI)fleet.getContainingLocation(); float orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(fleet, sys.getCenter()); float planetOrbitDays = orbitRadius / (20f + new Random().nextFloat() * 5f); float planetSize = 300; float moonOrbitRadius = planetSize * 3; float moon2OrbitRadius = planetSize * 5; float moonRadius = planetSize / 2; float moon2Radius = planetSize / 3; float moonOrbitDays = moonOrbitRadius / (20f + new Random().nextFloat() * 5f); float moon2OrbitDays = moon2OrbitRadius / (20f + new Random().nextFloat() * 5f); Vector2f playerCoords = $playerFleet.getLocation(); float angleCCW = Misc.getAngleInDegreesStrict(playerCoords); PlanetAPI star = sys.getStar(); PlanetAPI planet = sys.addPlanet(planetName, star, planetName, "gas_giant", angleCCW, planetSize, orbitRadius, planetOrbitDays ); MarketAPI market = sys.getEntityById(planetName).getMarket(); market.addCondition("volatiles_plentiful"); market.addCondition("IndEvo_RuinsCondition"); market.addCondition("US_floating"); market.addCondition("ruins_vast"); PlanetAPI moon = sys.addPlanet(moonName, planet, moonName, "terran", 0, moonRadius, moonOrbitRadius, moonOrbitDays); market = sys.getEntityById(moonName).getMarket(); market.addCondition("organics_plentiful"); market.addCondition("farmland_bountiful"); market.addCondition("ore_ultrarich"); market.addCondition("rare_ore_ultrarich"); market.addCondition("volatiles_plentiful"); market.addCondition("habitable"); market.addCondition("mild_climate"); market.addCondition("solar_array"); market.addCondition("IndEvo_RuinsCondition"); market.addCondition("ruins_vast"); PlanetAPI moon2 = sys.addPlanet(moonName2, planet, moonName2, "arid", 0, moon2Radius, moon2OrbitRadius, moon2OrbitDays); market = sys.getEntityById(moonName2).getMarket(); market.addCondition("organics_plentiful"); market.addCondition("farmland_bountiful"); market.addCondition("ore_ultrarich"); market.addCondition("rare_ore_ultrarich"); market.addCondition("volatiles_plentiful"); market.addCondition("habitable"); market.addCondition("mild_climate"); market.addCondition("solar_array"); market.addCondition("IndEvo_RuinsCondition"); market.addCondition("ruins_vast");

Edit: So I figured it out kind of. It'll spawn a gas giant with 1 terran moon, and 1 arid moon. and a bunch of good conditions with them to. Along with industrial evolution ruins and normal ruins. Shouldn't be hard to customize yourself.
« Last Edit: April 26, 2021, 09:11:23 PM by Puddz »
Logged
Pages: 1 ... 67 68 [69] 70 71 ... 93