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: Skill Changes, Part 2 (07/15/21)

Pages: 1 ... 71 72 [73] 74

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

dreamdancer

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1080 on: June 12, 2021, 04:53:56 AM »

So I found a command to spawn an Inactive Gate, but it's orbit is incredibly fast, much faster than anything in vanilla.

The orbit is 180 days (check the setCircularOrbitPointingDown method):

https://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/campaign/SectorEntityToken.html

Quote
In the same vein, is there also a way to spawn it so that it orbits another object, like a gas giant? That's more a question for spawning things in general, not specifically just gates.

To get a list of planets in the current system run "list planets". Assuming one of them was "penelope2", run:

Code
runcode PlanetAPI planet = (PlanetAPI) $loc.getEntityById("penelope2"); $loc.addCustomEntity(null, null, "inactive_gate", "neutral").setCircularOrbitPointingDown(planet, 0, 1000f, 180f);
to add a gate orbiting penelope2 with a distance of 1000 and an orbit of 180 days.

Quote
Also, is there a place where all of the syntax for these more complex runcode commands lives?

The "runcode" stuff is Java code, which uses the StarSector API:

https://fractalsoftworks.com/starfarer.api/

The special macros like "$loc" and "$playerFleet" are defined here:

https://github.com/LazyWizard/console-commands/blob/master/src/main/mod/data/console/runcode_macros.csv
« Last Edit: June 12, 2021, 12:52:10 PM by dreamdancer »
Logged

Phoenixheart

  • Lieutenant
  • **
  • Posts: 77
    • View Profile
    • Email
Re: [0.95a] Console Commands v2021.04.10
« Reply #1081 on: June 14, 2021, 12:22:43 PM »

Perfect, thank you!
Logged

JoeRogan

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1082 on: June 24, 2021, 01:41:57 PM »

Hey so I may just be stupid but every time I try to open my game with the mods activated I receive this error message.
"Fatal: com.fs.starfarer.api.SettingsAPI.getScreenScaleMultF()
Check starsector.log for more details"
I read that this was a common issue for running the mod on higher resolutions, however, when I tried to locate the settings file as stated in the original post I am unable to find it, I have looked through literally all starsector files and not a single one is named that, or anything similar. Can I get some help, please?
Logged

AContraryDecision

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1083 on: June 26, 2021, 05:09:20 PM »

So here's a dumb/fun one. For some reason system gen didn't put any high danger remnant systems into the map. Is there any way to force a system to be one using command prompt shenanigans?
Logged

SpaceDrake

  • Lieutenant
  • **
  • Posts: 79
  • Mio Harcourt: fixin' the Machine.
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1084 on: June 30, 2021, 04:18:25 AM »

Okay, so this has been driving me absolutely bonkers: is there any way to use the console to add d-mods to a ship? I keep looking over the commands and I feel like I have to be missing something, but it doesn't seem so.
Logged

Kelaris

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1085 on: June 30, 2021, 06:36:03 AM »

I don't know of a way to add d-mods to existing ships, but you can use this to add a new d-modded ship to your fleet and then manually scuttle the old one you want to replace. Just change the "kite_Hull" to "whatever_you_want_Hull" and the 5 to how many d-mods you want.

runcode FleetMemberAPI ship = Global.getFactory().createFleetMember(FleetMemberType.SHIP, "kite_Hull"); com.fs.starfarer.api.impl.campaign.DModManager.addDMods(ship, false, 5, MathUtils.getRandom()); Global.getSector().getPlayerFleet().getFleetData().addFleetMember(ship);
Logged

RocketPowered

  • Ensign
  • *
  • Posts: 3
    • View Profile
    • Email
Re: [0.95a] Console Commands v2021.04.10
« Reply #1086 on: June 30, 2021, 05:14:25 PM »

Hey so I may just be stupid but every time I try to open my game with the mods activated I receive this error message.
"Fatal: com.fs.starfarer.api.SettingsAPI.getScreenScaleMultF()
Check starsector.log for more details"
I read that this was a common issue for running the mod on higher resolutions, however, when I tried to locate the settings file as stated in the original post I am unable to find it, I have looked through literally all starsector files and not a single one is named that, or anything similar. Can I get some help, please?
I'm getting the same error and it's driving me crazy, is there anything we can do to correct it?
Logged

ASSIMKO

  • Commander
  • ***
  • Posts: 140
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1087 on: July 11, 2021, 04:15:36 AM »

How Addship and addblueprit: ?
Logged

