Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: A Tale of Two Tech Levels (05/28/21)

Pages: 1 ... 63 64 [65] 66 67 ... 73

Author Topic: [0.95a] Console Commands v2021.04.10  (Read 797258 times)

THEASD

  • Ensign
  • *
  • Posts: 12
  • *Confused Cat Noise*
    • MSN Messenger - anyidelse@qq.com
    • View Profile
Re: [0.95a] Console Commands v2021.03.27
« Reply #960 on: April 02, 2021, 05:40:30 AM »

maybe issue(version 2021.03.27):

Some combat commands won't work in the Misson's simulation, only work in campaign's combat and simulation.
Logged
I want to use AnyIDElse as my profile name, but it was occupied :{

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1349
    • View Profile
    • GitHub Profile
Re: [0.95a] Console Commands v2021.03.27
« Reply #961 on: April 02, 2021, 01:19:19 PM »

Just wanted to ask, would it be possible when adding marines to set how much experience they have?
AddOfficer doesn't work properly for officers above level 5 (or I suppose 6 if you've got that skill) - I was trying to use it to do a sortof a save-transfer-lite on starting a new game with extra mods enabled, and was hoping to keep the two level 7 officers I'd found in the previous game.

Respec is similarly non-functioning; I think what's happening here is that the game's officer-level-up mechanism cuts you off at 5 regardless of what level the officer thinks they're up to.

Also, addofficer apparently auto-elites whatever random skill they started with, which is not always what you want. (Looks like this is a result of assigning "two skill points" to said skill?)
Is it possible to modify the addcredits command to give "X" credits at the start/end of each month for "Y" Months. If it is possible can multiple versions be running at the same time or would they just replace the last one?

Context: I wanted to be able to invest in NPC markets (Growth incentives, new building, upgrades etc) and get a modest return on the investment over time. As there doesn't seem to be vailla support for this and no mods that I know of. I was just going to use this mod to transfer the market to myself, do the investments manually and then transfer the market back to it's original owner via the console.

Yes I could just add the extra credits to myself via the console at the time I make the investment (which doesn't really fit with my idea) or do it either periodically or at the end of the investment period which I'd be prone to forgetting about and hence need to do extensive and tedious record keeping which I'd rather not do if it can be helped.
Added these to the TODO list, thank you.


Can someone give me the dowland for th older version? (0.9.1a)
Here's the last release for 0.9.1a.


maybe issue(version 2021.03.27):

Some combat commands won't work in the Misson's simulation, only work in campaign's combat and simulation.

Fixed in the next version. This was a bug related to the new "disable cheats for the current save" setting added in the last version. Thanks for letting me know!
« Last Edit: April 02, 2021, 01:21:42 PM by LazyWizard »
Logged

Pantlessman

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.95a] Console Commands v2021.03.27
« Reply #962 on: April 03, 2021, 09:32:55 AM »

Hey OP thanks for keeping this going especially during early access.  But when is the "kill" command going to work, it doesnt and I use it for testing colonies.
Logged

Bob69Joe

  • Lieutenant
  • **
  • Posts: 64
  • Discord: Flying Kites / Steam: Herr Derrierr
    • View Profile
    • Email
Re: [0.95a] Console Commands v2021.03.27
« Reply #963 on: April 03, 2021, 12:32:21 PM »

I tried this mod out the other day, are warnings about low RAM normal, or is LazyLib in need of an update?
Nevermind, going to allocate yet more RAM

I'm getting the same warning in orange text in-game. What did you do to increase RAM and how would I know how much I can change on my laptop?

http://fractalsoftworks.com/forum/index.php?topic=16127.msg266660#msg266660

So I found the answer, and I've got 3.46 of usable RAM, but is it actually a problem or not that I'm getting a warning? My vparms is already at half that, I guess. "windows -Xms1536m"
_____
Ey, so oddly enough, I loaded recently and am not getting the 'low RAM' error, at all.
« Last Edit: April 03, 2021, 05:05:37 PM by Bob69Joe »
Logged

GamertagzFTW

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.95a] Console Commands v2021.03.27
« Reply #964 on: April 03, 2021, 05:15:16 PM »

I tried this mod out the other day, are warnings about low RAM normal, or is LazyLib in need of an update?
Nevermind, going to allocate yet more RAM

I'm getting the same warning in orange text in-game. What did you do to increase RAM and how would I know how much I can change on my laptop?

http://fractalsoftworks.com/forum/index.php?topic=16127.msg266660#msg266660

So I found the answer, and I've got 3.46 of usable RAM, but is it actually a problem or not that I'm getting a warning? My vparms is already at half that, I guess. "windows -Xms1536m"
_____
Ey, so oddly enough, I loaded recently and am not getting the 'low RAM' error, at all.

I tried allocating RAM, gave up, reinstalled the other day, and everything was working fine. Seemed like the game was just giving false warnings.
Logged

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2784
  • Your Friendly Forum Friend
    • View Profile
Re: [0.95a] Console Commands v2021.03.27
« Reply #965 on: April 04, 2021, 02:20:26 PM »

Hey OP thanks for keeping this going especially during early access.  But when is the "kill" command going to work, it doesnt and I use it for testing colonies.
The kill command DOES work though? How are you trying to use it?
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too

Archer

  • Ensign
  • *
  • Posts: 2
  • CEO of Archer Starworks
    • View Profile
Re: [0.95a] Console Commands v2021.03.27
« Reply #966 on: April 04, 2021, 04:01:16 PM »

Hello, is there a command to force a contract's event to trigger ? i have a bug on a delivery contract where when i arrive on the planet, nothing happens, so i'd like to either force the event to trigger or validate the mission.
Logged
Archer Starworks strongly deny the claims about their supposed use of [REDACTED]. We are trusted commercial partners of both the Hegemony and the Luddic Church, and it appears obvious that such fallacious accusations are the product of less succesful companies.

-------- this is an automated message absolutely not written by [REDACTED]. Please do not answer------

√ústad

  • Lieutenant
  • **
  • Posts: 57
    • View Profile
Re: [0.95a] Console Commands v2021.03.27
« Reply #967 on: April 05, 2021, 05:49:53 AM »

How can I create officers with maxed out skills including elite skills?
Logged

ShangTai

  • Ensign
  • *
  • Posts: 25
    • View Profile
Re: [0.95a] Console Commands v2021.03.27
« Reply #968 on: April 05, 2021, 06:45:55 AM »

Hi, I found a little annoying bug or thing.
When I put ships in my colony storage and use command "storage set" all ships in storage disappear.
Command "SetHome" works fine, ships are still in storage.
Logged

evzhel

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: [0.95a] Console Commands v2021.03.27
« Reply #969 on: April 06, 2021, 06:12:49 PM »

Some handy snippets to be saved in this thread.

Change limit of industries on planet:
Code
runcode String marketName = "YourPlanetMarket"; int modifier = 10; MarketAPI market = CommandUtils.findBestMarketMatch(planetName); if (market == null) { Console.showMessage("Error - market not found: " + marketName); return; } market.getStats().getDynamic().getMod("max_industries").modifyFlat("playerCustomIndustryMod", modifier);
Market IDs can be listed with "list markets".
[close]

Add industry or structure to build queue
Code
runcode import com.fs.starfarer.api.util.MutableValue; String marketName = "YourMarketName"; String industryID = "QueuedIndustryID"; IndustrySpecAPI spec = Global.getSettings().getIndustrySpec(industryID); if (spec == null) { Console.showMessage("Error - industry not found: " + industryID); return; } int industryCost = (int)spec.getCost(); MutableValue credits = Global.getSector().getPlayerFleet().getCargo().getCredits(); if (industryCost > (int) credits.get()) { Console.showMessage("Error - too expensive:" + industryCost); return; } credits.subtract(industryCost); MarketAPI market = CommandUtils.findBestMarketMatch(marketName); if (market == null) { Console.showMessage("Error - market not found: " + marketName); return; } if (market.getConstructionQueue().hasItem(industryID)) { Console.showMessage("Error - market already has " + industryID); return; } market.getConstructionQueue().addToEnd(industryID, industryCost); Console.showMessage("Success - queued construction of " + industryID + " on " + marketName + " for " + industryCost);
Building IDs can be listed with "list industries".
UI currently supports only 12 buildings and shows them in sorted order, no matter the sequence in which player added them. If building over the UI limit, hidden (last sorted) ones would be: ground defense, patrol hq, cryo revival facility.
[close]