Yunru

  • Admiral
  • *****
  • Posts: 918
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1088 on: July 11, 2021, 04:21:21 AM »

Code
addship [variant name] [number]

Blueprints entirely depends on what sort of blueprint; hullmod, weapon, ship, or pack.

ASSIMKO

  • Commander
  • ***
  • Posts: 140
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1089 on: July 11, 2021, 04:51:20 AM »

Blueprit is to be used in the Engineering Hub of mod [0.95a] Industrial.Evolution, to underwrite the hulls of ships. And thanks for the first tip.
Logged

Spess Mahren

  • Lieutenant
  • **
  • Posts: 90
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1090 on: July 19, 2021, 12:49:21 AM »

Would anyone know how to use the console to set the "level" of autonomous defenses to max at game start?
The code in question is in com\fs\starfarer\api\impl\campaign\rulecmd\salvage\SalvageGenFromSeed.java with the code suggested to me being
Global.getSector().getMemoryWithoutUpdate().setFloat(SalvageGenFromSeed.DEFEATED_DERELICT_STR, 1000);


I got it to work code goes like this for anyone interested.
Spoiler
Code
runcode import com.fs.starfarer.api.impl.campaign.rulecmd.salvage.SalvageGenFromSeed; Global.getSector().getMemoryWithoutUpdate().set(SalvageGenFromSeed.DEFEATED_DERELICT_STR, 1000);
[close]
« Last Edit: July 19, 2021, 09:57:59 PM by Spess Mahren »
Logged

fjc130

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1091 on: July 24, 2021, 08:08:39 AM »

Is there a way to copy something on the console to the clipboard? for example if i listed all ships could i copy it all to my clipboard?
« Last Edit: July 24, 2021, 08:29:51 AM by fjc130 »
Logged

nocluewhatimdoing

  • Ensign
  • *
  • Posts: 31
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1092 on: August 04, 2021, 06:02:47 AM »

Adding a number to the end of an add item no longer seems to work, no matter what number I add to the end of an additem command, it only ever gives me one, and I'm unable to add multiple of the specials in one go either, as that just adds data to the item
Logged

DownTheDrain

  • Captain
  • ****
  • Posts: 270
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1093 on: August 04, 2021, 05:25:03 PM »

Adding a number to the end of an add item no longer seems to work, no matter what number I add to the end of an additem command, it only ever gives me one, and I'm unable to add multiple of the specials in one go either, as that just adds data to the item

Works fine for me for regular commodities, weapons, wings and ships.
Doesn't seem to work for special items, but who needs 50 Nanoforges, or 20 copies of the same blueprint.
« Last Edit: August 04, 2021, 05:26:43 PM by DownTheDrain »
Logged

RydenKenneally

  • Ensign
  • *
  • Posts: 1
    • View Profile
    • http://aussiebestcasinos.com/casino-bonuses/no-deposit
Re: [0.95a] Console Commands v2021.04.10
« Reply #1094 on: August 05, 2021, 09:07:58 AM »

So I found a command to spawn an Inactive Gate, but it's orbit is incredibly fast, much faster than anything in vanilla.

The orbit is 180 days (check the setCircularOrbitPointingDown method):

https://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/campaign/SectorEntityToken.html

Quote
In the same vein, is there also a way to spawn it so that it orbits another object, like a gas giant? That's more a question for spawning things in general, not specifically just gates.

To get a list of planets in the current system run "list planets". Assuming one of them was "penelope2", run:

Code
runcode PlanetAPI planet = (PlanetAPI) $loc.getEntityById("penelope2"); $loc.addCustomEntity(null, null, "inactive_gate", "neutral").setCircularOrbitPointingDown(planet, 0, 1000f, 180f);
to add a gate orbiting penelope2 with a distance of 1000 and an orbit of 180 days.

Quote
Also, is there a place where all of the syntax for these more complex runcode commands lives?

The "runcode" stuff is Java code, which uses the StarSector API:

https://fractalsoftworks.com/starfarer.api/

The special macros like "$loc" and "$playerFleet" are defined here:

https://github.com/LazyWizard/console-commands/blob/master/src/main/mod/data/console/runcode_macros.csv

it was interesting, thanks
Logged
I work as a sales manager for Pup 'N' Taco. In my free time, I like to travel, watch TV shows, listen to music, play basketball, or online game with a company, I also recommend you a useful link in my bio for a verified review of the best no deposit bonus online casinos for Australian 2021, which is always very useful and helps make a quick selection of a cool site for the game.
Pages: 1 ... 71 72 [73] 74