Add a perfect planet with moon and satellites at fleet location
Code
runcode import com.fs.starfarer.api.util.Misc; String planetName = "YourPlanetName"; String moonName = "YourMoonName"; float planetOrbitDays = 180; float planetSize = 200; float moonOrbitRadius = planetSize * 4; float moonRadius = planetSize / 4; float moonOrbitDays = 40; Vector2f playerCoords = $playerFleet.getLocation(); float angleCCW = Misc.getAngleInDegreesStrict(playerCoords); StarSystemAPI sys = (StarSystemAPI)$playerFleet.getContainingLocation(); PlanetAPI star = sys.getStar(); float orbitRadius = Misc.getDistance(star.getLocation(), playerCoords); PlanetAPI planet = sys.addPlanet(planetName, star, planetName, "terran", angleCCW, planetSize, orbitRadius, planetOrbitDays ); MarketAPI market = sys.getEntityById(planetName).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"); 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"); sys.addCustomEntity(null, null, "comm_relay", "player").setCircularOrbitPointingDown(planet, 90, moonOrbitRadius, moonOrbitDays); sys.addCustomEntity(null, null, "nav_buoy", "player").setCircularOrbitPointingDown(planet, 180, moonOrbitRadius, moonOrbitDays); sys.addCustomEntity(null, null, "sensor_array", "player").setCircularOrbitPointingDown(planet, 270, moonOrbitRadius, moonOrbitDays);
Code of adding a derelict cryosleeper was posted somewhere in this thead. Reposting it here:
Spoiler
Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "derelict_cryosleeper", "player").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 400f); }
[close]
[close]

Add satellites at system center
Code
runcode $loc.addCustomEntity(null, null, "comm_relay", "player").setFixedLocation(0,0);$loc.addCustomEntity(null, null, "nav_buoy", "player").setFixedLocation(0,0);$loc.addCustomEntity(null, null, "sensor_array", "player").setFixedLocation(0,0);
[close]

This console mod is awesome. Game API and scripts, provided with installation, are very handy. I can't think of other game that provided such raw access to everything, for those situations when you're not content with how things are.
« Last Edit: April 06, 2021, 06:25:19 PM by evzhel »
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1349
    • View Profile
    • GitHub Profile
Re: [0.95a] Console Commands v2021.04.06
« Reply #970 on: April 06, 2021, 09:54:53 PM »

A new version is up, grab it here.

This fixes a few of the more pressing issues the console had post-0.95a:
  • Combat cheats work in missions again.
  • Updated the example commands mini-mod's mod_info.json so it works in 0.95a.
  • AddOfficer no longer starts officers out with an elite skill.
  • Respec works properly with officers.
  • The console overlay follows Starsector's UI scaling setting. If you changed the font scaling using the Settings command in the previous version, you'll have to use the command again (or edit saves/common/config/lw_console_settings.json.data) to return it to normal.

I'll try to fix the remaining issues and add some more 0.95a-specific features soon.
« Last Edit: April 06, 2021, 10:01:10 PM by LazyWizard »
Logged

Cyan Leader

  • Admiral
  • *****
  • Posts: 625
    • View Profile
Re: [0.95a] Console Commands v2021.04.06
« Reply #971 on: April 06, 2021, 11:14:08 PM »

I'd really appreciate if we could press up multiple times to use past commands other than just the latest one.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2693
    • View Profile
    • Sc2Mafia
    • Email
Re: [0.95a] Console Commands v2021.04.06
« Reply #972 on: April 07, 2021, 12:07:31 AM »

I'd really appreciate it if the console was a full GNU environment...  :P
Logged

Cyan Leader

  • Admiral
  • *****
  • Posts: 625
    • View Profile
Re: [0.95a] Console Commands v2021.04.06
« Reply #973 on: April 07, 2021, 04:27:04 AM »

Oh, I'm sorry, I didn't realize I was being unreasonable. I thought it was something simple to add.
Logged

Hammer

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.95a] Console Commands v2021.04.06
« Reply #974 on: April 07, 2021, 09:30:08 AM »

Just tried the new version and when you respec officers, if you have the skill officer training (or whatever it's called), it isn't applied (at least for levels, didn't check for elite skills).
Logged
Pages: 1 ... 63 64 [65] 66 67 ... 73