Fractal Softworks Forum

Starsector => Mods => Topic started by: LazyWizard on August 23, 2012, 01:19:31 AM

Title: [0.96a] Console Commands v2023.05.05
Post by: LazyWizard on August 23, 2012, 01:19:31 AM
Console Commands
An unofficial developer's console
Download latest dev (https://github.com/LazyWizard/console-commands/releases/download/2023.05.05/Console_Commands_2023.5.05.zip) (requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0) 2.8 and Starsector 0.96a or higher!)
View Javadoc (https://lazywizard.github.io/console-commands/)
View progress and source code on BitBucket (https://github.com/LazyWizard/console-commands)
Supports Version Checker (http://fractalsoftworks.com/forum/index.php?topic=8181)


Spoiler
(https://i.imgur.com/ToohEOu.png)
[close]


Instructions
This is installed just like any regular mod. Put it in the mods folder and make sure it's tagged in Starsector's launcher. Once in the game, you can summon the console with control+backspace and enter your commands. While the commands themselves aren't case sensitive, arguments are. For a full list of supported commands enter 'help' in the console. For more information on a specific command use 'help <command>'.

You can enter multiple commands by separating them with a semicolon. For example, "god;nocooldown;reveal;infiniteflux;infiniteammo" would run all of these combat cheats in a row. RunCode is an exception and can't be used with the command separator.

If you want to change the key that summons the console or the command separator, you can change these and several other console settings by using the "settings" command during a campaign.


Known bugs:


Current features:


Included commands:
Spoiler
Universal commands (13):
  • Alias, BugReport, Clear, DevMode, DumpHeap, Help, List, ModInfo, Reload, RunCode, Settings, SourceOf, Status

Campaign commands (49):
  • AddCredits, AddCrew, AddFuel, AddHullmod, AddItem, AddMarines, AddOfficer, AddOrdnancePoints, AddShip, AddSkillPoints, AddSpecial, AddSupplies, AddWeapon, AddWing, AddXP, AdjustRelation, AllBlueprints, AllCommodities, AllHullmods, AllHulls, AllWeapons, AllWings, FactionInfo, FindItem, FindShip, ForceDismissDialog, ForceMarketUpdate, GoTo, Hide, Home, InfiniteFuel, InfiniteSupplies, Jump, Kill, List, OpenMarket, PlanetList, Repair, Respec, Reveal, SetCommission, SetHome, SetRelation, ShowLoc, SpawnDerelict, SpawnFleet, Storage, Suicide, Survey

Combat commands (23):
  • AddCommandPoints, BlockRetreat, EndCombat, Flameout, ForceDeployAll, God, InfiniteAmmo, InfiniteCR, InfiniteFlux, Kill, NoCooldown, Nuke, RemoveHulks, Repair, Reveal, Rout, ShowAI, ShowBounds, ShowLoc, SpawnAsteroids, Suicide, ToggleAI, Traitor

Some commands are listed under both campaign and combat. These work in both contexts, but function in different ways.
[close]


Upcoming/planned features:


One final note:
While I've tried to keep everything as user-friendly as possible, this is primarily intended as a tool to aid mod development. This means it does require some knowledge of Starsector's inner workings. Most importantly, you will need to know the internal IDs of various objects in order to use any commands dealing with them. The command "list" will help with this; alternatively these IDs can be found in the data files, usually in the CSVs or variant files.

Using this mod as a cheating tool will suck all of the fun out of Starsector for you. You have been warned. :)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 17, 2012, 09:09:56 PM
Here's a tutorial on creating your own commands (this tutorial can also be found in the mod folder):

Spoiler
This mod supports user-created commands. A major design goal of version 2.0 was to make implementing these commands as painless as possible. This tutorial is intended to explain the new process in detail.

To add custom commands to the console you'll need a mod that contains two things: your commands' scripts, and the file data/console/commands.csv to register them in. You do not need to add Console.jar to your mod_info.json.

All commands are contained in their own separate Java class. The console mod loads command classes itself, so you can place the java files anywhere in your mod folder you want - data/console/commands is a good choice as data/console already exists to contain commands.csv. Commands can also be in jars (which shouldn't create a dependency as these classes won't be loaded if the console isn't active).

It is _highly_ recommended that you do not place your commands in data/scripts. Starsector will automatically compile any scripts in this directory or its subdirectories, and this will cause errors when the console mod is not active. Placing them elsewhere allows you to bundle commands with a regular mod that will only be loaded if the console is tagged in the launcher.

An example mod that adds several simple commands can be found in the mod folder. If you are the sort who learns best by example, you might find copying from that mod easier than following this tutorial.


 STEP 1 - THE SCRIPT
=====================

(Sometimes you may want to start with the CSV row to get a better idea of how your command will look. Just comment out the row by adding a # at the beginning to prevent the game from loading your command until it's finished)

First off, make sure your IDE has "mods/Console Commands/jars/lw_Console.jar" added as a library. Just follow the same procedure you did to add the Starsector API.

Your commands must implement the org.lazywizard.console.BaseCommand interface. This interface contains only one method (plus two enumerations, see below):
 - public CommandResult runCommand(String args, CommandContext context)

'args' is the argument(s) the player entered after this command, for example the command "addcrew 500 elite" would pass in "500 elite" as a single String. Parsing these arguments into something usable is left up to your script. This argument will never be null - if no arguments were entered, an empty String will be passed in instead.

'context' is a CommandContext passed into your script that tells it where this command was used. CommandContext is the first enum included in BaseCommand, and has the following values (these should be self-explanatory):
 - CAMPAIGN_MAP
 - COMBAT_CAMPAIGN
 - COMBAT_MISSION
 - COMBAT_SIMULATION

runCommand() returns a CommandResult, which is the other enum included in BaseCommand. CommandResult has the following possible values:
 - SUCCESS, returned when a command runs without error.
 - BAD_SYNTAX, return this if the player entered improperly formatted arguments (for example, a String where an number was expected). The console will automatically display the proper syntax to the player if this is returned.
 - WRONG_CONTEXT, if a command was entered in the wrong place (for example, using a campaign-only command during a mission).
 - ERROR, if a command used the proper syntax but still failed for some reason.

If you wish to show output to the player, Console.showMessage(String message) will format and print the String passed in to the player.

With all of this in mind, the basic structure of runCommand() is thus:
 - Check if the context passed in is a valid one for this command. Show a message and return CommandResult.WRONG_CONTEXT if the player used the command in the wrong context (ex: a camapaign travel command during combat).
 - Parse the arguments passed in. If they don't match what is expected, return CommandResult.BAD_SYNTAX (no message is needed; the console mod itself will show the proper syntax from commands.csv if BAD_SYNTAX is returned).
 - Try to run the command with the parsed arguments. If something goes wrong during this stage, show an error message and return CommandResult.ERROR. Console.showException(String message, Exception ex) can be used to display the stack trace of any exceptions to the player.
 - If everything went well, show a message and return CommandResult.SUCCESS

If you need further help implementing your command, the source files for every core command are included in jars/lw_Console.jar (most modern archive programs can open jars) in the org/lazywizard/console/commands directory. You can also find the most up-to-date source code at bitbucket.org/LazyWizard/console-commands/src


 STEP 2 - THE CSV
==================

After you have written your command's code, you will need to register it so the console can find it. Once you've done this, the mod will automatically load your command when the game starts.

Commands are registered in data/console/commands.csv. This CSV file has the following columns:
 - command: This is what the user enters to use your command.
 - class: This points to the script you wrote in Step 1 above. Use the fully-qualified name of your class (ex: data.console.commands.Example). This class can be a loose script or inside a jar, the console will work with both.
 - tags: Used with the 'help' command to find specific commands easier. For example, 'help combat' will return a list of all commands with 'combat' as one of their tags. Tags are solely a convenience feature and don't affect how your command functions in any way.
 - syntax: The basic instructions on how to use this command. Shown when a command returns CommandResult.BAD_SYNTAX, or as part of 'help <command>'
   <> - This denotes a required field
   [] - This denotes an optional field
 - help: Detailed instructions on how to use a command. Shown with 'help <command>'

Command and Class are required. Tags, Syntax and Help can be left empty, but it is HIGHLY recommended that you enter something in these fields unless this command is for personal use only.
[close]

(tutorial last updated 2015-12-11)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: xenoargh on September 18, 2012, 01:24:59 AM
This is pretty amazing.

How big of a deal would it be to add some additional data display to the console?  I'd like to use this to display the information my mod needs to function a little more like how I envisioned it; it sounds like adding the relevant commands won't be a big deal, but I'd like to go even further, and use this window to display data to the end-users.  What part of this am I going need to hack to get it done?
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: xenoargh on September 18, 2012, 01:37:37 AM
First test run with my mod; crashed when I hit tilde, gives a null error.  I take it that I'll have to install it into the mod?  I haven't changed Corvus as the name of the System.

It also leaves a copy of itself on the buffer if you move it.

[EDIT]Installed into my mod; pretty straightforward thus far, it just works, once I got past that hurdle.  This is way, way cooler than it has any right to be, especially considering the size and relative lack of complexity. 

I'm going to have to go back to square one with how I want to display my mod's data now; I think it makes a lot more sense to build a custom variant of this to serve as the unofficial UI, if I can use it to display changing data...[/EDIT]
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: CrashToDesktop on September 18, 2012, 03:50:48 AM
Well...suprize, suprize, LazyWizard has come out with yet another amazing tool. :) I'll try it out as soon as I can get to installing it.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: Upgradecap on September 18, 2012, 04:25:44 AM
Yay @ LazyWizard, for he brings glory to the modding community.





In all seriousness, this is an awesome tool that will see lots of use by us modders. (?)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 08:30:57 AM
First test run with my mod; crashed when I hit tilde, gives a null error.  I take it that I'll have to install it into the mod?  I haven't changed Corvus as the name of the System.

It also leaves a copy of itself on the buffer if you move it.

Hmm,  I've tested it with several different mods, and it should just work. You should only have to tag it like a regular mod in the launcher.

It might have been something I changed to get it working without an external jar in this version. I don't suppose you would be willing to re-try and post the complete error stack trace? :D

How big of a deal would it be to add some additional data display to the console?  I'd like to use this to display the information my mod needs to function a little more like how I envisioned it; it sounds like adding the relevant commands won't be a big deal, but I'd like to go even further, and use this window to display data to the end-users.  What part of this am I going need to hack to get it done?

As far as I know, not possible at the moment. We don't have access to a GUI API yet, and I don't know enough OpenGL to hack together a library. The 'console' is just a JOptionPane popup right now, with a customized UIManager to fit Starfarer's theme. That's why this mod requires the game to be run in windowed mode to function (and why there would be re-paint issues while it's active - it's completely halting the main thread while the console is visible). Making your own GUI with custom JFrames isn't possible, either. Most Swing components have java.io.File in their hierarchy somewhere, so they will get blocked by Starfarer even after the upcoming changes. I've isolated the input/output in this mod so I can easily replace it if this changes later on.

However, while it's not a perfect solution, the various showMessage() methods in Console.java do make working with addMessage slightly easier. They support newlines, and word-wrap longer lines for you. Feel free to take any of the code in this mod for your own use. :)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: Sproginator on September 18, 2012, 09:44:01 AM
A fantastic concept, shall try this tonight
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: xenoargh on September 18, 2012, 10:26:40 AM
If we have access to OpenGL at all, then all we really need access to is:

1.  Whatever Alex is using to display the text glyphs.  I presume that's a simple command
2.  Graphics within the starfarer directory defined within a .JSON somewhere.

We can do the rest fairly easily, if we're already allowed to capture mouse-click events and keystrokes.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 10:31:42 AM
I don't know what all we have access to, actually. Out of the entire LWJGL library, I'm only using Vector2f, Display.isFullScreen(), and Keyboard.isKeyDown().
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: xenoargh on September 18, 2012, 10:38:37 AM
Try this out. (http://www.lwjgl.org/wiki/index.php?title=GLSL_Shaders_with_LWJGL)

[EDIT]I'll try to hack a simpler version later; we really don't need GLSL to just draw a quad, lol.  But if we can draw textured quads, using named textures already available through Starfarer, and can call the text glyph system to present text at X,Y, then we can build just about anything we'd want to do... right there, in the game, like anything else in the UI.[/EDIT]
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 11:00:36 AM
Quick update: I made the source repository public - you can find it in the main post. The default branch won't work with Starfarer, so you will want to grab the noreflect branch.

It's a Mercurial repository because that's what I use for my solo projects. Sorry, Git/SVN users.


Try this out. (http://www.lwjgl.org/wiki/index.php?title=GLSL_Shaders_with_LWJGL)

[EDIT]I'll try to hack a simpler version later; we really don't need GLSL to just draw a quad, lol.  But if we can draw textured quads, using named textures already available through Starfarer, and can call the text glyph system to present text at X,Y, then we can build just about anything we'd want to do... right there, in the game, like anything else in the UI.[/EDIT]

If we can, that would be awesome. :D
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: Alex on September 18, 2012, 11:03:35 AM
Hah, very interesting. Haven't had a chance to try it, but kudos for putting this together :)

it's completely halting the main thread while the console is visible.

Really? Unless you're on a Mac, it shouldn't do that. But since I don't know where you're calling JOptionPane from... ahh, I guess that would explain it. If the code displaying it ends up on the main loop somewhere (and it probably does), then I it'd hang there until it was done. So, never mind.

Try this out. (http://www.lwjgl.org/wiki/index.php?title=GLSL_Shaders_with_LWJGL)

[EDIT]I'll try to hack a simpler version later; we really don't need GLSL to just draw a quad, lol.  But if we can draw textured quads, using named textures already available through Starfarer, and can call the text glyph system to present text at X,Y, then we can build just about anything we'd want to do... right there, in the game, like anything else in the UI.[/EDIT]

Don't bother with shaders. Starfarer uses the fixed function pipeline, and the two are incompatible. Shaders are an all-or-nothing way of doing it - you can't only use them for some things.

If you're not familiar with OpenGL, I'd suggest being very careful. It's pretty easy to crash the graphics driver by doing some ill-advised OpenGL calls - which can mean a system hang / hard reboot.

Although, that's kind of a moot point. Since there are currently no callback from within the rendering portion of the loop, anything you try to draw would get cleared out before the start of the next frame's rendering - you'd never see it.

We can do the rest fairly easily, if we're already allowed to capture mouse-click events and keystrokes.

There's some potential for unintended interactions here, too (using Keyboard.poll() or Mouse.poll() would break the game).
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 11:13:21 AM
Hah, very interesting. Haven't had a chance to try it, but kudos for putting this together :)
I don't suppose you would be willing to try the main branch and see if it runs in the latest development version? :D I've been using a lot of guesswork, but I'm almost certain it will work without tweaking given the changes you mentioned in our conversation.

it's completely halting the main thread while the console is visible.

Really? Unless you're on a Mac, it shouldn't do that. But since I don't know where you're calling JOptionPane from... ahh, I guess that would explain it. If the code displaying it ends up on the main loop somewhere (and it probably does), then I it'd hang there until it was done. So, never mind.

I intentionally called it that way, as it makes things much simpler for me. I did try making a multi-threaded version of this mod instead of using a SpawnPointPlugin, but there were so many edge cases (foremost being making sure the player is actually on the campaign map when the command is finally entered) that it just wasn't worth fixing all the potential pitfalls. The console implementation is isolated so I can replace it later if I change my mind. :)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: xenoargh on September 18, 2012, 11:15:57 AM
If it's just using fixed-function pipeline, that's fine; all we really need to do is draw some textured quads and make calls to display strings via your glyph system, nothing terribly fancy.

Anyhow,

Code
import org.lwjgl.opengl.GL11;
import org.lwjgl.util.glu.GLU;
That's already compiling, so we're fairly close.  It's too bad we don't have a callback atm, I think that simple test stuff's already possible.

Quote
There's some potential for unintended interactions here, too (using Keyboard.poll() or Mouse.poll() would break the game).
Yeah, we'd need to know how to safely do that.

Pretty stoked, though; instead of pestering you about building some UI stuff, we could just do it, I think.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: Alex on September 18, 2012, 11:17:31 AM
Hah, very interesting. Haven't had a chance to try it, but kudos for putting this together :)
I don't suppose you would be willing to try the main branch and see if it runs in the latest development version? :D I've been using a lot of guesswork, but I'm almost certain it will work without tweaking given the changes you mentioned in our conversation.

Sure, I'll give it a try if you can post a download link. Not set up w/ Mercurial.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: xenoargh on September 18, 2012, 11:18:23 AM
Linky (http://www.mediafire.com/?yisxug9x8r9hdim)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 11:18:34 AM
You can grab it here: https://bitbucket.org/LazyWizard/sfconsole/get/default.zip
The mod folder is SFConsole in the zip.

Edit:
Linky (http://www.mediafire.com/?yisxug9x8r9hdim)
That's the released version, not the development version.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: Alex on September 18, 2012, 11:24:38 AM
You can grab it here: https://bitbucket.org/LazyWizard/sfconsole/get/default.zip
The mod folder is SFConsole in the zip.

Sweet - works like a charm. Very good work, sir - I think I'll just leave it enabled :)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: CrashToDesktop on September 18, 2012, 11:56:31 AM
Psst! Be honored LazyWizard!
:)
Anyways, from what I've been playing around with, it's a pretty good tool.  Though I managed to *** up my system pretty badly after I changed some relations and money.  Very fun, and no doubt very useful when put to the right job.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 12:19:56 PM
I realized I forgot to include the AddItem command (same as AddWeapon, but for CargoItemType.RESOURCE). I'll update the download link in a moment.

Sweet - works like a charm. Very good work, sir - I think I'll just leave it enabled :)

Wow, that's just awesome. Thank you for testing it, and I'm glad you like it. I hope it helps. :) I knew I should have put code in to upload the user's Starfarer directory...

Anyways, from what I've been playing around with, it's a pretty good tool.  Though I managed to *** up my system pretty badly after I changed some relations and money.  Very fun, and no doubt very useful when put to the right job.

You say that like spreading chaos isn't the right job.  ;D
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: doodlydee on September 18, 2012, 03:23:46 PM
This is probably a stupid question how do you use the add ship command, I keep trying to add a onslaught but it keeps giving me a error saying variant id or something like that
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 03:28:02 PM
This is probably a stupid question how do you use the add ship command, I keep trying to add a onslaught but it keeps giving me a error saying variant id or something like that

You need to use the variant ID of the ship. You can find them in starfarer-core/data/variants (or a mod's data/variants folder). For example, "addship onslaught_Elite" should work.

If you don't know any of the variants, you can always just spawn an empty hull ("addship onslaught_Hull"), which is an auto-generated variant for every ship.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: doodlydee on September 18, 2012, 03:34:33 PM
Thanks for quick reply I just read that in your first post should have done that in first place stupid me, but thanks again
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: DeathPhoenyx on September 18, 2012, 04:32:08 PM
Is there any way to edit the key that brings up the console? I am Spanish, therefore I use a Spanish keyboard and when I press the key that corresponds to your ~ (the one on the left of the 1) and nothing pops up. I have tried to change the keyboard's locale through the windows' language bar but that doesn't make it work.

Also, on a related note: the console pops up nomather in what part of the game are you (in combat, flying through the system, docked in a station etc) or is it more specific?
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 04:37:16 PM
Is there any way to edit the key that brings up the console? I am Spanish, therefore I use a Spanish keyboard and when I press the key that corresponds to your ~ (the one on the left of the 1) and nothing pops up. I have tried to change the keyboard's locale through the windows' language bar but that doesn't make it work.

Yes, you can change the key the console uses. You'll need to edit data.scripts.console.ConsoleManager. Just change CONSOLE_KEY (it's near the top of the file) from Keyboard.KEY_GRAVE to any of the keys listed on this page (http://www.lwjgl.org/javadoc/org/lwjgl/input/Keyboard.html).

Quote
Also, on a related note: the console pops up nomather in what part of the game are you (in combat, flying through the system, docked in a station etc) or is it more specific?

It only works while on the campaign map, while the game is unpaused. This is because the keyboard handler is implemented as a spawn point, and checks for key input once per game frame on the campaign map. I might change this later. :)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: DeathPhoenyx on September 18, 2012, 04:40:15 PM
Well, that was a quick response. Thanks, I will try it out when I get an opportunity, will report back if something doesn't work.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 04:45:26 PM
I'm actually coding the next update of this mod in another window, so I can just tab over when my phone alerts me to a new reply. :)

Speaking of updates, what would be the equivalent key on a Spanish keyboard layout? I can make the next version change the default key based on the locale (or is that too obnoxious?).
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: xenoargh on September 18, 2012, 04:48:28 PM
Hey, stupid question:  if I want to write some code that executes a command via the console, then runs the command and updates the text displayed in the console, how would I go about that, roughly? 

I'm trying to figure out how to get this thing to let me give the user some feedback, basically, while executing some commands.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 05:01:20 PM
What do you mean, update the text displayed in the console? It's just an input popup, it's completely disposable.

And for security reasons, I set up the access modifiers in the mod to make it difficult to run commands through code. The only access point to command execution is through Console.getInput(), which spawns the popup window and handles input itself.

However, you can directly create a BaseCommand object and run it, but it might be buggy (you will have problems with commands that need access to the current location/starsystem or persistent variable storage if you haven't used the console this session, since certain references are only set when the console is called).

Example:
Code
     BaseCommand spawnShip = new AddShip();
     spawnShip.runCommand("onslaught_Elite");
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: DeathPhoenyx on September 18, 2012, 05:40:08 PM
The equivalent key is the "º", here is a picture of the layout

(http://upload.wikimedia.org/wikipedia/commons/thumb/7/74/KB_Spanish.svg/800px-KB_Spanish.svg.png)

If you have problems I have also seen games where the console key is changed to the "Ñ" key, don't know why they do it beside the fact that spanish' keyboards are the only ones that have that key and therefore there won't be any kind of binding conflict, but I though you might want to know.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: Thaago on September 18, 2012, 06:23:51 PM
Wow, this looks very impressive! I'm looking forward to trying this and digging into the code to learn!
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 18, 2012, 06:43:15 PM
[...]

Thank you, that was very helpful. I think I'll just allow users to rebind the key in-game. :)

Wow, this looks very impressive! I'm looking forward to trying this and digging into the code to learn!

You might want to check out the repository (https://bitbucket.org/LazyWizard/sfconsole/overview). The upcoming version won't compile in the current version of Starfarer, but it has some fun code. That version also fixes a few stupid mistakes I made, but haven't put together a full update for.

And if you (or anyone, really) ever decide you want to contribute to the mod, feel free. ;)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: doodlydee on September 19, 2012, 08:41:12 AM
Im not sure what Im doing wrong still unable to spawn any kind of ship keeps saying cant find varient, I type it in like you say "addship onslaught_elite", I tried other ships and get same error
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 19, 2012, 10:32:21 AM
Variant ids are case-sensitive. You'll want to try onslaught_Elite, not onslaught_elite. :)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: Sproginator on September 19, 2012, 10:34:04 AM
Alex should implement this I think :)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: doodlydee on September 19, 2012, 12:15:59 PM
Thanks for the reply again, I thought I had tried that already but I guess not, thanks works great
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 19, 2012, 01:31:34 PM
Glad I could help.

I'm putting the final touches on the next release right now. Here's the changelog so far:
Quote
0.3 beta (September 19, 2012)
===============================
You can now rebind the console key in-game (default key to rebind is )
RunScript's script store is now persistent between reloads
Added the GC command (tells the JVM to run a garbage collection event)
Minor optimization when reloading a saved game
Added Console.setManager() method, should make modding the console easier
Changed how commands are stored internally
Miscellaneous display tweaks
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: Sproginator on September 19, 2012, 01:49:17 PM
Glad I could help.

I'm putting the final touches on the next release right now. Here's the changelog so far:
Quote
0.3 beta (September 19, 2012)
===============================
You can now rebind the console key in-game (default key to rebind is )
RunScript's script store is now persistent between reloads
Added the GC command (tells the JVM to run a garbage collection event)
Minor optimization when reloading a saved game
Added Console.setManager() method, should make modding the console easier
Changed how commands are stored internally
Miscellaneous display tweaks
Great dedication to the mod I must say
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: LazyWizard on September 19, 2012, 03:46:38 PM
Okay, 0.3 is up, download here (http://www.mediafire.com/?4ta4u7ytfrr8eq5). A lot of things were modified in this update, so let me know if you run into any bugs.

Changelog:
Spoiler
Quote
0.3 beta (September 19, 2012)
===============================
You can now rebind the console key in-game (to rebind, press Shift+F1)
RunScript's script store is now persistent between reloads
Added the GC command (tells the JVM to run a garbage collection event)
Minor optimization when reloading a saved game
Added Console.setManager() method, should make modding the console easier
Miscellaneous display tweaks

 0.2 beta (September 18, 2012)
===============================
Added missing AddItem command

 0.1 beta (September 17, 2012)
===============================
Initial release, 16 included commands, several features removed to run in .53.1a
[close]


Great dedication to the mod I must say

Shh, don't say that! I don't want to have to change my username! ;)
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: Sproginator on September 19, 2012, 03:57:06 PM
Okay, 0.3 is up, download here (http://www.mediafire.com/?4ta4u7ytfrr8eq5). A lot of things were modified in this update, so let me know if you run into any bugs.

Changelog:
Spoiler
Quote
0.3 beta (September 19, 2012)
===============================
You can now rebind the console key in-game (to rebind, press Shift+F1)
RunScript's script store is now persistent between reloads
Added the GC command (tells the JVM to run a garbage collection event)
Minor optimization when reloading a saved game
Added Console.setManager() method, should make modding the console easier
Miscellaneous display tweaks

 0.2 beta (September 18, 2012)
===============================
Added missing AddItem command

 0.1 beta (September 17, 2012)
===============================
Initial release, 16 included commands, several features removed to run in .53.1a
[close]


Great dedication to the mod I must say

Shh, don't say that! I don't want to have to change my username! ;)
Haha, and I'm afraid I cannot play the game as my pc decided it doesn't like living anymore and will no longer start up
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: xenoargh on September 19, 2012, 04:17:44 PM
Looking forward to testing this and then maybe writing some custom commands this evening to get the ball rolling on the stuff I need to finish before my next release :)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 19, 2012, 04:50:45 PM
Looking forward to testing this and then maybe writing some custom commands this evening to get the ball rolling on the stuff I need to finish before my next release :)

In the current version you'll need to hard-code them into the console. It's not complicated, but hardly intuitive. I'll put together a quick tutorial in a bit.

I can't wait until the next Starfarer release. The version with reflection is much simpler, it's just Console.registerCommand(YourCustomCommand.class) and you're done. :)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 19, 2012, 05:51:29 PM
I posted a very poorly-written tutorial on writing your own commands in the second post of this thread. I'll rewrite it eventually, but hopefully it's enough for now. Good luck! :)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: TJJ on September 19, 2012, 06:21:59 PM
Looking forward to testing this and then maybe writing some custom commands this evening to get the ball rolling on the stuff I need to finish before my next release :)

In the current version you'll need to hard-code them into the console. It's not complicated, but hardly intuitive. I'll put together a quick tutorial in a bit.

I can't wait until the next Starfarer release. The version with reflection is much simpler, it's just Console.registerCommand(YourCustomCommand.class) and you're done. :)

Alex is allowing reflection in scripts?!
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 19, 2012, 06:26:03 PM
Looking forward to testing this and then maybe writing some custom commands this evening to get the ball rolling on the stuff I need to finish before my next release :)

In the current version you'll need to hard-code them into the console. It's not complicated, but hardly intuitive. I'll put together a quick tutorial in a bit.

I can't wait until the next Starfarer release. The version with reflection is much simpler, it's just Console.registerCommand(YourCustomCommand.class) and you're done. :)

Alex is allowing reflection in scripts?!

Sorry, let me rephrase that. The version with class literals is much simpler. He unblocked java.lang.reflect, I don't know if reflection itself will be allowed. :)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: xenoargh on September 19, 2012, 06:40:46 PM
For all of us who are still new to Java, what does that mean, exactly?
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 19, 2012, 06:51:52 PM
Class literals point to the actual class object (http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html) associated with an object. You can do some crazy stuff with it and reflection.

Reflection allows you to analyze and change the program during runtime (hence the name 'reflection', the program is looking at itself) - see here (http://docs.oracle.com/javase/tutorial/reflect/index.html) for more.

I know there's a security risk with reflection since you can grab and change even private variables/methods (which shouldn't be a big deal since this is a single player game, plus the dangerous object types are still blocked). Is there something I'm missing?
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: xenoargh on September 19, 2012, 07:15:46 PM
I'm still befuddled; the docs make it sound like you can grab classes without knowing their names, and thereby can dig out and modify pretty much whatever you want (which would be great, I'd love to be able to customize how some of the really low-level code works, change some basic rules), but how can you do that if you don't know the names, and how do you get it back in a format you can analyze and write new code to modify?

Sorry, this is probably RTFM stuff, but I'm not used to this kind of approach; it sounds like it'd let us mod practically anything, which is a neat idea, but I can't see how that wouldn't let us do dangerous stuff like get open access to the file system, or attack people via bloating their savegames to thousands of gigabytes with junk data, etc.

If that stuff wasn't possible, it's not a big deal; it's a SP game, if a mod doesn't do something awesome and entertaining with that ability, then it's not an issue, same with the reverse, because either way they need to buy the game to play it, which seems like a win-win for Alex.
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: medikohl on September 21, 2012, 02:59:55 PM
will it be possible to reload assets midgame?

right now it's make something, open game, test, close game, change a stat, re-open game, test, close game, change something else, open game again
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 21, 2012, 03:08:36 PM
will it be possible to reload assets midgame?

right now it's make something, open game, test, close game, change a stat, re-open game, test, close game, change something else, open game again

Unfortunately not, but you might want to take a look at this thread (http://fractalsoftworks.com/forum/index.php?topic=4253). Just keep in mind Alex's warning there.
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 23, 2012, 01:07:54 PM
Progress update:

Thanks to Thaago's excellent advice (http://fractalsoftworks.com/forum/index.php?topic=4407.msg68873#msg68873), I've started work on a combat-compatible console. This was as good a time as any to switch to a multi-threaded mod, so the console should now work anywhere in-game - paused, in menus, etc.

It will be a while before the next update is released. I'll need to test everything to see what commands will work in combat, hammer out the massive bug-list this update has created, and polish a few other changes that snuck into the development version.

It's probable that this won't be released until after the next Starfarer update, which is good, because the underlying changes to how the console functions will mean this update wouldn't be save-compatible anyway.

I'll still support the currently released version while I'm working on this. If you find any bugs or have feature requests for the current version, let me know. :)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: CrashToDesktop on September 23, 2012, 01:17:18 PM
We eagerly await the new patch to use your console.  Plenty of fun with the last one, even more fun with it in combat. >:D
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: Upgradecap on September 23, 2012, 01:39:55 PM
This is going to be of greatest help to me. How can we thank you, LW? :D
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: Sproginator on September 23, 2012, 01:41:46 PM
This is going to be of greatest help to me. How can we thank you, LW? :D
I'm surprised he isn't working for them I must say
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 23, 2012, 01:55:53 PM
We eagerly await the new patch to use your console.  Plenty of fun with the last one, even more fun with it in combat. >:D

I'm looking forward to seeing what horrors we can unleash with the combat version. I haven't explored the combat API thoroughly to see what's possible yet, but I'm fairly certain you'll at least be able to modify available command points. >:D

This is going to be of greatest help to me. How can we thank you, LW? :D

Ten million dollars. *evil laugh*

But seriously, it's actually a very simple mod (only about 2,000 lines of code last I checked). Anyone could have done it; I'm just the only one boring enough to like making this kind of thing. :)

I'm surprised he isn't working for them I must say

Thank you for the compliment, but I'm only a hobbyist programmer. Most of my knowledge - especially in Java - is self-taught, and the language I have the most experience in (LPC) doesn't translate skill-wise to Java. I'm sure if a professional ever looked at my code, they'd scream in horror. ;)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: Sproginator on September 23, 2012, 02:00:06 PM
We eagerly await the new patch to use your console.  Plenty of fun with the last one, even more fun with it in combat. >:D

I'm looking forward to seeing what horrors we can unleash with the combat version. I haven't explored the combat API thoroughly to see what's possible yet, but I'm fairly certain you'll at least be able to modify available command points. >:D

This is going to be of greatest help to me. How can we thank you, LW? :D

Ten million dollars. *evil laugh*

But seriously, it's actually a very simple mod (only about 2,000 lines of code last I checked). Anyone could have done it; I'm just the only one boring enough to like making this kind of thing. :)

I'm surprised he isn't working for them I must say

In all actuality, I'm only a hobbyist programmer. Most of my knowledge - especially in Java - is self-taught, and the language I have the most experience in (LPC) doesn't translate skill-wise to Java. I'm sure if a professional ever looked at my code, they'd scream in horror. ;)

1st response: woohoo! That would be epic!
2nd response: simple to you, maybe, but wow
3rd response: where does one learn all of this
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: Alex on September 23, 2012, 02:20:53 PM
Hmm. I'd be careful about using a multi-threaded approach - almost none of the core game classes are thread-safe.
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 23, 2012, 02:21:27 PM
where does one learn all of this

If you have the funds to spare or the academic achievements for a scholarship, university is a good route. If not, no worries. A university degree isn't as big a deal in game development as it is in other IT industries. Sign up for some cheap college courses. Buy multiple textbooks and read them in your free time. Study the documentation that comes with the language. Whatever you want. It depends on how you learn best.

Most importantly, once you've learned the basic syntax of a language and are comfortable coding on your own, experiment. If something even slightly interests you, make a simple project to learn how it works. If you stumble on another topic that interests you while working on that, start another project. Don't feel bad about abandoning projects that no longer interest you; the goal here is to learn, not create a polished product (my personal code directory contains hundreds of projects, of which about a dozen are complete). This is, in my opinion, the best way to learn a language's libraries quickly and accurately. And a strong portfolio impresses potential employers just as much as a piece of paper that says you can follow instructions for a few years.

Don't hesitate to go online if you get lost. Every problem you face, many others have faced before you and at least one of them asked for help. Hang out on sites like StackOverflow. Read every question you comprehend, even - especially - if you think you know the answer already. The experts often have tricks and better ways of doing things than you were taught.

Join community projects. Most larger, established teams have experienced modders who will be willing to give you a hand, and can point out your mistakes before they become ingrained. A mod team is probably the best option for learning game development, and mods looks great on a résumé.

And above all, remember: it's never too late to learn something new.
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 23, 2012, 02:29:28 PM
Hmm. I'd be careful about using a multi-threaded approach - almost none of the core game classes are thread-safe.

The plan is to have the keyboard handler alone in its own thread, and everything else including running commands will be done in the main thread. The current spawn point method I'm using will be changed to just tell the console if it's currently on the campaign map, and a custom combat plugin will tell it when it's on the battle map. I'm having minor issues with refit battles, but it seems to work fine other than that (aside from the bugs caused by shifting the entire structure of the mod around, of course). :)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: Alex on September 23, 2012, 02:35:32 PM
I'm not sure if the Keyboard class is threadsafe, if that's what you mean. Might be, but I just don't know.

Also: how would you execute something on the main thread while paused? The spawn point/combat plugin wouldn't get called until the unpause. Just trying to understand :)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 23, 2012, 02:57:34 PM
I'm not sure if the Keyboard class is threadsafe, if that's what you mean. Might be, but I just don't know.

Hmm, would that matter if all I'm calling are isKeyDown() queries? Nothing should be changing in the static Keyboard instance, correct?

To be honest, I'm not that familiar with multi-threading (I've only worked with it a few times, and most of the libraries I've used were thread safe). This update is partially an excuse to learn. :)

Quote
Also: how would you execute something on the main thread while paused? The spawn point/combat plugin wouldn't get called until the unpause. Just trying to understand :)

The keyboard handler was previously in the spawn point, and the keyboard checks were done once per advance(). It's not implemented that way anymore.

Now, the keyboard handler is its own thread with a custom framerate (and thus no longer reliant on Starfarer calling advance()). This is the change that allows it to be used while paused or in a menu. All the spawn point advance()/combat plugin init() methods do is tell the console if the player is on the campaign map or in a battle so it can select which commands are available.

It's kind of a messy workaround, but I believe it will work (I'm still in the prototype phase right now). That said, I would love to see something like a Global.getCampaignState(CampaignState state) API method that tells us where the current focus is. ;D
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: Sproginator on September 23, 2012, 04:24:40 PM
where does one learn all of this

If you have the funds to spare or the academic achievements for a scholarship, university is a good route. If not, no worries. A university degree isn't as big a deal in game development as it is in other IT industries. Sign up for some cheap college courses. Buy multiple textbooks and read them in your free time. Study the documentation that comes with the language. Whatever you want. It depends on how you learn best.

Most importantly, once you've learned the basic syntax of a language and are comfortable coding on your own, experiment. If something even slightly interests you, make a simple project to learn how it works. If you stumble on another topic that interests you while working on that, start another project. Don't feel bad about abandoning projects that no longer interest you; the goal here is to learn, not create a polished product (my personal code directory contains hundreds of projects, of which about a dozen are complete). This is, in my opinion, the best way to learn a language's libraries quickly and accurately. And a strong portfolio impresses potential employers just as much as a piece of paper that says you can follow instructions for a few years.

Don't hesitate to go online if you get lost. Every problem you face, many others have faced before you and at least one of them asked for help. Hang out on sites like StackOverflow. Read every question you comprehend, even - especially - if you think you know the answer already. The experts often have tricks and better ways of doing things than you were taught.

Join community projects. Most larger, established teams have experienced modders who will be willing to give you a hand, and can point out your mistakes before they become ingrained. A mod team is probably the best option for learning game development, and mods looks great on a résumé.

And above all, remember: it's never too late to learn something new.
Thank you, very inspirational
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: Alex on September 23, 2012, 05:00:35 PM
I'm not sure if the Keyboard class is threadsafe, if that's what you mean. Might be, but I just don't know.

Hmm, would that matter if all I'm calling are isKeyDown() queries? Nothing should be changing in the static Keyboard instance, correct?

To be honest, I'm not that familiar with multi-threading (I've only worked with it a few times, and most of the libraries I've used were thread safe). This update is partially an excuse to learn. :)

Well, that depends on how the Keyboard class is implemented. It may or may not be thread-safe - I don't know what the methods do under the hood.


Quote
Also: how would you execute something on the main thread while paused? The spawn point/combat plugin wouldn't get called until the unpause. Just trying to understand :)

The keyboard handler was previously in the spawn point, and the keyboard checks were done once per advance(). It's not implemented that way anymore.

Now, the keyboard handler is its own thread with a custom framerate (and thus no longer reliant on Starfarer calling advance()). This is the change that allows it to be used while paused or in a menu. All the spawn point advance()/combat plugin init() methods do is tell the console if the player is on the campaign map or in a battle so it can select which commands are available.

It's kind of a messy workaround, but I believe it will work (I'm still in the prototype phase right now). That said, I would love to see something like a Global.getCampaignState(CampaignState state) API method that tells us where the current focus is. ;D

Hmm. So the console calls API methods from that thread, right? The API is definitely not thread-safe. It'll probably work most of the time, but it may die horribly every so often.

For example, suppose you try to add a ship while the main thread is iterating over it because, oh, I don't know, it has to show the fleet tooltip - and that's not even getting into the guts of multithreading.

A particularly evil example - the JVM isn't actually required to make changes made by one thread visible to another, unless those changes are made in a thread-safe way. So if you have a member variable in an object and two threads change it, they could each end up seeing their own value. As far as I know most JVM implementations don't do this - but according to the language spec, they could.
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 23, 2012, 05:20:03 PM
Well, that depends on how the Keyboard class is implemented. It may or may not be thread-safe - I don't know what the methods do under the hood.

Viewing the source (http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java?revision=3801&view=markup), it looks like it should be safe.
Spoiler
Code
	        public static boolean isKeyDown(int key) {
               synchronized (OpenGLPackageAccess.global_lock) {
                       if (!created)
                               throw new IllegalStateException("Keyboard must be created before you can query key state");
                       return keyDownBuffer.get(key) != 0;
               }
       }
[close]

Quote
Hmm. So the console calls API methods from that thread, right?

No, the other thread doesn't call any Starfarer code directly. The only thing that it does is check if the 'summon console' key is down, and notifies the Console object in the main thread if it is.
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: Alex on September 23, 2012, 05:23:40 PM
Ah, alright. It probably sounds like I'm interrogating you, sorry about that :)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 23, 2012, 05:25:23 PM
No worries, I appreciate the help. I actually learned a lot from your explanations. :)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: Sproginator on September 24, 2012, 09:19:05 AM
WAS FINALLY ABLE TO TRY THIS OUT ANNNNNNNNNNND:

WOW, Friggin epic mod here man, It's beautiful, shame there isn't a GUI capable of being hooked up to the console :/, And maybe make it a little less case sensitive :)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 24, 2012, 11:59:02 AM
I can't really do much about that, Starfarer itself is case-sensitive. I can change a few commands to automatically try with different capitalization if they fail, though.
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: Sproginator on September 24, 2012, 04:28:07 PM
I can't really do much about that, Starfarer itself is case-sensitive. I can change a few commands to automatically try with different capitalization if they fail, though.
Yes please
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: CrashToDesktop on September 24, 2012, 04:34:16 PM
OT topic, but whatever happened to the Economy mod?

Anyways, I've been playing around with it more and more with the Ironclads mod enanbled.  Mothership, here I come. >:D Very useful tool, makes dev mode look almost like a baby. ;D
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 24, 2012, 05:46:54 PM
I can't really do much about that, Starfarer itself is case-sensitive. I can change a few commands to automatically try with different capitalization if they fail, though.
Yes please

I'll put that together right now, along with writing the 'help' for commands that lack it.

------------

OT topic, but whatever happened to the Economy mod?

Here are the projects I'm working on, in descending order of priority:

I'm still planning on finishing it eventually, but it's been assigned a low priority for now. It's exactly like I said in one of the very first posts in the economy thread:
Every time I try to juggle multiple large projects I end up neglecting one of them.

(also, have I really only been a modder here for three months? It feels much longer than that...)

------------

Anyways, I've been playing around with it more and more with the Ironclads mod enanbled.  Mothership, here I come. >:D Very useful tool, makes dev mode look almost like a baby. ;D

I'm glad you're enjoying it. :) Just remember my warning at the end of the first post!
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: CrashToDesktop on September 24, 2012, 05:57:19 PM
Dark Souls-style invasions?  I eagerly await that. :)

And don't worry about the warning, I have a seperate save file that I use just for playing around with devmode and this. ;)
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: LazyWizard on September 29, 2012, 11:15:48 PM
Sorry for the lack of progress this week, lots of crazy real-life stuff happened. I'm an uncle now.

I'll have the update posted later today. Here's the changelog so far:
Quote
0.4 beta (September 30, 2012)
===============================
Less strict about capitalization (failed commands try again with different case)
AddShip: specifying a ship type without a variant will spawn an empty hull
The various Add<X> commands will accept their arguments in any order
Added syntax and usage help for all commands
Removed showMultiLineMessage methods, incorporated into showMessage
Title: Re: Unofficial Developer's Console (beta 0.3 released!)
Post by: arcibalde on September 30, 2012, 12:14:49 AM
I'm an uncle now.

Congrats  ;D   Uncle LazyWizard... Wait... Hey, you can't be Lazy any more. You have to make example man. You should be uncle WIZARD. Yeah. Awesome!  ;D
Title: Re: Console Commands (0.4 released - 9/30)
Post by: LazyWizard on September 30, 2012, 09:00:17 PM
0.4 is out. Just a reminder, this isn't the update with combat support, that won't be released until after the next Starfarer update.

Download (http://www.mediafire.com/?rawp7orcwimvq9a)

Changelog:
Spoiler
Quote
0.4 beta (September 30, 2012)
===============================
Completely rewrote AddShip:
 - less strict about capitalization (tries again with different case)
 - specifying a ship type without a variant will spawn an empty hull
The various Add<X> commands will accept their arguments in any order
Added syntax and usage help for all commands
Removed showMultiLineMessage methods, incorporated into showMessage
[close]

There were a lot (https://bitbucket.org/LazyWizard/sfconsole/changeset/89fd309469fe57f5b79554e735191f87f30f48ea) of small changes spread out over many files in this release, so please let me know if you run into any bugs. :)
Title: Re: Console Commands (0.4 released - 9/30)
Post by: CrashToDesktop on October 19, 2012, 06:55:01 PM
So, anything else changed relating to stuff before the next patch, or have you stopped working on this epic mod? :)

Came here because it doesn't seem to work with the Ironclads mod.  Checked to see if the name was corvus, it was, and it crashes the game when it attempts to create a new game (each mod alone works in a new game, but together, they don't)
Title: Re: Console Commands (0.4 released - 9/30)
Post by: LazyWizard on October 19, 2012, 07:49:31 PM
I've made a lot of changes under-the-hood, but little that would be visible to users. The major change I've already talked about, that being that you can use the console at any time now - commands are queued until the next unpaused frame.

In-battle commands are working, but need improvement. There's no addMessage() equivalent for the combat engine API, so commands have no visible output. They also aren't thread-safe like campaign commands since there's no access to the game loop in combat, meaning there's a risk of concurrency errors. Since these are API limitations I can't really do much about either, so I'll have to put together a suggestion thread soon.

The next update will add a few new commands:

And, of course, it will be the update that allows you to easily add your own commands to the console. :)

Came here because it doesn't seem to work with the Ironclads mod.  Checked to see if the name was corvus, it was, and it crashes the game when it attempts to create a new game (each mod alone works in a new game, but together, they don't)

I'll take a look. It might be the same problem Xenoargh had a long time ago.
Title: Re: Console Commands (0.4 released - 9/30)
Post by: LazyWizard on October 19, 2012, 08:15:27 PM
I tracked down the null pointer exception. It was caused by my mod's generator running first, meaning the other mod's custom star system hadn't been created yet. This isn't a problem with vanilla since base files are always loaded first.

However, since Ironclads' generators.csv is identical to vanilla you can just delete it to make the problem go away. You'll also have to change the name of the star system in AddConsole.java to point at Ironclad's custom one. Here's the code:

Code
package data.scripts.console;

import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorGeneratorPlugin;
import com.fs.starfarer.api.campaign.StarSystemAPI;

@SuppressWarnings("unchecked")
public final class AddConsole implements SectorGeneratorPlugin
{
    private static final String SYSTEM_NAME = "Barnard`s Star";

    @Override
    public void generate(SectorAPI sector)
    {
        StarSystemAPI system = sector.getStarSystem(SYSTEM_NAME);

        if (system == null)
        {
            throw new RuntimeException("Console could not find system '"
                    + SYSTEM_NAME + "'!");
        }

        ConsoleManager consoleManager = new ConsoleManager(system);
        system.addSpawnPoint(consoleManager);
    }
}
Title: Re: Console Commands (0.4 released - 9/30)
Post by: CrashToDesktop on October 20, 2012, 04:35:05 AM
Thanks! :)
Title: Re: Console Commands (0.4 released - 9/30)
Post by: LazyWizard on October 21, 2012, 09:15:11 AM
I fixed the generator issue, now I'm adding built-in support for most mod's custom star systems. I'll release a patch for 0.4 later today.

Edit: And uploaded (http://www.mediafire.com/?hfrktqdiezhn362).

Changelog:
Spoiler
Quote
0.4b beta (October 21, 2012)
==============================
Fixed null-pointer exception with mods that have a custom star system
Added built-in support for Project CAELUS, Project Ironclads, Fight for
 Universe: Sector Xplo, and Ascendency.
[close]
Title: Re: Console Commands (0.4b released - 10/21)
Post by: LazyWizard on November 16, 2012, 09:27:53 PM
Quick progress update - combat is finally completely stable, I've added in mission support (you won't have your custom settings unless you load a save game first), and I've added a few more combat commands. I'm still planning on waiting to release this until after the next Starfarer update - in fact, with the changes mentioned in Alex's last post, I'll probably hold off and implement a few more commands first. :)

Here's the changelog so far:
Quote
1.0 (November xx, 2012)
=========================
Slight tweaks to mod compatibility - should work with more mods out of the box
Changed how commands are handled - no longer hard-coded
User-made/mod-specific commands can now be registered with the console
You can now issue multiple commands at once (separate commands with a semicolon)
The console can now be used in combat or when the game is paused/in menus
Mission support - load a campaign save first to use your custom settings
New campaign commands:
 - RunCode: compiles and runs a line of Java code (uses Janino)
New in-battle commands:
 - AddCommandPoints: modifies available command points
 - InfiniteAmmo: toggles infinite ammo for your side
 - NoCooldown: toggles cooldown for all weapons on your side
 - Reveal/Unreveal: reveals/unreveals the entire battle map

And here's infiniteammo and nocooldown in action:
Spoiler
(http://i.imgur.com/gKyjy.png)
(http://i.imgur.com/S6OGC.png)
(http://i.imgur.com/01Ihm.png)
[close]
Title: Re: Console Commands (0.4b released - 10/21)
Post by: CrashToDesktop on November 17, 2012, 06:20:20 AM
...woah.  Well, that's going to be fun. :D
Title: Re: Console Commands (0.4b released - 10/21)
Post by: silentstormpt on November 17, 2012, 07:14:04 AM
wait what is the burst delay u apply on that, when u set as infinite?
Title: Re: Console Commands (0.4b released - 10/21)
Post by: LazyWizard on November 18, 2012, 01:30:00 AM
wait what is the burst delay u apply on that, when u set as infinite?

Nocooldown checks all weapons of every ship on your side, and drops the cooldown to .1 seconds if it is currently higher. So most weapons will fire ten shots per second - weapons that have a higher rate-of-fire are unaffected. There were only API methods to affect cooldown, so weapons with chargeup or delays will still fire slowly.
Title: Re: Console Commands (0.4b released - 10/21)
Post by: LazyWizard on November 24, 2012, 03:53:04 AM
After a few months of work, version 1.0 is finally out. Get it here (http://www.mediafire.com/?le8catx7myop37v).

Changelog:
Quote
1.0 (November 24, 2012)
=========================
MASSIVE changes made to the code base for this release - please report any bugs!
New features:
 - The console can now be used in combat (limited list of supported commands)
 - Multi-threaded input: can enter commands when the game is paused/in menus
 - Full mission support (load a campaign save first to use your custom settings)
 - You can now issue multiple commands at once (separate them with a semicolon)
 - Should work out of the box with all mods that don't replace generators.csv
New campaign commands:
 - AddAptitudePoints: adds aptitude points to your character
 - AddSkillPoints: adds skill points to your character
 - Alias: allows you to create nicknames for existing commands
 - RunCode: compiles and runs a line of Java code (uses Janino)
New in-battle commands:
 - AddCommandPoints: modifies available command points
 - InfiniteAmmo: toggles infinite ammo for your side
 - NoCooldown: toggles cooldown for all weapons on your side
 - Reveal/Unreveal: reveals/unreveals the entire battle map
Modder-specific changes:
 - Changed how commands are handled, uses reflection instead of being hard-coded
 - User-made/mod-specific commands can now be registered with the console
 - Most code is now stored in jars/SFConsole.jar - source is included in the jar
 - Console variable storage/retrieval is now type-safe
 - Added protected Class getVarType(String varName) to Console and BaseCommand
 - Added basic documentation - see JavaDoc.zip in the main folder
Title: Re: Console Commands (0.4b released - 10/21)
Post by: Sproginator on November 24, 2012, 04:15:06 AM
Sweet jesus!!!!!! IT LOOKS BRILLIANT
Title: Re: Console Commands (1.0 released - 11/24)
Post by: CrashToDesktop on November 24, 2012, 05:38:27 AM
Excellent work. :D Now we wait for Verrius to produce his...
Title: Re: Console Commands (1.0 released - 11/24)
Post by: LazyWizard on January 11, 2013, 06:15:07 PM
With the new undecorated mode added to settings.json in the last hotfix, you can now use this mod in fullscreen games (well, close enough (http://pcgamingwiki.com/wiki/Borderless_fullscreen_windowed)). Just open up starsector-core/data/config/settings.json and change "undecoratedWindow" to true, then disable fullscreen in the launcher.

I'm working on another patch for this mod. It's coming soon; I just need to do a little more testing.

Changelog so far:
Quote
1.1 (January 11, 2012)
========================
Fixed bug where the console occasionally stopped working during a campaign
In-battle commands are no longer reset after each battle
Active in-battle commands are listed on the screen during combat
New in-battle commands:
 - God: Invincibility (somewhat buggy - heavy damage will instantly drop you to
   zero hull but you won't die)
 - InfiniteFlux: Gives all ships on your side infinite flux

Also, could a moderator please move this to the Mods subforum? :)
Title: Re: Console Commands (1.0 released - 11/24)
Post by: CrashToDesktop on January 11, 2013, 06:21:04 PM
Ah, was wondering where this mod went. :D

Nice update. :) I can finally enjoy this in fullscreen! Or, as close as I can get. ;)
Title: Re: Console Commands (1.1 released - 01/11)
Post by: LazyWizard on January 11, 2013, 08:29:13 PM
1.1 is up. Two new commands, some bugfixes, and in-combat message support. Get it here (http://www.mediafire.com/?r62k03cbjbbd8ca).

Godmode is still slightly buggy. If you are in a weak ship and take a massive amount of damage in a single frame your hull points will occasionally drop to zero. If this happens, try not to bump into anything - collisions at zero HP will cause a crash.

Yes, I'm aware the in-combat messages rotate with your ship. It's the lesser of two evils. If I don't attach them to the player ship, they fly off the top of the screen. I'll see what I can do to fix this.

Changelog:
Quote
1.1 (January 11, 2012)
========================
Fixed bug where the console occasionally stopped working during a campaign
Generator is more aggressive about activating itself in total conversions
In-battle message support added, displayed underneath player ship
In-battle commands are no longer reset after each battle
Active in-battle commands are listed at the start of combat and when toggled
Removed Unreveal command, Reveal is now a toggle
New in-battle commands:
 - God: Invincibility (somewhat buggy - heavy damage will instantly drop you to
   zero hull but you won't die, and you get a null crash when ramming ships)
 - InfiniteFlux: Gives all ships on your side infinite flux
Title: Re: Console Commands (1.2 released - 01/12)
Post by: LazyWizard on January 12, 2013, 12:30:41 AM
1.2 is up. This is a simple bugfix release, no new features. Get it here (http://www.mediafire.com/file/umt110i9qrr48h2/Console_1.2.zip).

Changelog:
Quote
1.2 (January 12, 2012)
========================
Fixed crash when using invincibility cheats
Fixed position of in-battle messages when using large ships
Title: Re: Console Commands (1.2 released - 01/12)
Post by: Sproginator on January 12, 2013, 04:26:41 AM
Oh man, god mode and inf flux? I'm gonna have fun with this :D
Title: Re: Console Commands (1.2 released - 01/12)
Post by: obihal on January 14, 2013, 10:16:43 AM
Thanks for the great mod..

Can we use this for old saves - characters. i cant make it work it old saves. Console comes to screeen commands dont work...

it works perfectly with new character...
Title: Re: Console Commands (1.2 released - 01/12)
Post by: LazyWizard on January 14, 2013, 05:25:04 PM
Thanks for the great mod..

Can we use this for old saves - characters. i cant make it work it old saves. Console comes to screeen commands dont work...

it works perfectly with new character...

Not at the moment, though you can always use it in battle. I'll write a quick update to let you add campaign functionality to existing saves. You'll still need to edit the save file if you ever want to remove it, though, since we can't remove spawn points with code yet.

And I'm glad you like the mod. :)
Title: Re: Console Commands (1.2 released - 01/12)
Post by: Thaago on January 14, 2013, 06:14:14 PM
Thanks for the great mod..

Can we use this for old saves - characters. i cant make it work it old saves. Console comes to screeen commands dont work...

it works perfectly with new character...

Not at the moment, though you can always use it in battle. I'll write a quick update to let you add campaign functionality to existing saves. You'll still need to edit the save file if you ever want to remove it, though, since we can't remove spawn points with code yet.

And I'm glad you like the mod. :)

Oh, cool. LazyWizard, would you mind sharing the code that lets you add a spawn point to existing saves? I didn't know that was possible.
Title: Re: Console Commands (1.3 released - 01/14)
Post by: LazyWizard on January 14, 2013, 06:46:45 PM
1.3 is up. Get it here (http://www.mediafire.com/file/ngr5ibccf7uple3/Console_1.3.zip).

Changelog:
Quote
1.3 (January 14, 2012)
========================
You can now add the console to an existing save with 'addconsole'
Mod info page now has more information to help beginners with this mod
Godmode no longer fails with systems that increase ships' vulnerability
New campaign command: AddXP <amount> - adds experience to your character
New in-battle command: Nuke - destroys all enemies on the battle map
Added missing text to AddAptitudePoints and AddSkillPoints
Title: Re: Console Commands (1.2 released - 01/12)
Post by: LazyWizard on January 14, 2013, 06:50:43 PM
Thanks for the great mod..

Can we use this for old saves - characters. i cant make it work it old saves. Console comes to screeen commands dont work...

it works perfectly with new character...

Not at the moment, though you can always use it in battle. I'll write a quick update to let you add campaign functionality to existing saves. You'll still need to edit the save file if you ever want to remove it, though, since we can't remove spawn points with code yet.

And I'm glad you like the mod. :)

Oh, cool. LazyWizard, would you mind sharing the code that lets you add a spawn point to existing saves? I didn't know that was possible.

It isn't, normally. I'm only able to do it due to the way this mod is structured - there's a separate thread that handles input, and that is activated whenever combat is entered (including the title screen, so it's ALWAYS active). I just hardcoded a command to add the spawn point into that thread.

If you want to check out the source, there's a link at the top of the main post. You would want to take a look at forceAddConsole() in data.scripts.console.Console.java. :)
Title: Re: Console Commands (.54.1a - version 1.4 released on 01/17)
Post by: LazyWizard on January 17, 2013, 08:12:55 PM
1.4 is up. Get it here (http://www.mediafire.com/file/ax4r71rs2jw7ab0/Console_1.4.zip).

Changelog:
Quote
1.4 (January 17, 2012)
========================
The cursor for the console pop-up is now visible
Fixed bug: exception details not displayed when an error occurs
RunCode works again (ignores separators, can't be used with other commands)
Multiple changes to the alias command:
 - More detail is given when the command fails
 - Fixed several bugs that prevented aliases with multiple commands from working
 - Fixed bug: could alias alias and cause an infinite loop
Title: Re: Console Commands v1.5 (.54.1a, released 02/07)
Post by: LazyWizard on February 07, 2013, 08:48:37 PM
1.5 is up. Get it here (http://www.mediafire.com/file/z4zfl8r4obh0cqs/Console_1.5.zip).

Changelog:
Quote
1.5 (February 7, 2013)
========================
Toggleable combat commands can now be used on the campaign map
Certain non-combat commands can now be used in battles (Alias, GC, RunCode, etc)
You can now copy your console settings to a new savefile:
 (this process will be improved in future versions)
 - Step 1: start a new game without this mod active, save and quit
 - Step 2: activate this mod, load the save with the settings you want
 - Step 3: without exiting the game, load the new save from step 1
 - Step 4: use the AddConsole command to activate the console on that save
Title: Re: Console Commands v1.5 (.54.1a, released 02/07)
Post by: Lucian Greymark on February 12, 2013, 07:41:19 AM
Brilliant console that works perfectly with the vanilla. But I came across The Valkyrie project and after enjoying that for a while i realised i wanted some of the bigger ships ^.^ so i tried to use the addship command and it failed. double and triple checked the command and argument but it's not working. Is there some process that I need to go through to install the console to the mod specifically? Is there a way to make this work?
Title: Re: Console Commands v1.5 (.54.1a, released 02/07)
Post by: LazyWizard on February 12, 2013, 08:50:10 AM
Brilliant console that works perfectly with the vanilla. But I came across The Valkyrie project and after enjoying that for a while i realised i wanted some of the bigger ships ^.^ so i tried to use the addship command and it failed. double and triple checked the command and argument but it's not working. Is there some process that I need to go through to install the console to the mod specifically? Is there a way to make this work?

The console mod will only work in the campaign if you start a new game with it or use the 'addconsole' command. Campaign functionality and console customization are disabled otherwise.

Try running the 'addconsole' command. If it's already active, it will tell you. If it's not, problem solved! ;)
Title: Re: Console Commands v1.5 (.54.1a, released 02/07)
Post by: Lucian Greymark on February 12, 2013, 03:49:09 PM
You absolute genius. Thankyou
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: DelicateTask on March 11, 2013, 06:50:33 PM
Doesn't work for me. I installed and checked it in the launcher. Tried using the console key and nothing happened. Tried rebinding with no luck. Did I miss something? Does it not work for Mac? I searched all 7 pages and saw nothing that indicated mac incompatibility or any steps extra steps.
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: LazyWizard on March 11, 2013, 07:00:50 PM
You might need to switch windows to get to the input box (OSX might not automatically switch focus like Windows does). It's a standard Java dialogue popup, so it should work on Macs.

If that's the case, let me know. I'll see about forcing window focus in the code. :)
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: DelicateTask on March 11, 2013, 08:59:45 PM
I never saw any other windows. I kept an eye out and used all of the usual methods for browsing windows, but it never showed. I'm running Snow Leopard, just so you know.
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: LazyWizard on March 20, 2013, 04:57:09 PM
Working on 1.6 right now, this update will focus on usability improvements. Here's the changelog so far:
Quote
1.6 (March xx, 2013)
======================
Improved interface, command history support
Console.showError() shows more detail, accepts Throwables
Improvements to the RunCode command:
 - Added Vector2f to default imports
 - RunCode can now use LazyLib's classes if LazyLib is currently active
 - If an exception occurs, actual exception details are shown rather than the
   InvocationTargetException wrapper thrown by Janino's ScriptEvaluator

If there are any commands you think I should add, let me know. I'm completely out of ideas. :)
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: jeffg10 on March 29, 2013, 03:03:17 AM
Every time i try and use this mod the game does not crash but the commands won't work. mods i use most times: DS tech, Fleet control, OMM (omega's mini mash)
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: LazyWizard on March 29, 2013, 03:05:51 AM
Did you have this mod active when you started that save? If not, you'll need to use the command 'addconsole' to activate it in the campaign.
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: pablo on April 02, 2013, 11:17:36 AM
Can you add command for ordanance points ?? Like add x points to first ship in fleet menu...

Ps: is it even possible ??
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: NITROtbomb on May 11, 2013, 05:42:01 AM
I started a new game and the console wont work, does it conflict with Lazylib or something?
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: LazyWizard on May 11, 2013, 05:55:54 AM
Were you running it alongside a total conversion? If the mod you are using overwrites generators.csv (which most non-Corvus mods will), you will need to use the 'addconsole' command to get it working in campaign mode.

If the input box doesn't show up at all, try alt-tabbing. Sometimes focus won't be switched to the input popup correctly.
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: chami on June 01, 2013, 08:22:59 PM
Has anyone gotten this to work with Exerelin? I'm getting no console and no prompt to rebind the console keybind when i hit shift+F1.
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: Zaphide on June 02, 2013, 12:07:08 AM
Has anyone gotten this to work with Exerelin? I'm getting no console and no prompt to rebind the console keybind when i hit shift+F1.

Exerelin is a total conversion and replaces the generators.csv file so you'll need to do the following:

Were you running it alongside a total conversion? If the mod you are using overwrites generators.csv (which most non-Corvus mods will), you will need to use the 'addconsole' command to get it working in campaign mode.

If the input box doesn't show up at all, try alt-tabbing. Sometimes focus won't be switched to the input popup correctly.

Note: I haven't actually used this with Exerelin so I don't know for sure :)
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: Sproginator on June 02, 2013, 03:41:11 AM
It works fine with Excelerin,

But you have to start a new game with both mods active, otherwise it won't generate again :/
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: chami on June 02, 2013, 07:21:51 AM
It works fine with Excelerin,

But you have to start a new game with both mods active, otherwise it won't generate again :/

That's what I actually did, I'm not getting a console pop up.

[
Were you running it alongside a total conversion? If the mod you are using overwrites generators.csv (which most non-Corvus mods will), you will need to use the 'addconsole' command to get it working in campaign mode.

If the input box doesn't show up at all, try alt-tabbing. Sometimes focus won't be switched to the input popup correctly.

Note: I haven't actually used this with Exerelin so I don't know for sure :)

How do you use the "addconsole" command without the console pop up appearing?
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: Sproginator on June 02, 2013, 03:38:59 PM
This is most weird, on starting a new game, do you get a green message?
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: chami on June 02, 2013, 07:06:05 PM
This is most weird, on starting a new game, do you get a green message?

Nope. I know the console mod works though - I can exit out of Starfarer, switch to Uomoz's Corvus, and load an Uomoz save and it'll work fine. It just doesn't work at all with Exerelin for me.
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: Zaphide on June 02, 2013, 07:13:42 PM
This is most weird, on starting a new game, do you get a green message?

Nope. I know the console mod works though - I can exit out of Starfarer, switch to Uomoz's Corvus, and load an Uomoz save and it'll work fine. It just doesn't work at all with Exerelin for me.

Hmmm well Uomoz Corvus isn't a total conversion, maybe try with Ironclads and see if the same issue happens? Sorry but I haven't used console commands so I haven't tested Exerelin with it.
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: chami on June 02, 2013, 07:45:41 PM
This is most weird, on starting a new game, do you get a green message?

Nope. I know the console mod works though - I can exit out of Starfarer, switch to Uomoz's Corvus, and load an Uomoz save and it'll work fine. It just doesn't work at all with Exerelin for me.

Hmmm well Uomoz Corvus isn't a total conversion, maybe try with Ironclads and see if the same issue happens? Sorry but I haven't used console commands so I haven't tested Exerelin with it.

It works just fine with Ironclads. It really isn't a big deal - I recall reading earlier that LazyWizard added some code that should make it work with total conversions, so I thought it would be something he would like to know. Also having commands to play around with in Exerelin would be rather interesting to say the least.
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: LazyWizard on June 02, 2013, 08:25:03 PM
Sorry, I was away this weekend so was unable to help with this. Thanks for bringing it to my attention! :)

It's strange that the popup works for some mods and not others - the input thread is started when the main menu battle begins, so the popup should always appear regardless of what mod you're using (it just won't work with campaign-level commands until you use addconsole/start a new game). Can you use the console in missions with Exerelin active?

I'll take a look and see if I can figure out what's going on. This mod is going to be rewritten after .6a, so I should probably get re-acclimated with the mod's codebase anyway. ;)

Edit: seems to work normally with Exerelin for me. It's possible it's due to something I've changed in the months since the last release, though. Could you try replacing jars/SFConsole.jar with this jar (http://www.mediafire.com/download/0dd29yeyeomhknm/SFConsole.jar) and seeing if it works for you then?
Spoiler
(http://i.imgur.com/qJN9plr.png)
(http://i.imgur.com/WaSctur.jpg)
[close]
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: chami on June 03, 2013, 10:36:18 AM
Sorry, I was away this weekend so was unable to help with this. Thanks for bringing it to my attention! :)

It's strange that the popup works for some mods and not others - the input thread is started when the main menu battle begins, so the popup should always appear regardless of what mod you're using (it just won't work with campaign-level commands until you use addconsole/start a new game). Can you use the console in missions with Exerelin active?

I'll take a look and see if I can figure out what's going on. This mod is going to be rewritten after .6a, so I should probably get re-acclimated with the mod's codebase anyway. ;)

Edit: seems to work normally with Exerelin for me. It's possible it's due to something I've changed in the months since the last release, though. Could you try replacing jars/SFConsole.jar with this jar (http://www.mediafire.com/download/0dd29yeyeomhknm/SFConsole.jar) and seeing if it works for you then?
Spoiler
(http://i.imgur.com/qJN9plr.png)
(http://i.imgur.com/WaSctur.jpg)
[close]

Tried a fresh reinstall of Starsector, with only Lazylib, Exerelin, and Console Commands installed. Started a new game, no console. Overwrote SFConsole.jar with the file you provided, still no console with a new game. I'm actually kind of stumped as to how that wouldn't work, given that it's a fresh install and it works out of the box for everybody else.  ???
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: hydremajor on June 07, 2013, 05:55:04 AM
I gotta ask....why make a mod when you could just make a Trainer for the game ?
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: Hari Seldon on June 11, 2013, 10:35:55 AM
Can I modify the number of Ordinance Points with this?  I want to experience increasing them so much I can get all hull mods at once ;).
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: Silver Silence on June 11, 2013, 11:40:52 AM
You can probably do that just by setting the OP of a ship really high in the files. Most likely to be in ship_data instead of the ship files. Ship files are the boundaries and logic behind the sprites as far as I know. And some combinations of hullmods are pretty terrible. Armoured Mounts + Optics = painfully slow turning beam weaponry. Aug'd Engines + Injectors = silly speeds, especially in frigates that are already fast to begin with, but if your engines get shot out, oh boy, you're gonna be adrift for a LONG time.
Title: Re: Console Commands v1.6 (.54.1a, released 2013-07-30)
Post by: LazyWizard on July 30, 2013, 12:24:47 PM
1.6 has been released. Get it here (http://www.mediafire.com/download/6m3btschf3s18az/Console_1.6.zip) (alternative link (https://bitbucket.org/LazyWizard/sfconsole/downloads/Console%201.6.zip)).

I've been neglecting this mod for a while (the last update was in February?!), so I figured I'd release what I have done so far. It's mostly bugfixes and improvements to the RunCode command I doubt anyone uses, but it also includes a text box in the console pop-up that shows previous console output so you don't have to worry about missing anything in the quickly vanishing sector messages.

Oh, and I changed the AddWing command so it doesn't automatically append _wing to its arguments. Seeing others mention this issue is actually the reason I'm releasing this now. ;)

This mod will be getting a re-write after .6a is released, so there probably won't be any more updates until then other than bugfixes.

Changelog:
Quote
1.6 (July 30, 2013)
=====================
Console popup now shows console output
Console.showError() shows more detail, accepts Throwables
AddWing now only appends '_wing' to its arguments after it fails without it
Improvements to the RunCode command:
 - Added Vector2f to default imports
 - RunCode can now use LazyLib's classes if LazyLib is tagged in the launcher
 - If an exception occurs, actual exception details are shown rather than the
   InvocationTargetException wrapper thrown by Janino's ScriptEvaluator
Title: Re: Console Commands v1.5 (.54.1a, released 2013-02-07)
Post by: chami on August 14, 2013, 12:50:10 PM
Sorry, I was away this weekend so was unable to help with this. Thanks for bringing it to my attention! :)

It's strange that the popup works for some mods and not others - the input thread is started when the main menu battle begins, so the popup should always appear regardless of what mod you're using (it just won't work with campaign-level commands until you use addconsole/start a new game). Can you use the console in missions with Exerelin active?

I'll take a look and see if I can figure out what's going on. This mod is going to be rewritten after .6a, so I should probably get re-acclimated with the mod's codebase anyway. ;)

Edit: seems to work normally with Exerelin for me. It's possible it's due to something I've changed in the months since the last release, though. Could you try replacing jars/SFConsole.jar with this jar (http://www.mediafire.com/download/0dd29yeyeomhknm/SFConsole.jar) and seeing if it works for you then?
Spoiler
(http://i.imgur.com/qJN9plr.png)
(http://i.imgur.com/WaSctur.jpg)
[close]

I know it's been two months, but I only recently started playing again. I would just like to let you know that I fixed the "console not activating in Exerelin" issue by loading up the game with only lazylib and the console mod, making a savegame with the console activated, then copying the console code in the OP from the vanilla+console savegame into the Exerelin savegame. I still have absolutely no clue why it doesn't work on my system when it does with everyone else's, but at least there's a fix!
Title: Re: Console Commands v1.6 (.54.1a, released 2013-07-30)
Post by: tchan on September 18, 2013, 01:52:39 AM
Hi :D

I just tried this on the new .6a build, and it seems NoCoolDown caused all my weapons to not fire.  I see the moving guns but no projectiles come out, no sounds played, and nothing gets damaged.

Is it just me?  Please let me know if anyone else is having this problem.  Thanks! 
Title: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: LazyWizard on September 18, 2013, 02:52:31 AM
It's not just you, it's a bug in the mod due to a change in .6a (ironically, one I requested (http://fractalsoftworks.com/forum/index.php?topic=6136.msg98521#msg98521)).

Here's (http://www.mediafire.com/download/6x59572m3oa773b/Console_1.6b.zip) version 1.6b (mirror (https://bitbucket.org/LazyWizard/sfconsole/downloads/Console%201.6b.zip)). This isn't the promised mod rewrite, just a quick patch that fixes NoCooldown.

Changelog:
Quote
1.6b (September 18, 2013)
===========================
Fixed bug where NoCooldown prevented projectile weapons from firing in .6a
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: tchan on September 18, 2013, 04:20:41 AM
You are awesome.

And epic.

And also awesome.

Thanks! :D
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: Dayshine on September 20, 2013, 06:43:02 AM
Tiny bug:

Using "help" in the battle engine results in two overlapping messages.
listCommands() just calls showMessage() twice which doesn't work with floating text.

Also, no bug tracker? Tut-tut :P
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: Sotales on September 21, 2013, 02:41:15 PM
I was wondering if this could be used to remove excessive Supplies, Crew, and Fuel from various stations. Some stations in my current save have upwards of 20 stacks of each. Or is there another, better way?
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: CopperCoyote on September 21, 2013, 02:58:16 PM
I was wondering if this could be used to remove excessive Supplies, Crew, and Fuel from various stations. Some stations in my current save have upwards of 20 stacks of each. Or is there another, better way?

I don't know if there is a better way, but i use the addcredits command to buy up all the supplies and fuel and then Jettison it. It's a little tedious sometimes, but it shouldn't be necessary after Starsector's .6.1a version.
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: NikolaiLev on September 25, 2013, 01:53:59 AM
Would it be possible for you to add a command that reloads currently loaded mods, or perhaps a specific one?  It'd be useful for tweaking variables in-game.

Unless that's somehow possible already, though I doubt it.
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: LazyWizard on September 25, 2013, 02:02:51 AM
I was wondering if this could be used to remove excessive Supplies, Crew, and Fuel from various stations. Some stations in my current save have upwards of 20 stacks of each. Or is there another, better way?

Added a 'purge' command to the todo list.


Would it be possible for you to add a command that reloads currently loaded mods, or perhaps a specific one?  It'd be useful for tweaking variables in-game.

Unless that's somehow possible already, though I doubt it.

Starsector's dev mode has a key that reloads all files used by the game (I believe it's F8).
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: Jazzrish on September 25, 2013, 10:29:15 PM
HELP!

my input popup just disappears into nowhere as i input "help".

i'm using 1.6b with exerelin 0.6 in fullscreen. the popup appears fine :'(

P.S. i just try it again in battle, the popup disappears and leave messages in screen. some character get overlapped. it that correct?
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: LazyWizard on September 25, 2013, 10:37:30 PM
The currently released version doesn't play nice with mods that replace generators.csv. Try using 'addconsole' on the campaign map to force-add campaign functionality to your save. :)
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: molotof on September 27, 2013, 05:43:54 AM
I just pass by to say GREAT WORK, very usefull mod !
One thing i could use is a decreasecredits command or maybe the addcredits with a negative argument work, i can't test it right now. It will serve to solve station overloaded problem without cheating to much. Spawn the needed object and then deduct the credits.
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: LazyWizard on September 27, 2013, 05:47:36 AM
AddCredits should work with a negative number.

The next version (no ETA) will add 'purge' and 'purgehulls' commands that will help with overloaded stations by deleting duplicate stacks/hulls.
Title: Re: Console Commands v1.6b (.6a, released 2013-09-18)
Post by: molotof on September 27, 2013, 08:58:31 AM
AddCredits should work with a negative number.

The next version (no ETA) will add 'purge' and 'purgehulls' commands that will help with overloaded stations by deleting duplicate stacks/hulls.

Sweet !

AddCredits work with negative number, tested.
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: Fevz on October 02, 2013, 02:46:02 PM
How can i enable console in mac?
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: rookie10276 on October 07, 2013, 12:15:11 AM
How can i enable console in mac?

1. Make sure you are running the older version of starfarer 0.6a (NOT 0.6.1a).

2a. Find where to install the mod: On a Mac, Starsector "mods" folder is right inside the application package - right-click on the application and select "Show Package Contents" to see it.

2b. Put mod in Starsector mods folder. Do not move the zip file to the Starsector mods folder. Do not unzip the contents of the mod (i.e. data, graphics, mod_info.json...etc) into the Starsector mods folder. Instead, unzip and move the folder containing the mod's contents, into the Starsector mod folder.

3. Open the launcher, check to see that mod is check-marked.

4. Once in the game, you can activate the console with tilde (~)* at any time - commands will execute the next unpaused in-game frame. *(tilde is below Esc in the top left corner of the keyboard).

There is nothing more I can do to help. Godspeed, and good luck!
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: Fevz on October 07, 2013, 07:18:02 AM
So that's where the catch is. I tried it on 0.6.1a
Thanks for support ;)
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: rookie10276 on October 08, 2013, 07:41:08 PM
So that's where the catch is. I tried it on 0.6.1a
Thanks for support ;)

You're welcome! Just didn't want to see someone have to painfully figure it all out themselves (like I did when I first got Starsector).
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: Viethen on October 13, 2013, 01:11:57 AM
I'm having an issue with adding ships and items that are added by mods.  The command doesn't recognize the name of the file. Is there a work around for this?


Thanks for this mod, btw.  The game is definitely in its alpha, and the mods can be very broken sometimes, requiring a total restart.  This mod takes some of that sting away. 
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: Wunder on October 13, 2013, 01:32:16 AM
Hehehe.... addship Prodigous 1
;D ;D ;D
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: chiro on December 09, 2013, 05:13:28 AM
ok ... srsly now ... its nice that you talk about "addconsole" command into the campaignmap if the console dosnt works but a honest question, from where should someone know who is new in the game where to ENTER that command?

i tried now many things to enter that damn command and i have no clue where i should use that addconsole command <_<
i want to play the game with that console mod and the Exerelin mod but, when i activate the Exerelin mod works the console not longer =/
and as i already said, i have no clue where i should enter that 'addconsole' command i tried it in the menu screen, i tried it ingame while the game is running (opened a few menus ...) i tried to open the campaign map ingame and tried to enter that command (opened again only the game menus ...) but your mod still dosnt works x_x

please, would it be possible to tell more in an excact way where or how to enter the addconsole command then only this?
Quote
This happens if the console controller hasn't been added to your savefile, meaning commands added to the queue are never executed. Try using the 'addconsole' command, a special command that force-adds the controller to your save. This issue will occur if you are playing with a mod that replaces generators.csv or if you try to use the console mod with an old save.

because you dont tell there where to enter that command x___x that would be really nice of you please? =(
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: LazyWizard on December 09, 2013, 05:17:39 AM
Try pressing tilde (~) to make the console pop up (it's just a standard Java input pop-up). You might have to alt-tab to get to it if the window focus doesn't want to play nice.
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: chiro on December 09, 2013, 05:46:09 AM
Try pressing tilde (~) to make the console pop up (it's just a standard Java input pop-up). You might have to alt-tab to get to it if the window focus doesn't want to play nice.

there pops nothing up ... (well i have a german keyboard <.<) i can only write a ~ when i push alt Gr+* but the game dosnt accepts it ingame and no console pops up at all

after i readed your comment trie´d i to simply switch from german into english mode (with alt+shift) but that didnt worked either =|
so yea ... i have no clue how to get the console to work with that Exerelin mod xwx cuz the vanilla game has so damn less planets and systems ... (only 2 systems with a bunch of planets and stations -_-)

normally upen i consoles (in german keyboard mode) with ^ but that dosnt works either D= i have no idea how to get that damn console up ... even tried to add addconsole behind the linked executable path xD but that didnt worked too xD

normally is the console on the windows tab aswell when it opens but nooothing >_<
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: SpaceRiceBowl on December 13, 2013, 01:41:46 PM
I've noticed that spawning in modded ships won't work sometimes.
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: LazyWizard on December 13, 2013, 01:56:21 PM
I've noticed that spawning in modded ships won't work sometimes.

Does adding the ship as an empty hull work? If it doesn't could you tell me what ship, and from what mod?

If it does work with just the hull, make sure you're using the actual variant ID in the command. This ID is sometimes different from the filename (including for two variants in vanilla, last I checked). If it's not working for a specific ship, check the "variantId" tag inside the .variant file and see whether it's different.
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: SpaceRiceBowl on December 14, 2013, 07:07:02 AM
I was using ship IDs from the ship.csv files
Seems to work for vanilla ships
Edit: Blackrocks, Neutrinos are the ones i'm having problems with. Haven't really tried spawning in other ships.
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: ValkyriaL on December 14, 2013, 09:21:43 AM
that doesn't tell him anything tho. what mod? what ships?
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: Midnight Kitsune on January 18, 2014, 04:08:04 PM
OK, I keep getting a "Fatal: null" error when I try to start a new game with this mod on. I have the latest version
Log info:
Spoiler
52643 [Thread-5] WARN  com.fs.starfarer.loading.SpecStore  - Description with id flarelauncher_fighter_SHIP_SYSTEM not found
52643 [Thread-5] WARN  com.fs.starfarer.loading.SpecStore  - Description with id traveldrive_SHIP_SYSTEM not found
52643 [Thread-5] WARN  com.fs.starfarer.loading.SpecStore  - Description with id inferniuminjector_SHIP_SYSTEM not found
52643 [Thread-5] WARN  com.fs.starfarer.loading.SpecStore  - Description with id skimmer_drone_SHIP_SYSTEM not found
52645 [Thread-5] DEBUG com.fs.graphics.TextureLoader  - Loading [graphics/particlealpha32sq.png] as texture with id [fs.common/graphics/particlealpha32sq.png]
52650 [Thread-5] DEBUG com.fs.graphics.TextureLoader  - Loaded 247.21 MB of texture data so far
52650 [Thread-5] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/particlealpha32sq.png (using cast)
52908 [Thread-5] DEBUG com.fs.graphics.TextureLoader  - Loading [graphics/backgrounds/background4.jpg] as texture with id [graphics/backgrounds/background4.jpg]
222899 [Thread-5] ERROR com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.combat.CombatEngine.addFloatingText(Unknown Source)
   at data.scripts.console.Console.printMessage(Console.java:1066)
   at data.scripts.console.Console.showMessage(Console.java:910)
   at data.scripts.console.Console.showMessage(Console.java:920)
   at data.scripts.console.AddConsole.generate(AddConsole.java:24)
   at com.fs.starfarer.campaign.save.CampaignGameManager.o00000(Unknown Source)
   at com.fs.starfarer.title.OoOO.dialogDismissed(Unknown Source)
   at com.fs.starfarer.ui.K.dismiss(Unknown Source)
   at com.fs.starfarer.ui.impl.I.dismiss(Unknown Source)
   at com.fs.starfarer.campaign.save.OooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.O00oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.o00000(Unknown Source)
   at com.fs.starfarer.ui.F.processInput(Unknown Source)
   at com.fs.starfarer.ui.newsuper.super(Unknown Source)
   at com.fs.starfarer.B.ØÓÒ000(Unknown Source)
   at com.fs.oOOO.A.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

[close]
Title: Re: [0.6a] Console Commands v1.6b (released 2013-09-18)
Post by: Alex on January 18, 2014, 04:16:33 PM
Just to chime in on this - it turns out I didn't quite fix that bug.
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: LazyWizard on January 18, 2014, 04:25:35 PM
Console Commands hasn't really been updated since .54.1a. I'm actually surprised it continued to function this long! I'm in the middle of a complete rewrite of this mod*, so hopefully there will be a working version again soon. :)

*Which it desperately needs. Every time I look at the 1.6 codebase I die a little inside.


Just to chime in on this - it turns out I didn't quite fix that bug.

I wouldn't worry about it, it's probably my code's fault. The core of this mod hasn't changed much since .53a, and it's probably doing things in a ridiculously convoluted manner due to predating most of the current API. :)
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: Midnight Kitsune on January 18, 2014, 04:58:50 PM
Are you gonna update here or start a new topic?
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: SpaceRiceBowl on January 19, 2014, 01:44:40 PM
Most likely he's gonna update here, why would he want to start a new topic?
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: LazyWizard on January 19, 2014, 05:48:27 PM
I'll continue using this thread for the rewrite.

I'm hoping to release a WIP of the new console soontm. This first release will be little more than a rough prototype and will be missing several features the old one had (in-combat commands being the most obvious), but I'd like to get it out there just so others have something to use.
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: Gotcha! on January 20, 2014, 05:06:13 AM
Thanks, LW. I'll be waiting with anticipation. This mod is a great tool to help out in the mod testing department. ;)
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: LazyWizard on January 21, 2014, 09:14:32 PM
If anyone desperately needs this mod in their life, I have an early, mostly working version of the rewrite here (http://www.mediafire.com/download/i8bfmfa8qmz822v/Console%20Commands%202.0%20WIP%201.zip) (requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0)).

It's still pretty rough and several features haven't made it in yet. I've ported most of the old stuff to the new system but haven't thoroughly tested anything. I'd greatly appreciate it if anyone who plays around with this would let me know of any bugs they find. :)

The following commands have been implemented in the new version:

These commands from the old mod require other things to be implemented first and haven't been ported yet:
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: LazyWizard on January 21, 2014, 09:18:05 PM
Oh, almost forgot to mention. The console is now summoned with backspace instead of tilde by default. You can change this in data/console/console_settings.json. It also doesn't work in menus as the mod is no longer multi-threaded (that was more trouble than it was worth).

This mod doesn't require a new game, and it doesn't save anything either so you can safely disable it at will.
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: Midnight Kitsune on January 21, 2014, 11:04:50 PM
*cracks fingers and pulls out my code testing sledge hammer*
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: LazyWizard on January 22, 2014, 11:03:29 PM
A second WIP of the rewrite is ready, get it here (http://www.mediafire.com/download/tg8b9ryccfgri89/Console%20Commands%202.0%20WIP%202.zip). Still requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0). ;)

Support for multiple commands is back! Just separate commands with a semicolon and it'll execute all of them. RunCode ignores separators for obvious reasons.

In addition, the following old commands have been added since the last WIP (a few have changed from their old versions, see notes):

Alias and Purge are the only old commands that haven't been converted. Purge is no longer necessary since convoys will remove old cargo by themselves. I might leave Alias out too and just make a separate csv for aliases.

Again, please let me know if you spot any bugs. :)
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: LazyWizard on January 23, 2014, 07:12:17 PM
I don't know if anyone will find this interesting, but I thought I'd post about the old mod and the reasons behind scrapping everything for a rewrite.

A few posts back I mentioned that the 1.x codebase made me die a little inside every time I looked at it. To elaborate on that statement:

Age
The biggest problem is simply that the console mod was old. This mod dates back to 2012 and was written for Starfarer 0.53a. Back then the API was only 15% the size it is now. I can't overstate just how many problems were caused due to ugly workarounds for missing features (the big ones being campaign-level scripts, keeping track of the combat engine and saving persistent data; though users of the old mod probably know these better as "why isn't the pop-up working?").

That even in this state the mod continued to function with minimal changes until now is a testament to the amazing work Alex put into making the API forwards compatible. That said, using the modern Starsector API methods allows the rewrite to do everything the old one did with a fraction the effort and a much lower chance of errors. :)

Bloat
The old version had become insanely bloated, largely due to the necessary workarounds described above.

To throw some numbers at you: the old console's main class was 1,300 lines of code (including 40 lines spent defining variables) and was a confusing mix of static and local code. It also had several commands hard-coded into it. That's pretty reprehensible for a class whose only duties are to check for input, parse and validate entered text, and create and pass arguments into the proper command object.

The new version? Completely static, with 270 lines for the console itself and 150 for the class that handles command loading/storage/lookup. It does virtually everything the old version did in a third the code and with almost none of the complexity! The only command that has any special code dedicated to it is RunCode, and that's just a single line (https://bitbucket.org/LazyWizard/console-commands/src/62b9712340cd31bfaf3cfce8263dd607dd7c7439/org/lazywizard/console/Console.java?at=default#cl-184) to prevent it from being parsed into multiple commands since the default command separator is a semicolon.

If you're curious as to how bad it was, you can find the source for the old console here (https://bitbucket.org/LazyWizard/console-commands/src/80e54a0620386ab7a5cd9a6667d9eab01afb02d0/SFConsole/data/scripts/console/Console.java). Compare to the new (https://bitbucket.org/LazyWizard/console-commands/src/tip/org/lazywizard/console/Console.java?at=default) version (https://bitbucket.org/LazyWizard/console-commands/src/tip/org/lazywizard/console/CommandStore.java?at=default).

Poor design decisions
There were a lot of these (having the default console key not easily accessible on several international keyboard layouts was a big one), but for the worst example, here's what you had to go through to implement a custom command in 1.6b:

In the new console, here's the process for adding a custom command:

Here's an example of a command implementation in the rewrite:
Spoiler
Here's the code for AddSkillPoints:
Code: java
package org.lazywizard.console.commands;

import com.fs.starfarer.api.Global;
import org.lazywizard.console.BaseCommand;
import org.lazywizard.console.Console;
import org.lazywizard.console.CommonStrings;

public class AddSkillPoints implements BaseCommand
{
    @Override
    public CommandResult runCommand(String args, CommandContext context)
    {
        if (context == CommandContext.COMBAT_MISSION)
        {
            Console.showMessage(CommonStrings.ERROR_CAMPAIGN_ONLY);
            return CommandResult.WRONG_CONTEXT;
        }

        int amount;

        try
        {
            amount = Integer.parseInt(args);
        }
        catch (NumberFormatException ex)
        {
            Console.showMessage("Error: Skill points must be a whole number!");
            return CommandResult.BAD_SYNTAX;
        }

        Global.getSector().getPlayerFleet().getCommanderStats().addSkillPoints(amount);
        Console.showMessage("Added " + amount + " skill points to your character.");
        return CommandResult.SUCCESS;
    }
}
And here's the CSV data for it:
Quote
command,class,syntax,help
AddSkillPoints,org.lazywizard.console.commands.AddSkillPoints,addskillpoints <amount>,"Adds the specified amount of skill points to your character."
[close]


tl;dr: The old mod was a mess. It's going to be much better now. :)

You can grab the latest WIP here (http://www.mediafire.com/download/tg8b9ryccfgri89/Console%20Commands%202.0%20WIP%202.zip) if you want to try the rewrite out yourself (this is the same one I posted yesterday). It's pretty much done at this point except for a few new commands I have planned and some bugtesting/polish.
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: Mytre on January 25, 2014, 11:57:07 AM
Is there a list of what does each command does? typing help and the command says always taht such command does not exist :C
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: LazyWizard on January 25, 2014, 12:16:12 PM
You have to use lower-case arguments with help in the WIP. Fixed in dev.
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: Chronosfear on January 25, 2014, 01:54:32 PM
Backspace is a bad key to open the console btw.
Ever tried to modify a ships name or variant name ^^

Also I have a slight problem opening the console. The console doesn't pop up.
Alt + Tab doesn't work ,too.
Have to open my task manager and then mark it and use the switch to button.
Title: Re: [OUTDATED] Console Commands v1.6b (released 2013-09-18)
Post by: LazyWizard on January 25, 2014, 02:04:43 PM
Backspace is a bad key to open the console btw.
Ever tried to modify a ships name or variant name ^^

oops, hadn't thought about that. I'll see what I can do. Maybe require shift to be held down as well?

For now, you can change the key to whatever you want in data/console/console_settings.json.

Quote
Also I have a slight problem opening the console. The console doesn't pop up.
Alt + Tab doesn't work ,too.
Have to open my task manager and then mark it and use the switch to button.

Are you playing borderless windowed? It's pretty much required, otherwise you'll have serious problems (such as the pop-up not showing and your game becoming unresponsive).

I'm planning on writing a dialog plugin for entering commands in the campaign to get around this issue, but combat support will probably always suck. :)

Edit: to play borderless windowed, open up starsector-core/data/config/settings.json, change "undecoratedWindow" to true and uncomment the "windowLocationX":0 and "windowLocationY":0 lines. Then you just need to untag fullscreen in the launcher and set the resolution to your desktop resolution. :)
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 2 released 2014-01-23)
Post by: doodlydee on January 25, 2014, 03:07:39 PM
I sorry I am really dumb when it comes to modding, what do you mean by this "and uncomment the "windowLocationX":0 and "windowLocationY":0 lines"? Do you mean delete those lines
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 2 released 2014-01-23)
Post by: LazyWizard on January 25, 2014, 03:13:54 PM
Just remove the # in front of them. :)
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 2 released 2014-01-23)
Post by: Midnight Kitsune on January 25, 2014, 03:44:20 PM
I sorry I am really dumb when it comes to modding, what do you mean by this "and uncomment the "windowLocationX":0 and "windowLocationY":0 lines"? Do you mean delete those lines
He means removing the number symbol ( # ) from the left side of that line. IE you make (#"windowLocationX":0,) into ("windowLocationX":0,) but without the parenthesis. Edit: Ninja'd

BUG: Even with undecorated windows and having it set to the native resolution, you can sometimes lose the ability to alt tab fully if the console ever loses focus.
How to replicate:
open the console
alt tab to the game or click in the game window
in a few seconds the console window should disappear but it is still active
alt tab back to the console
close the console
open the console again. The console will appear "under" the game window but still be active.
The game is now "stuck on top" of all the other windows
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 2 released 2014-01-23)
Post by: doodlydee on January 25, 2014, 03:53:13 PM
Thank you for quick response
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 2 released 2014-01-23)
Post by: LazyWizard on January 25, 2014, 04:11:23 PM
BUG: Even with undecorated windows and having it set to the native resolution, you can sometimes lose the ability to alt tab fully if the console ever loses focus.
How to replicate:
open the console
alt tab to the game or click in the game window
in a few seconds the console window should disappear but it is still active
alt tab back to the console
close the console
open the console again. The console will appear "under" the game window but still be active.
The game is now "stuck on top" of all the other windows

I'm aware of this, unfortunately there's not much I can do about it. It's due to the way I get input - the mod uses a standard Java input dialog pop-up, and that sort of thing doesn't work well with games at the best of times.

I'm only using it for now because it's an easy way of getting player input in a single line of code. For the campaign, I'm planning on writing an interaction dialog (the sort you see when you click on a station) to get around these limitations, so it won't be a problem forever. :)

However, combat will stick with the standard Java input pop-up for the foreseeable future. I might implement an overlay similar to the radar mod (http://bit.ly/1cXUkNW) if text rendering is ever added to the API, though.
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 3 released 2014-01-26)
Post by: LazyWizard on January 26, 2014, 02:52:57 PM
WIP 3 is up, get it here (http://www.mediafire.com/download/q5aaxptkbkjjuvb/Console%20Commands%202.0%20WIP%203.zip). Still requires LazyLib.

I changed the default console summoning key to control+backspace. Again, you can change this in data/console/console_settings.json if you prefer another key. :)

I also added the Jump and Repair commands. Jump teleports you to another star system/hyperspace. Repair will heal hull/armor for all deployed ships if used in combat, or hull/armor/CR for your entire fleet if used on the campaign map (equivalent to repairing in a station, but free).

Other than that, there's mostly just some minor tweaks and bugfixes. Help ignores case, and the console output no longer adds an extra line after every message. I've been busy this weekend, so there's no major changes.


If anyone has any requests for additional commands, I'd be glad to hear them. :)
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 3 released 2014-01-26)
Post by: FasterThanSleepyfish on January 26, 2014, 04:11:37 PM
How about a CR timer disabler command? No more frigate CR decay?
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 3 released 2014-01-26)
Post by: Farlarzia on January 27, 2014, 03:43:47 AM
Just noticed on the OP, its still says just to use backspace without control, thought I would just let you know
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 3 released 2014-01-26)
Post by: LazyWizard on January 27, 2014, 05:05:04 PM
How about a CR timer disabler command? No more frigate CR decay?

I can't disable the timer, but I can prevent CR from draining once it's run out and recover any lost CR. InfiniteCR is done and will be in the next release. :)


Just noticed on the OP, its still says just to use backspace without control, thought I would just let you know

Fixed. Thank you for pointing that out.
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 4 released 2014-03-06)
Post by: LazyWizard on March 06, 2014, 03:41:53 PM
WIP 4 is out, get it here (http://www.mediafire.com/download/2vdbo0ovywsv6gn/Console_Commands_2.0_WIP_4.zip).

Changes since the last version (going off the repository commit messages, so I might have missed a few):
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 4 released 2014-03-06)
Post by: FasterThanSleepyfish on March 07, 2014, 05:14:40 PM
Make sure you have the LATEST version of lazylib! Should be 1.8.
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 4 released 2014-03-06)
Post by: doodlydee on March 07, 2014, 05:17:45 PM
Thanks I realized this as soon as I posted so I removed my message thank you though
I have another problem though the only way I can see the console after I activate it is to ctrl+alt+delete even then it does not show and the game just freezes
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 4 released 2014-03-06)
Post by: Auraknight on March 09, 2014, 11:12:44 AM
Heya! I re-downloaded the latest version, but sadly, it din't solve my problem. With the latest update, whenever I try and run SS with this mod, once the loading bar reaches the end, it crashes, giveing me this error
Fatal: org/lazywizard/lazylib/JSONUtils
Cause: org.lazywizard/lazylib/JSONUtils
Check starsector.log for more info

this is running it with JUST Lazylib and Console Commands running, nothing else.
Thanks in advance for any help!
EDIT: Also like to say that Lazylib works fine with my other mods that use it.
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 4 released 2014-03-06)
Post by: doodlydee on March 09, 2014, 11:24:03 AM
I had that problem to fixed it by downloading latest lazylib
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 4 released 2014-03-06)
Post by: Auraknight on March 09, 2014, 11:29:37 AM
I had that problem to fixed it by downloading latest lazylib
Yup, that, strangely, was it.
I coulda SWORN I had updated my Lazylib when the update came out :/
Thanks kindly!
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 4 released 2014-03-06)
Post by: TheDTYP on March 13, 2014, 07:09:37 PM
Nobody should have this much power...
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 4 released 2014-03-06)
Post by: FasterThanSleepyfish on March 13, 2014, 08:10:13 PM
I noticed some possibly unintended behavior. The commands entered for battle simulations in the refit screen are broken after you reenter battle. It will state that NoCoolDown is on, yet it will be off. I actually liked it better when the commands were permanently on until you disabled them by repeating the command. That feature has been taken away in 2.0, when every new combat session has no commands enabled even if you had them enabled before.
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 4 released 2014-03-06)
Post by: LazyWizard on March 13, 2014, 08:23:09 PM
That was actually a bug with NoCooldown. It's fixed in the dev version.

Combat commands resetting between battles is temporary; they will be persistent in the final version. I just wanted to have them in the mod in some form until I had the time to write a better system for them.
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 5 released 2014-03-14)
Post by: LazyWizard on March 14, 2014, 06:46:08 AM
WIP 5 is out, get it here (http://www.mediafire.com/download/7up3rwqrzziena6/Console_Commands_2.0_WIP_5.zip). This mod requires the latest version of LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0). :)

No new console features in this update, but there are two new commands and a fix to an existing one. Here's the list of changes:

I'll be away for the next few days, so if there's a problem with this release (unlikely, nothing important has changed since the last WIP), I won't be able to upload a fix right away. In that case you can download the previous WIP here (http://www.mediafire.com/download/2vdbo0ovywsv6gn/Console_Commands_2.0_WIP_4.zip).

I attempted to get persistent combat commands implemented before I left but I ran out of time. Sorry Foxer.
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 5 released 2014-03-14)
Post by: Vinya on March 17, 2014, 04:49:06 PM
Getting constant crashes while running in undecorated window mode, not to mention the command interface being hidden behind the game.

Title: Re: [0.6.2a] Console Commands v2.0 (WIP 5 released 2014-03-14)
Post by: Taverius on March 23, 2014, 01:39:33 AM
I tried WIP 4 and 5 and it crashes when I summon the console window? Halp D:
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 5 released 2014-03-14)
Post by: LazyWizard on March 27, 2014, 04:40:40 PM
Could you post the crash logs?

[...] not to mention the command interface being hidden behind the game.

Unfortunately that's beyond my control. The command pop-up is a different window and I believe it's up to the OS to decide which gets focus. Sometimes it works, often times it doesn't. I've tried all sorts of hacks to get around this, believe me.

As far as I am aware it will always get proper focus if you run the game windowed (as in a smaller resolution than your desktop, not fullscreen borderless) because that disables the game window's "always on top" property. If you're one of the unfortunate users that can't play it fullscreen, that's the only fallback outside of typing blind or constant alt-tabs until an actual console input dialog is written.
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 5 released 2014-03-14)
Post by: Midnight Kitsune on March 28, 2014, 01:53:22 AM
...or constant alt-tabs until an actual console input dialog is written.
Problem is though is that you can't alt tab to it as all you do is make it "active" without putting it on top. Also I will say that I never had this problem with the old version so you might take a look at that and see if it still works
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 6 released 2014-03-30)
Post by: LazyWizard on March 30, 2014, 01:51:48 PM
WIP 6 is out, get it here (http://www.mediafire.com/download/h4xbocsypxysx8t/Console_Commands_2.0_WIP_6.zip). Some files have been moved around/removed so you'll need to delete your old mod folder before upgrading.

This update replaces the campaign inpup pop-up with an InteractionDialogPlugin. This will work in fullscreen and should hopefully resolve a lot of the problems people have been having with this mod. I tried to imitate vanilla text entry as closely as possible, so it has a blinking caret and shift/control+backspace support. These were definitely critical additions and not indicative of any kind of super-OCD.

Spoiler
(http://i.imgur.com/UebEJTi.png)
[close]

Due to a bug with text panel resizing (in short, it doesn't work) the console output only takes up a small fraction of the screen. Luckily the dialog has a scrollbar so it's not a huge deal. Text input does not support international characters yet, but that shouldn't be a problem since no commands or their arguments should need them.

Combat still uses the old pop-up and will continue to do so for the foreseeable future. The next release of this mod will let you toggle combat commands from the campaign layer to get around this.

Other changes:
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 6 released 2014-03-30)
Post by: Midnight Kitsune on April 03, 2014, 12:55:29 PM
Newest update works AWESOMELY!
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 6 released 2014-03-30)
Post by: Farlarzia on April 23, 2014, 09:41:11 AM
Hey, I've been using this mod and have had some trouble spawning in mod ships, specifically the Mimir XV from the mod Shadowyards heavy industries . I'm using its variant id (ms_mimirBaus_Baus) with the command addship but it returns as not being found every time. I was just wondering if there was something I'm doing wrong, as it works for the normal mimir (ms_mimir standard). I was thinking maybe it is due to the capital letters in the name, but I've tried it with and without them being capital to no avail. I've also noticed when using allhulls, not all hulls are actually added, for example I cannot find many ships, most notably capitals, including the mimir or the mimir XV and many many capitals from the Valkyries mod.

The mods I have running are: Blackrock Driveyards 0.6, Combat Radar 0.6c, Console commands 2.0 WIP 6 (obviously), Lazylib 1.8c, Shadowyards heavy industries 0.4.4.

Not sure whats up with these things, I might just be doing it wrong? Anyway, just wondering if you could shed some light on this. Thanks
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 6 released 2014-03-30)
Post by: LazyWizard on April 26, 2014, 10:34:11 AM
Hey, I've been using this mod and have had some trouble spawning in mod ships, specifically the Mimir XV from the mod Shadowyards heavy industries . I'm using its variant id (ms_mimirBaus_Baus) with the command addship but it returns as not being found every time. I was just wondering if there was something I'm doing wrong, as it works for the normal mimir (ms_mimir standard). I was thinking maybe it is due to the capital letters in the name, but I've tried it with and without them being capital to no avail. I've also noticed when using allhulls, not all hulls are actually added, for example I cannot find many ships, most notably capitals, including the mimir or the mimir XV and many many capitals from the Valkyries mod.

The mods I have running are: Blackrock Driveyards 0.6, Combat Radar 0.6c, Console commands 2.0 WIP 6 (obviously), Lazylib 1.8c, Shadowyards heavy industries 0.4.4.

Not sure whats up with these things, I might just be doing it wrong? Anyway, just wondering if you could shed some light on this. Thanks

AddShip seems to be working with that variant for me. (http://i.imgur.com/6DCI9JN.png)

Are you sure you're getting the capitalization exact? The console tries to vary the capitalization a bit if it fails, but it wouldn't be able to do so successfully with variant ids that have capital letters in the middle of a segment like that one.

Regarding AllHulls: are you running the latest version of Starsector? That command uses SectorAPI's getAllEmptyVariantIds(), which had a bug in prior SS versions where it didn't return ships with built-in weapons. If you have .6.2a and ships still aren't appearing then that method is still buggy. :(
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 6 released 2014-03-30)
Post by: Farlarzia on April 26, 2014, 10:39:36 AM
As far as I am aware I am running the latest version of starsector, but I did manage to spawn in that ship, but only as a blank hull, I tried spawning in that hull with just about any combination of capitals I could without avail. It might be useful to show how to spawn in a blank ship hull on the spawnship help, as it wasn't immediately obvious how to do it, and I got a little confused. Actually upon thinking, the ships that spawned with allhulls, some of the ships spawned that did have built in weapons, and a alot of ships I noticed that didn't spawn, had no built in weapons. Weird. I'm not sure what's going on there, it might just be my computer, its... not very reliable, or good, to say the least.
 
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 6 released 2014-03-30)
Post by: LazyWizard on May 02, 2014, 10:29:59 AM
AllHulls will work properly after .65a is released. There's a bug in getAllEmptyVariantIds() in the current version where it doesn't consider hulls with built-in hullmods to be empty.

For AllShips, I just changed it so it will accept the .variant filename (http://i.imgur.com/UGpWnHO.png) as an argument as well. That should make it work in almost all cases, even ones where the variant ID doesn't match the filename.
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 6 released 2014-03-30)
Post by: Farlarzia on May 02, 2014, 10:44:17 AM
Ah, glad I could help improve / find some bugs, and help improve this already great mod, look forward to it!  :)
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 7 released 2014-05-02)
Post by: LazyWizard on May 02, 2014, 02:39:07 PM
WIP 7 is out, get it here (http://www.mediafire.com/download/0e818p6b1s7f0rp/Console_Commands_2.0_WIP_7.zip).

The big change in this one: the popup shouldn't be hidden behind the game window in combat anymore. Due to the way this was fixed the game no longer pauses while entering commands, so make sure you hit spacebar before toggling god mode when torpedoes are incoming! ;)

I also added error sounds to the mod. If a command fails the game will play the CR malfunction alert; which alert varies depending on what kind of error occurred. You can configure this (or even add a sound for success) in data/console/console_settings.json.

The full list of changes:

After this update the only planned feature remaining is an option to make commands persistent between battles. Once that's in I'll 'officially' release a v2.0 instead of this stream of WIP releases.
It's almost like my other mods have made me wary of running out of version numbers or something...
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 7 released 2014-05-02)
Post by: Debido on May 10, 2014, 01:03:56 AM
We can now add our own console commands? I was just going to ask for this feature! This is exactly what I need. Lazy, you are legendary.
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 7 released 2014-05-02)
Post by: Tommygunner70 on May 31, 2014, 03:14:53 PM
hey I got a weird crash on game start. Version 0.6.2a-RC3
message:

Fatal: org/lazywizard/lazylib/JSONUtils
Cause: org.lazywizard.lazylib.JSONUtils


Here's the log: ((Removed))


EDIT: Derp! looks like I needed Lazylib installed as well. I added it and it made it work. probably a good idea to add a requirements section at the start of this topic for newbies like me  8)
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 7 released 2014-05-02)
Post by: LazyWizard on May 31, 2014, 09:44:25 PM
EDIT: Derp! looks like I needed Lazylib installed as well. I added it and it made it work. probably a good idea to add a requirements section at the start of this topic for newbies like me  8)

Oops, sorry. That requirement is new in the rewrite, and I forgot to add a notice when I updated the OP. Fixed now. :)
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 7 released 2014-05-02)
Post by: Inertial Mage on August 24, 2014, 03:43:33 PM
I didn't have enough time to check but how would i go about adding ships, like a paragon or oddysey
Title: Re: [0.6.2a] Console Commands v2.0 (WIP 7 released 2014-05-02)
Post by: LazyWizard on August 25, 2014, 11:06:43 AM
On the campaign map press shift+backspace to bring up the console (you can change this keystroke in data/console/console_settings.json). The command to spawn a ship is addship <variantId>, so if you want an Elite Paragon you'd enter "addship paragon_Elite" without the quotes. For just the hull you'd enter "addship paragon_Hull". The variant ID is case-sensitive, so check your capitalization if the command fails.

You can find available variants in data/variants (ex: data/variants/afflictor_Strike.variant becomes "afflictor_Strike"). Sometimes the actual variant ID will be different from these filenames, but the latest console release (WIP 7) will work anyway in those cases.


If you ever get lost you can list all commands with "help". If you just want to know what commands are available on the campaign map you can use "help campaign". If you need help with a specific command you would use "help <command>" ("help addship", for example).


And I should mention one other thing just because it's poorly explained in-game right now. If you're ever playing around with the "allweapons" or "allhulls" command: if you don't enter a valid destination then the console will put the spawned items/ships into a special infinite storage container. You can retrieve goods from this container by entering the command "storage".
Title: Re: [0.65a] Console Commands v2.0 (WIP 8 released 2014-10-21)
Post by: LazyWizard on October 21, 2014, 05:03:31 AM
A small compatibility update is up, get it here (http://www.mediafire.com/download/1mp1gfjk4fmh6mx/Console_Commands_2.0_WIP_8.zip).

I only changed what was necessary to get this mod to run in .65a. I fully expect at least one campaign command to be completely broken given the sheer magnitude of changes to the campaign layer in this update. :)
Title: Re: [0.65a] Console Commands v2.0 (WIP 8 released 2014-10-21)
Post by: Midnight Kitsune on October 21, 2014, 05:58:09 AM
A small compatibility update is up, get it here (http://www.mediafire.com/download/1mp1gfjk4fmh6mx/Console_Commands_2.0_WIP_8.zip).

I only changed what was necessary to get this mod to run in .65a. I fully expect at least one campaign command to be completely broken given the sheer magnitude of changes to the campaign layer in this update. :)
You most likely already know this, but the console storage causes a CTD. Error log:
Spoiler
450957 [Thread-5] ERROR com.fs.starfarer.combat.D  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.campaign.ui.newsuper.sizeChanged(Unknown Source)
   at com.fs.starfarer.ui.o0oO.setSize(Unknown Source)
   at com.fs.starfarer.ui.Q.setSize(Unknown Source)
   at com.fs.starfarer.coreui.OO0o.sizeChanged(Unknown Source)
   at com.fs.starfarer.ui.o0oO.setSize(Unknown Source)
   at com.fs.starfarer.ui.Q.setSize(Unknown Source)
   at com.fs.starfarer.ui.String.oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO$5.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.String.oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.setCurrentTab(Unknown Source)
   at com.fs.starfarer.ui.String.oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.setCurrentTab(Unknown Source)
   at com.fs.starfarer.ui.String.P.showCoreInternal(Unknown Source)
   at com.fs.starfarer.ui.String.P.showCore(Unknown Source)
   at org.lazywizard.console.commands.Storage$StorageInteractionDialogPlugin.init(Storage.java:71)
   at com.fs.starfarer.ui.String.P.Óoo000(Unknown Source)
   at com.fs.starfarer.ui.String.P.<init>(Unknown Source)
   at com.fs.starfarer.ui.String.P.<init>(Unknown Source)
   at com.fs.starfarer.campaign.Object.showInteractionDialog(Unknown Source)
   at org.lazywizard.console.Console$ShowDialogOnCloseScript.advance(Console.java:325)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.Object.o00000(Unknown Source)
   at com.fs.starfarer.OoOO.Oôo000(Unknown Source)
   at com.fs.super.A.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.D.super(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

[close]
Title: Re: [0.65a] Console Commands v2.0 (WIP 8 released 2014-10-21)
Post by: LazyWizard on October 21, 2014, 07:18:04 AM
You most likely already know this, but the console storage causes a CTD. Error log:
Spoiler
450957 [Thread-5] ERROR com.fs.starfarer.combat.D  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.campaign.ui.newsuper.sizeChanged(Unknown Source)
   at com.fs.starfarer.ui.o0oO.setSize(Unknown Source)
   at com.fs.starfarer.ui.Q.setSize(Unknown Source)
   at com.fs.starfarer.coreui.OO0o.sizeChanged(Unknown Source)
   at com.fs.starfarer.ui.o0oO.setSize(Unknown Source)
   at com.fs.starfarer.ui.Q.setSize(Unknown Source)
   at com.fs.starfarer.ui.String.oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO$5.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.String.oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.setCurrentTab(Unknown Source)
   at com.fs.starfarer.ui.String.oooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.setCurrentTab(Unknown Source)
   at com.fs.starfarer.ui.String.P.showCoreInternal(Unknown Source)
   at com.fs.starfarer.ui.String.P.showCore(Unknown Source)
   at org.lazywizard.console.commands.Storage$StorageInteractionDialogPlugin.init(Storage.java:71)
   at com.fs.starfarer.ui.String.P.Óoo000(Unknown Source)
   at com.fs.starfarer.ui.String.P.<init>(Unknown Source)
   at com.fs.starfarer.ui.String.P.<init>(Unknown Source)
   at com.fs.starfarer.campaign.Object.showInteractionDialog(Unknown Source)
   at org.lazywizard.console.Console$ShowDialogOnCloseScript.advance(Console.java:325)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.Object.o00000(Unknown Source)
   at com.fs.starfarer.OoOO.Oôo000(Unknown Source)
   at com.fs.super.A.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.D.super(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

Ouch, I'll see what I can do. Unfortunately there doesn't appear to be a simple fix for this. Storage is kind of hacky and the new market system doesn't agree with it.
Title: Re: [0.65a] Console Commands v2.0 (WIP 8 released 2014-10-21)
Post by: Auraknight on October 27, 2014, 05:26:48 PM
Could you possibly make the storage command link so something like the abandoned atmo station, with it's own market value, just non-existent on the world map? I'd imagine it'd be as easy as adding whatever the Market has in addition, and the storage command working as if you docked at it?
Title: Re: [0.65a] Console Commands v2.0 (WIP 8 released 2014-10-21)
Post by: Oathseeker on October 28, 2014, 04:21:34 AM
Probably a stupid question, but I can't figure out how to set faction relationships for factions with a space in the name. I tried luddicchurch, LuddicChurch and "Luddic Church" but none seem to work. Or maybe I just made a spelling error somewhere?

EDIT: Oh ***, didnt try _
Mah bad
Title: Re: [0.65a] Console Commands v2.0 (WIP 8 released 2014-10-21)
Post by: LazyWizard on October 28, 2014, 05:27:58 AM
Could you possibly make the storage command link so something like the abandoned atmo station, with it's own market value, just non-existent on the world map? I'd imagine it'd be as easy as adding whatever the Market has in addition, and the storage command working as if you docked at it?

The real problem with adding a market is ensuring that it doesn't cause problems further down the line, say if a mod starts iterating through all markets and messing with them, or if fleets try to trade with it. It's probably doable, but I haven't dug into the new economy API yet to find out.


Probably a stupid question, but I can't figure out how to set faction relationships for factions with a space in the name. I tried luddicchurch, LuddicChurch and "Luddic Church" but none seem to work. Or maybe I just made a spelling error somewhere?

The command uses the internal ID of that faction, found inside the json files in data/world/factions/. :)
Title: Re: [0.65a] Console Commands v2.0 (WIP 8 released 2014-10-21)
Post by: Oathseeker on October 28, 2014, 05:35:16 AM
Thanks lazy, but already figured out through trial and error that the underscore replaces the space. And after that through more trial and error found out i should have been looking at those files, instead of trialing and erroring ^^
Title: Re: [0.65a] Console Commands v2.0 (WIP 8 released 2014-10-21)
Post by: LazyWizard on October 28, 2014, 05:38:41 AM
This is what happens when I spend an hour in other tabs before finishing my reply, I guess. ;)
Title: Re: [0.65a] Console Commands v2.0 (WIP 8 released 2014-10-21)
Post by: Oathseeker on October 28, 2014, 06:58:20 AM
This is what happens when I spend an hour in other tabs before finishing my reply, I guess. ;)

I was going to make some obvious joke about lazyness, but unfortunaly i was right when i thought it might be a stupid question ;)
Title: Re: [0.65a] Console Commands v2.0 (WIP 8 released 2014-10-21)
Post by: Auraknight on November 02, 2014, 11:03:45 PM
(http://i.imgur.com/hBFWwFG.png)
The sass is real
Title: Re: [0.65.1a] Console Commands v2.1 (released 2014-11-12)
Post by: LazyWizard on November 12, 2014, 07:29:56 PM
Version 2.1 is up, get it here (http://www.mediafire.com/download/2aa6zfqa4tw2wzf/Console_Commands_2.1.zip) (mirror (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.1.zip)).

This fixes several commands that had odd behavior post-.65a. It also removes the broken Storage command, as that appears to be unfixable without some very ugly hacks.

Another addition of note: you can press up in the campaign popup to re-enter the last command. This is very useful if you make as many typos as I do. ;)

There are a few other interesting changes that managed to sneak into this release. You might spot them in this changelog:
Quote
2.1 (November 12, 2014)
=========================
Fixed crash when commands that summon a dialog have an error in said dialog
Console now defaults to showing entered commands (and logging them as well)
Up now re-enters the previously entered command (down to undo, campaign only)
Removed shift+backspace deleting entire line (too easy to hit by accident)
Lots of minor tweaks and polishing
Changes to existing commands:
 - Temporarily removed Storage command (broken since .65a added markets)
 - AddItem and AddWeapon no longer spam a stack trace when an invalid ID is
   entered
 - AdjustRelationship and SetRelationship now properly use -100 to 100 range
 - GoTo works with token ids as well as names (ex: corvus_pirate_station)
 - Fixed Home not teleporting player fleet if your home isn't in the same
   system, now moves your fleet to the containing location first
 - Fixed SetHome not working with stations after vanilla switched to custom
   entities in .65a, also works with comm relays now
 - ShowBounds now also shows collision and shield radii (grey/blue respectively)
 - RunCode supports macros, see data/console/runcode_macros.csv
 - Fixed Reload failing if RunCode was used this session


Yes, I finally ended the ridiculous WIP stuff.
Title: Re: [0.65.1a] Console Commands v2.1 (released 2014-11-12)
Post by: TartarusMkII on November 12, 2014, 10:23:15 PM
Hiya, I just started using this mod, and as with most of your work, it's awesome, and I thank you for sharing it!

I read what you said above about faction IDs, but what is your own ID when setting relationships to the player's faction?

Thanks!
Title: Re: [0.65.1a] Console Commands v2.1 (released 2014-11-12)
Post by: LazyWizard on November 12, 2014, 10:41:29 PM
Glad you're enjoying the mod. And it's "player". :)

I'll add a command to list the various IDs for weapons, ships, factions, systems etc in the next release.
Title: Re: [0.65.1a] Console Commands v2.1 (released 2014-11-12)
Post by: TartarusMkII on November 12, 2014, 10:43:44 PM
Yea, that'd be awesome! I was going to suggest simply putting the fact that you are 'player' in the help, but the list would probably make that clear.

Thanks again for all 'yer work.
Title: Re: [0.65.1a] Console Commands v2.1.1 (released 2014-11-13)
Post by: LazyWizard on November 12, 2014, 11:36:55 PM
Version 2.1.1 is up, get it here (http://www.mediafire.com/download/dfd97571bkugg9o/Console_Commands_2.1.1.zip) (mirror (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.1.1.zip)).

Spoiler
(http://i.imgur.com/Wg087SI.png)
[close]

The only change in this update is a new command, List. This will display all valid IDs for use with other commands. For example, "list ships" will print all hull IDs, "list factions" all faction IDs, etc - see "help list" for the supported categories.

This command should make the console much easier to use, therefore I'm pushing it a mere four hours after the last update. Sorry about that. :)
Title: Re: [0.65.1a] Console Commands v2.1.1 (released 2014-11-13)
Post by: Cyan Leader on November 13, 2014, 09:26:40 AM
Will this command include any modded entries?
Title: Re: [0.65.1a] Console Commands v2.1.1 (released 2014-11-13)
Post by: LazyWizard on November 13, 2014, 09:39:08 AM
Yes, it will display all IDs including mod-added ones.
Title: Re: [0.65.1a] Console Commands v2.1.1 (released 2014-11-13)
Post by: Midnight Kitsune on November 13, 2014, 12:39:25 PM
Have the allships and allweapons commands been fixed as well? Before the storage command they were put in the ASF near Asharu but once the storage command was put in, they used that
Title: Re: [0.65.1a] Console Commands v2.1.1 (released 2014-11-13)
Post by: LazyWizard on November 13, 2014, 12:47:03 PM
I had that annoying feeling I was forgetting something. Thank you for reminding me.

No, they still put it in storage by default. For now you can tell the command to put them elsewhere with "allhulls Abandoned Terraforming Platform". I'll try to get a better solution out today.
Title: Re: [0.65.1a] Console Commands v2.1.1 (released 2014-11-13)
Post by: LazyWizard on November 13, 2014, 03:56:59 PM
Sneak preview of a new feature:
Spoiler
(http://i.imgur.com/ADfYjGB.png)

If you're confused (http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance)
[close]

Also, Storage is back, sort of. It just redirects to the Abandoned Terraforming Platform for now (or the player fleet if you're in a total conversion).
Title: Re: [0.65.1a] Console Commands v2.1.1 (released 2014-11-13)
Post by: TartarusMkII on November 13, 2014, 04:29:13 PM
I read a little about the metric from the link you posted, and I am not a programmer, so I can only understand very little about it. But the fact that a program would have the ability to do that with strings blows my mind. Why don't we see such things in more UIs in all sorts of commercial applications? Either way, including it in something like this is surprising, and I think really speaks to your skill- I mean, god damn.

I hate to spawn an off topic discussion, but I'd love to know, if it detects typos in strings, how does it infer what the user meant to say? Does it refer to accepted strings and try to pick the best expected command?

Edit - Silly me, I use my iPhone constantly and yet ask where in commercial programming I'd encounter typo corrections!

Someone asked me, you know, what is the point of not requiring users to just use the correct strings? I thought maybe Lazy just wanted to practice or, just did it for fun. But then I realized, with the amount of items, systems, ships, etc in a big modded game, the ability to guess at the name of an item would be incredibly useful.
Title: Re: [0.65.1a] Console Commands v2.1.1 (released 2014-11-13)
Post by: CrashToDesktop on November 13, 2014, 04:56:51 PM
Oh, nice autocorrect feature. :D
Title: Re: [0.65.1a] Console Commands v2.1.1 (released 2014-11-13)
Post by: LazyWizard on November 13, 2014, 07:08:18 PM
I read a little about the metric from the link you posted, and I am not a programmer, so I can only understand very little about it. But the fact that a program would have the ability to do that with strings blows my mind. Why don't we see such things in more UIs in all sorts of commercial applications? Either way, including it in something like this is surprising, and I think really speaks to your skill- I mean, god damn.

I hate to spawn an off topic discussion, but I'd love to know, if it detects typos in strings, how does it infer what the user meant to say? Does it refer to accepted strings and try to pick the best expected command?

That's exactly what it does. The algorithm doesn't detect typos, it only determines how similar two strings are (IIRC it was originally meant for finding misspelled duplicates in census records). When the player enters an invalid input, I have the console check every ID vs the player's input and see if any are close, and if so which matches the input best. The reason you don't see this kind of thing more often is that in most cases it's a bad idea to guess what the user intended (anyone who remembers T9Word can vouch for this). The console's a special case as the pool of valid IDs is small and unique enough that mistakes are rare, and the effects of a wrong 'guess' are easily undone.


Quote
Either way, including it in something like this is surprising, and I think really speaks to your skill- I mean, god damn.

Almost every algorithm that has its own Wikipedia page also has an example implementation online somewhere, so it actually took little skill beyond copy+paste. ;)
Title: Re: [0.65.1a] Console Commands v2.1.1 (released 2014-11-13)
Post by: Death_Silence_66 on November 18, 2014, 03:32:33 PM
For whatever reason, it does not recognize the "storage" command. when i looked it up with the help command it said "no such command 'storage'" any way to fix this? another issue is that whenever i use a command in combat after the battle it opens a console window that can't be closed.
Title: Re: [0.65.1a] Console Commands v2.2 (released 2014-11-18)
Post by: LazyWizard on November 18, 2014, 04:12:27 PM
Version 2.2 is out, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.2.zip) (mirror (http://www.mediafire.com/download/as6w32dzxfc7d32/Console_Commands_2.2.zip)).

Changelog:
Quote
2.2 (November 18, 2014)
=========================
Console popup will now expand to take up the entire screen in the campaign
Added typo correction - most commands will find the best match for invalid IDs
Added "typoCorrectionThreshold" to data/console/console_settings.json
Added positional editing to the campaign input dialog
Fixed campaign commands being usable in the simulator
Changes to existing commands:
 - Typo correction added to the following commands: AddItem, AddWeapon,
   AdjustRelationship, AllHulls, AllWeapons, AllWings, GoTo, Jump, SetHome,
   SetRelationship
 - Added EndCombat command, takes the victorious side as an optional argument
 - Added several more default RunCode macros
 - Re-added Storage command, redirects to the Abandoned Terraforming Platform,
   or in total conversions the first station it can find with the "abandoned"
   market condition (if you used AllHulls or AllWeapons in a prior version,
   those items will be transferred over to the station's storage when you next
   use this command)

---

For whatever reason, it does not recognize the "storage" command. when i looked it up with the help command it said "no such command 'storage'" any way to fix this? another issue is that whenever i use a command in combat after the battle it opens a console window that can't be closed.

The old Storage command was removed because it broke after markets were introduced. 2.2 brings it back in a different form (it's just a redirect to the abandoned station now).

I haven't run across that uncloseable window bug, I'll take a look.
Title: Re: [0.65.1a] Console Commands v2.2 (released 2014-11-18)
Post by: Maelstrom on December 13, 2014, 03:28:29 PM
I have a problem, I wrote AddCredits<100000000> and it says ERRROR: credits amount must be a whole number!

what is the proble?
Title: Re: [0.65.1a] Console Commands v2.2 (released 2014-11-18)
Post by: AsterPiano on December 13, 2014, 05:08:03 PM
I have a problem, I wrote AddCredits<100000000> and it says ERRROR: credits amount must be a whole number!

what is the proble?
I don't think you need the <100000000>, I'm sure it's just AddCredits 100000000. Although it might be too high of a number, something like 2000000 should be enough to do basically anything, so try it with that.
Title: Re: [0.65.1a] Console Commands v2.2 (released 2014-11-18)
Post by: LazyWizard on December 13, 2014, 05:42:28 PM
I have a problem, I wrote AddCredits<100000000> and it says ERRROR: credits amount must be a whole number!

what is the proble?

Yeah, you don't need the brackets, it's just AddCredits 100000000. The brackets shown in the syntax help just show that the amount is a single argument, so if it said "AddCrew <amount to add> [crew level]", you'd know that's two separate arguments. <> denotes a required argument, [] an optional one. Sorry this isn't explained anywhere. :)
Title: Re: [0.65.1a] Console Commands v2.2 (released 2014-11-18)
Post by: Midnight Kitsune on December 21, 2014, 06:33:33 PM
Just got this crash when trying to spawn a ship with this:
Spoiler
java.lang.ArrayIndexOutOfBoundsException
   at java.lang.System.arraycopy(Native Method)
   at java.lang.AbstractStringBuilder.insert(Unknown Source)
   at java.lang.StringBuilder.insert(Unknown Source)
   at org.lazywizard.console.ConsoleCampaignListener$CampaignPopup$KeyListener.processInput(ConsoleCampaignListener.java:368)
   at com.fs.starfarer.ui.String.OOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.s.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.s.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.oO0O.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.String.P.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.s.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.s.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.campaign.C.super(Unknown Source)
   at com.fs.starfarer.B.void.class$super(Unknown Source)
   at com.fs.A.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOO.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.super(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

[close]
I think what happened is I hit "\" at the end of a command (like addship Aurora_hull) and hit enter instead of backspace
Title: Re: [0.65.1a] Console Commands v2.3 (released 2014-12-22)
Post by: LazyWizard on December 22, 2014, 06:00:06 AM
I couldn't find an obvious cause for that error. I know it's related to the positional editing I added in the last patch, but a ridiculous amount of testing couldn't replicate the crash. Regardless, I wrapped the whole thing in a try-catch, made it able to recover from the error, and added logging to help track it down if it ever occurs again. :)

On that note, version 2.3 is up, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.3.zip) (mirror (http://www.mediafire.com/download/jqb2hvoh7qf2xk7/Console_Commands_2.3.zip)) (requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0)).

Changelog:
Quote
2.3 (December 22, 2014)
=========================
Made campaign input popup capable of recovering from certain errors
New commands:
 - Kill, destroys your ship's current target
 - Suicide, destroys the currently piloted ship
Changes to existing commands:
 - Fixed shield center offset with ShowBounds
Title: Re: [0.65.1a] Console Commands v2.3 (released 2014-12-22)
Post by: TheDTYP on January 15, 2015, 09:46:06 AM
Hey, I have a question. When I type Spawnfleet, it asks for the fleet ID, so I'd type something like
Spawnfleet hegemony patrol but it says a "patrol fleet" doesn't exist, so what exactly is the game asking for when it says Fleet ID? Thanks!
Title: Re: [0.65.1a] Console Commands v2.3 (released 2014-12-22)
Post by: AMDAMK on January 16, 2015, 01:04:56 PM
Hey, I have a question. When I type Spawnfleet, it asks for the fleet ID, so I'd type something like
Spawnfleet hegemony patrol but it says a "patrol fleet" doesn't exist, so what exactly is the game asking for when it says Fleet ID? Thanks!



An ID that is found in the Faction file.
Title: Re: [0.65.1a] Console Commands v2.3 (released 2014-12-22)
Post by: LazyWizard on January 16, 2015, 03:57:08 PM
Hey, I have a question. When I type Spawnfleet, it asks for the fleet ID, so I'd type something like
Spawnfleet hegemony patrol but it says a "patrol fleet" doesn't exist, so what exactly is the game asking for when it says Fleet ID? Thanks!

SpawnFleet actually still uses the old fleet spawning logic, so it doesn't work in .65a. I forgot to disable the command until I get around to rewriting the logic. Sorry about that!
Title: Re: [0.65.2a] Console Commands v2.3 (released 2014-12-22)
Post by: JamesBai03 on February 27, 2015, 01:36:24 PM
there should be a command that unlocks the Ordnance point limit for player's ships
Title: Re: [0.65.2a] Console Commands v2.3 (released 2014-12-22)
Post by: JamesBai03 on February 28, 2015, 10:18:23 AM
also commands that removes the limits for cargo and fuel will also be nice.
Title: Re: [0.65.2a] Console Commands v2.3 (released 2014-12-22)
Post by: EvilWaffleThing on March 05, 2015, 06:40:17 PM
Could a command be made that increases/alters the logistics capacity?
I've tried several different means of increasing it but none seem to work on an existing save.
Title: Re: [0.65.2a] Console Commands v2.3 (released 2014-12-22)
Post by: LazyWizard on March 05, 2015, 08:10:37 PM
there should be a command that unlocks the Ordnance point limit for player's ships
also commands that removes the limits for cargo and fuel will also be nice.

Added AddOrdnancePoints. Just use a ridiculous number with it if you want to go crazy. I'll see what I can do about cargo/fuel limits. :)


Could a command be made that increases/alters the logistics capacity?
I've tried several different means of increasing it but none seem to work on an existing save.

Added AddLogistics. I'll try to get a release out within the next few days.
Title: Re: [0.65.2a] Console Commands v2.3 (released 2014-12-22)
Post by: EvilWaffleThing on March 06, 2015, 06:48:33 AM
Added AddLogistics. I'll try to get a release out within the next few days.

Wow that is awesome. I was afraid I was gonna have to bumblefuck my way through writing it up myself!
Nobody wants that, trust me. Thank you so much, you're awesome.
Title: Re: [0.65.2a] Console Commands v2.3 (released 2014-12-22)
Post by: JamesBai03 on March 06, 2015, 01:18:08 PM
there should be a command that unlocks the Ordnance point limit for player's ships
also commands that removes the limits for cargo and fuel will also be nice.

Added AddOrdnancePoints. Just use a ridiculous number with it if you want to go crazy. I'll see what I can do about cargo/fuel limits. :)


Could a command be made that increases/alters the logistics capacity?
I've tried several different means of increasing it but none seem to work on an existing save.

Added AddLogistics. I'll try to get a release out within the next few days.

man you're fantastic. Amazing Job. ;)
Title: Re: [0.65.2a] Console Commands v2.3 (released 2014-12-22)
Post by: LazyWizard on March 06, 2015, 07:34:02 PM
Here's something that should make life a bit easier:
Spoiler
(https://i.imgur.com/Uqt5djq.png)
[close]
Title: Re: [0.65.2a] Console Commands v2.3 (released 2014-12-22)
Post by: JamesBai03 on March 06, 2015, 07:47:29 PM
Here's something that should make life a bit easier:
Spoiler
(https://i.imgur.com/Uqt5djq.png)
[close]
that's awesome, Im just wondering if there'd be an ETA or does the ETA entirely depend on the monthly update of the game?
Title: Re: [0.65.2a] Console Commands v2.3 (released 2014-12-22)
Post by: LazyWizard on March 06, 2015, 07:51:11 PM
It'll be out either within the next few hours or some time tomorrow.
Title: Re: [0.65.2a] Console Commands v2.4 (released 2015-03-06)
Post by: LazyWizard on March 06, 2015, 09:23:27 PM
Version 2.4 is up, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.4.zip) (mirror (http://www.mediafire.com/download/577g891uxg84tb0/Console_Commands_2.4.zip)). LazyLib is still required, get that here (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

This is a huge update with ten new commands and changes to several existing ones, along with a few other features. Let me know if you spot any bugs.

Here's the full changelog:
Quote
2.4 (March 06, 2015)
======================
The keystroke to summon the console is now shown when you first load a game
Combat output is now centered on the top of the screen, not the player ship
Added isInCampaign()/isInCombat() to CommandContext enum
Added alias support, aliases are defined in data/console/aliases.csv
Default aliases:
 - aap -> AddAptitudePoints
 - acp -> AddCommandPoints
 - aop -> AddOrdnancePoints
 - asp -> AddSkillPoints
 - ia -> InfiniteAmmo
 - if -> InfiniteFlux
 - nc -> NoCooldown
New commands:
 - AddLogistics, modifies the maximum logistics of the player fleet
 - AddOrdnancePoints, modifies the max OP for all ships in player fleet
 - AllCommodities, adds all trade items to the specified station/player cargo
 - FindItem, lists all markets that sell a resource or weapon and their
   location/faction
 - FindShip, lists all markets that sell that ship and their location/faction
 - InfiniteFuel, prevents fuel from draining in hyperspace
 - InfiniteSupplies, prevents supplies from draining while flying
 - Respec, resets player skills/aptitudes to 0 and refunds all spent points
 - ToggleAI, disables or re-enables the AI of the targeted ship
 - Traitor, toggles the side of the targeted ship
Changes to existing commands:
 - AddWeapon can add built-in and system weapons to your inventory again
 - AllHulls, AllWings and AllWeapons work with stations as an argument again
 - AllHulls and AllWings also work with 'player' as the argument again
 - Kill works on targets that have god mode active
 - Reload now reloads settings, commands, tags, aliases, and RunCode's
   imports and macros
 - Repair won't lower your CR on the campaign map if it was over the maximum
 - SpawnFleet re-added, syntax is now "spawnfleet <faction> <totalFP> <quality>
 - Status includes aliases (plus their definitions with "detailed" argument)
 - Storage will now use the first station with an unlocked storage tab if
   there are no abandoned stations in the sector (total conversion support)
 - Added getStorageStation() to Storage command's script
Title: Re: [0.65.2a] Console Commands v2.4 (released 2015-03-06)
Post by: Midnight Kitsune on March 08, 2015, 12:44:33 AM
Just found a bug with aliases: If you have a single lowercase letter for an alias and you use a capital letter in the console, you will get a fatal:null error when you execute the command
Example:
I have "s" as the storage command alias. If I type it into the console in lowercase, it works. If I type it in uppercase, it crashes

Log entry:
Spoiler
127444 [Thread-5] ERROR com.fs.starfarer.combat.D  - java.lang.NullPointerException
java.lang.NullPointerException
   at org.lazywizard.console.Console.parseInput(Console.java:302)
   at org.lazywizard.console.ConsoleCampaignListener$CampaignPopup$KeyListener.processInput(ConsoleCampaignListener.java:347)
   at com.fs.starfarer.ui.D.F.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.do.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.D.O00O.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.campaign.ooOO.super(Unknown Source)
   at com.fs.starfarer.new.Òôo000(Unknown Source)
   at com.fs.oOOO.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.D.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

[close]
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on March 08, 2015, 01:44:52 AM
2.4b is up, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.4b.zip) (mirror (http://www.mediafire.com/download/2h4ut8sn8c8zxw4/Console_Commands_2.4b.zip)). Still requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

This update fixes the crash bug reported by Midnight Kitsune. It also makes FindItem/FindShip a bit more useful as they now list the price and legality of goods in each market. Finally, I added a new command, ForceMarketUpdate, that forces every market to refresh its stock as if the player just visited them. You'll probably want to call this command before using FindItem or FindShip. ;)
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: JamesBai03 on March 12, 2015, 08:16:52 PM
allhulls doesnt seem to work with Nexerlin with supported faction mods installed, nor does the storage work anymore.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on March 12, 2015, 08:58:12 PM
allhulls doesnt seem to work with Nexerlin with supported faction mods installed, nor does the storage work anymore.

The order for storage is abandoned station -> any station with unlocked storage -> player fleet. If there's no abandoned station in Nexerelin you'll have to pay to unlock a storage tab in a station somewhere to get storage working. I just realized planets aren't included in this check, that's fixed for the next version.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: JamesBai03 on March 12, 2015, 10:12:47 PM
Yeah thanks man, also note the allhulls problem. ;)
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on March 12, 2015, 10:15:39 PM
AllHulls tries to use storage by default. It'll work fine once you have a storage set up somewhere. Until then, you can direct it to a specific station by entering that station's name as the argument (you must be in the same system as the station), or to the player fleet with "allhulls player". The same goes for AllWings, AllCommodities and AllWeapons.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: JamesBai03 on March 13, 2015, 11:46:21 PM
Ive got no idea how addship works. plz help ???
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on March 13, 2015, 11:59:19 PM
Ive got no idea how addship works. plz help ???

It's AddShip, followed by the hull or variant id, optionally followed by the amount to add to your fleet. For example, "addship onslaught" will give you a single empty Onslaught hull, whereas "addship paragon_Elite 3" will give you three Elite-variant Paragons. Keep in mind that arguments are case-sensitive (onslaught is not the same as Onslaught), though AddShip is a bit more forgiving than most commands and will attempt with different capitalizations if it fails.

You can get the list of internal ship hull IDs using the command "list ships". For variants you'll actually have to look in data/variants to get their id as mods can't retrieve that list through the API yet.

List is probably the most useful command for new users of the mod as it gives you the ids required for other commands. Help is also important - try "help addship". :)
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: Histidine on March 21, 2015, 03:19:48 AM
Is it a vanilla bug that this doesn't work (you have to reverse the order of the faction args)?

Code
setrelationship player targetFaction num
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on March 21, 2015, 05:36:59 AM
Both ways work for me (using player and hegemony). Are you sure you didn't misspell one of the factions on one attempt?
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: Histidine on March 21, 2015, 05:57:02 AM
Both ways work for me (using player and hegemony). Are you sure you didn't misspell one of the factions on one attempt?
Hmm never mind, seems to be a Nexerelin bug. Sorry for the trouble!
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on March 21, 2015, 05:59:41 AM
What two factions were you testing with? I can't see a reason why it'd work for some factions and not others, all commands should be mod-agnostic.

Edit: spotted the error. SetRelationship and AdjustRelationship would try to find the closest matching faction to your arguments, but when it came time to actually set the relationship it'd use the raw arguments. So if it corrected "hegemon" to "hegemony", the actual FactionAPI.setRelationship() call would still use "hegemon". Fixed for the next version, thanks for bringing this to my attention. :)
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: epicgear60 on March 22, 2015, 02:06:59 PM
Hey LazyWizard. Amazing work with this mod. I've ran into a problem while implementing this mod and lazylib where I get a fatal null error after the planning phase and right when the actual battle starts for campaign. I've looked at a dozen posts concerning the error but can't seem to find one matching my situation. Wondering if you could make sense of this:

sound.OooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOO  - Playing music with id [music-battle_ambience_01.ogg]
156600 [Thread-5] ERROR com.fs.starfarer.combat.D  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.combat.ai.FighterAI.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.G.Òôo000(Unknown Source)
   at com.fs.oOOO.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.D.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Thanks. If you need additional information I'll get it up asap. This just seems to be the flagged lines that get referenced on most of these posts. Again, thanks in advance.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on March 22, 2015, 02:29:53 PM
Does that happen every time, and only when you're running Console Commands? Otherwise that crash appears to be a vanilla bug, not one caused by this mod. You should report it in the Bug Reports (http://fractalsoftworks.com/forum/index.php?board=4.0) forum.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: epicgear60 on March 22, 2015, 02:57:07 PM
I'll get a post there soon. As I have had slow success in starsector, I haven't been able to command large fleets without console commands. But with and without the mod I can do missions and small battles. So it would seem to be the case you mentioned.

But just out of curiosity, what does the log point out?
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on March 22, 2015, 03:19:57 PM
Not much. Basically just that there was an error in the vanilla fighter AI. We don't have access to that source so I can't tell you exactly what went wrong. It's a NullPointerException, which means the game couldn't find something it expected to exist. But that's all we can tell from the log.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: Shedovv on May 04, 2015, 06:18:06 AM
The "forcemarketupdate" command doesn't seem to do anything. I ran it many, many, many very many times. And it had no effect on the market.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on May 04, 2015, 06:29:46 AM
Most markets only restock when you visit them after a certain amount of time has passed. All ForceMarketUpdate does is simulate the player entering each market to trigger any possible restocks. It won't do anything if you use it multiple times in a row, and it won't affect markets that have already restocked recently.

The command is really only useful before using FindShip/FindItem. It will prevent whatever you're looking for from vanishing when you dock with the station because a restock cycle has passed.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: UnamusedPotato on July 03, 2015, 08:37:28 PM
Sorry,I'm a noob can someone give me an example of what the console accepts to spawn a 50 ship large Pirate Armada.Thanks.Great mod too
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on July 03, 2015, 08:50:48 PM
Ah, SpawnFleet is one of those commands that's not really user-friendly. It's more for modders who want to test their faction's fleet makeups.

You can't control exactly how many ships the spawned fleet has, but you can set how many fleet points it will try to take up. A good, large pirate armada would be spawned with "spawnfleet pirates 250 0.6 Armada" (minus the quotes). That creates a 250FP pirate fleet named Armada, which was ~40 ships large when I tested it. The 0.6 is the quality modifier; if you want a tougher fight you can bump that up to 1.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: UnamusedPotato on July 04, 2015, 01:41:46 AM
Thanks a lot.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: Cyan Leader on August 26, 2015, 08:49:05 PM
I was messing around with the SpawnFleet command, and the quality seems to be only for the ships total CR, right?

Is it possible to spawn fleets with crew that isn't Green and have some levels?
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on August 26, 2015, 10:31:57 PM
Adding an optional crew level argument to SpawnFleet wouldn't be difficult. I'll put it on my todo list. Leveled officers is more complicated, but I'll see what I can do.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: Cyan Leader on August 26, 2015, 11:16:00 PM
Much appreciated.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: Midnight Kitsune on October 29, 2015, 07:04:12 PM
So it looks like the traitor command doesn't make a ship's drones friendly, even ones deployed after the ship switches sides
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on October 29, 2015, 07:42:58 PM
Thanks for the report! Changed it so Traitor also switches sides of any deployed drones. New drones still have the old owner, but that's an issue with the ship system itself. I'll ask Alex about it. Edit: And fixed for 0.7a. Thanks, Alex!
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: Histidine on October 29, 2015, 11:57:25 PM
On that note, perhaps Traitor should flip entire fighter wings instead of just the one targeted fighter.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: LazyWizard on October 30, 2015, 12:21:47 AM
But that would make too much sense. Ha ha. Ha. Ha.

Fixed.
Title: Re: [0.65.2a] Console Commands v2.4b (released 2015-03-08)
Post by: J33v3s on November 19, 2015, 02:58:36 PM
Although I'm aware the current release was for 0.65.2a, I thought I'd let you know console doesn't appear to work on the campaign map with the 0.7a release. As unhelpful as that comment is, unfortunately that's all I get. Nothing at all appears to happen when I press ctrl + backspace. Even tried typing after pressing ctrl + backspace and no text appeared.
It does, however, appear to work in combat fine.


*EDIT*
Should add that's with both the previous and current versions of LazyLib

Thanks :)
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: LazyWizard on November 19, 2015, 06:08:20 PM
Version 2.5 is up, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.5.zip) (mirror (http://www.mediafire.com/download/tyxzv9a56p82w3n/Console_Commands_2.5.zip)). Still requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

Changelog:
Quote
2.5 (November 19, 2015)
=========================
Updated to be compatible with Starsector 0.7a
Updated custom command template with more examples + documentation
Changed some constants in CommonStrings, shouldn't affect any custom commands
Removed AddLogistics command (logistics no longer exists in current version)
New commands:
 - Clear, clears the text from the campaign pop-up
 - Flameout, disables all engines of current target
 - Rout, forces the enemy side into a full retreat
Changes to existing commands:
 - AddShip won't let you spawn fighter wings as ships anymore
 - AdjustRelationship and SetRelationship typo correction work properly now
 - InfiniteCR stops the CR timer from counting down, doesn't prevent bonuses
   from raising your current CR above the ship's maximum
 - ShowBounds optimized, doesn't draw in menus, also shows new elliptical target
   radius used by AI since 0.65.2a
 - SpawnFleet ensures there is at least 150 su of space between the player and
   the new fleet, pings the new fleet to show its position
 - SpawnFleet supports typo correction for faction argument
 - Added optional crew level argument to SpawnFleet command, made quality
   optional as well; syntax is now "spawnfleet <faction> <totalFleetPoints>
   [optionalQuality] [optionalCrewLevel] [optionalFleetName]"
   Examples of valid syntax:
    "spawnfleet hegemony 150"
    "spawnfleet hegemony 150 0.6"
    "spawnfleet hegemony 150 0.6 veteran"
    "spawnfleet hegemony 150 0.6 veteran System Defense Fleet"
 - Storage searches all markets for an unlocked storage tab, not just stations
 - Suicide works on the campaign map, destroys your entire fleet
 - Traitor swaps side of all members of a fighter wing
 - Traitor also affects any drones currently deployed by the selected ship
Greatly expanded the bundled Example Mod-Added Commands mini-mod:
 - This can be found in a zip in the main folder and contains sample
   implementations of some simple commands (mostly jokes)
 - Echo, the most basic example. Just prints the entered text to the console.
 - DogPile, causes all hostile fleets in the system to attempt to intercept
   the player
 - FlipShips, flips all ships on the battle map 180 degrees
 - FlakJacket, causes a constant circle of flak to rain around your flagship
 - ForeverAlone, prevents you from touching other fleets and vice versa
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Cyan Leader on November 19, 2015, 07:39:04 PM
Excellent, thanks for the quick release.
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Sy on November 20, 2015, 12:57:32 AM
yup, thanks a bunch for the speedy update, you saved my poor pirate! ^_^
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: kruqnut on November 20, 2015, 10:32:31 AM
new game is brutal lol need this, thanks!
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Midnight Kitsune on November 20, 2015, 11:03:19 AM
Now that I'm in the right area...
Would it be possible to add a command that adds an officer to your fleet, with the option to set their personality and/ or level?
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: LazyWizard on November 20, 2015, 01:53:22 PM
Now that I'm in the right area...
Would it be possible to add a command that adds an officer to your fleet, with the option to set their personality and/ or level?

Added!
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Sy on November 20, 2015, 02:10:50 PM
Added!
i was just about to ask "already?! are you a wizard?", but, well....
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: cpmartins on November 21, 2015, 11:18:23 AM
I got shafted big time by the new inter-faction mechanics, but luckily I have a wizard on my side. Thanks for the update my good man.
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Pyxll on November 22, 2015, 12:18:11 PM
So I believe I installed the mod correctly, but I get this error when I start the game:

Fatal: org/lazywizard/lazylib/JSONUtils
Cause: org.lazywizard.lazylib.JSONUtils

Let me know if I did something wrong or what I need to do to fix it, thanks!  :)
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Sy on November 22, 2015, 12:28:07 PM
sounds like you just need to download and install the LazyLib mod, which is required for Console Commands (and for many other mods). download link is in the opening post, next to the download for Console Commands.
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Schwartz on November 22, 2015, 12:40:03 PM
The 'Respec' command gives you way more skill points than you should have. Does it still work off the old progression?
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Aklyon on November 22, 2015, 03:45:06 PM
The 'Respec' command gives you way more skill points than you should have. Does it still work off the old progression?
Are you sure you didn't have that many points in the first place? It worked fine when I used it.
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: LazyWizard on November 22, 2015, 04:08:51 PM
The 'Respec' command gives you way more skill points than you should have. Does it still work off the old progression?

It doesn't use the progression plugin, it counts your spent points and refunds them using the skill/aptitude lists provided by the API. It shouldn't be possible for it to give you more points than you started with.

Spoiler
Code: java
package org.lazywizard.console.commands;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;
import org.lazywizard.console.BaseCommand;
import org.lazywizard.console.CommonStrings;
import org.lazywizard.console.Console;

public class Respec implements BaseCommand
{
    @Override
    public CommandResult runCommand(String args, CommandContext context)
    {
        if (!context.isInCampaign())
        {
            Console.showMessage(CommonStrings.ERROR_CAMPAIGN_ONLY);
            return CommandResult.WRONG_CONTEXT;
        }

        Console.showMessage("Performing respec...");

        // Refund aptitudes
        int total;
        final MutableCharacterStatsAPI player
                = Global.getSector().getPlayerFleet().getCommanderStats();
        for (String currId : Global.getSettings().getSortedAbilityIds())
        {
            total = (int) player.getAptitudeLevel(currId);
            if (total > 0)
            {
                Console.showMessage(" - removed " + total + " points from aptitude " + currId);
                player.setAptitudeLevel(currId, 0f);
                player.addAptitudePoints(total);
            }
        }

        // Refund skills
        for (String currId : Global.getSettings().getSortedSkillIds())
        {
            total = (int) player.getSkillLevel(currId);
            if (total > 0)
            {
                Console.showMessage(" - removed " + total + " points from skill " + currId);
                player.setSkillLevel(currId, 0f);
                player.addSkillPoints(total);
            }
        }

        Console.showMessage("Respec complete.");
        return CommandResult.SUCCESS;
    }
}
[close]
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Schwartz on November 22, 2015, 04:16:05 PM
I figured it out. It doesn't refund aptitude points. But it gives me the number of aptitude points I've spent and adds them to my skill points.

This is in RC10. Mods're up to date. The save started in RC7, though.
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: LazyWizard on November 22, 2015, 04:53:08 PM
Right. I see what's wrong with it now. It should be fixed for the next release.
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Midnight Kitsune on November 23, 2015, 05:19:33 PM
If possible you might want to update the spawn fleet command to include officers
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Chronosfear on November 27, 2015, 06:22:20 AM
Hi
Is there a command to reset/set relation of all factions to amount x ( 0 for me )
I only could find the one to change it for one faction a time and only +/- x amount

Since i started using the savetransfer I thought it would be nice to  reset my relations to 0 after "restarting" the game.

Chronosfear

Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: LazyWizard on November 27, 2015, 03:05:45 PM
If possible you might want to update the spawn fleet command to include officers

I'll see what I can do. SpawnFleet needs a complete overhaul anyway (again!), since it's still using the old fleet generation methods.

Hi
Is there a command to reset/set relation of all factions to amount x ( 0 for me )
I only could find the one to change it for one faction a time and only +/- x amount

Since i started using the savetransfer I thought it would be nice to  reset my relations to 0 after "restarting" the game.

Chronosfear

There's SetRelationship (sets relation to entered value) and AdjustRelationship (modifies existing relation by what you entered). Both are a pain to use, so I just made some changes for the next version:
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Sy on November 27, 2015, 11:21:26 PM
those changes sound perfect! i use the AdjustRelationShip command frequently in my current run, and these will safe me a lot of typing :D
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Auraknight on November 30, 2015, 05:43:38 PM
is there any way we could get an 'addcommander' or some way to get commanders with specific personalities?
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: LazyWizard on November 30, 2015, 05:53:30 PM
There will be an AddOfficer command in the next version! :)

I'll try to get the next version out soon. Here is the changelog so far:
Quote
2.6 (December XX, 2015)
=========================
New features:
 - Command tab completion. Press tab to cycle through all matches for the
   current command from the cursor onwards (campaign input dialog only)
New commands:
 - AddOfficer, adds a skilled officer to the player fleet
 - Hide, makes the player fleet invisible to other fleets
 - ListStorage, lists everything you've left in a storage tab and its location
Changes to existing commands:
 - AddShip uses list of all variants added to the API in 0.7a, doesn't care
   about miscapitalizations in variant IDs (requires 0.7a-RC10 hotfix)
 - Jump positions the player fleet a safe distance away from the system's star
 - Jumps to hyperspace in systems without a hyperspace anchor will work,
   teleport you to the center of hyperspace
 - List accepts arguments "planets" and "variants" (VERY spammy), "markets" now
   shows the location, owning faction, and their relationship with the player
 - Respec properly refunds aptitude points again
 - Reveal works on the campaign map, maximizes sensor range and strength
   (both have a hard cap, so revealing the entire map isn't feasible)
 - AdjustRelationship/SetRelationship changes:
   - Renamed to AdjustRelation/SetRelation
   - If only one faction is entered, use player faction as the target
   - If "all" is entered as argument, changes relation with all other factions
   - RepLevels are allowed as an argument ("friendly", "hostile", etc)
 - SpawnFleet adds officers to the created fleet, levels based on quality factor
   (note: SpawnFleet no longer matches vanilla fleet compositions post-0.7a)
New aliases:
 - ar -> AdjustRelation
 - sr -> SetRelation
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Schwartz on November 30, 2015, 08:22:34 PM
Is it possible to add a Respec for officers?

It would also be helpful if a blank Adjust- or SetRelationship command listed all targets for the command. I had to dig around in the Starsector folder last time for the faction names, because the auto-complete mechanic didn't want to pick up on 'Sindrian' or 'Diktat' for some reason.

Anyway, thanks for the update. I love the console.
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: LazyWizard on November 30, 2015, 08:46:29 PM
Is it possible to add a Respec for officers?

It's not possible to the best of my knowledge. We don't have the ability to remove levels, so they wouldn't earn their replacement skills properly. I'll mess around with it just in case I'm wrong, though.

Quote
It would also be helpful if a blank Adjust- or SetRelationship command listed all targets for the command. I had to dig around in the Starsector folder last time for the faction names, because the auto-complete mechanic didn't want to pick up on 'Sindrian' or 'Diktat' for some reason.

Added. In the meantime you can use "list factions".

Quote
Anyway, thanks for the update. I love the console.

My pleasure. :)
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Auraknight on December 01, 2015, 12:35:16 AM
The reveal is gonna be hella handy, but one I'd also really really appreciate is hide.
Any method possible of making us completely invisible?
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: LazyWizard on December 01, 2015, 12:39:23 AM
2.6 (December XX, 2015)
=========================
[...]
New commands:
 - AddOfficer, adds a skilled officer to the player fleet
 - Hide, makes the player fleet invisible to other fleets

 - ListStorage, lists everything you've left in a storage tab and its location

;)
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Auraknight on December 01, 2015, 01:07:13 PM
2.6 (December XX, 2015)
=========================
[...]
New commands:
 - AddOfficer, adds a skilled officer to the player fleet
 - Hide, makes the player fleet invisible to other fleets

 - ListStorage, lists everything you've left in a storage tab and its location

;)
I swear.
I looked it over to make sure it wasn't there before I asked @.@
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Sy on December 01, 2015, 02:29:50 PM
I swear.
I looked it over to make sure it wasn't there before I asked @.@
you just can't trust wizards and their crazy magics.
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Auraknight on December 02, 2015, 08:29:17 PM
Right, i think I got one that you don't have! I _DOUBLE_ checked both the lists
Is there any way to clear a specific fleet from the campaign screen? or failing that, destroy all spawned fleets?
Title: Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
Post by: Chronosfear on December 03, 2015, 08:41:03 PM
I may have found a bug/issue
The "allhulls" command adds all ships to the "storage" each time it is used while "allweapons" only stocks to 1 stack of 10

I think "allweapons" could be expanded to put a full stack in the "storage"
while "allhulls" should only "refill" the storage.

Having over 500 ships in the Storage doesn`t do well with performance when trying to take a ship from it  :o
Maybe the clear command could get an expansion to clear the storage ( tried clear storage but didn´t work )
Title: Re: [0.7a] Console Commands v2.6 (released 2015-12-03)
Post by: LazyWizard on December 03, 2015, 08:59:45 PM
Version 2.6 is up, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.6.zip) (mirror (http://www.mediafire.com/download/0gdqaqd097mh83a/Console_Commands_2.6.zip)). Still requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

Changelog:
Quote
2.6 (December 03, 2015)
=========================
Console output in combat uses combat messages instead of floating text
CommandUtils findBestXMatch() checks IDs before names (fixes Nexerelin issue)
New features:
 - Command tab completion. Press tab to cycle through all matches for the
   current command from the cursor onwards, shift+tab to reverse order
   (does not work for arguments, available in the campaign input dialog only)
New commands:
 - AddOfficer, adds a skilled officer to the player fleet
 - Hide, makes the player fleet invisible to other fleets
 - OpenMarket, opens any market's interaction dialog from any system
 - RemoveHulks, destroys all hulks on the battle map
Changes to existing commands:
 - AddShip uses list of all variants added to the API in 0.7a, doesn't care
   about miscapitalizations in variant IDs (requires 0.7a-RC10 hotfix)
 - AllHulls won't add any hulls that already exist in the target's cargo
 - AllWeapons gives up to 1,000 of each weapon (used to give 10)
 - Jump positions the player fleet a safe distance away from the system's star
 - Jumps to hyperspace in systems without a hyperspace anchor will teleport you
   to the center of hyperspace as a fallback
 - List accepts arguments "planets" and "variants" (VERY spammy), "markets" now
   shows the location, owning faction, and their relationship with the player
 - Respec properly refunds aptitude points again
 - Reveal works on the campaign map, maximizes sensor range and strength
   (both have a hard cap, so revealing the entire map isn't feasible)
 - AdjustRelationship/SetRelationship changes:
   - Renamed to AdjustRelation/SetRelation
   - If a non-existent faction is entered, show list of valid faction IDs
   - Show both name and ID of affected factions (formerly only showed names)
   - If only one faction is entered, use player's current faction as the target
   - If "all" is entered as argument, changes relation with all other factions
   - RepLevels are allowed as an argument ("friendly", "hostile", etc)
 - SpawnFleet adds officers to the created fleet, levels based on quality factor
   (note: SpawnFleet no longer matches vanilla fleet compositions post-0.7a)
 - SpawnFleet properly sorts fleet members of created fleets
New aliases:
 - ar -> AdjustRelation
 - sr -> SetRelation
Title: Re: [0.7a] Console Commands v2.6 (released 2015-12-03)
Post by: Midnight Kitsune on December 03, 2015, 09:05:19 PM
Does remove hulks destroy them or just de-spawn them? The difference being that destroyed hulks don't give salvage
Title: Re: [0.7a] Console Commands v2.6 (released 2015-12-03)
Post by: LazyWizard on December 03, 2015, 09:13:36 PM
Destroys, if you downloaded before I posted this message. Deletes, if you downloaded after. Invisible update, go!
Title: Re: [0.7a] Console Commands v2.6 (released 2015-12-03)
Post by: Auraknight on December 03, 2015, 10:03:01 PM
niiiice, this'll make things loads easier for my tests!
Right, i think I got one that you don't have! I _DOUBLE_ checked both the lists
Is there any way to clear a specific fleet from the campaign screen? or failing that, destroy all spawned fleets?
^I'm guessing this isn't possible?
EDIT:
Allhulls no longer adds extra ships to storage, (as intend) but allwings does. intentional?
Title: Re: [0.7a] Console Commands v2.6 (released 2015-12-03)
Post by: LazyWizard on December 03, 2015, 10:26:45 PM
Right, i think I got one that you don't have! I _DOUBLE_ checked both the lists
Is there any way to clear a specific fleet from the campaign screen? or failing that, destroy all spawned fleets?
^I'm guessing this isn't possible?

It's possible, I just didn't get around to it in time. I wanted to get this release out quickly due to some issues the old version had.

I'll see about adding a command to remove fleets for the next version.
Title: Re: [0.7a] Console Commands v2.6 (released 2015-12-03)
Post by: Chronosfear on December 04, 2015, 10:20:07 AM
Your spawnfleet got a little bug , it seems EVERY ship now has an officer  ;D
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 04, 2015, 02:11:36 PM
Version 2.6b is up, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.6b.zip) (mirror (http://www.mediafire.com/download/yccekl40beh3hhn/Console_Commands_2.6b.zip)). Still requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

Changelog:
Quote
2.6b (December 04, 2015)
==========================
Changes to existing commands:
 - AllWings won't add any wings that already exist in the target's cargo
 - SpawnFleet gives an actually playable ratio of officers:
   Adds 1 officer per 8 combat-ready ships (minimum 2, maximum 15 officers)
 - SpawnFleet ensures massive fleets aren't spawned touching the player fleet

Your spawnfleet got a little bug , it seems EVERY ship now has an officer  ;D

Ah, the danger of thinking a minor last-minute change isn't worth testing. :)
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Auraknight on December 04, 2015, 04:18:07 PM
(I have a sneaking suspicion I'm am partially responsible for the change of making sure fleets are not touching the player on spawn >.>)
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 04, 2015, 04:20:31 PM
(You may be right)
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Midnight Kitsune on December 04, 2015, 04:22:40 PM
Your spawnfleet got a little bug , it seems EVERY ship now has an officer  ;D
Ah, the danger of thinking a minor last-minute change isn't worth testing. :)
I don't want to update now as I kinda liked this idea
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Auraknight on December 04, 2015, 06:22:50 PM
Your spawnfleet got a little bug , it seems EVERY ship now has an officer  ;D
Ah, the danger of thinking a minor last-minute change isn't worth testing. :)
I don't want to update now as I kinda liked this idea
it IS the sort of thing that would make for a very neat option. maybe an argument (if that's the right word?) that lets you tell the spawner how many captains to spawn in the fleet, and otherwise defaults to how it is now?
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Chronosfear on December 05, 2015, 02:42:04 AM
Your spawnfleet got a little bug , it seems EVERY ship now has an officer  ;D
Ah, the danger of thinking a minor last-minute change isn't worth testing. :)
I don't want to update now as I kinda liked this idea
it IS the sort of thing that would make for a very neat option. maybe an argument (if that's the right word?) that lets you tell the spawner how many captains to spawn in the fleet, and otherwise defaults to how it is now?
I would like that.
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Zelnik on December 11, 2015, 11:34:19 AM
Looks like your mod crashes the latest version of the game.


Error looks like this

Fatal:Error compiling [org.lazywizard.console.ConsoleCombatListener]
cause:org.lazywizard.console.consolecombatlistener


Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 11, 2015, 02:21:20 PM
Could you post the end of starsector.log after a crash? This file is in starsector-core in the game's installation folder.

There's only been one change to ConsoleCombatListener within the last several months, and that was to make console output show up at the top of the screen instead of as floating text. You're sure you're running the latest version of Starsector (the change relies on API additions in 0.7a), and have LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0) installed as well?
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: speeder on December 11, 2015, 03:33:16 PM
I can't get my command to work...

I added inside my mod folder a data/commands

inside that folder I put a .java file with my script, and a .csv file, as per tutorial instructions on first page...

Nothing happened, good, or bad.

What I did wrong?
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 11, 2015, 03:39:31 PM
It's most likely a misnamed/malformed data/console/commands.csv, though it's also possible there was an error loading the command (unlikely unless you're not using an IDE).

Try using the command "reload". It will show any exceptions that occur while loading in the console. If no errors show up then the csv is the culprit.


Edit:
I added inside my mod folder a data/commands

It's actually supposed to be in data/console. That might be your problem. ;)
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: speeder on December 11, 2015, 03:50:24 PM
Oh, it is data/console/commands

I made a typo in the post :P

Still how it is:

my mod has on its root folder data/console/commands

on data/console/commands.csv there is this:

CSEShowAllStocks,data.console.commands.ShowAllStocks,"CSEMod,campaign",ShowAllStocks (no arguments),"This just show the stock and average price of all commodities."

and on data/console/commands/ folder there is ShowAllStocks.java file


Typing "reload" give no error messages.
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 11, 2015, 04:14:19 PM
Huh, and you have the csv's header (command,class,tags,syntax,help), too?

If so, it should be working given what you've described. Could you send me a copy of your mod so I could take a closer look?
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: speeder on December 11, 2015, 04:30:34 PM
There was two problems:

One, the csv was "something" wrong, I have no idea what.

I deleted my csv, but instead of copying the one that comes with the mod, I copied the one from the example, and then added my line to it instead...

now my class attempted to load.

now it refuses to work due to janino hating List it seems :(

Any idea on how I make a console command that use a "List" somehow? (I just want to dump all information from the CommodityStatTracker)
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 11, 2015, 04:38:07 PM
now it refuses to work due to janino hating List it seems :(

Any idea on how I make a console command that use a "List" somehow? (I just want to dump all information from the CommodityStatTracker)

Janino is fine with Lists, it just hates generics and foreach loops (among other things). So if it's a List<CommoditySpecAPI>, you'd change the code from this:
Code: java
List<CommoditySpecAPI> specs = getAllSpecs();
for (CommoditySpecAPI spec : specs)
{
   doSomething(spec);
}

To this:
Code: java
List specs = getAllSpecs();
for (Iterator iter = specs.iterator(); iter.hasNext(); )
{
   CommoditySpecAPI spec = (CommoditySpecAPI) iter.next();
   doSomething(spec);
}

Alternatively you could use a jar and bypass Janino's limitations completely, though that's a significant step up in mod complexity if you don't already know how to do it.
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: speeder on December 11, 2015, 04:46:49 PM
My mod already has a .jar...

I made a .java because your tutorial never said it also accepts .jars :P

Neither explains how to do it... (ie: to what I need to point the csv to, and how I load my jar with commands, and how I make my jar don't cause bugs if the player don't have console commands mod)

EDIT: Oh, your suggestion worked, indeed it was only a generics AND foreach issue, stripping them away worked :)
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 11, 2015, 05:10:36 PM
So, the way it works is that the console mod handles loading all commands and their classes. The commands.csv tells the console where to look for these scripts (the class row) and how the player uses the command (command is what they enter to use it, syntax and help are shown by the "help" command, and syntax is also shown to the player if the command returns CommandResult.BAD_SYNTAX). It doesn't know or care if these scripts are loose or in a jar as the actual class loading is done through Starsector's classloader (which supports both).

Since the console mod handles everything, the CSV won't be read and nothing will be loaded if the console isn't enabled in the launcher. Java only loads classes when they are needed, so don't worry about including commands in your mod's jar.

The sole exception to the "don't worry about creating a dependency" rule is any loose script in data/scripts, which is a magic directory whose contents are automatically compiled by Starsector when the game starts. That's why the tutorial recommends putting scripts in data/console, so you don't accidentally create a dependency on the console mod. The tutorial doesn't mention jars because it's old and was written before they became commonplace.

tl;dr: commands can be in jars, don't worry about creating a dependency, the tutorial is outdated. :)
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Zelnik on December 11, 2015, 09:03:12 PM
sorry this took so long, had to go to work

17147 [Thread-5] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error compiling [org.lazywizard.console.ConsoleCombatListener]
java.lang.RuntimeException: Error compiling [org.lazywizard.console.ConsoleCombatListener]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lazywizard.console.ConsoleCombatListener
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 11, 2015, 09:07:52 PM
Could you try redownloading? It sounds like you may be missing some parts of the mod.
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Zelnik on December 11, 2015, 09:14:27 PM
I did, from the mirror, it now works.
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Midnight Kitsune on December 12, 2015, 11:41:52 PM
Got another bug for that traitor command: missiles launched from the traitorous ship will target said launching ship BUT will not connect
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Cyan Leader on December 13, 2015, 02:57:18 PM
I'm a little confused with the ForceMarketUpdate command. What exactly does it update? The markets inventories seem to be always the same after I run the command.
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 13, 2015, 03:02:28 PM
Got another bug for that traitor command: missiles launched from the traitorous ship will target said launching ship BUT will not connect

Fixed, thanks for letting me know.

I'm a little confused with the ForceMarketUpdate command. What exactly does it update? The markets inventories seem to be always the same after I run the command.

Vanilla submarkets only refresh their stock once every thirty days, and only when you visit them. ForceMarketUpdate simulates the player entering every non-storage submarket of every market, forcing the stock to rollover if enough time has passed. It's only useful before using FindShip or FindItem, so I should probably just remove it and move the code to those two commands.
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Cyan Leader on December 14, 2015, 06:42:58 AM
I see. Would it be possible then to have a command that would force the refresh the inventory of a specific market as soon as you enter the command?

It'd be very useful.
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: speeder on December 14, 2015, 08:05:13 AM
So, the way it works is that the console mod handles loading all commands and their classes. The commands.csv tells the console where to look for these scripts (the class row) and how the player uses the command (command is what they enter to use it, syntax and help are shown by the "help" command, and syntax is also shown to the player if the command returns CommandResult.BAD_SYNTAX). It doesn't know or care if these scripts are loose or in a jar as the actual class loading is done through Starsector's classloader (which supports both).

Since the console mod handles everything, the CSV won't be read and nothing will be loaded if the console isn't enabled in the launcher. Java only loads classes when they are needed, so don't worry about including commands in your mod's jar.

The sole exception to the "don't worry about creating a dependency" rule is any loose script in data/scripts, which is a magic directory whose contents are automatically compiled by Starsector when the game starts. That's why the tutorial recommends putting scripts in data/console, so you don't accidentally create a dependency on the console mod. The tutorial doesn't mention jars because it's old and was written before they became commonplace.

tl;dr: commands can be in jars, don't worry about creating a dependency, the tutorial is outdated. :)

Thanks for this!

I was having two issues: One... my lastest command got HATED by Janino...

Second issue, my IDE don't liked the java files elsewhere and keep bugging out :(
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Auraknight on December 16, 2015, 02:04:15 AM
Is there a way to get errorlogs from Console commands for you Lazy? i'd post one with this, but I don't know how to get it. Pretty easy to replicate though, and the first ines of text where a null point error
While in-game in Ironclads trying the allhulls, allwings, commands gives a very long error. allweapons still works, as do several other commands.
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 16, 2015, 02:22:44 AM
I see the problem. AllHulls without arguments will try to place it in an unlocked storage tab (the same one accessed by the "storage" command, which is the first unlocked storage tab it can find, and almost always the Abandoned Terraforming Platform in vanilla). Ironclads, however, doesn't have any storage tabs that are unlocked at game start.

This will be fixed for the next release. In the meantime this will resolve itself after you purchase a storage tab somewhere, or you can use "allhulls player" to add the hulls directly to your fleet.
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: Auraknight on December 16, 2015, 02:30:43 AM
I see the problem. AllHulls without arguments will try to place it in an unlocked storage tab (the same one accessed by the "storage" command, which is the first unlocked storage tab it can find, and almost always the Abandoned Terraforming Platform in vanilla). Ironclads, however, doesn't have any storage tabs that are unlocked at game start.

This will be fixed for the next release. In the meantime this will resolve itself after you purchase a storage tab somewhere, or you can use "allhulls player" to add the hulls directly to your fleet.
If the storage thing is the case, why would Allweapons work then? I thought that might have been it, but with the allweapons working and putting them in a storage anyways..?
EDIT:
Alright, so after actually trying to ACCESS said storage, it doesn't exist, but the allweapons still deposits weapons into this? Dunno how that works, just thought I'd let you know.
EDIT2: I think I got it. it put them in my inventory instead >.< and it can't do this with ships, presumably, due to the fleet limit. Self-problem solved!
Title: Re: [0.7.1a] Console Commands v2.6b (released 2015-12-04)
Post by: LazyWizard on December 16, 2015, 02:39:13 AM
There's supposed to be a fallback if a storage tab wasn't found, but a change to how storage worked a few versions ago broke the fallback for ships (items will go to the player inventory).

Edit: ninja'd by your edits. :)
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on December 16, 2015, 03:38:12 PM
Version 2.7 is up, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.7.zip) (mirror (http://www.mediafire.com/download/3i7woci934s1hs8/Console_Commands_2.7.zip)). Still requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

There are no new commands in this release, but several of the old ones work in new ways. The focus of this update (as with the last several) has been in making the mod more user-friendly.

Changelog:
Quote
2.7 (December 16, 2015)
=========================
Newlines (\n) in a command's 'help' column are displayed correctly
Exception stack traces are no longer shown by default
Added "showExceptionDetails" to console_settings.json
Updated the custom command tutorial in the base folder
Changes to existing commands:
 - AddCrew without a quantity will add all needed skeleton crew to your fleet
 - AddFuel without a quantity will top off your fleet's fuel tanks
 - AddShip: fixed regression that allowed you to spawn single fighters again
 - AddSupplies without a quantity will fill half the player cargo with supplies
   (won't go over cargo capacity, won't go over 50% total cargo as supplies)
 - AllHulls and AllWings won't cause an error if used in a total conversion
   that lacks an unlocked storage tab
 - FindItem/FindShip list goods in free transfer submarkets last (useful for
   reminding yourself which storage tab you left a specific ship/weapon in)
   Note: due to API limitations this does not include anything in storage in the
   Abandoned Terraforming Platform or any other market that doesn't participate
   in the economy!
 - ForceMarketUpdate actually forces a market refresh each time you use it
   (previously only refreshed stock if the market would have done so on a visit)
 - InfiniteAmmo also applies to ship systems that have limited uses
 - Kill works on the campaign map, destroys any fleet you click on until you
   press escape or enter a menu (kills are not credited to the player)
 - List accepts a second argument, used to filter out any IDs that don't start
   with that argument (ex: "list variants exi_" will show all Exigency variants,
   "list variants hound" will show all hound and hound subskin variants)
 - Traitor affects guided missiles fired by that ship (no more targeting itself)
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: Taverius on December 16, 2015, 07:09:56 PM
I probably haven't said this in a while, so thank you for Console - even though I only really use Respec and OmnifacStatus - and everything else too :D
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: Nanao-kun on December 17, 2015, 11:01:48 AM
How long does FoceMarketUpdate take usually?
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on December 17, 2015, 05:22:07 PM
@Taverius: thanks, I enjoy making them. :)

How long does FoceMarketUpdate take usually?

For me (on a computer from 2007), ForceMarketUpdate takes a little over two seconds in a Nexerelin game with every sector generation parameter maxed out. In vanilla the delay is barely noticeable, maybe half a second? I didn't test it with the various faction mods; the command might take longer if they do something special in a custom submarket plugin's updateCargoPrePlayerInteraction() method.
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: sycspysycspy on January 18, 2016, 11:11:44 PM
Is it possible to include command to change the sensor range?
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: Midnight Kitsune on January 19, 2016, 12:36:00 PM
Is it possible to include command to change the sensor range?
Already in. If you use reveal on the campaign map, it gives you maxed out (5K) sensor range
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: Drewsen on January 27, 2016, 01:26:14 PM
I am trying to add a Plasma Cannon, but addweapon is not working for me, it worked when I added a weapon already in my inventory.

I assume the weapon ID is just the name of the weapon? it seems to not like spaces in the weapon name..

It says 'add 1 of weapon null to player inventory' but when I check there is nothing there.
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: JohnDoe on January 27, 2016, 01:33:04 PM
id for Plasma Cannon is "plasma", not "plasmacannon".
You can check weapon ids in Starsector\starsector-core\data\weapons\weapon_data.csv
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: FelixG on February 11, 2016, 06:32:26 AM
Odd, I have the game set to boarderless windowed mode, but when I hit Ctrl + Backspace in combat nothing happens, no box appears to take my command, nothing appears along the side like in campaign, etc.
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on February 11, 2016, 12:32:04 PM
It sounds like the pop-up didn't get focus for some reason. You should be able to alt+tab to it.
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: FelixG on February 12, 2016, 09:14:53 PM
I tried doing so and there is nothing waiting in the background
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: Ali on February 14, 2016, 01:19:50 PM
Is it possible to do a code to stop xp gain please?

So when your at max level you won't keep getting points you can't spend?

Also not sure if poss to do an "add/remove" command for hullmods?

Many thanks
AL
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: SierraTangoDelta on February 21, 2016, 10:07:32 PM
Can any of these commands be used to put a faction back into the game after it is defeated completely, or to change ownership of a planet?
I'm in a game right now and the Knights Templar got killed off ridiculously early somehow, and I want to still have them in my game.
Title: Re: [0.7.1a] Console Commands v2.7 (released 2015-12-16)
Post by: Midnight Kitsune on February 21, 2016, 11:27:35 PM
Can any of these commands be used to put a faction back into the game after it is defeated completely, or to change ownership of a planet?
I'm in a game right now and the Knights Templar got killed off ridiculously early somehow, and I want to still have them in my game.
Yup and it is a two for one thing as well! Simply look for a command named something like "changemarketowner" and you should be able to use that to add in the templars
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: OrangeLima on March 02, 2016, 10:43:43 AM
I'm making this post to obtain a temporary fix to a persistent problem in the current release pertaining to a old save of mine (0.7.1a).

I am wondering how to set the relationship of one faction against another so that they cease to be at war?

Currently in 0.7.2a my Tri-Tach faction is hostile with the Independent faction and this has failed to cease its hostilities after a very very long time. I presume this has been caused to due to the fact that Independent does not participate in faction hostilities in 0.7.2a but did in previous releases.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on March 02, 2016, 10:50:07 AM
The command setrelation tritachyon independent 0 should make them neutral towards each other.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: CitizenJoe on March 03, 2016, 04:54:44 PM
The console doesn't seem to be working in-combat with .7.2a
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on March 03, 2016, 05:13:55 PM
With 0.7.2a you will have to alt-tab to the combat input popup the first time you use it. It should successfully request focus afterwards, so you'll only have to do this once per play session.

I'll try to have it fixed for v2.8.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Cyan Leader on March 05, 2016, 05:04:12 PM
Is there a console command to force the AI to always fight (during combat, not campaign), at full power even (read: launch everything first wave)? It gets annoying during mid/late game when majority of fleets will just run away during combat.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Dubby on April 01, 2016, 10:28:05 AM
Are there (will there be) any commands to manipulate [add] missions? Such as rare bounty missions on unique hostile fleets.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: EvilWaffleThing on April 06, 2016, 06:46:17 PM
A command to make fleets ignore you completely would be awesome
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: NightKev on April 06, 2016, 09:15:01 PM
A command to make fleets ignore you completely would be awesome
So basically setting your sensor profile to 0?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: EvilWaffleThing on April 06, 2016, 09:48:04 PM
Would that do it? If so then it would be very welcome.
Sometimes I just want to be able to hyperspace without wading through 12 fleets of losers who waste my time.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Midnight Kitsune on April 07, 2016, 01:21:28 AM
Would that do it? If so then it would be very welcome.
Sometimes I just want to be able to hyperspace without wading through 12 fleets of losers who waste my time.
Sadly the hide command, which does set your profile to zero, won't make you TOTALLY invisible
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on April 07, 2016, 01:39:52 AM
Would that do it? If so then it would be very welcome.
Sometimes I just want to be able to hyperspace without wading through 12 fleets of losers who waste my time.
Sadly the hide command, which does set your profile to zero, won't make you TOTALLY invisible

There's a zip in the mod folder that includes a second mod with some example/joke commands. One of them is "ForeverAlone", which prevents other fleets from touching yours. Combine that with Hide and you should be good.

It works both ways, though, so you'll have to toggle it off again when you want to attack something.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: EvilWaffleThing on April 07, 2016, 01:23:11 PM
Thank you very much
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Culverin on April 09, 2016, 12:37:24 AM
Hiya,

I have followed the instructions and I'm not running the game in Windowed mode (is it just me, or are you guys getting an FPS hit from it?)
Everything is working great, except for accessing the console during combat,
It seems inconsistent and buggy.

Once or twice, I have accessed it at the beginning of combat.
However, it doesn't work after accessing it a single time.
The dialogue box just won't come up anymore after that.

Any thoughts?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on April 09, 2016, 01:06:40 AM
Changes to the game's launcher in Starsector 0.7.2a mean that the Java UI classes needed by the combat console aren't initialized when the game starts. This means a slight delay (~1-2 seconds) the first time you summon the combat console each session, and the window usually won't switch focus automatically that first time. It should redirect focus properly in subsequent uses, or at least it does on my system (Windows 10). If you tried to summon the console multiple times there may still be an open input dialog or two that're preventing focus switching. Try alt+tabbing and closing any that are open.

I apologize for the inconvenience. This won't be an issue after the next release, which scraps the current campaign and combat input methods entirely in favor of a more traditional console using a custom font renderer.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Midnight Kitsune on April 09, 2016, 04:04:08 PM
I apologize for the inconvenience. This won't be an issue after the next release, which scraps the current campaign and combat input methods entirely in favor of a more traditional console using a custom font renderer.
Wow, that sounds awesome! Can't wait!
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: EvilWaffleThing on April 11, 2016, 01:57:58 AM
Hey there,
I just tried to launch the game with the mod active AND with the example commands that were recommended to me earlier and got a crash.
Here is the last few lines of the log it printed.
Spoiler
197411 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ssp/ships/ssp_dragon_bc.png (using cast)
197423 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/brawler.png (using cast)
197448 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ssp/ships/ssp_amalgam.png (using cast)
197483 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ssp/ships/ssp_punisher_dd.png (using cast)
197521 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/junk_pirates/ships/junk_pirates_octopus.png (using cast)
197553 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/junk_pirates/ships/junk_pirates_onslaught_overdrive.png (using cast)
197564 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/tarsus/tarsus_base.png (using cast)
197586 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/enforcer/enforcer_base.png (using cast)
197597 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/pack/ships/pack_wirefox_sh.png (using cast)
197653 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ssp/ships/boss/ssp_boss_falcon.png (using cast)
197663 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/hound/hound_luddic_church.png (using cast)
197690 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ssp/ships/ssp_bull.png (using cast)
197739 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/neut/ships/neutrino_april1.png (using cast)
197740 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/xyphos.png (using cast)
198533 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error compiling [org.lazywizard.console.ConsoleCombatListener]
java.lang.RuntimeException: Error compiling [org.lazywizard.console.ConsoleCombatListener]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lazywizard.console.ConsoleCombatListener
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more
[close]
Any ideas as to what I should do?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on April 11, 2016, 01:56:59 PM
Are you sure you still have the base console mod enabled?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: EvilWaffleThing on April 12, 2016, 03:27:42 AM
Disregard everything, I misunderstood the installation instructions.
What I had done was to drag the data folder from the example commands into the main console commands folder.
Thus overwriting it and breaking the mod.

I've since realized the example commands is supposed to be its own mod and have fixed the issue.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Julzjuice on April 17, 2016, 02:23:21 PM
I have a question guys: is it possible to disable the god mode command? I needed it to win an impossible fight with way to much things done without having saved before, but now I would like to undo the god mode... Is that possible?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Midnight Kitsune on April 17, 2016, 04:37:35 PM
I have a question guys: is it possible to disable the god mode command? I needed it to win an impossible fight with way to much things done without having saved before, but now I would like to undo the god mode... Is that possible?
Does retyping it work?
also if it is a battle command then I think it resets to normal after every fight
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Silver Silence on April 17, 2016, 07:23:34 PM
I have a question guys: is it possible to disable the god mode command? I needed it to win an impossible fight with way to much things done without having saved before, but now I would like to undo the god mode... Is that possible?

God, infinitecr, infiniteflux and all that stuff should reset after each fight but disabling them is just a matter of typing the same command again. "god" to turn godmode on, "god" to turn godmode off.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: rogerbacon on April 24, 2016, 09:04:41 AM
I just updated to the latest version of StarSector after not playing awhile. This mod worked great before (and thanks to the tutorial I even made my own commands) but now when I type ctrl-backspace nothing happens. Is there something in the base game I need to enable to make the console appear? It's been awhile since I played.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Histidine on April 25, 2016, 06:49:30 AM
I just updated to the latest version of StarSector after not playing awhile. This mod worked great before (and thanks to the tutorial I even made my own commands) but now when I type ctrl-backspace nothing happens. Is there something in the base game I need to enable to make the console appear? It's been awhile since I played.

If it's not appearing in campaign: dunno what's wrong

If it's not appearing in combat: The input goes into a separate window, which takes a while to appear the first time (it does give a pronounced framerate drop on my machine though) and doesn't automatically take focus. You need to Alt-Tab to it.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Drglord on April 25, 2016, 07:09:02 AM
Works fine in my end. But i have another problem it seems that bounties have stuck at 20.000k does anyone know what can be causing that? I am desperate here i even tried reinstalling the game. I wonder if i broke something with the commands. All bounties are 20.000 and i have a big fleet. So what constitutes what bounties are spawned?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: rogerbacon on April 25, 2016, 03:00:41 PM
I just updated to the latest version of StarSector after not playing awhile. This mod worked great before (and thanks to the tutorial I even made my own commands) but now when I type ctrl-backspace nothing happens. Is there something in the base game I need to enable to make the console appear? It's been awhile since I played.

If it's not appearing in campaign: dunno what's wrong

If it's not appearing in combat: The input goes into a separate window, which takes a while to appear the first time (it does give a pronounced framerate drop on my machine though) and doesn't automatically take focus. You need to Alt-Tab to it.

That was it. It was opening in the background. Alt-Tabbing brought it up. Thanks.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: EclecticFruit on April 25, 2016, 07:16:54 PM
Love the mod. Use it to find the ships I want next all the time. So any chance of a command for manipulating faction commissions?  ;D
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on April 26, 2016, 01:29:03 AM
Added a SetCommission command to the next version. Using "setcommission none" will end any current commission.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Sy on May 03, 2016, 11:49:26 PM
i think i found a little bug: using ctrl+v in the console when there's nothing in the clipboard crashes the game. :D
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: gruberscomplete on May 19, 2016, 02:05:28 PM
is there a command to spawn a variant with all weapons set-up?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on May 19, 2016, 03:10:37 PM
You can spawn vanilla variants by using AddShip with the variant ID. You can find the available variant IDs using the List command, for example "list variants onslaught", then "addship onslaught_Elite".
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Wyvern on May 19, 2016, 03:25:11 PM
This won't be an issue after the next release, which scraps the current campaign and combat input methods entirely in favor of a more traditional console using a custom font renderer.

That... would be an insanely useful chunk of code to use for, well, anything else that wants to let the player input or read stuff during gameplay.  Is this capability (custom font renderer & related utilities) going to go into the base LazyLib?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on May 19, 2016, 09:30:24 PM
The font loading and rendering classes will eventually make their way to LazyLib, but I should warn you that drawing text is all they do at the moment. There are a few methods to make life easier such as measuring a string before drawing or constraining rendering to an area, but any UI elements (input fields, scrollable text, etc) would have to be custom made.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: dannieb1abla on May 22, 2016, 08:45:17 AM
I just installed the mod on .7.2.a but ctrl backspace doesn't do anything. I went into the config and changed the key to "`" but that also didn't do anything. Perhaps it's because I'm on a mac?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Midnight Kitsune on May 22, 2016, 11:47:54 AM
I just installed the mod on .7.2.a but ctrl backspace doesn't do anything. I went into the config and changed the key to "`" but that also didn't do anything. Perhaps it's because I'm on a mac?
Where are you trying to use the console? In combat or in the campaign?
If in combat then try looking for a separate dialogue box outside of the game. It happens on windows but I don't know if it would happen on a mac
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: HELMUT on August 14, 2016, 04:59:58 AM
I don't think it have been asked before, but i'd like to request a command to unlock all hullmods in the campaign. This would be quite useful for testing purpose, not having to spend points on skills and screwing the stats of the ships. Something like "AllHullMods" would be handy.

Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: King Alfonzo on August 14, 2016, 05:46:46 PM
Another suggestion: a FindWing command? I am finding it increasingly difficult to locate mining pods.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: DownTheDrain on August 15, 2016, 03:15:14 AM
Are there any intricacies I'm missing with the "spawnfleet" command?
As far as I can tell I can only adjust the total points and crew level and I always end up with a random fleet composition with transponders off that instantly attacks me if hostile or wanders off to do whatever if neutral or friendly.

It would be nice to have templates or some such that determine composition and behavior, you know, for roleplaying purposes.
As it is now the only use of the command seems to be providing XP fodder, or maybe as a last-ditch effort to even the odds against a superior enemy in pursuit without cheating during the actual fight.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on August 15, 2016, 05:02:38 PM
I don't think it have been asked before, but i'd like to request a command to unlock all hullmods in the campaign. This would be quite useful for testing purpose, not having to spend points on skills and screwing the stats of the ships. Something like "AllHullMods" would be handy.

Good idea! It doesn't look possible with the current API, unfortunately. I'll have to make an API request and add it after the next Starsector update.


Another suggestion: a FindWing command? I am finding it increasingly difficult to locate mining pods.

You can use FindShip for wings, too. It uses the internal ID of the wing, which you can find with the command "list wings". In this case you're looking for mining_drone_wing.

It looks like it gives the same output if there are none for sale as it does when you enter a nonexistent id. I'll have that fixed for the next release.


Are there any intricacies I'm missing with the "spawnfleet" command?
As far as I can tell I can only adjust the total points and crew level and I always end up with a random fleet composition with transponders off that instantly attacks me if hostile or wanders off to do whatever if neutral or friendly.

It would be nice to have templates or some such that determine composition and behavior, you know, for roleplaying purposes.
As it is now the only use of the command seems to be providing XP fodder, or maybe as a last-ditch effort to even the odds against a superior enemy in pursuit without cheating during the actual fight.

SpawnFleet is a relic in desperate need of an update. It's using an outdated fleet spawning system that Starsector hasn't used in years, and in its current form is really only useful for making pinata fleets rather than spawning specific fleet types or testing faction compositions. I've been meaning to port it over to the new, significantly more complex vanilla fleet spawning system at some point, but I keep putting it off for other things.



I apologize for the next update taking so long to complete. I kind of drifted away from Starsector for a while, and progress almost completely halted for a few months (https://i.imgur.com/0uRvFus.png). I'd say it's currently about 70% finished.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: CaptainWinky on August 16, 2016, 10:36:28 AM
Are there any intricacies I'm missing with the "spawnfleet" command?
As far as I can tell I can only adjust the total points and crew level and I always end up with a random fleet composition with transponders off that instantly attacks me if hostile or wanders off to do whatever if neutral or friendly.

It would be nice to have templates or some such that determine composition and behavior, you know, for roleplaying purposes.
As it is now the only use of the command seems to be providing XP fodder, or maybe as a last-ditch effort to even the odds against a superior enemy in pursuit without cheating during the actual fight.

I like to use spawnfleet to even the odds, since (in Nex) you can get allied fleets to follow you but it gets annoying over a long distance, they sometimes get distracted by 2-ship pirate fleets, etc.  I just spawn a fleet from my faction once I reach my destination and let the approaching enemies run into them.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Cyan Leader on November 28, 2016, 07:39:01 AM
Would it be possible to add a command that would force the AI to always deploy the maximum amount of ships that they can?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Octavus on December 14, 2016, 03:57:02 PM
Say can anyone help me with discerning my problem, got my game in windowed mode, everything works fine, mods aren't conflicting, console table comes out outside of combat, but in combat nothing comes up, is it not ctrl-backspace to bring up console in combat?
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Midnight Kitsune on December 14, 2016, 04:08:57 PM
Say can anyone help me with discerning my problem, got my game in windowed mode, everything works fine, mods aren't conflicting, console table comes out outside of combat, but in combat nothing comes up, is it not ctrl-backspace to bring up console in combat?
Due to the changes in the launcher, the game has to launch some extra stuff when you use the console in combat now so it take a few seconds to pop up. I'd say wait about 10 seconds and then alt tab and you should see the launcher in a small separate window
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Octavus on December 14, 2016, 06:03:21 PM
Say can anyone help me with discerning my problem, got my game in windowed mode, everything works fine, mods aren't conflicting, console table comes out outside of combat, but in combat nothing comes up, is it not ctrl-backspace to bring up console in combat?
Due to the changes in the launcher, the game has to launch some extra stuff when you use the console in combat now so it take a few seconds to pop up. I'd say wait about 10 seconds and then alt tab and you should see the launcher in a small separate window
Thanks for the help haha, had no idea it launches in a separate window, will have to check that out
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: MrEpicSaxMan on February 04, 2017, 10:34:50 AM
Maybe I'm just really bas at this but the game keeps crashing. It gets through the initial loading screen then crashes before the main menu.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: LazyWizard on February 04, 2017, 11:03:47 AM
Do you also have the mod LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0) installed and enabled?

If you do, what does the end of starsector.log say? You can find this file in starsector-core in the install directory.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: MrEpicSaxMan on February 04, 2017, 02:31:47 PM
That would be what I'm missing. Thanks for the help. I can say that now that I got it running, I love this mod.
Title: request for help creating a command
Post by: majorfreak on February 05, 2017, 08:33:39 PM
hiya! i'm hoping that "reset follower's skill points" is a console command already, or is possible theoretically. I'd love to level up my officers to get a feel for different combinations and styles to fit the ship classes i put the different aggression personalities into.
Title: Re: request for help creating a command
Post by: Midnight Kitsune on February 05, 2017, 10:04:09 PM
hiya! i'm hoping that "reset follower's skill points" is a console command already, or is possible theoretically. I'd love to level up my officers to get a feel for different combinations and styles to fit the ship classes i put the different aggression personalities into.
You can't respec per se but you can spawn an officer in to replace the old one, all with the the same name, personality and level
Title: Re: request for help creating a command
Post by: majorfreak on February 06, 2017, 12:46:49 AM
hiya! i'm hoping that "reset follower's skill points" is a console command already, or is possible theoretically. I'd love to level up my officers to get a feel for different combinations and styles to fit the ship classes i put the different aggression personalities into.
You can't respec per se but you can spawn an officer in to replace the old one, all with the the same name, personality and level
oh! when i tried to use the base command "addofficer" all i got was a random level 1 steady officer. how do i tailor it?
Title: Re: request for help creating a command
Post by: Chronosfear on February 06, 2017, 12:52:34 AM
hiya! i'm hoping that "reset follower's skill points" is a console command already, or is possible theoretically. I'd love to level up my officers to get a feel for different combinations and styles to fit the ship classes i put the different aggression personalities into.
You can't respec per se but you can spawn an officer in to replace the old one, all with the the same name, personality and level
oh! when i tried to use the base command "addofficer" all i got was a random level 1 steady officer. how do i tailor it?

You have to add his  personalty and Level

/addofficer steady 12
For a Level 12 steady one
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Sy on February 06, 2017, 10:37:46 AM
how do i tailor it?
you can use the help command in combination with other commands, to get more information on how to use it:
(http://i.imgur.com/Unbhv5x.jpg)
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: majorfreak on February 06, 2017, 06:50:21 PM
ahhhh the irony of being so old i remember learning MS-DOS via 'help' (or was that /?...i forget so long ago) - THANKS GUYS! *wanders off whistling happily*
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Delta7 on March 13, 2017, 08:22:31 PM
I seem to be having a strange issue with the "bounty level" command... once i used it, named bounties stopped appearing. No more boss mod ships for me till i figure out how to un-screw up whatever i did...

Any idea what might have caused that? And is there an easy way to fix that? I've had zero new named boss bounties in many hours of playtime since i used the "bounty level" command.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Midnight Kitsune on March 13, 2017, 09:07:50 PM
I seem to be having a strange issue with the "bounty level" command... once i used it, named bounties stopped appearing. No more boss mod ships for me till i figure out how to un-screw up whatever i did...

Any idea what might have caused that? And is there an easy way to fix that? I've had zero new named boss bounties in many hours of playtime since i used the "bounty level" command.
What was the exact command you used? And are you talking named bounties like in vanilla or IBB bounties from SWP?
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: LazyWizard on March 16, 2017, 09:15:35 PM
Version 2.7b is up, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%202.7b.zip) (mirror (http://www.mediafire.com/file/z1347vtyd8wd63d/Console_Commands_2.7b.zip)). This mod requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

This update adds no new features and only fixes the version file hosting. If you don't use Version Checker you don't need to download this.
Title: Re: [0.7.2a] Console Commands v2.7 (released 2015-12-16)
Post by: Delta7 on March 19, 2017, 08:30:37 AM
I seem to be having a strange issue with the "bounty level" command... once i used it, named bounties stopped appearing. No more boss mod ships for me till i figure out how to un-screw up whatever i did...

Any idea what might have caused that? And is there an easy way to fix that? I've had zero new named boss bounties in many hours of playtime since i used the "bounty level" command.
What was the exact command you used? And are you talking named bounties like in vanilla or IBB bounties from SWP?

I'm using multiple mods including swp, SS+, nexerlian, and a few faction mods. I'll give you the exact mod list and command used in a couple of hours when I get access to my laptop again.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Delta7 on March 19, 2017, 03:43:00 PM
"BountyLevel"
tags: campagin, ssp
detailed use: sets the current person bounty level to the specified amount

list of currently enabled mods: SSP, dynasector, BRDY, combat chatter, common radar, console commands (obviously), diable avionics, interstellar imperium, lazy lib, nexerlin, shadowyards, swp, simulator overhaul, mayorate, tiandong, underworld, graphics lib

using the command "BountyLevel" has caused there to be no more posted named bounties...
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Dark.Revenant on March 19, 2017, 04:57:07 PM
That's for debugging; if you set it high, bounties may not spawn as often because of various factors.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Delta7 on March 25, 2017, 08:33:53 AM
ahh. well... i think i set it to 3 or something, and havent had a single bounty spawn in hours of gameplay. guess next time i'll just leave it the hell alone <.<
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: gruberscomplete on April 07, 2017, 06:02:57 PM
Dear LazyWizard,

I'd like to submit a contribution to your mod.

I have implemented a command that auto-levels-up officers in your fleet, which becomes annoying when you have manually level-up each officer in your 10+ officer fleet.

I have already implemented the command, and leave the implementation below

commands.csv
Spoiler
LevelUpOfficers
org.lazywizard.console.commands.LevelUpOfficers
core,campaign
levelupofficers (no arguments)
Automatically levels up all officers in player's fleet until out of upgrade points
[close]


LevelUpOfficers.java
Spoiler
package org.lazywizard.console.commands;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.characters.FullName;
import com.fs.starfarer.api.campaign.FactionAPI;
import com.fs.starfarer.api.campaign.FleetDataAPI;
import com.fs.starfarer.api.characters.PersonAPI;
import com.fs.starfarer.api.characters.OfficerDataAPI;
import com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent;
import com.fs.starfarer.api.plugins.OfficerLevelupPlugin;
import org.lazywizard.console.BaseCommand;
import org.lazywizard.console.CommandUtils;
import org.lazywizard.console.CommonStrings;
import org.lazywizard.console.Console;
import java.lang.String;
import static com.fs.starfarer.api.impl.campaign.ids.Personalities.*;

public class LevelUpOfficers implements BaseCommand
{
    @Override
    public CommandResult runCommand(String args, CommandContext context)
    {
        if (!context.isInCampaign())
        {
            Console.showMessage(CommonStrings.ERROR_CAMPAIGN_ONLY);
            return CommandResult.WRONG_CONTEXT;
        }

      // code goes here
      final FleetDataAPI fleetData = Global.getSector().getPlayerFleet().getFleetData();
      
      java.util.List<OfficerDataAPI> myOfficers = fleetData.getOfficersCopy();
      
      final OfficerLevelupPlugin plugin = (OfficerLevelupPlugin) Global.getSettings().getPlugin("officerLevelUp");
      
      for(OfficerDataAPI guy : myOfficers) {
         
         PersonAPI human = guy.getPerson();
            
         while(guy.canLevelUp()) { // keep going till all skills picked
            
            // pick new skills
            java.util.List<java.lang.String> picks = plugin.pickLevelupSkills(human);
            
            for (java.lang.String s : picks) {
            // pick in random order, although we only pick the first skill in the list
               
               if(guy.canLevelUp()) { // sanity-check
                  guy.levelUp(s); //"missile_specialization"); //picks.get(0));
                  Console.showMessage(human.getName().getFullName()  + " leveled up in " + s);
               }
               else
                  break; // no more room for new skills! Max level reached
               
               break; // break the for loop
            }
         }
         
         
         Console.showMessage("\n");
      }

      

        return CommandResult.SUCCESS;
    }
}

[close]

I hope you can integrate this command with the console commands mod package to benefit all users of your fine mod.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: blubullett on April 20, 2017, 07:52:41 PM
Well, sort of expected with the new game update, but this mod isn't working with the new 0.8 starsector.  Neither is LazyLib or version checker.

This is the message I get in the starsector log file...Softworks\Starsector\starsector-core\..\mods\Console Commands\jars\lw_Console.jar] vs [C:\Program Files (x86)\Fractal Softworks\Starsector\mods\Console Commands\jars\lw_Console.jar]
java.lang.RuntimeException: Filenames are case-sensitive, [C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Console Commands\jars\lw_Console.jar] vs [C:\Program Files (x86)\Fractal Softworks\Starsector\mods\Console Commands\jars\lw_Console.jar]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Orikson on April 20, 2017, 08:38:16 PM
Well, sort of expected with the new game update, but this mod isn't working with the new 0.8 starsector.  Neither is LazyLib or version checker.

This is the message I get in the starsector log file...Softworks\Starsector\starsector-core\..\mods\Console Commands\jars\lw_Console.jar] vs [C:\Program Files (x86)\Fractal Softworks\Starsector\mods\Console Commands\jars\lw_Console.jar]
java.lang.RuntimeException: Filenames are case-sensitive, [C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Console Commands\jars\lw_Console.jar] vs [C:\Program Files (x86)\Fractal Softworks\Starsector\mods\Console Commands\jars\lw_Console.jar]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Every update applies this rule: All mods will be broken until they are updated. Do not use them and expect them to work.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Maelstrom on April 21, 2017, 09:18:19 PM
can't wait for this one to update dammit xD the game is unplayable without this :P
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: LazyWizard on April 22, 2017, 12:35:53 AM
Unfortunately the console mod's kind of a mess of half-finished features right now, so it'll be a while before I can throw together a proper release.

However, because I don't want to leave you all with nothing (and because other modders use this mod to test their own work), I threw together a quick interim version that cuts out all the known broken and unfinished stuff. You're entering untested waters with this, so expect bugs!

Enjoy! (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%203.0%20WIP.zip) (mirror (http://www.mediafire.com/file/bvzv7ut6zhq3vj3/Console_Commands_3.0_WIP.zip)) This mod requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

Changelog:
Quote
3.0 WIP (April 22, 2017)
=======================
Updated to be compatible with Starsector 0.8a
Control+backspace now deletes the current word instead of last word in input
If exception stack traces are enabled, show source jars in exception details
Added isCampaignAccessible() to CommandContext:
 - Returns true if the player is on the campaign map, in a campaign battle,
   or fighting a refit simulation battle in the campaign
 - Used to check if you have access to campaign-only methods (in SectorAPI, etc)
Removed AddAptitudePoints command (use AddSkillPoints instead)
Removed SpawnFleet command (will rewrite at some point in the future)
New commands:
 - BlockRetreat, prevents a full retreat from being ordered by the enemy
 - ForceDeployAll, forces your opponent to deploy every ship in their fleet
 - ModInfo, shows detailed info about a mod, including what ships, fighter
   wings, weapons and commodities it adds to the game
 - SetCommission, sets the faction the player is commissioned to work for, or
   ends the current commission if "none" is entered as an argument
Changes to existing commands:
 - AddCrew no longer accepts a crew XP level argument
 - AddShip will redirect to AddWing if a wing ID is entered
 - AddSkillPoints now adds character points, used for both skills and aptitudes
 - FindItem/FindShip:
   - Both commands will simulate a visit from the player to each searched
     submarket; this ensures the searched stockpiles are always up to date, at
     the expense of the command taking ~1 second to execute the first time
   - Results are sorted by distance to the market
   - Added proper formatting to prices
   - Made it more clear when you enter an invalid ID versus when no goods are
     available in any market
 - GoTo will redirect to the Jump command if a star system's name is entered
 - Kill and Nuke credit kills to the player flagship (makes them usable w/ bounties)
 - List accepts several new arguments:
   - "mods", shows all currently enabled mods
   - "commands", lists all loaded commands (use "status detailed" for more info)
   - "aliases", shows all aliases added through aliases.csv
   - "tags", shows all tags and their associated commands
 - Fixed Traitor failing when used directly on a drone
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Saethar on April 22, 2017, 05:16:04 AM
I am running into an error with just LazyLib and Console Commands enabled. Hopefully someone can help.


20100 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Filenames are case-sensitive, [G:\Games\Starsector\starsector-core\..\mods\Console Commands\jars\lw_Console.jar] vs [G:\Games\Starsector\mods\Console Commands\jars\lw_Console.jar]
java.lang.RuntimeException: Filenames are case-sensitive, [G:\Games\Starsector\starsector-core\..\mods\Console Commands\jars\lw_Console.jar] vs [G:\Games\Starsector\mods\Console Commands\jars\lw_Console.jar]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Histidine on April 22, 2017, 05:20:43 AM
Re-download Starsector to get the newest hotfix version (RC19).
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Saethar on April 22, 2017, 06:40:08 AM
Perfect! Thank you.   :D
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Cyan Leader on April 22, 2017, 10:39:28 AM
ForceMarketUpdate is broken.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Sy on April 22, 2017, 11:37:32 AM
wow, not only a fast update, but with a bunch of useful new stuff as well. thanks for all the time you put into your various mods! =)
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: gofastskatkat on April 22, 2017, 11:50:05 AM
Pretty sure you already know about this, but the allweapons command doesnt add the chips for the wings in that you place on carriers now
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Midnight Kitsune on April 22, 2017, 12:00:16 PM
Pretty sure you already know about this, but the allweapons command doesnt add the chips for the wings in that you place on carriers now
Try allwings instead?
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Shield on April 22, 2017, 12:14:27 PM
Pretty sure you already know about this, but the allweapons command doesnt add the chips for the wings in that you place on carriers now
Try allwings instead?

It adds wings but they are kind of like ships instead of chips and they have a maximum burn of 4, kinda weird.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Midnight Kitsune on April 22, 2017, 12:16:29 PM
Pretty sure you already know about this, but the allweapons command doesnt add the chips for the wings in that you place on carriers now
Try allwings instead?

It adds wings but they are kind of like ships instead of chips and they have a maximum burn of 4, kinda weird.
Oops! Well I guess that is a bug then
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Sy on April 22, 2017, 12:34:41 PM
Oops! Well I guess that is a bug then
it's to be expected, they're an entirely new type of inventory item.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: gofastskatkat on April 22, 2017, 12:41:38 PM
Oops! Well I guess that is a bug then
it's to be expected, they're an entirely new type of inventory item.
As Sy said, Alex redesigned the fighters to where you buy their LPC's for the carrier hangars to build. He had a post about it, but that was way back in August of last year so it probably slipped out of people's minds
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Camael on April 23, 2017, 04:43:54 AM
Hey there, thanks for the quick update. Just wanted to point out that personally I use the spawn fleet command a lot, mainly to test new mods or releases for interesting skill builds etc. and I would love to see it back up soon, even if it is not in perfect working order. (The best way I could put "please give it baaahaaack" trying not to sound entitled... ahem...)
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Midnight Kitsune on April 23, 2017, 12:12:48 PM
Hey there, thanks for the quick update. Just wanted to point out that personally I use the spawn fleet command a lot, mainly to test new mods or releases for interesting skill builds etc. and I would love to see it back up soon, even if it is not in perfect working order. (The best way I could put "please give it baaahaaack" trying not to sound entitled... ahem...)
The reason why this was removed was it used OLD fleet spawning systems back from 65 I think
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: The_Mess on April 23, 2017, 08:07:42 PM
Damn it, this keeps crashing the game on me with the latest 0.80a hotfix release. I get a fatal error with the following stuff in the .log file:
Code
ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoSuchMethodError: com.fs.starfarer.api.campaign.TextPanelAPI.addParagraph(Ljava/lang/String;)V
java.lang.NoSuchMethodError: com.fs.starfarer.api.campaign.TextPanelAPI.addParagraph(Ljava/lang/String;)V
at org.lazywizard.console.ConsoleCampaignListener$CampaignPopup.init(ConsoleCampaignListener.java:145)
at com.fs.starfarer.ui.newui.newsuper.öØ0000(Unknown Source)
at com.fs.starfarer.ui.newui.newsuper.<init>(Unknown Source)
at com.fs.starfarer.ui.newui.newsuper.<init>(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.showInteractionDialog(Unknown Source)
at org.lazywizard.console.ConsoleCampaignListener.advance(ConsoleCampaignListener.java:78)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I have lazylib installed so what the hell's going wrong?

And kind of need this since I made the mistake of jumping into a Remnant system with a red warning without saving before hand, only saving when I entered as the last time I mopped the up a lone fleet of them. Really don't want to loose a level 34 save due to this...
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Midnight Kitsune on April 23, 2017, 08:09:27 PM
Damn it, this keeps crashing the game on me with the latest 0.80a hotfix release. I get a fatal error with the following stuff in the .log file:
Code
ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoSuchMethodError: com.fs.starfarer.api.campaign.TextPanelAPI.addParagraph(Ljava/lang/String;)V
java.lang.NoSuchMethodError: com.fs.starfarer.api.campaign.TextPanelAPI.addParagraph(Ljava/lang/String;)V
at org.lazywizard.console.ConsoleCampaignListener$CampaignPopup.init(ConsoleCampaignListener.java:145)
at com.fs.starfarer.ui.newui.newsuper.öØ0000(Unknown Source)
at com.fs.starfarer.ui.newui.newsuper.<init>(Unknown Source)
at com.fs.starfarer.ui.newui.newsuper.<init>(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.showInteractionDialog(Unknown Source)
at org.lazywizard.console.ConsoleCampaignListener.advance(ConsoleCampaignListener.java:78)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I have lazylib installed so what the hell's going wrong?

And kind of need this since I made the mistake of jumping into a Remnant system with a red warning without saving before hand, only saving when I entered as the last time I mopped the up a lone fleet of them. Really don't want to loose a level 34 save due to this...
Worse case scenario, you could use the back up save
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: The_Mess on April 23, 2017, 08:17:36 PM
Thanks! Didn't know there where back up saves :D

Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: dis astranagant on April 23, 2017, 10:38:46 PM
allweapons misses a few, like the new Devastator Cannons.
Title: Fufufufu
Post by: Daquan_Baton on April 24, 2017, 01:20:35 PM
I miss my baybay! I never realized how difficult normal was without console commands, now 0.8a is out and I'm so lonely D:
Title: Re: Fufufufu
Post by: Midnight Kitsune on April 24, 2017, 02:02:18 PM
I miss my baybay! I never realized how difficult normal was without console commands, now 0.8a is out and I'm so lonely D:
Just be aware that it is buggy and not all commands work. (Allwings for example)
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: LazyWizard on April 24, 2017, 05:12:00 PM
Thanks for the bug reports, everyone!

Damn it, this keeps crashing the game on me with the latest 0.80a hotfix release. I get a fatal error with the following stuff in the .log file:
Spoiler
Code
ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoSuchMethodError: com.fs.starfarer.api.campaign.TextPanelAPI.addParagraph(Ljava/lang/String;)V
java.lang.NoSuchMethodError: com.fs.starfarer.api.campaign.TextPanelAPI.addParagraph(Ljava/lang/String;)V
at org.lazywizard.console.ConsoleCampaignListener$CampaignPopup.init(ConsoleCampaignListener.java:145)
at com.fs.starfarer.ui.newui.newsuper.öØ0000(Unknown Source)
at com.fs.starfarer.ui.newui.newsuper.<init>(Unknown Source)
at com.fs.starfarer.ui.newui.newsuper.<init>(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.showInteractionDialog(Unknown Source)
at org.lazywizard.console.ConsoleCampaignListener.advance(ConsoleCampaignListener.java:78)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[close]

I have lazylib installed so what the hell's going wrong?

And kind of need this since I made the mistake of jumping into a Remnant system with a red warning without saving before hand, only saving when I entered as the last time I mopped the up a lone fleet of them. Really don't want to loose a level 34 save due to this...

That particular crash means you downloaded the 0.7.2a version of the mod from the OP. There's no proper 0.8a version out yet, but I released a buggy interim version you can get here (http://fractalsoftworks.com/forum/index.php?topic=4106.msg202837#msg202837).
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: The_Mess on April 24, 2017, 07:54:39 PM

That particular crash means you downloaded the 0.7.2a version of the mod from the OP. There's no proper 0.8a version out yet, but I released a buggy interim version you can get here (http://fractalsoftworks.com/forum/index.php?topic=4106.msg202837#msg202837).
Cheers, the setcommission command is going to get some heavy use :P
Title: Re: Fufufufu
Post by: Daquan_Baton on April 25, 2017, 12:44:58 PM
Just be aware that it is buggy and not all commands work. (Allwings for example)

Yea trust me I had tried to play it with CC hundreds of times before that last comment and no dice, the game just crashes instantly for me.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: gofastskatkat on April 26, 2017, 01:28:50 PM
Oh yeah, just remembered that not only does the allwings not give you the wing lpc's, allcommodities doesnt give all the modspecs which are the hullmods that you need to find and buy to learn them
Title: Re: Fufufufu
Post by: Midnight Kitsune on April 26, 2017, 03:55:55 PM
Just be aware that it is buggy and not all commands work. (Allwings for example)

Yea trust me I had tried to play it with CC hundreds of times before that last comment and no dice, the game just crashes instantly for me.
OK, so you are using the buggy .8 build from here: http://fractalsoftworks.com/forum/index.php?topic=4106.msg202837#msg202837 and not the one from the OP right?
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Bastion.Systems on April 30, 2017, 05:03:23 AM
Can you trigger the ceased hostilities event with this mod to counter the bug of it not triggering in the current version?
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Midnight Kitsune on May 01, 2017, 02:31:54 PM
Can you trigger the ceased hostilities event with this mod to counter the bug of it not triggering in the current version?
You might be able to use it to set the relationship levels to a more sane level and that might make them stop but I don't know for sure
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Cyan Leader on May 02, 2017, 06:48:52 AM
I know this was reported but yeah, no way to easily acquire the hullmods which would be great for testing. Moreover I'd suggest a command to make the player character learn everything that can be learned, as it would be great for testing.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: Midnight Kitsune on May 02, 2017, 11:33:26 AM
I know this was reported but yeah, no way to easily acquire the hullmods which would be great for testing. Moreover I'd suggest a command to make the player character learn everything that can be learned, as it would be great for testing.
If you are taking skills, that is easy. But yeah, hull mods and fighter LPCs are needed for this
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16)
Post by: LazyWizard on May 05, 2017, 07:10:40 AM
So, progress report! I've fixed the bugs in the last WIP that I know about, re-added SpawnFleet, added hullmod and LPC support, and am currently going over the entire mod with a fine-toothed comb to fix all the issues and code debt that have accumulated over the years. I've currently done a bugfix/polish pass on 12 commands, leaving 57 to go, so a proper release is still a while away.

You can download the current WIP here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%203.0%20WIP%202.zip). For anyone who used the link I posted on the Discord channel earlier today, this is a newer version.

Here's the changelog as of now:
Quote
3.0 WIP 2 (May 05, 2017)
==========================
Updated to be compatible with Starsector 0.8a
Control+backspace now deletes the current word instead of last word in input
If exception stack traces are enabled, show source jars in exception details
Added isCampaignAccessible() to CommandContext:
 - Returns true if the player is on the campaign map, in a campaign battle,
   or fighting a refit simulation battle in the campaign
 - Used to check if you have access to campaign-only methods (in SectorAPI, etc)
Removed AddAptitudePoints command (use AddSkillPoints instead)
New commands:
 - AddHullmod, adds the specified modspec to the player's inventory
 - AllHullmods, unlocks all unlearned hullmods
 - BlockRetreat, prevents a full retreat from being ordered by the enemy
 - ForceDeployAll, forces your opponent to deploy every ship in their fleet
   (warning: this command can seriously impact game performance!)
 - ModInfo, shows detailed info about a mod, including what ships, fighter
   wings, weapons and commodities it adds to the game
 - SetCommission, sets the faction the player is commissioned to work for, or
   ends the current commission if "none" is entered as an argument
Changes to existing commands:
 - AddCrew:
   - No longer accepts a crew XP level argument
   - Using this command without arguments gives as many crew as your fleet can
     hold (in the past this only gave up to the skeleton crew requirement)
 - AddOfficer:
   - Added support for Reckless officers
   - Now allows custom officer names. Updated syntax: AddOfficer
     [optionalPersonality] [optionalLevel] [optionalFaction] [optionalName]
 - AddShip will redirect to AddWing if a wing ID is entered
 - AddSkillPoints now adds character points, used for both skills and aptitudes
 - AddWing and AllWings properly add LPCs instead of fleet members
 - FindItem/FindShip:
   - Both commands will simulate a visit from the player to each searched
     submarket; this ensures the searched stockpiles are always up to date, at
     the expense of the command taking ~1 second to execute the first time
   - Results are sorted by distance to the market
   - Added proper formatting to prices
   - Made it more clear when you enter an invalid ID versus when no goods are
     available in any market
 - GoTo will redirect to the Jump command if a star system's name is entered
 - Kill and Nuke credit kills to the player flagship
 - List accepts several new arguments:
   - "hullmods", shows all hullmods that can be unlocked with a modspec item
   - "mods", shows all currently enabled mods
   - "commands", lists all loaded commands (use "status detailed" for more info)
   - "aliases", shows all aliases added through aliases.csv
   - "macros", shows all macros usable within the RunCode command
   - "tags", shows all tags and their associated commands
 - SpawnFleet:
   - Updated to use FleetFactoryV2; mostly matches vanilla fleet compositions
     now (spawned fleets are of fleet type "large patrol")
   - No longer accepts crew XP level or quality arguments. Updated syntax:
     SpawnFleet <factionId> <totalFP> [optionalName]
   - Still needs some tweaking for officer numbers and levels
 - Traitor now works properly when used on drones
... plus a ridiculous amount of polish on nearly everything
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Axolotl on May 05, 2017, 07:38:40 AM
Thanks, for the update.
Is there a command to reset the skill points spent?
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: LazyWizard on May 05, 2017, 07:40:03 AM
Yes, "Respec".
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Ali on May 05, 2017, 11:13:52 AM
Is there a command to add multiple officers at once please? or can one be implemented pls =p
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: gofastskatkat on May 05, 2017, 12:48:09 PM
Nice update, everything seems to be working fine. I only have one request that deals with LPC's, since they arent like the old wings now, could there be a way to add multiple LPCs of the same kind into the inventory/selected station since they stack like weapons now? I understand that this is picky to ask of, but it'd make outfitting fighter bays less annoying by having to constantly go out, re-enter allwings and storage, and go back in. Either way, thanks for the new update and keep them coming :D
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Maelstrom on May 14, 2017, 03:28:52 PM
so why is this considered 0.7.2a? it works fine now :P
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Midnight Kitsune on May 14, 2017, 08:55:26 PM
so why is this considered 0.7.2a? it works fine now :P
Because not all commands and such have been tested

Also, small feature request: Make the "Allwings" command add more than one LPC to the game
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Cyan Leader on May 17, 2017, 07:05:05 AM
Thanks as always, looking forward to when we'll be able to spawn fleets with officers.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Jojo_195 on May 17, 2017, 04:55:00 PM
Currently trying the WIP for 0.8a
Only one problem until now: Adding a Custom Officer name makes it repeat the first name. Ex:

AddOfficer [steady] [2] [independent] [John Doe]

Officer ends up called "John John Doe" instead.

Also any plan to make it possible to choose the portrait for the officer?
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: zothos on May 19, 2017, 08:00:33 AM
Possible bug when using Console Commands in battle on my MacBook Pro Retina 2015

Hallo,

- latest starsector (i can reproduce it with older versions, too
- latest versionchecker (i can reproduce it with older versions, too)

when using the VersionChecker during combat, and returning to the game, the mouse position is not where the mouse really is. The game gets unusable because i can only use the lower left portion of the screen afterwords. I suspect thats caused by the resolution the game is running in, and the resolution the game is actually displayed on my device (Retina). Would it be possible to fix that inside ConsoleCommands or is this something for the game itself? I can not reproduce the issue when using console commands on the sector view.

Best regards,
Jochen
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: isaacssv552 on May 31, 2017, 10:07:24 PM
The AllHullmods command currently just sets every non-hidden hullmod to always unlocked. Have you considered something such as the below? Seems to work fine in my tests.

Code
CharacterDataAPI playerStats = CampaignEngine.getInstance().getCharacterData();

for (HullModSpecAPI spec : Global.getSettings().getAllHullModSpecs())
    if (!spec.isHidden() && !spec.isAlwaysUnlocked() && !playerStats.knowsHullMod(spec.getId()))
        playerStats.addHullMod(spec.getId());
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: LazyWizard on May 31, 2017, 10:38:38 PM
Sorry for the recent lack of progress; I've been distracted for the last few weeks by my non-Starsector related hobbies (they exist; I swear!). I'll try to have another WIP update out soon. The one feature I really want to have in for the proper 3.0 release is the new unified overlay for campaign and combat, so the full release is still a ways off.


The AllHullmods command currently just sets every non-hidden hullmod to always unlocked. Have you considered something such as the below? Seems to work fine in my tests.

Code
CharacterDataAPI playerStats = CampaignEngine.getInstance().getCharacterData();

for (HullModSpecAPI spec : Global.getSettings().getAllHullModSpecs())
    if (!spec.isHidden() && !spec.isAlwaysUnlocked() && !playerStats.knowsHullMod(spec.getId()))
        playerStats.addHullMod(spec.getId());

Fixing this was on my todo list (which you can actually see if you look at the code in the jar). Thanks for pointing me to the proper API method; I hadn't gotten around to it yet and you just saved me the trouble. :)



Nice update, everything seems to be working fine. I only have one request that deals with LPC's, since they arent like the old wings now, could there be a way to add multiple LPCs of the same kind into the inventory/selected station since they stack like weapons now? I understand that this is picky to ask of, but it'd make outfitting fighter bays less annoying by having to constantly go out, re-enter allwings and storage, and go back in. Either way, thanks for the new update and keep them coming :D
Also, small feature request: Make the "Allwings" command add more than one LPC to the game

Changed for the next version. I believe the jar linked at the bottom of this post includes that fix if you want it right now.



Currently trying the WIP for 0.8a
Only one problem until now: Adding a Custom Officer name makes it repeat the first name. Ex:

AddOfficer [steady] [2] [independent] [John Doe]

Officer ends up called "John John Doe" instead.

Also any plan to make it possible to choose the portrait for the officer?

Also fixed, thanks for the report.

As for choosing the portrait, no, that's not currently planned. The portrait is currently determined by the faction the officer is assigned to, and I think AddOfficer already has too many arguments. :)



Possible bug when using Console Commands in battle on my MacBook Pro Retina 2015

Hallo,

- latest starsector (i can reproduce it with older versions, too
- latest versionchecker (i can reproduce it with older versions, too)

when using the VersionChecker during combat, and returning to the game, the mouse position is not where the mouse really is. The game gets unusable because i can only use the lower left portion of the screen afterwords. I suspect thats caused by the resolution the game is running in, and the resolution the game is actually displayed on my device (Retina). Would it be possible to fix that inside ConsoleCommands or is this something for the game itself? I can not reproduce the issue when using console commands on the sector view.

Best regards,
Jochen


Could you try replacing the mod's jar with this one (http://www.mediafire.com/file/ao5gqnkd6ug3yu7/lw_Console.jar)? If that doesn't fix it, then there's nothing I can do (at least until the new console overlay is finished).
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Snrasha on June 01, 2017, 12:27:29 AM
Possible, to put under guillemet "Gurl Emi 4Xv" for jump or other? Or create a officer with a long name without possible problem?

Thank you.
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Ali on June 01, 2017, 01:11:20 PM
Any plans to add multiple officers in one go? or is this possible already?

Would be great to just add 30-40 steady officers at once so i can pick the one's with decent portriats / acceptable names..

takes me a lot of typing to get 10 im hpy with currently lol..

Many thanks for efforts with console commands! It's one of my "must have" mods on any playthrough!!!  ;D
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Midnight Kitsune on June 01, 2017, 06:30:09 PM
Any plans to add multiple officers in one go? or is this possible already?

Would be great to just add 30-40 steady officers at once so i can pick the one's with decent portriats / acceptable names..

takes me a lot of typing to get 10 im hpy with currently lol..

Many thanks for efforts with console commands! It's one of my "must have" mods on any playthrough!!!  ;D
If you push up arrow, the console will autofill the last entered command
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Ali on June 01, 2017, 10:27:30 PM
Ah many thanks mk! That's v.handy to know! Cheers!  ;D
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Midnight Kitsune on June 02, 2017, 05:25:30 PM
Ah many thanks mk! That's v.handy to know! Cheers!  ;D
You can also do multiple commands at once using the semicolon as a "breaker"
IE this command:
allweapons; storage
would add all the weapons into the storage and also open the storage interface once you unpaused
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: LazyWizard on June 03, 2017, 04:17:52 AM
Possible, to put under guillemet "Gurl Emi 4Xv" for jump or other? Or create a officer with a long name without possible problem?

Thank you.

I'm afraid I don't understand what you mean with the first question, could you elaborate? As for the second, if you're referring to the bug where AddOfficer duplicated the officer's first name, that's fixed in the jar linked at the bottom of this post (http://fractalsoftworks.com/forum/index.php?topic=4106.msg212627#msg212627).
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: Cyan Leader on June 03, 2017, 01:54:34 PM
Would it be possible to make it so that pressing up multiple times would go through the last few inputted commands?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 2 (released 2017-05-05)
Post by: Tufted Titmouse on June 04, 2017, 06:14:29 AM
Does this work in 8.1? or are we SOL?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 2 (released 2017-05-05)
Post by: LazyWizard on June 04, 2017, 06:17:01 AM
It works in 0.8.1a.


Would it be possible to make it so that pressing up multiple times would go through the last few inputted commands?

I'll add it to the todo list. Not sure if I'll get to it for the next version, though.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 2 (released 2017-05-05)
Post by: Tufted Titmouse on June 04, 2017, 06:17:38 AM
Great to hear
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: LazyWizard on June 04, 2017, 07:40:15 AM
Console Commands 3.0 WIP 3 is out, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%203.0%20WIP%203.zip) (mirror (http://www.mediafire.com/file/b4m69y5p9ylz5ns/Console_Commands_3.0_WIP_3.zip)). Requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

This fixes a crash bug with SpawnFleet due to an API change in 0.8.1a, along with a few other minor tweaks.

Changelog for 3.0 so far:
Quote
3.0 WIP 3 (June 04, 2017)
===========================
Updated to be compatible with Starsector 0.8.1a
Control+backspace now deletes the current word instead of last word in input
Minor update to typo correction, please let me know if it's more/less accurate
If exception stack traces are enabled, show source jars in exception details
Added isCampaignAccessible() to CommandContext:
 - Returns true if the player is on the campaign map, in a campaign battle,
   or fighting a refit simulation battle in the campaign
 - Used to check if you have access to campaign-only methods (in SectorAPI, etc)
Removed AddAptitudePoints command (use AddSkillPoints instead)
New commands:
 - AddHullmod, adds the specified modspec to the player's inventory
 - AllHullmods, unlocks all unlearned hullmods
 - BlockRetreat, prevents a full retreat from being ordered by the enemy
 - ForceDeployAll, forces your opponent to deploy all reserves in their fleet
   (warning: this command can seriously impact game performance!)
 - ModInfo, shows detailed info about a mod, including what ships, fighter
   wings, weapons and commodities it adds to the game
 - SetCommission, sets the faction the player is commissioned to work for, or
   ends the current commission if "none" is entered as an argument
Changes to existing commands:
 - All AddX commands will no longer allow you to drop into negative quantities
 - AddCrew:
   - No longer accepts a crew XP level argument
   - Using this command without arguments gives as many crew as your fleet can
     hold (in the past this only gave up to the skeleton crew requirement)
 - AddOfficer:
   - Added support for Reckless officers
   - Now allows custom officer names. Updated syntax: AddOfficer
     [optionalPersonality] [optionalLevel] [optionalFaction] [optionalName]
 - AddShip will redirect to AddWing if a wing ID is entered
 - AddSkillPoints now adds character points, used for both skills and aptitudes
 - AddWing and AllWings properly add LPCs instead of fleet members
 - FindItem/FindShip:
   - Both commands will simulate a visit from the player to each searched
     submarket; this ensures the searched stockpiles are always up to date, at
     the expense of the command taking ~1 second to execute the first time
   - Results are sorted by distance to the market
   - Added proper formatting to prices
   - Made it more clear when you enter an invalid ID versus when no goods are
     available in any market
 - GoTo will redirect to the Jump command if a star system's name is entered
 - Kill and Nuke credit kills to the player flagship
 - List accepts several new arguments:
   - "hullmods", shows all hullmods that can be unlocked with a modspec item
   - "mods", shows all currently enabled mods
   - "commands", lists all loaded commands (use "status detailed" for more info)
   - "aliases", shows all aliases added through aliases.csv
   - "macros", shows all macros usable within the RunCode command
   - "tags", shows all tags and their associated commands
 - Respec should properly reset skill-granted bonuses
 - SpawnFleet:
   - Updated to use FleetFactoryV2; mostly matches vanilla fleet compositions
     now (spawned fleets are of fleet type "large patrol")
   - No longer accepts crew XP level or quality arguments. Updated syntax:
     SpawnFleet <factionId> <totalFP> [optionalName]
   - Still needs some tweaking for officer numbers and levels
 - Traitor now works properly when used on drones
... plus a ridiculous amount of polish on nearly everything
Title: Re: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)
Post by: zothos on June 04, 2017, 02:42:38 PM
Could you try replacing the mod's jar with this one (http://www.mediafire.com/file/ao5gqnkd6ug3yu7/lw_Console.jar)? If that doesn't fix it, then there's nothing I can do (at least until the new console overlay is finished).

Hallo,

i've tried your linked jar, unfortunately it still has the same annoying bug. Thanks for trying anyway! I am really looking forward to the new console overlay :)

Best regards,
Jochen
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: Drokkath on June 05, 2017, 02:33:57 PM
Splendid! This is a mod that is a must-have-first in my list of mods. Thanks for the update!
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: c plus one on June 05, 2017, 02:47:11 PM
LazyWizard, thank you for the recent update. I enjoy Console Commands a great deal and am thrilled that version 3's WIP has that new-car smell. For a "lazy" person, you rock!  ;D
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: Cyan Leader on June 05, 2017, 06:57:31 PM
I don't get any music through the storage command anymore, it used to be the same as independent markets in the mod version for .7.2

I know this is minor but would it be possible to add that back in?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: Fandanguero on June 11, 2017, 09:33:34 AM
It's funny that ctrl+backspace combination doesn't work for opening console in the battle and it isn't mentioned anywhere and by anyone. You should put working hotkey for that in the first post.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: ANGRYABOUTELVES on June 11, 2017, 11:00:41 AM
It's funny that ctrl+backspace combination doesn't work for opening console in the battle and it isn't mentioned anywhere and by anyone. You should put working hotkey for that in the first post.
It's mentioned in the very first post.
Quote
Troubleshooting
The input popup never appears when I press the console button in combat:

    Unfortunately, due to the way the combat pop-up is implemented you must either run the game windowed or in borderless windowed mode to use the console in battle (see instructions below).
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: Fandanguero on June 12, 2017, 01:50:15 AM
It's mentioned in the very first post.
I had never run this game other way than windowed. The console worked in battles few years ago, but not this year.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: Histidine on June 12, 2017, 01:53:16 AM
On Windows the console takes a while to appear and I often have to Alt-Tab to it when it does pop up.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: Fandanguero on June 12, 2017, 01:58:57 AM
On Windows the console takes a while to appear and I often have to Alt-Tab to it when it does pop up..
got it
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: Midnight Kitsune on June 12, 2017, 04:11:42 AM
Yeah, what happens is that due to the new launcher, the method that the console uses to bring up the input window isn't running, so it needs to start up that process. So it takes a few seconds to pop up at first but then after that it SHOULD pop up quickly until you restart the game
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: Dal on June 12, 2017, 05:21:17 PM
I have a quick suggestion for the "goto" command: it should support moving to the current autopilot waypoint in some form. Since it's otherwise unused, having "goto" without arguments default to that would make moving around the local system significantly faster, though "goto waypoint" or similar would be fine.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 3 (released 2017-06-04)
Post by: LazyWizard on June 13, 2017, 08:46:22 AM
On Windows the console takes a while to appear and I often have to Alt-Tab to it when it does pop up.
Yeah, what happens is that due to the new launcher, the method that the console uses to bring up the input window isn't running, so it needs to start up that process. So it takes a few seconds to pop up at first but then after that it SHOULD pop up quickly until you restart the game

If you set "legacyLauncher" to true in starsector-core/data/config/settings.json, you'll no longer have to wait the few seconds the first time you use the console in combat.


I don't get any music through the storage command anymore, it used to be the same as independent markets in the mod version for .7.2

I know this is minor but would it be possible to add that back in?

That'd be due to a change in vanilla. The storage command opens the Abandoned Terraforming Platform's market, and it seems neutrals don't have music anymore. You could always copy the Independents' market music config to the neutral faction if you want the old behavior.


I have a quick suggestion for the "goto" command: it should support moving to the current autopilot waypoint in some form. Since it's otherwise unused, having "goto" without arguments default to that would make moving around the local system significantly faster, though "goto waypoint" or similar would be fine.

Good idea, added!
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on June 21, 2017, 02:54:09 AM
Console Commands 3.0 WIP 4 is out, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%203.0%20WIP%204.zip) (mirror (http://www.mediafire.com/file/l0k6kurs2932w6w/Console_Commands_3.0_WIP_4.zip)). Requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

Edit (2017-07-03): If you experience a crash when opening the console, you can download a patched jar here (https://bitbucket.org/LazyWizard/console-commands/downloads/lw_Console.jar).

This brings a few changes to existing commands, but most importantly it includes the first revision of the new unified console overlay. This means the mod no longer requres running in borderless windowed mode for combat support, and there will be no more problems with an input window stubbornly refusing to appear.

The new overlay doesn't support scrolling yet (though that's next on my list), and error sounds are currently broken. Other than that, please let me know of any bugs or other issues you encounter with this WIP. This is the single largest change to the mod since its inception, so I'd be shocked if something doesn't go wrong.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Takion Kasukedo on June 21, 2017, 04:15:36 AM
I can't seem to figure how to spawn a pirate respawn or invasion fleet, anyone know how?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: dk1332 on June 21, 2017, 04:53:51 AM
update

Awesome, I don't really use borderless windowed mode when playing so this is great addition. Any plans to make the storage command to pick which which storage you want to open other than the omnifactory?

I can't seem to figure how to spawn a pirate respawn or invasion fleet, anyone know how?

As far as I know using the command spawnfleet <faction> <FP> spawns any fleet of that faction near the player. SpawnInvasionfleet command seems to only work if you have joined a faction or you have a faction.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Drokkath on June 21, 2017, 10:09:16 PM
WIP 3 is heck of a lot more stable for me, WIP 4 scared my lungs out of oxygen processes with it's savefile corruption. So I removed the new version and put WIP 3 back just so my poor save files don't get corrupted, feels like Fallout 2 all over again with its somewhat similar savegame corruptions, never finished that game because of the paranoia of save files getting corrupted/damaged/un-loadable even to this day.

Had to check if my hard-drive (other than my heart and lungs too) is okay, that's how much I hate and fear files getting corrupt.
I mainly use Console Command mod for spawning items, weapons, ships and to make my character a level 40 steamroller captain with +57 skill points thus maximizing every skill/perk point.

But for now, I'm gonna just muck around in the game now that I've found a possible culprit.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on June 21, 2017, 10:44:40 PM
What kind of corruption issues are you referring to? The console mod is very unlikely to be the culprit behind any crashes while saving. Those are usually due to Starsector running out of memory while saving, and the console doesn't store much in the save file (just some simple references to things like which market the storage command uses) and uses far less RAM than even the smallest of faction mods.

If you're referring to a command going wrong and breaking something: the inner workings of the console - the parsing and running of commands - are nearly identical between WIPs 3 and 4 (the overlay just passes the input text to the actual console implementation and prints the results), so if you feel like WIP 4 causes corruption that WIP 3 didn't I'm tempted to call it the placebo effect. If a specific command is causing issues, could you let me know which one, and possibly post a stack trace if it gives one?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Drokkath on June 22, 2017, 12:44:40 AM
Nah, no command I typed in did not crash the game instantly so that's good, I just started noticing the corruption when I couldn't save and saw the game stuck, had to end-task it, loading corrupt save gives me a error screen telling me unclearly/generally about something is not existing in the save file anymore, so it's not a damn placebo and is definitely to do with memory size then. Where does one set the memory usage settings for SS anyway? ..ah, nvm, that .bat file. Good grief the values are low, an easy thing to fix hopefully. I have 16gb of RAM, the default values in there are basically for a potato.

Tested WIP 4 again with loading and saving the game like a madman after tweaking the memory values and so far it seems like it saves and loads as it should. I did notice more lag upon when it loaded the game's in-game assets with WIP 4 version and with WIP 3 it's less severe.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Darloth on June 24, 2017, 12:44:37 PM
The link in the first post currently goes to the post where WIP 3 is linked, rather than either the direct download or the post for WIP 4.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on June 24, 2017, 01:36:14 PM
The link in the first post currently goes to the post where WIP 3 is linked, rather than either the direct download or the post for WIP 4.

Fixed, thanks for mentioning it.


Tested WIP 4 again with loading and saving the game like a madman after tweaking the memory values and so far it seems like it saves and loads as it should. I did notice more lag upon when it loaded the game's in-game assets with WIP 4 version and with WIP 3 it's less severe.

Startup impact should be lower in the next version. There's a bug in WIP 4 where the console loads the overlay font twice.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: mercando on June 26, 2017, 02:21:25 PM
Thanx for this version of mod
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Drokkath on June 27, 2017, 08:22:08 PM
Startup impact should be lower in the next version. There's a bug in WIP 4 where the console loads the overlay font twice.

Thanks. Sorry about me seeming ungrateful or something along those lines. Was at the time in my focus mode of problem solving so it's easy to mistake it for something else entirely.
Without this mod I'd probably not be playing SS as much, thank you in general for sticking around with updating the mod to this day.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Wapno on June 28, 2017, 06:00:26 PM
Is there any way to find fighter LPCs?

Neither findship nor finditem work. Finditem outright throws an error, while findship claims that said wing is not for sale anywhere, no matter what I type. Even if I put in "findship broadsword_wing" it says there are no broadswords anywhere, even though I'm right next to a station which sells them.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on July 01, 2017, 01:03:06 PM
Thanks. Sorry about me seeming ungrateful or something along those lines. Was at the time in my focus mode of problem solving so it's easy to mistake it for something else entirely.
Without this mod I'd probably not be playing SS as much, thank you in general for sticking around with updating the mod to this day.

No worries. In fact, I appreciate it. Usually I learn about bugs in my mods by overhearing someone mention them in Discord or in a random forum post rather than them being reported. I'd rather have any feedback, even negative or wrong, than no feedback at all! :)


Is there any way to find fighter LPCs?

Neither findship nor finditem work. Finditem outright throws an error, while findship claims that said wing is not for sale anywhere, no matter what I type. Even if I put in "findship broadsword_wing" it says there are no broadswords anywhere, even though I'm right next to a station which sells them.

FindItem hasn't been updated for 0.8a+ yet, but it will be for the next version of this mod. I've been going through and updating commands alphabetically, but WIP 4 was focused on the new overlay so progress on that front stalled for a bit. I uploaded a todo document for v3.0 here (https://bitbucket.org/LazyWizard/console-commands/src/tip/v3.0%20update%20progress.txt?at=default&fileviewer=file-view-default) for anyone who's interested in what's left to be done.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: DinoZavarski on July 02, 2017, 06:14:02 AM
I have game crash with this error on attempt to open console with WIP 4:

Code
656217 [Thread-5] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.IllegalArgumentException: Number of remaining buffer elements is 3932160, must be at least 5242880. Because at most 5242880 elements can be returned, a buffer with at least 5242880 elements is required, regardless of actual returned element count
java.lang.IllegalArgumentException: Number of remaining buffer elements is 3932160, must be at least 5242880. Because at most 5242880 elements can be returned, a buffer with at least 5242880 elements is required, regardless of actual returned element count
at org.lwjgl.BufferChecks.throwBufferSizeException(BufferChecks.java:162)
at org.lwjgl.BufferChecks.checkBufferSize(BufferChecks.java:189)
at org.lwjgl.BufferChecks.checkBuffer(BufferChecks.java:230)
at org.lwjgl.opengl.GL11.glReadPixels(GL11.java:2450)
at org.lazywizard.console.ConsoleOverlayInternal.show(Overlay.kt:55)
at org.lazywizard.console.ConsoleOverlay.show(Overlay.kt:33)
at org.lazywizard.console.ConsoleCampaignListener.advance(ConsoleCampaignListener.java:62)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

WIP 3 works.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on July 02, 2017, 06:28:55 AM
Thanks for the report! I believe I see what went wrong, and luckily it should be an easy fix. I'll try to put a patch out ASAP.

Edit: could you try replacing the mod's jar with this one (https://bitbucket.org/LazyWizard/console-commands/downloads/lw_Console.jar) and see if that fixes it? Unfortunately this bug is hardware dependent so I can't test the fix myself.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: DinoZavarski on July 02, 2017, 07:24:35 AM
Edit: could you try replacing the mod's jar with this one (https://bitbucket.org/LazyWizard/console-commands/downloads/lw_Console.jar) and see if that fixes it? Unfortunately this bug is hardware dependent so I can't test the fix myself.

Replaced it, unfortunately same error.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on July 02, 2017, 07:43:43 AM
Could you try this one (https://bitbucket.org/LazyWizard/console-commands/downloads/lw_Console.jar)?

I'm about to leave to spend the day with family, so if that one doesn't work you can use this jar (https://bitbucket.org/LazyWizard/console-commands/downloads/lw_Console_fallback.jar) as a fallback until I can get back to a computer (rename it to lw_Console.jar). That one doesn't properly fix the bug, but simply papers over it by providing a large enough buffer that it shouldn't occur.

Also, just to make sure: you're using a Mac, right? If not, then I'm trying to fix the wrong thing.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: DinoZavarski on July 02, 2017, 09:29:56 AM
Also, just to make sure: you're using a Mac, right? If not, then I'm trying to fix the wrong thing.

No, Linux.

Sorry, should have guessed it is OS related and told this earlier, given no one mentioned similar problem since the release.

Tell me if i can do something to help in debugging. Just be aware that my java skill is somewhere around the power copypaster level (script kitbashing based on logical guessing).

Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on July 02, 2017, 01:01:39 PM
Alright, I'm pretty sure I spotted the error. Could you try this jar (https://bitbucket.org/LazyWizard/console-commands/downloads/lw_Console.jar) and see if it works now?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: DinoZavarski on July 02, 2017, 11:23:08 PM
Works!  ;D
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on July 03, 2017, 12:02:03 AM
Excellent. Thanks for testing it for me!

For anyone curious: the culprit was the console overlay's background (a darkened screenshot of the game). Initially I thought the crash was due to some Retina display compatibility code, but the real problem was that the native buffer the screenshot was stored in was dynamically sized based on your monitor's display settings, but the actual screenshot was always stored in a 32 bit per pixel format. That explains why this hasn't shown up before now: the buffer would only be too small if you ran the game with a sub-32 bpp display mode, which I didn't even think was possible with Starsector.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: DinoZavarski on July 03, 2017, 02:13:51 PM
the buffer would only be too small if you ran the game with a sub-32 bpp display mode, which I didn't even think was possible with Starsector.

Code
dino@valqk ~/Games/starsector % grep Depth /var/log/Xorg.0.log
[    38.142] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[    38.800] (**) NVIDIA(1): Depth 24, (--) framebuffer bpp 32
[    38.807] (--) Depth 24 pixmap format is 32 bpp

24bit depth is actually pretty typical for Nvidia Linux drivers.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Martell on July 04, 2017, 10:10:38 AM
If you're still taking requests, can I ask for AddOrdnancePoints to have a percentage component? So +20%OP instead of a flat number.

Thanks in advance.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on July 04, 2017, 10:11:44 AM
Sure, I'll see what I can do.

Edit: added (https://i.imgur.com/IQwVY96.png). If you don't want to wait for the next WIP, replace the jar in the mod folder with this one (https://bitbucket.org/LazyWizard/console-commands/downloads/lw_Console.jar). Adding a percent sign at the end of the argument makes the bonus a percentage rather than flat.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Martell on July 04, 2017, 11:37:27 AM
Holy crap, it took you a minute to answer and 10 minutes to code and upload.

Thanks so much! That's amazing. Your name is only half true.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Dal on July 05, 2017, 04:44:08 PM
Another hopefully quick suggestion - Could the Storage command have a counterpart SetStorage added? You'd have to verify there's a valid storage at the station to use, but it'd be a lot more convenient than having to transfer the contents of the abandoned station when arriving at "home". Or, thinking of it, SetHome could check for a valid storage and set it then.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on July 05, 2017, 04:52:19 PM
I'll see what I can do. I won't be able to release anything today, though. I've been messing with the internals of the mod and I'm not sure if it's stable enough to release in its current state.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: cjuicy on July 05, 2017, 08:21:39 PM
While in a text field in the Refit screen, pressing control-backspace currently opens the console instead of backspacing a word. While not game breaking, it is an annoyance during ship and variant renaming. I haven't noticed it anywhere else (yet).
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on July 05, 2017, 09:27:09 PM
Yeah, being able to open the console inside campaign menus was an oversight. It'll be fixed in the next version.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: 00lewnor on July 06, 2017, 10:05:36 AM
Can I us this mod to teach myself the salvage gantry hullmod? I want to 'learn' it now I've reached salvaging skill 3 but it doesn't seem to be on the list for the AddHullmod command.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Midnight Kitsune on July 06, 2017, 07:53:36 PM
Can I us this mod to teach myself the salvage gantry hullmod? I want to 'learn' it now I've reached salvaging skill 3 but it doesn't seem to be on the list for the AddHullmod command.
Most likely because it is a built it
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: DinoZavarski on July 07, 2017, 02:13:38 AM
Is it possible to implement console command that clears storage?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: theSONY on July 14, 2017, 06:42:55 AM
Question: how to spawn ships ?
i mean i know the command i got the info that the hull is add & all but i dunno where is stored
in older version it was stored in omnifactory storage area if a remember it right, but now cant find it
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: Histidine on July 14, 2017, 08:06:02 AM
The added ship goes straight into your fleet.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: LazyWizard on July 21, 2017, 07:57:02 PM
If any Mac/Linux users could test this build (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%203.0%20WIP%205-pre1.zip) of the mod and get back to me with the results, I'd greatly appreciate it.

The command you'll want to test is "Settings". If it works at all, everything should be good for the next WIP release. :)


Can I us this mod to teach myself the salvage gantry hullmod? I want to 'learn' it now I've reached salvaging skill 3 but it doesn't seem to be on the list for the AddHullmod command.

Midnight Kitsune is correct. AddHullmod only works for hullmods that can be unlocked with a modspec.


Is it possible to implement console command that clears storage?

Sure, I'll add "clear" as a supported argument for Storage before I properly release WIP 5.


Question: how to spawn ships ?
i mean i know the command i got the info that the hull is add & all but i dunno where is stored
in older version it was stored in omnifactory storage area if a remember it right, but now cant find it

As Histidine said, it goes to your fleet. In general, the AddX commands dump their results into your fleet's cargo and AllX commands dump into storage. If you're unsure, the help for the command should tell you where it will go.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 4 (released 2017-06-21)
Post by: isaacssv552 on July 23, 2017, 07:26:59 PM
If any Mac/Linux users could test this build (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%203.0%20WIP%205-pre1.zip) of the mod and get back to me with the results, I'd greatly appreciate it.

The command you'll want to test is "Settings". If it works at all, everything should be good for the next WIP release. :)


Can I us this mod to teach myself the salvage gantry hullmod? I want to 'learn' it now I've reached salvaging skill 3 but it doesn't seem to be on the list for the AddHullmod command.

Midnight Kitsune is correct. AddHullmod only works for hullmods that can be unlocked with a modspec.


Is it possible to implement console command that clears storage?

Sure, I'll add "clear" as a supported argument for Storage before I properly release WIP 5.


Question: how to spawn ships ?
i mean i know the command i got the info that the hull is add & all but i dunno where is stored
in older version it was stored in omnifactory storage area if a remember it right, but now cant find it

As Histidine said, it goes to your fleet. In general, the AddX commands dump their results into your fleet's cargo and AllX commands dump into storage. If you're unsure, the help for the command should tell you where it will go.
Tested on mac, works perfectly. I don't have Starsector on my linux install so I can't say whether it would work on Linux.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: LazyWizard on July 25, 2017, 06:38:33 PM
Version 3.0 WIP 5 is up, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%203.0%20WIP%205.zip) (mirror (http://www.mediafire.com/file/l8svaawuvd9a1sd/Console_Commands_3.0_WIP_5.zip)). This mod requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0) to function. The list of remaining tasks for v3.0 final can be found here (https://bitbucket.org/LazyWizard/console-commands/src/tip/v3.0%20update%20progress.txt?at=default&fileviewer=file-view-default).

Changes since WIP 4:

And here are the known issues in this release:

If you encounter anything that's not on that list, please let me know! :)
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: Drokkath on July 29, 2017, 02:36:45 AM
  • The console can no longer be summoned inside of campaign menus. This was a bug, not a feature.

And here I was thinking it was a feature! :D Moments like that make it hard for me to perceive what is a bug and what is not when it doesn't crash the game.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: Lucretius on August 30, 2017, 04:33:23 AM
hello, i post rarely here but im playing the game from time to time, im struggling a lot with adjustrelation all 100, since i dont have freetime to play the game as intended

i like to spawn a fleet of mine (using the faction mods); equip it and go around doing things, but after awhile  the relations goes back in the red , how to make all fiendly permament? thanks
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: Drokkath on September 04, 2017, 09:23:14 PM
-snip-

IIRC, one of the ways needs two commands, like being friendly with pirates faster for example and thus making pirates friendly to the player first:   setrelation pirate player 100   And then being technically friendly towards them:   setrelation player pirate 100

I haven't even touched adjustrelation so I have no idea how to put it into use, all I know is that in-game faction relations towards the player and player's relation to them drop at the same time each time you do something that is considered a no no bad by a faction(s), thus reducing the friendliness. Don't know how many times I've been an irritation to factions but that relation drop sound has become almost a white noise to me. :D

Oh yeah, and then there's this one I haven't tried: setrelation all player 100
I play SS with Nexerlin these days and use high value prisoners to boost relations after I've either mowed entire fleets down or punch in   additem prisoner 20   for example.
I use  addmarines amount  and  addcrew amount  commands too to resurrect lost robots/slaves/cannon fodder/crew and marines. :-X
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: TrashMan on September 05, 2017, 11:18:54 AM
Simply giving myself a commander without buying feels like cheating.

but sometimes the offers you get are pathetic. Maybe a way to refresh merecenaries, like one refreshes markets?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: Lucretius on September 06, 2017, 10:25:11 AM
thanks , ill test that out tomorrow, im kinda tired now, the weapon placement on the hull reminds me of mechwarrior series

in fact the colors are mostly same yellow are guns, green missiles,  the lasers are red there but here are blue no problem with that :D
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: Midnight Kitsune on September 06, 2017, 10:33:34 AM
Simply giving myself a commander without buying feels like cheating.

but sometimes the offers you get are pathetic. Maybe a way to refresh merecenaries, like one refreshes markets?
You can remove credits by adding negative credits to your account. So if you wanted to, you could do a command like "addofficer aggressive 4; addcredits -10000" and it would give you the officer and take the credits out of your account
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: Histidine on September 08, 2017, 10:02:53 PM
Should the default console hotkey be changed? Pressing Backspace in combat in dev mode ends the engagement instantly with a player victory.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: Cyan Leader on November 01, 2017, 09:45:14 PM
Yeah, not being able to scroll is a hassle when you list ships and those that you are looking for are out of the screen.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: Midnight Kitsune on November 01, 2017, 11:57:52 PM
Yeah, not being able to scroll is a hassle when you list ships and those that you are looking for are out of the screen.
if you know the faction it is from, you can just use that modder's code as an argument, (IE "list ships brdy" ) cutting down on the amount of listed ships
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: Cyan Leader on November 02, 2017, 06:52:48 AM
That's useful, thanks.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: LazyWizard on November 02, 2017, 05:42:36 PM
Should the default console hotkey be changed? Pressing Backspace in combat in dev mode ends the engagement instantly with a player victory.

Early versions of the console used to be summoned with tilde, but that caused issues with certain international keyboard layouts so was changed to a more universally available keystroke. If you have a better default in mind, let me know! :)

For now, you can change it to whichever key you like using the Settings command once you get into the campaign layer. That setting will be retained forever (it will persist between saves and survive Starsector updates) so this only has to be done once.


Yeah, not being able to scroll is a hassle when you list ships and those that you are looking for are out of the screen.

This one's frustrating for me too, because scrolling is a feature I intended to add months ago but my computer died before I could get around to it. The overlay was built with scrolling in mind so it should only take a couple lines of code to add it. The problem is making sure it looks perfect (scrolls smoothly, stops and starts where you'd expect, scrollbar is positioned and sized correctly), which requires a lot of testing and tweaking.

For the time being I'm doing all my hobbyist programming on a Raspberry Pi, which is a $35 computer that's about as powerful as a low-end smartphone. I was able to get Starsector running on it (https://i.imgur.com/M965Zbp.png) after recompiling the native libraries for ARM, but it takes around six minutes to get into a mission refit battle, the game runs at two frames per second, and the 1GB of RAM on the Pi means I can't have my IDE open at the same time as the game, meaning I can't debug or change code while testing. Modding is an exercise in frustration when it takes several minutes to test every minor edit I make, and I'm also limited to working on non-campaign features as there's absolutely no way this machine could handle the campaign layer.

Since scrolling support is theoretically such a simple change, I'll see about adding it and releasing another WIP with that as the only addition. I can't promise my sanity will still be intact afterwards, though. ;)
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: NightKev on November 15, 2017, 04:18:25 AM
It would be nice if the ForceDeployAll command could work for allied AI fleets too, for some inane reason they only deploy half the max DP at the beginning of the fight and then nothing for the rest of the entire fight, while the enemy actually reinforces most of the time.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: A Random Jolteon on November 15, 2017, 07:22:28 AM
Should the default console hotkey be changed? Pressing Backspace in combat in dev mode ends the engagement instantly with a player victory.

Early versions of the console used to be summoned with tilde, but that caused issues with certain international keyboard layouts so was changed to a more universally available keystroke. If you have a better default in mind, let me know! :)

For now, you can change it to whichever key you like using the Settings command once you get into the campaign layer. That setting will be retained forever (it will persist between saves and survive Starsector updates) so this only has to be done once.


Yeah, not being able to scroll is a hassle when you list ships and those that you are looking for are out of the screen.

This one's frustrating for me too, because scrolling is a feature I intended to add months ago but my computer died before I could get around to it. The overlay was built with scrolling in mind so it should only take a couple lines of code to add it. The problem is making sure it looks perfect (scrolls smoothly, stops and starts where you'd expect, scrollbar is positioned and sized correctly), which requires a lot of testing and tweaking.

For the time being I'm doing all my hobbyist programming on a Raspberry Pi, which is a $35 computer that's about as powerful as a low-end smartphone. I was able to get Starsector running on it (https://i.imgur.com/M965Zbp.png) after recompiling the native libraries for ARM, but it takes around six minutes to get into a mission refit battle, the game runs at two frames per second, and the 1GB of RAM on the Pi means I can't have my IDE open at the same time as the game, meaning I can't debug or change code while testing. Modding is an exercise in frustration when it takes several minutes to test every minor edit I make, and I'm also limited to working on non-campaign features as there's absolutely no way this machine could handle the campaign layer.

Since scrolling support is theoretically such a simple change, I'll see about adding it and releasing another WIP with that as the only addition. I can't promise my sanity will still be intact afterwards, though. ;)
Here lies LazyWizard
Twas a fine modder
Killed by him potato of a computer destroying his sanity
Title: Re: [0.8.1a] Console Commands v3.0 WIP 5 (released 2017-07-25)
Post by: intrinsic_parity on November 21, 2017, 08:12:32 PM
I've encountered a strange issue. The game will sometimes crash upon attempting to open the console. I'm not even sure if it's actually a crash because I get no crash dialogue, the game just quits immediately. 

I am playing with only a few utility mods:

Console Commands 3.0 WIP 5
Lazylib 2.2
ZZ Graphicslib 1.2.1
Save Transfer 1.11.3

Playing on a Mac.

The issue does not occur every time I attempt to open the console, I have been able to open and use commands successfully. It seems like it just randomly crashes sometimes, I'd say at least 50% of the time I attempt to open it.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: LazyWizard on November 30, 2017, 09:48:53 AM
Console Commands 3.0 WIP 6 is out, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%203.0%20WIP%206.zip) (mirror (http://www.mediafire.com/file/t1b111xeaigek00/Console_Commands_3.0_WIP_6.zip)). This mod requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0) to function.

This release adds basic scrolling support to the console overlay. You can scroll using the mouse wheel, pageup/down, or shift+pageup/down to go to the beginning or end of the scrollback history. Nothing fancy, and there's no scrollbar yet.

Let me know if there are any weird bugs that weren't in the previous WIP. I'd normally say there shouldn't be, but earlier today I ran into a crash in completely valid code that ran fine when built under my old setup. *shrug*


I've encountered a strange issue. The game will sometimes crash upon attempting to open the console. I'm not even sure if it's actually a crash because I get no crash dialogue, the game just quits immediately. 

I am playing with only a few utility mods:

Console Commands 3.0 WIP 5
Lazylib 2.2
ZZ Graphicslib 1.2.1
Save Transfer 1.11.3

Playing on a Mac.

The issue does not occur every time I attempt to open the console, I have been able to open and use commands successfully. It seems like it just randomly crashes sometimes, I'd say at least 50% of the time I attempt to open it.

If there's no crash dialog then I'm guessing there's a bug somewhere in my OpenGL code. I changed a few things that might make that crash less likely to occur, but those types of bugs are harder to track down than regular ones so there's no guarantee.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: zaimoni on December 01, 2017, 12:41:35 PM
Had an unpleasant surprise in my latest Nexerillin game:
Code
finditem heavy_machinery
finds heavyneedler instead.

Also fuel search was odd; problems with values at least 10,000 (e.g. Sindria).
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: ylwhrt on January 11, 2018, 02:21:38 PM
Any plans to add the ability to either add ships with dmods on them or add dmods to ships you currently have?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: mandbo on February 06, 2018, 01:50:32 AM
Hi there,
LazyWizard

 I´m just curious, but will you add some scroll button (like the one in your internet browser on your right ============================>) ?
 or any other way to move text up n´down in your console ?

Just asking, but I look impatiently for such upgrade, cause i have installed all of the "up to date" faction mods and i can not see all ID´s when typing
 command "list weapons". Without any filter it ends with letter "i" at top on my desktop (1680*1050) and that´s it.

Some "cutting" of image was necesary, but here is result.
See ya.

[attachment deleted by admin]
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Midnight Kitsune on February 06, 2018, 02:58:18 AM
Hi there,
LazyWizard

 I´m just curious, but will you add some scroll button (like the one in your internet browser on your right ============================>) ?
 or any other way to move text up n´down in your console ?

Just asking, but I look impatiently for such upgrade, cause i have installed all of the "up to date" faction mods and i can not see all ID´s when typing
 command "list weapons". Without any filter it ends with letter "i" at top on my desktop (1680*1050) and that´s it.

Some "cutting" of image was necesary, but here is result.
See ya.
Do you have the latest version? I think he updated CC to include at least mouse wheel scrolling
(And if you are out of date, please get version checker as well)
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: LazyWizard on March 21, 2018, 11:01:48 PM
Just checking in to let you all know this mod's not dead!

The console's undergone a visual overhaul since the last release. It has a new (monospaced) font, a scrollbar, proper pixel-perfect word-wrapping, and a few other minor tweaks. Here's how it looks these days:
Spoiler
(https://i.imgur.com/Zb8abWU.png)
[close]

Also, I added a command that should hopefully make debugging problems with rules.csv-based dialogs a bit less painful:
Spoiler
(https://i.imgur.com/Ru7UTY4.png)
[close]

No ETA on the next update, unfortunately. I've moved the font rendering classes to LazyLib so other mods can use them, so the next console WIP will have to wait until after the LazyLib update has been released.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: tchan on April 14, 2018, 04:03:44 PM
Love the new non-disappearing-over-time text when you type help in battle :D

But I do miss the ability to paste my copied god;infiniteammo;infiniteflux;nocooldown;reveal chain when i go into combat.  Yeah I can press up arrow to show the last command I did, but if I typed AddCrew or something else, my long chain isn't in the history. 

Is it possible to put back the ability to paste text again? :D
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Midnight Kitsune on April 14, 2018, 04:42:05 PM
You can create an allis and make it where one command does everything
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: tchan on April 14, 2018, 04:59:09 PM
You can create an allis and make it where one command does everything

Oh thanks very much :D  I thought the only way to do it was to follow that tutorial to make your own command, but I couldn't follow it.  Ok cool, I just added my alias in aliases.csv!  ;D
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: arwan on April 14, 2018, 09:42:10 PM
Hi there,
LazyWizard

 I´m just curious, but will you add some scroll button (like the one in your internet browser on your right ============================>) ?
 or any other way to move text up n´down in your console ?

Just asking, but I look impatiently for such upgrade, cause i have installed all of the "up to date" faction mods and i can not see all ID´s when typing
 command "list weapons". Without any filter it ends with letter "i" at top on my desktop (1680*1050) and that´s it.

Some "cutting" of image was necesary, but here is result.
See ya.

page up and page down keys will scroll up and down. if you had not been told yet. or found out yourself yet.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Gunner18355 on April 28, 2018, 10:34:42 AM
I'm running into a crash issue whenever I enter "OmnifacStatus" into the console. The mods I have enabled are Lazylib 2.2, Omnifactory 2.2.7 and Console Commands 3.0 WIP 6. I've copied and pasted the last bit of the log file with the error.

118683 [Thread-4] INFO  org.lazywizard.console.Console  - > OmnifacStatus
118788 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoSuchMethodError: org.lazywizard.console.ConsoleSettings.getMaxOutputLineLength()I
java.lang.NoSuchMethodError: org.lazywizard.console.ConsoleSettings.getMaxOutputLineLength()I
   at org.lazywizard.omnifac.commands.OmnifacStatus.runCommand(OmnifacStatus.java:33)
   at org.lazywizard.console.Console.runCommand(Console.java:255)
   at org.lazywizard.console.Console.parseInput(Console.java:317)
   at org.lazywizard.console.ConsoleOverlayInternal.checkInput(ConsoleOverlay.kt:290)
   at org.lazywizard.console.ConsoleOverlayInternal.show(ConsoleOverlay.kt:97)
   at org.lazywizard.console.ConsoleOverlay.show(ConsoleOverlay.kt:34)
   at org.lazywizard.console.ConsoleCampaignListener.advance(ConsoleCampaignListener.java:36)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Dag on June 24, 2018, 08:52:49 AM
Hi, I was wondering if we could get "flux shunt" hull modification added to the list of hullmods.  I've wanted to see how different ships would fare with it other then the monitor, especially with some other game mods. If it's not possible, is there any other way to add it?

Thank you in advance.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Midnight Kitsune on September 09, 2018, 03:46:22 AM
INFO  org.lazywizard.console.Console  - Known enabled mods (2):
   lw_console (Console Commands by LazyWizard, version 3.0 WIP 6, utility)
   lw_lazylib (LazyLib by LazyWizard, version 2.2, utility)

OK, so here are a few bugs I get with dev mode and using the console
First off devmode needs to be enabled, either via the console command "devmode" or via the settings file
To cause the bug
-With devmode ACTIVE, open then close the console in either the Tab map or the battle space, using the keys right control and backspace.
Note: If the deploy/ reinforcements menu is open then the bug will not occur.

Now depending on where you test this, it gives you different outcomes
-If tested in the mission's refit SIM, it kicks you out of combat and prints a message like that at the end of a mission
-If tested in campaign combat with a fleet AND you deploy a ship, it will end the combat and kick you back to the pre combat dialogue but it will act as if the enemy retreated
--HOWEVER if you DO NOT DEPLOY a ship and simply activate the console, instead of opening the console, it will end the combat
-If tested in the campaign SIM (I did this in space), the game will crash to desktop with a Null Pointer Exception.
The log will show the following error:
[Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
 at com.fs.starfarer.campaign.CampaignState.prepare(Unknown Source)
 at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
 at com.fs.state.AppDriver.begin(Unknown Source)
 at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
 at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: LazyWizard on September 09, 2018, 11:31:36 AM
Thanks for the report! This seems to be a vanilla bug, triggered by pressing backspace with devmode on. I'll report it to Alex; for now, you can rebind the console to a different key in the Settings menu.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Ali on September 18, 2018, 11:38:27 AM
Isa it possible to do commands ( assuming not there already ) that;

alow you to add a ship to a market

increase a market size ( more ships viewable at a time )

spawn x number of officers ( ie spawn 10 + officers in 1 command )

Many thanks for any guidance!
 :)
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Midnight Kitsune on September 20, 2018, 10:03:56 PM
I'm pretty sure you can add a number at the end of the "addofficer" command to spawn multiple officers. Typing in the command "help addofficer" should give you the argument setup
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Ali on September 21, 2018, 02:09:07 PM
ah couldn't find anythin on that front, only personallity, behaviour etc :/
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: LazyWizard on September 21, 2018, 02:26:04 PM
Isa it possible to do commands ( assuming not there already ) that;

alow you to add a ship to a market

Not in the current version, but I'll see what I can do. I'll probably add an optional argument for it to AddShip.


Quote
increase a market size ( more ships viewable at a time )

Not yet. Starsector's markets are one of those things I've never bothered to learn the intricacies of (as I've never written a faction mod, I've never needed to know), so there are few commands dealing with them at the moment. The next version does have a command to adjust stability, but I haven't fully tested it for long-term stability.

For now you can use ForceMarketUpdate to re-roll what stock they do have available. I'll definitely add more market commands in the future. If you have any other ideas for that sort of thing, let me know! :)


Quote
spawn x number of officers ( ie spawn 10 + officers in 1 command )

No, and AddOfficer already has so many optional arguments that I'd be hesitant to add another. The best you can do now is add a single officer, then press up and enter to repeat the last command X number of times. I might add a RepeatLast <numTimes> command, but that'd require rewriting how the command history is handled so it will probably not be in the next version.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Ali on September 21, 2018, 03:46:53 PM
ah k many thanks!

Will look fwd to next update...

Many thanks for console commands so far.. couldn't play ss without it!! ;D
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Cyan Leader on October 10, 2018, 10:56:44 AM
It'd be nice to have an InfiniteCR command to affect every ship in the battlefield and not only the player's flagship.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Vayra on October 26, 2018, 06:51:50 PM
Is there any way to spawn derelict ships on the campaign map? I can't find one in 'help' and that'd be nice to have.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: LazyWizard on October 26, 2018, 06:54:45 PM
Not at the moment, but I'll add one in.

In the meantime, you can enable devmode and press M (IIRC) to spawn a random derelict.


It'd be nice to have an InfiniteCR command to affect every ship in the battlefield and not only the player's flagship.

I'm planning on updating all combat cheat toggle commands to take arguments: PLAYER, FLEET, ENEMIES, ALL (defaulting to PLAYER if no argument is passed in). This feature might not make it into the next version, which will be released after 0.9a lands.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: CopperCoyote on November 08, 2018, 03:03:30 PM
Is it possible to change the font size? My vision isn't quite correctable to 20/20 so i have to squint and get close to the screen to read the text. I checked settings, but couldn't find anything about that.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: LazyWizard on November 08, 2018, 04:18:05 PM
Using the Settings command, it should be found under Overlay Settings -> Text Settings -> Text Scaling Percentage.

I'm actually not sure if that setting is in WIP 6. If not, here is a dev version (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%203.0%20WIP%207-dev.zip) I posted on Discord a while back that should include it.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: CopperCoyote on November 09, 2018, 05:37:23 PM
Thanks!
 I just double checked the stable version, and there wasn't a text scaling percentage there.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: LazyWizard on November 12, 2018, 07:09:36 PM
Hey, just a heads up to anyone using one of the dev versions of this mod that are floating around: those dev versions may conflict with today's LazyLib release (http://fractalsoftworks.com/forum/index.php?topic=5444.msg231508#msg231508). You can update to this dev version (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%20dev%202018_10_23.zip) from last month to avoid the issue.

People still on WIP 6 should be fine, though honestly the above dev version is likely far better and more stable than WIP 6. :)
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: Tyranicus on November 16, 2018, 12:23:58 PM
I keep getting this error "java preferences access not allowed to scripts" any help?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30)
Post by: LazyWizard on November 16, 2018, 12:29:38 PM
This mod is not updated for 0.9a yet. It'll probably be a while before there's a proper release (I was working on several half-finished features when 0.9a came out), but here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%20(super%20buggy%20special%20edition).zip) is a barely tested, probably extremely buggy dev version to tide everyone over until I can get v3.0 final out. As always, this mod requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

SpawnFleet and SetCommission are disabled in this build as I haven't gotten around to updating them for 0.9a yet. Also, any console customization you've done has been lost with the move to the common data API that was added in 0.9a. You'll need to run the Settings command again to get things back to the way you prefer them.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: tchan on November 17, 2018, 02:10:07 PM
Thanks for making the quick update wip for .9a  ;D

I know you said it's super buggy, so I'm wondering if one of the bugs include turning on God mode would prevent enemy AI from attacking you?   ???

[I disabled all other mods and am using only Console Commands .9 dev and lazy lib]
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: LazyWizard on November 17, 2018, 04:26:49 PM
The invincibility itself is implemented the same way that it was in prior versions. There might have been a change to the vanilla AI to make them not target something they can't damage, in which case I'll have to do some tweaking to get it to work properly.

And just to warn you: the combat cheat commands were among the "half-finished features" I mentioned, and as a result the God command is broken in other ways, namely that the invincibility is not unapplied when god mode is toggled off in the dev version. I'd avoid using it entirely for the time being.

Here are the commands that have known issues:

If anyone runs into something that's not on that list, please let me know!
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: LazyWizard on November 18, 2018, 12:11:31 AM
I spent today fixing most of the outstanding bugs I knew about. You can grab an updated 0.9a-compatible dev version here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%20(slightly%20less%20buggy%20special%20edition).zip). As always, this mod requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

The changes I made today can be found here (https://bitbucket.org/LazyWizard/console-commands/commits/all).

Known problems:

If you encounter anything else, no matter how minor, please let me know.

Version 3.0 final should be out within the next few days.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: Midnight Kitsune on November 18, 2018, 09:33:25 AM
I'm gonna add some "wishlist items" here for console if you don't mind
-The ability to spawn in stuff like nanoforges. Should be simple right?
-The ability to look for a planet of a specific survey level or type? Could be useful for testing things
-The ability to spawn admins
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: Fantastic Chimni on November 18, 2018, 11:26:48 AM
Is there a way to use the console to change the owner of an AI marketplace? Like say, if I wanted to take a pirate market and make it owned by a vanilla or mod faction?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: LazyWizard on November 18, 2018, 04:23:16 PM
I'm gonna add some "wishlist items" here for console if you don't mind
-The ability to spawn in stuff like nanoforges. Should be simple right?

Already in! Use "AddSpecial <id> [optionalData]", and "list specials" to get the valid IDs.

Obviously using this will spoil some of 0.9a's new content, so beware!

Quote
-The ability to look for a planet of a specific survey level or type? Could be useful for testing things
-The ability to spawn admins

I'll look into these, thanks for the suggestions!


Is there a way to use the console to change the owner of an AI marketplace? Like say, if I wanted to take a pirate market and make it owned by a vanilla or mod faction?

There's no built-in command for this yet, (and depending on how fragile markets are, there might never be one), but you can use RunCode to accomplish it if it's possible.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: Midnight Kitsune on November 18, 2018, 06:52:57 PM
I'm gonna add some "wishlist items" here for console if you don't mind
-The ability to spawn in stuff like nanoforges. Should be simple right?
Already in! Use "AddSpecial <id> [optionalData]", and "list specials" to get the valid IDs.
Would this work for blueprints as well?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: LazyWizard on November 18, 2018, 06:56:49 PM
Yes, for example "addspecial ship_bp onslaught", "addspecial fighter_bp talon_wing", "addspecial modspec frontshield", or "addspecial weapon_bp lightmg". The various IDs can be found with "list ships", "list wings", "list modspecs", and "list weapons" respectively.

A proper AddBlueprint command will be added later.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: Midnight Kitsune on November 18, 2018, 07:11:39 PM
AWESOME! And thanks for the examples!
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: Auraknight on November 21, 2018, 10:01:49 PM
If I might make a suggestion for this?

Advancing time. Sure, one can enter a stable orbit, and hold shift, but that takes about 5 seconds per day! Waiting three minutes for a month to tick on by can really add up.
Primary things I want this to accomplish: Time out, and bring in new bounties; Restock stations; Replenish defense fleets, and hurry build times.

Mind you, I haven't a clue how this would affect the game or AI, especially given how there's a loadingscreen at the start of a new game that's advancing time
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: Ali on November 22, 2018, 02:54:46 AM
Will it be possible to add & remove features from planets going forward? Ie, remove trace ore deposits, add rich ore deposits etc..

Also is it possible to increase the structure cap from 9 per planet? Would a slider appear if so?

Many thanks for efforts!! This is my No1 mandatory mod for any playthrough!! :)
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: gofastskatkat on November 22, 2018, 12:52:16 PM
Not sure what Im doing wrong (if I am doing anything wrong that is) but when I run the settings command and try to make it to where all the ships and stuff gets sent to my "Home" planet, its kinda darkened and I cant toggle it, I used the sethome one to set my home to one of my colonies, but it still wont work. What should I do or is it an issue with the .9a dev version of CC?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: Arkiuz on November 22, 2018, 04:31:15 PM
Perhaps I'm in the minority here but I feel the 'God' command should be a blanket command for infinite ammo/cr/flux.  I mean, if you're flipping on the invincibility, you'd may as well have the rest of the effects.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: LazyWizard on November 23, 2018, 03:20:48 PM
If I might make a suggestion for this?

Advancing time. Sure, one can enter a stable orbit, and hold shift, but that takes about 5 seconds per day! Waiting three minutes for a month to tick on by can really add up.
Primary things I want this to accomplish: Time out, and bring in new bounties; Restock stations; Replenish defense fleets, and hurry build times.

Mind you, I haven't a clue how this would affect the game or AI, especially given how there's a loadingscreen at the start of a new game that's advancing time

I'll look into it, but I wouldn't get my hopes up if I were you. I'm 99% certain mods can't mess with the game's timescale the way the new game advance can.


Will it be possible to add & remove features from planets going forward? Ie, remove trace ore deposits, add rich ore deposits etc..

Adding/removing conditions is absolutely on my to-do list.

Quote
Also is it possible to increase the structure cap from 9 per planet? Would a slider appear if so?

From what I've overheard on the Discord, the structure cap is currently hardcoded to 12. Sorry about that!


Not sure what Im doing wrong (if I am doing anything wrong that is) but when I run the settings command and try to make it to where all the ships and stuff gets sent to my "Home" planet, its kinda darkened and I cant toggle it, I used the sethome one to set my home to one of my colonies, but it still wont work. What should I do or is it an issue with the .9a dev version of CC?

That setting isn't implemented yet, hence why it's grayed out. It's been on my to-do list for a while, so I'll try to get it in for the next release. :)


Perhaps I'm in the minority here but I feel the 'God' command should be a blanket command for infinite ammo/cr/flux.  I mean, if you're flipping on the invincibility, you'd may as well have the rest of the effects.

At its core the console is a mod testing tool, and God is meant to test a ship's weapons/stats in combat without worrying about it dying. Infinite flux and ammo would detract from that.

That said, there is the alias 'tc' (short for "toggle cheats") that activates god, infiniteflux, infiniteammo, and reveal in one command. You can use "list aliases" to see the full list of aliases (and aliases will be editable in-game soon).
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: zothos on December 01, 2018, 12:00:57 PM
could it be that some items should not be added to the player inventory? For example "modspec" breaks the game :D
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: Statius on December 01, 2018, 12:11:07 PM
could it be that some items should not be added to the player inventory? For example "modspec" breaks the game :D
Can't you just use addhullmod for that? I think the issue with just adding modspec to your inventory is that it's adding the item to give you a mod, but doesn't have a hull mod specified on the item.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: zothos on December 01, 2018, 01:27:21 PM
Its more or less not an issue for me. I just tried some of the items and the game crashed. I was also able to add a prestine nanoforge to my game with some sort of metadata, that also crashed the game. Should i collect these crashes and report them or are these kind of problems known?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: LazyWizard on December 01, 2018, 01:58:07 PM
I've already changed it for the next version so you can't spawn a blueprint or modspec without data (the cause of your first crash).

There's nothing I can do about the player passing in garbage data, but I'm also not able to recreate that crash with the pristine nanoforge. Do you remember what data you passed in?
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: zothos on December 01, 2018, 03:08:07 PM
I tried recreating the issue with the nanoforge but so far no luck, maybe just a mixup with a modspec item that should not be added to the player inventory in the first place. I will try my best again in the next version :) Thanks for your help!
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: cybersol on December 02, 2018, 07:20:41 PM
I just wanted to say this mod is awesome. I originally installed it to fix a bug I encountered with a mission and an explore data event conflicting. More recently I been testing some of the mechanics in the game around colony and planets. Here is some code I learned that may be useful to others:

Colony test, wanted the hazard lower to compare with another colony
Code
RunCode Global.getSector().getStarSystem("Galaver").getEntityByName("Hantu Raya").getMarket().removeCondition("high_gravity")

Creating planet with low yield of several things for testing
Code
RunCode Global.getSector().getStarSystem("Beta Labraxas").addPlanet("Matrix", Global.getSector().getStarSystem("Beta Labraxas").getEntityByName("Beta Labraxas"), "Matrix", "terran", 0, 190, 2250, 30)
RunCode Global.getSector().getStarSystem("Beta Labraxas").getEntityByName("Matrix").getMarket().addCondition("habitable")
RunCode Global.getSector().getStarSystem("Beta Labraxas").getEntityByName("Matrix").getMarket().addCondition("extreme_weather")
RunCode Global.getSector().getStarSystem("Beta Labraxas").getEntityByName("Matrix").getMarket().addCondition("farmland_poor")
RunCode Global.getSector().getStarSystem("Beta Labraxas").getEntityByName("Matrix").getMarket().addCondition("rare_ore_sparse")
RunCode Global.getSector().getStarSystem("Beta Labraxas").getEntityByName("Matrix").getMarket().addCondition("volatiles_trace")

# Reference for more planetary modifiers
http://fractalsoftworks.com/starfarer.api/constant-values.html#com.fs.starfarer.api.impl.campaign.ids.Conditions.RUINS_WIDESPREAD

Fixing one of the bugged planets in Penelope's Star, by adding suitable conditions
Code
RunCode import com.fs.starfarer.api.impl.campaign.procgen.PlanetConditionGenerator; import com.fs.starfarer.api.impl.campaign.procgen.StarAge; PlanetConditionGenerator.generateConditionsForPlanet((PlanetAPI)Global.getSector().getStarSystem("Penelope's Star").getEntityByName("Ithaca"), StarAge.OLD)

And just because I thought of it now, another suggestion for a feature that I could not find yet is to respec an officer or administrator. But seriously man, thanks for the mod!
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: LazyWizard on December 02, 2018, 07:29:55 PM
Good work!

Which reminds me:
Spoiler
(https://cdn.discordapp.com/attachments/283917938124390410/518463924459274271/unknown.png)
[close]

There will be a ToggleConditions command in the next version, which should make lengthy RunCode snippets less necessary. :)

You will also now be able to use the console when in dialogs, and most campaign commands will target the entity you're interacting with. The procgen market IDs make finding a specific market with List difficult, so this is the next best option.

As for Respec supporting officers/administrators, it's on my to-do list.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: cybersol on December 02, 2018, 07:47:20 PM
I figured you were working on this from an earlier comment. But seeing more RunCode examples would have helped me (especially Global access and imports from more of the API), so I thought I would post what I found. Also, the code to fix the stars in Penelope's took some time to figure out, and it's a nice but not broken system after you fix the planets there.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: LazyWizard on December 02, 2018, 08:00:34 PM
The "good work" comment wasn't meant to be sarcastic or patronizing, and I apologize if it came across that way. I'm glad to see more examples of RunCode use out there. It's one of the more esoteric commands in the mod, with some hidden caveats that make using it tricky. The lack of documentation for it just makes things worse.

Here's a bit of information that might have helped you earlier:
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: DingooS on December 06, 2018, 09:08:37 PM
Have any date to release the next update? i want sooooo much to use the update version of the console commands!
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: LazyWizard on December 06, 2018, 10:20:05 PM
SoonTM. The update is nearly done, but I ran into a few complications with the new commands regarding industries and market conditions. Also, the changelog is currently about 80 commits out of date, so that'll be fun.

If you're desperate, you can download the current dev here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%20(3.0%20WIP).zip). You can see what's been added here (https://bitbucket.org/LazyWizard/console-commands/commits/all), and what's left to do here (https://bitbucket.org/LazyWizard/console-commands/src/default/src/main/mod/v3.0%20update%20progress.txt).

I'd avoid using AddIndustry until it's finished (it works, but doesn't upgrade existing structures correctly yet), but aside from that I'm not aware of any other bugs. Every other issue (http://fractalsoftworks.com/forum/index.php?topic=4106.msg232109#msg232109) with the previous dev should have been fixed. Please let me know if you encounter any new ones!

Edit: you know what, let's mark this as one last proper WIP release before 3.0 final. It should be stable enough. I'll have Version Checker notify users that it's available.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on December 07, 2018, 08:16:01 AM
Edit: you know what, let's mark this as one last proper WIP release before 3.0 final. It should be stable enough.

:-[

I uploaded a quick fix for a crash during the tutorial, get it here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%20(3.0%20WIP).zip).

Note to self: in the future, don't tempt fate.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: XpanD on December 08, 2018, 01:40:41 AM
Is there a way to quickly remove the inhabitants of a planet using this mod, or to remove the relations penalty when fuel bombing? Using "adjustrelation" works, but is a bit cumbersome since it requires so much copy-pasting.

Thanks for all the hard work! This mod is a must-have for my slightly strange (trying every ship and weapon I can) runs.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on December 08, 2018, 06:50:35 AM
Added a DestroyColony command. You monster.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: XpanD on December 08, 2018, 08:45:58 AM
Whoa, thank you! I'll put it to good use. ;)
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: PeepingPeacock on December 09, 2018, 04:54:59 PM
Added a DestroyColony command. You monster.

Fantastic! Takes away the burden of microing a colony to make sure it wont grow and become unable to be abandoned.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: A Random Jolteon on December 09, 2018, 08:54:50 PM
DestroyColony command
Ahem.
LUUUUUDS! Get your butts over hear!!!
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: TheWetFish on December 11, 2018, 01:37:53 AM
Toggling dev mode off with the devmode command does not prevent full control of other faction's colonies
i.e.
- devmode true in settings.json
- start game
- devmode console command, toggling dev mode off
- interact with Jangala, trade, colony info, allowed to toggle free port status

The devmode console command is turning off other dev mode features like the additional interaction menu options so I'm not sure this is a mod bug or not.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on December 11, 2018, 02:51:22 AM
That's not something I can fix, unfortunately. How devmode is handled is purely up to Starsector; the command just toggles it on and off.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: dk1332 on December 11, 2018, 05:24:56 AM
Added a DestroyColony command. You monster.

And thus, the end of Pather's terrorism has come.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: TheWetFish on December 11, 2018, 05:35:28 PM
Toggling dev mode off with the devmode command does not prevent full control of other faction's colonies

Looks like there's a bit more to devmode now, referencing http://fractalsoftworks.com/forum/index.php?topic=14643.0
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on December 12, 2018, 09:57:39 AM
Toggling dev mode off with the devmode command does not prevent full control of other faction's colonies

Looks like there's a bit more to devmode now, referencing http://fractalsoftworks.com/forum/index.php?topic=14643.0

Ah, I stand corrected. Added a "DevMode also toggles debug flags" setting to the Settings command (defaults to true), and updated the DevMode command accordingly. Thanks for following up on that! :)
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Marshall Briggs on December 14, 2018, 04:54:37 PM
Im not entirely sure if its intentional or a bug but god mode only affects your ship but not the rest of your fleet.

*edit. i guess i should have used the help command huh?
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on December 14, 2018, 04:56:51 PM
It is intentional. You can pass in PLAYER, FLEET, ENEMY, or ALL to any combat cheat to control who is affected by it (the capitalization doesn't actually matter). It defaults to PLAYER if you don't pass in an argument.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Skay24 on December 20, 2018, 08:09:08 AM
Will there be option "allblueprints"??
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Wyvern on December 24, 2018, 12:52:32 PM
A hopefully small request: for openmarkets to work with planet name in addition to market ID.  For player markets, this can get... absurd.  For example, the market ID for my current colony is "market_system 2355_moon_system_2355_system_2355:planet_5_1", while the planet's actual name is "Stray Dog".
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on December 24, 2018, 01:03:38 PM
Will there be option "allblueprints"??

A hopefully small request: for openmarkets to work with planet name in addition to market ID.  For player markets, this can get... absurd.  For example, the market ID for my current colony is "market_system 2355_moon_system_2355_system_2355:planet_5_1", while the planet's actual name is "Stray Dog".

Added both of these. Thanks for the suggestions!
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kulverstukass on December 25, 2018, 10:58:14 AM
As I haven't found way to change faction for a market (outside of possible script writing), that's gonna be my suggestion :)

Disclaimer: in my current playthrough, Agreus went decivilized rather early, and I've been quite disappointed that while such an unfortunate event could happen to NPC-Faction, there is no through-gameplay way to help restore order, or alike.
And thanks for your efforts altogether, half of my mods are "utility" ones, and about half of them are yours ;D
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Worachot on January 03, 2019, 05:23:18 PM
can you respec commanders and yourself with any command?
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Midnight Kitsune on January 03, 2019, 09:06:05 PM
can you respec commanders and yourself with any command?
YOu can respec yourself with the "respec" command. However you ca NOT respec officers currently.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on January 05, 2019, 03:21:42 PM
Respeccing officers will be in the next version:
Spoiler
(https://i.imgur.com/sGMzCue.png)

(https://i.imgur.com/vz0u1eh.png)
[close]
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: uzsibox on January 07, 2019, 10:13:29 AM
Respeccing officers will be in the next version:
Spoiler
(https://i.imgur.com/sGMzCue.png)

(https://i.imgur.com/vz0u1eh.png)
[close]

The officers I added don't seem to gain exp....
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on January 07, 2019, 03:54:46 PM
The officers I added don't seem to gain exp....

Are you playing with the Nexerelin beta? There was a bug where officers in cruisers and capitals didn't receive experience.

It should be fixed by grabbing the hotfix in the Nexerelin OP (http://fractalsoftworks.com/forum/index.php?topic=9175.0).
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: uzsibox on January 08, 2019, 07:57:37 AM
The officers I added don't seem to gain exp....

Are you playing with the Nexerelin beta? There was a bug where officers in cruisers and capitals didn't receive experience.

It should be fixed by grabbing the hotfix in the Nexerelin OP (http://fractalsoftworks.com/forum/index.php?topic=9175.0).
Reloading the save fixed it but yes it was probably nexerelin
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: grinningsphinx on January 09, 2019, 01:47:18 PM
Hello LW!

Is there a way to add spaces to a system to install stabilizeds areas for comm relay's etc to a system that doesnt have them etc?

Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on January 09, 2019, 01:55:07 PM
The next version will have a SpawnCustomEntity command.

Until then, you can spawn one at the player fleet's location by copy+pasting the following command into the console:
Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "stable_location", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: grinningsphinx on January 09, 2019, 03:37:34 PM
The next version will have a SpawnCustomEntity command.

Until then, you can spawn one at the player fleet's location by copy+pasting the following command into the console:
Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "stable_location", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }

Very many thanks!
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Neidra on January 14, 2019, 05:29:29 AM
Hey guys!

I'm kind of new to this forum so thanks for having me here.  ;D
First of all thanks LazyWizard for the awesome mod. It helped me out in some situations in the game.
But nowadays whenever i open the game with the Console Commands mod the game crashes and says:
"Fatal:
 com.fs.starfarer.api.SettingsAPI.readTextFileFromCommon(Ljava/lang/String;)Ljava/lang/String;
 Check starsector.log for more info"

When i first used the mod it went smoothly without a crash, but now it gives me this every time i try to open up the game with the mod. I tried using every mod separetly from each other and this is the mod that gives me this crash.  It gives me this error at every version of the game. Can you LazyWizard or anyone help me out why it gives me this error?

Thanks in advance!
                           -Neidra

(Oh and sorry for my bad english :-[ )
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on January 14, 2019, 06:09:43 AM
Are you running the latest version of Starsector (http://fractalsoftworks.com/2018/11/16/starsector-0-9a-release/)? If you're trying to use the current console release with an old version of Starsector it will crash. readTextFileFromCommon() is a method the console relies on that was only added in Starsector 0.9a.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Neidra on January 14, 2019, 10:06:46 AM
Oh shoot..

Well, that may be the problem, because i'm playing in the 0.8.1 version of the game because of the Blackrock Drive Yards mod witch is made for 0.8.1.
I almost forgot. When i tried the mod with 0.9.1 the game crashes with the same error too. So can you advice me with something to cure the problem?

Thanks in advance!
                          -Neidra

EDIT: Nevermind. It works. I just downloaded the older version of the mod that is compatible with the 0.8.1 version of the game! ;-)
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Ali on January 14, 2019, 12:12:14 PM
Any word on whether add/remove conditions from planets will make next release? I know u said it was Todo, jus wondered ;)

Also is it possible to spawn a pirate fleet of X strength? I'm sure this used to be possible? I know Dev mode & "n" triggers a fleet but not sure on the strength.. Be cool to be able to spawn a pirate armada. ;D

Many thanks regardless ;)
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on January 14, 2019, 02:48:47 PM
Any word on whether add/remove conditions from planets will make next release? I know u said it was Todo, jus wondered ;)

Also is it possible to spawn a pirate fleet of X strength? I'm sure this used to be possible? I know Dev mode & "n" triggers a fleet but not sure on the strength.. Be cool to be able to spawn a pirate armada. ;D

Are you on WIP 7.6? Both of those should be in.

You can add/remove conditions with AddCondition and RemoveCondition, for example "addcondition farmland_bountiful". You can get a list of all condition IDs with "list conditions", and a list of conditions on the current market by entering AddCondition or RemoveCondition without arguments.

You can spawn fleets with SpawnFleet. For example, "spawnfleet pirates 750 Big Ball of Death" (the name is optional).
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Thyrork on January 14, 2019, 03:27:03 PM
Is there commands to unlock an entire factions ships to build? Or specific ones? Spawning the packages is possible but I'd love to get every ship from a certain era or faction.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on January 14, 2019, 04:39:17 PM
There is not, and it's probably a bit too niche a use case to add as a separate command. I'll look into adding an optional faction argument to the existing AllBlueprints command.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Thyrork on January 14, 2019, 04:55:16 PM
Thank you.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Wyvern on January 18, 2019, 07:45:16 PM
Another example of a use of runCode; I worked this one out after a game crash cost me a recently-salvaged ship with a set of d-mods I was quite pleased with, and instead gave me ones I'd need to restore.
Code
RunCode ((FleetMemberAPI)$playerFleet.getFleetData().getMembersInPriorityOrder().get(0)).getVariant().addPermaMod("defective_manufactory")
This will add the specified d-mod to the first ship in your fleet.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Reedyboyrampage on January 19, 2019, 06:06:21 PM
I noticed under the conditions lists that it contains the various types of planets, for example volcanic, or jungle, but when these conditions are added or removed nothing seems to change. Is this a WIP for changing planets to different kinds, or is that even possible? It would be nice to be able to spruce up some of the larger systems with more interesting planets.     
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Dezgard on January 23, 2019, 02:20:41 AM
Will there be option "allblueprints"??

A hopefully small request: for openmarkets to work with planet name in addition to market ID.  For player markets, this can get... absurd.  For example, the market ID for my current colony is "market_system 2355_moon_system_2355_system_2355:planet_5_1", while the planet's actual name is "Stray Dog".

Added both of these. Thanks for the suggestions!

Can't get the allblueprints command to work or am I doing it wrong?
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on January 25, 2019, 10:06:54 PM
Can't get the allblueprints command to work or am I doing it wrong?

It was added to the dev version, which hasn't been published yet.

Edit: I realize the slow pace of updates is kind of a problem, so I spent today setting things up so a dev version of the mod is automatically built and uploaded every time I push changes to the online repo. You can grab these dev versions here (https://bitbucket.org/LazyWizard/console-commands/downloads/) (higher = newer).

Note that these versions of the mod are in-development, so there is no guarantee that they will be stable, or even work at all! The dev version will always have the latest changes I've made, even if that means something in it is still only half-finished. There will also be no version checker support, so you won't be notified of updates until the next stable version is released. These are just to tide users over until the next official release.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Dezgard on January 27, 2019, 12:47:00 PM
Can't get the allblueprints command to work or am I doing it wrong?

It was added to the dev version, which hasn't been published yet.

Edit: I realize the slow pace of updates is kind of a problem, so I spent today setting things up so a dev version of the mod is automatically built and uploaded every time I push changes to the online repo. You can grab these dev versions here (https://bitbucket.org/LazyWizard/console-commands/downloads/) (higher = newer).

Note that these versions of the mod are in-development, so there is no guarantee that they will be stable, or even work at all! The dev version will always have the latest changes I've made, even if that means something in it is still only half-finished. There will also be no version checker support, so you won't be notified of updates until the next stable version is released. These are just to tide users over until the next official release.

Thanks for the info's!
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Histidine on January 28, 2019, 05:04:53 AM
How does console decide which dialogs it can be opened within? e.g. I noticed it can be opened when docking at a market, but not when interacting with a comm relay or cargo pods, or in my custom InteractionDialogPlugin.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on January 28, 2019, 05:10:50 AM
In WIP 7.6 the console can be opened during combat (the COMBAT_CAMPAIGN, COMBAT_SIMULATION, and COMBAT_MISSION contexts), on the campaign map (the CAMPAIGN_MAP context), and in any dialog that has a market attached (the CAMPAIGN_MARKET context).

In the latest dev builds (https://bitbucket.org/LazyWizard/console-commands/downloads/) it can be opened anywhere outside of menus (non-market dialogs will use the CAMPAIGN_MAP context for now).
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Thyrork on January 28, 2019, 10:50:09 AM
Apologies if I'm blind, but is there a command to spawn an object like the various functional satellites, broken gates or abandoned/inhabitable space stations?

Sometimes I'd like my homeworld to have a creepy gateway to restore using the gateway mod stare lovingly at. Or a inhabited space station to act out the idea of it being the smelting complex for a mining system.

E: asked directly.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Shuka on February 09, 2019, 08:29:25 PM
Cool mod thanks LW
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Troika on February 13, 2019, 02:31:22 AM
Would it be possible to add wildcards for the addspecial command? So, for example, I could go "addspecial weapon_bp swp* and it'd add blueprints for every weapon with the prefix swp to my inventory.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: ASSIMKO on February 23, 2019, 06:47:14 AM
How to add gates with this mod to existing systems ???
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Grizzlyadamz on March 15, 2019, 09:30:33 AM
Has anyone ever reported lost cargo after using the "endcombat" command? Stuff went missing for me after my ships safely extracted from an AI's botched station assault, and the only things I can think of which could cause that would be if allied ship losses make you lose cargo, or the game thinks fightercraft are ships, and using endcombat when they're all that's left on the field is tricking it into thinking you lost something.

-edit
Turns out it was a bug, and allied losses were counting.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Vayra on March 20, 2019, 03:31:18 PM
i have to keep telling people to get CC to be able to escape the salvage-dialogue-NPE bugbear

but then they're like "i have the latest CC"

and i'm like "well wtf"

and then i remember half an hour later that it's the dev version that they need

but it is too late

let this post serve as a warning to ye all (lazy pls push this change to the release version i;m beg)
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: diegoweiller on March 25, 2019, 01:27:18 PM
Any command list of sorts?
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Blothorn on March 25, 2019, 01:36:40 PM
As noted in the OP, 'help' alone gives a list of commands (including those added by mods).
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: diegoweiller on March 25, 2019, 02:20:07 PM
Thanks, fist time using it, by help you mean help command? Right?
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Blothorn on March 25, 2019, 04:18:06 PM
Correct.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Midnight Kitsune on April 08, 2019, 11:24:35 AM
(Using the latest wip build) I have noticed that population conditions don't actually do anything. I've tried setting it to the level bellow and letting the colony grow to the next level but that doesn't do anything. And neither does just setting the level directly
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on April 14, 2019, 06:17:02 PM
(Using the latest wip build) I have noticed that population conditions don't actually do anything. I've tried setting it to the level bellow and letting the colony grow to the next level but that doesn't do anything. And neither does just setting the level directly

This is fixed in the latest dev (https://bitbucket.org/LazyWizard/console-commands/commits/all) (download by clicking the newest green checkmark on the right) - use the new SetMarketSize command.

Sorry for the late response; I haven't had much time for modding lately.


let this post serve as a warning to ye all (lazy pls push this change to the release version i;m beg)

Heh, hopefully someday SoonTM.
Title: Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Lucretius on April 20, 2019, 12:16:45 PM
i mostly play this game on the my freetime but wow in 0.9 there is a lot of new things to discover even battle station engagements neat

one thing the adjustrelation (i use all 100 or 200)  seems doesnt work overtime, the factions get neutral/hostile while time passes
i want to stay at 100 always friendly while i engage them or not

i like to experiment a lot with the ships weapon/systems  
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Shield on May 18, 2019, 06:56:20 AM
I am assuming an update is in the works for 9.1?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Schwartz on May 18, 2019, 07:31:35 AM
Have been using the dev version without problems. I do only use it for a select few commands however.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Shield on May 18, 2019, 07:44:17 AM
Have been using the dev version without problems. I do only use it for a select few commands however.

you know I realized my error, didn't update lazylib
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Shoat on May 21, 2019, 07:46:52 PM
Quick question: Is there (or is it possible to make in the future) a command to rename a system (both the sector map dot and the star at the center)?

Finding a really nice colonizable planet in a good position only to then be stuck with a pretty boring system name is slightly annoying. The main game already features renaming colonized worlds which is nice, but I'm not sure what to do about the system name.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Six__Nix on May 25, 2019, 02:08:58 PM
Love this mod as well as most of LazyWizard's mods!!

2 requests if possible?

1. If you press the up arrow while in the console it will select the last command you used similar to bash or cmd, however, it only stores the last 1 command used.  Would it be possible to have it save the last few (5 or 6) unique commands?

2. Love the tab completion feature but would it be possible to have to cursor go to the end of the command, possibly even with a space after it, rather than leaving the cursor in the middle of the command?

Thanks!!
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Nick XR on May 30, 2019, 10:21:46 PM
In the spirit of requests and saving last commands, what if it saved your command history to the common folder so it would be preserved between restarts and what not.

Would make my development workflow just a little easier since I wouldn't have to type in the same commands ever time I load up a save to check something out and have to use Console Commands (to spawn a fleet or something like that)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Midnight Kitsune on June 02, 2019, 09:44:28 PM
Feature request: Can we make the command that makes stable locations in system a real command? IE one that is executed via something like "addstablepoint" and not that string of code?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: stormbringer951 on June 03, 2019, 03:05:14 AM
Feature request: Can we make the command that makes stable locations in system a real command? IE one that is executed via something like "addstablepoint" and not that string of code?

If LazyWizard wants the code for core, I've already implemented this as a console command using Alex's method for picking stable locations randomly instead of current player location. I was planning to put it in a small mod with some other helpful functions.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: vorpal+5 on June 03, 2019, 03:58:27 AM
Oh please do!

And add an abandoned station too, so we can setup resupply cache!  :)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: NivMizzet13 on July 27, 2019, 02:37:39 PM
Hello! Your mod is amazing! and you're amazing! And you should feel amazing!

Is there a console command methods for altering a planet's properties? Let's say I wanna change a mediocre looking planet into some sort of Eden. Is there a way to do that?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on July 27, 2019, 02:51:49 PM
Is there a console command methods for altering a planet's properties? Let's say I wanna change a mediocre looking planet into some sort of Eden. Is there a way to do that?

You can't change the type or appearance of a planet, but you can give it the market conditions you want. So you could have your homeworld look like a fiery hellscape but actually be a garden world if you wanted.

While you're at the planet, use list conditions to get the IDs of the conditions you want, then addcondition <condition>.

(You may be able to change the appearance/type of the planet with RunCode, but I haven't tested this. Use at your own risk!)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: NivMizzet13 on July 27, 2019, 04:57:58 PM
Is there a console command methods for altering a planet's properties? Let's say I wanna change a mediocre looking planet into some sort of Eden. Is there a way to do that?

You can't change the type or appearance of a planet, but you can give it the market conditions you want. So you could have your homeworld look like a fiery hellscape but actually be a garden world if you wanted.

While you're at the planet, use list conditions to get the IDs of the conditions you want, then addcondition <condition>.

(You may be able to change the appearance/type of the planet with RunCode, but I haven't tested this. Use at your own risk!)

I took the time to read through it all carefully, and now i'm playing god with the planets! Is there also a way to modify colony size? I can change population size, but that doesn't seem to change colony size yet
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on July 27, 2019, 05:03:33 PM
Yes, the SetMarketSize command. Make sure you're using the latest dev version (https://bitbucket.org/LazyWizard/console-commands/downloads/) - I'm not sure that command is in the stable release.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Midnight Kitsune on July 27, 2019, 09:12:49 PM
Yes, the SetMarketSize command. Make sure you're using the latest dev version (https://bitbucket.org/LazyWizard/console-commands/downloads/) - I'm not sure that command is in the stable release.
I've tried both setpop and doing the actual condition and both won't set it to size 10, only 9
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on July 27, 2019, 09:41:00 PM
It was deliberately capped at 9, but I can't remember why I set it up that way. I've changed it to 10. I'm currently having trouble pushing to Bitbucket, so I don't know when the updated dev build will be live.

Edit: and it's up.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: NivMizzet13 on July 28, 2019, 05:10:23 AM
You're awesome and amazing! and I'm glad I stumbled into starsector!

EDIT: how do we add a ship that is a variant of the base, like the IXth battalion or similar?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Avanitia on July 28, 2019, 04:35:30 PM
You're awesome and amazing! and I'm glad I stumbled into starsector!

EDIT: how do we add a ship that is a variant of the base, like the IXth battalion or similar?

Command is addship <ID of the ship>
You need the ship's ID - which requires going into mod's files (in this case Arsenal Expansion's, because it adds Ninth Battlegroup skins)
Standard 'procedure' is to go to:
mod's folder -> data -> hulls -> skins (last step optional, depends on the thing you want to spawn - is it as skin or seperate ship)

Open the file that interests you - let's say we want to spawn IX Aurora.
So we open the aurora_ix.skin file with Notepad or Notepad++ (I prefer the latter, it's in general better if you want to go through different files) and check first two lines - skinHullId is the one you're looking for.

Type in the command I mentioned in the beginning and add the ID from this skinHullId line - remember to remove the quotations from the ID (command will look like this - addship aurora_ix)
Enjoy the ship you just spawned into your fleet.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on July 28, 2019, 05:24:47 PM
You can use the List command to get the ship's ID instead of browsing the files. Use "list ships" to get the ship ID (if you want to filter it further, "list ships onslaught" would filter out any IDs that don't start with onslaught). See "help list" for details.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: MagefromAntares on August 04, 2019, 12:20:36 PM
Hi,

The current version of this mod both the WIP and the latest dev crashes when trying to enter the console:

Code
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f202725fd3c, pid=3291, tid=139776051574528
#
# JRE version: Java(TM) SE Runtime Environment (7.0_79-b15) (build 1.7.0_79-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.79-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libnvidia-glcore.so.430.40+0xf34d3c]  _nv043glcore+0x277ec
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/mage/starsector/starsector/hs_err_pid3291.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
starsector.sh: line 1:  3291 Aborted                 (core dumped) ./jre_linux/bin/java -server -XX:CompilerThreadPriority=1 -XX:+CompilerThreadHintNoPreempt -Djava.library.path=./native/linux -Xms1536m -Xmx1536m -Xss1024k -classpath janino.jar:commons-compiler.jar:commons-compiler-jdk.jar:starfarer.api.jar:starfarer_obf.jar:jogg-0.0.7.jar:jorbis-0.0.15.jar:json.jar:lwjgl.jar:jinput.jar:log4j-1.2.9.jar:lwjgl_util.jar:fs.sound_obf.jar:fs.common_obf.jar:xstream-1.4.10.jar -Dcom.fs.starfarer.settings.paths.saves=./saves -Dcom.fs.starfarer.settings.paths.screenshots=./screenshots -Dcom.fs.starfarer.settings.paths.mods=./mods -Dcom.fs.starfarer.settings.paths.logs=. com.fs.starfarer.StarfarerLauncher

I have included the console output of the dev version.

I'm running Ubuntu 18.04 LTS with the latest(430.40) NVIDIA drivers.

Edit: Attached log file.

[attachment deleted by admin]
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on August 04, 2019, 02:00:15 PM
Could you go into your saves/common/config folder (create it if it doesn't exist) and create a file named lw_console_settings.json.data and paste the following into it?

Code: json
{
   "defaultCombatCheatTarget": "PLAYER",
   "devModeTogglesDebugFlags": true,
   "fontScaling": 1,
   "maxScrollback": 20000,
   "outputColor": "0|255|255",
   "showBackground": false,
   "showCursorIndex": false,
   "showEnteredCommands": true,
   "showExceptionDetails": true,
   "showMemoryUsage": true,
   "transferStorageToHome": true,
   "typoCorrectionThreshold": 0.9
}

(if this file already exists, just change "showBackground" to false)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: MagefromAntares on August 04, 2019, 02:14:01 PM
Thanks, it works this way!

Hmm, maybe there are more restrictions for reading the frame buffer under Linux? (I saw the "nglReadPixels" call in the back-trace.)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: radekplug on August 12, 2019, 12:16:43 PM
why commands like god, InfiniteFlux, InfiniteAmmo, InfiniteCR dont work for ally ships?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on August 12, 2019, 04:48:24 PM
why commands like god, InfiniteFlux, InfiniteAmmo, InfiniteCR dont work for ally ships?

Cheats now default to only target the player flagship unless you specify otherwise. You need to pass in the target as an argument, for example "god fleet", "infiniteammo enemy", "infinitecr all", etc. You can change the default target using the Settings command, under Misc Console Settings. FLEET is the one that targets you and your allies.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: tigartar on August 13, 2019, 01:03:09 AM
I might be blind but is there a way to auto run specific commands on specific parts eg combat or campaign(upon startup)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: radekplug on August 13, 2019, 01:23:55 AM
i changed nad works thanks and it is funy when i change to all imortal battle happenig.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: General Bubbles on August 14, 2019, 11:48:35 AM
Hi folks! Hoping for some clarification from anyone who can help!

While Devmode is turned on......What does the M key do?

Because if I press M while Devmode is activated, my game insta-crashes to Desktop and it has me VERY curious XD

And useful input would be most welcome :)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Nartex on August 15, 2019, 11:12:42 AM
Hey can i get some help, When i press ctrl+backspace the game just shuts down. im on linux
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on August 15, 2019, 12:03:20 PM
I might be blind but is there a way to auto run specific commands on specific parts eg combat or campaign(upon startup)

There is not, at least not yet. You can make aliases to run several commands quickly, for example the built-in alias tc toggles several of the combat cheats at once.


Hi folks! Hoping for some clarification from anyone who can help!

While Devmode is turned on......What does the M key do?

Because if I press M while Devmode is activated, my game insta-crashes to Desktop and it has me VERY curious XD

And useful input would be most welcome :)

I believe M is supposed to spawn a random derelict. The devmode shortcuts can be found on the wiki here (https://starsector.fandom.com/wiki/Dev_mode), but what they do sometimes changes between game updates.


Hey can i get some help, When i press ctrl+backspace the game just shuts down. im on linux

You're probably running into the same problem MageFromAntares encountered here (https://fractalsoftworks.com/forum/index.php?topic=4106.msg254416#msg254416).

This should be "fixed" in the latest dev build by disabling the background on non-Windows platforms until I have time to track it down properly.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: rencor12 on August 15, 2019, 11:58:01 PM
does anyone know why this code is not working?
when im trying to input it i get compilation failed and then it says the entire first line is not a type.

Code
RunCode Global.getSector().getStarSystem("Agenor").addPlanet("Konstantinople", Global.getSector().getStarSystem("Agenor").getEntityByName("Agenor"), "Konstantinople", "terran", 0, 190, 2250, 30)
RunCode Global.getSector().getStarSystem("Agenor").getEntityByName("Konstantinople").getMarket().addCondition("habitable")
RunCode Global.getSector().getStarSystem("Agenor").getEntityByName("Konstantinople").getMarket().addCondition("mild_climate")
RunCode Global.getSector().getStarSystem("Agenor").getEntityByName("Konstantinople").getMarket().addCondition("farmland_bountiful")
RunCode Global.getSector().getStarSystem("Agenor").getEntityByName("Konstantinople").getMarket().addCondition("rare_ore_ultrarich")
RunCode Global.getSector().getStarSystem("Agenor").getEntityByName("Konstantinople").getMarket().addCondition("volatiles_plentiful")
RunCode Global.getSector().getStarSystem("Agenor").getEntityByName("Konstantinople").getMarket().addCondition("organics_plentiful")
RunCode Global.getSector().getStarSystem("Agenor").getEntityByName("Konstantinople").getMarket().addCondition("ore_ultrarich")
RunCode Global.getSector().getStarSystem("Agenor").getEntityByName("Konstantinople").getMarket().addCondition("ruins_vast")
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: didakkos on August 17, 2019, 07:46:38 AM
Hi, I'm trying to install this mod and, even after downloading the last dev version, the game crashes on load and this pops up:

Fatal: Failed to find script of class
[com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
Check starsector.log for more info.

And the log says this:
Code
12769 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
java.lang.RuntimeException: Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
at com.fs.starfarer.loading.scripts.ScriptStore.new(Unknown Source)
at com.fs.starfarer.settings.StarfarerSettings.OO0000(Unknown Source)
at com.fs.starfarer.launcher.ModManager.getEnabledModPlugins(Unknown Source)
at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I only have this mod and version checker installed. Does anyone know how to fix this?

Thank you.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on August 17, 2019, 07:47:50 AM
You also need LazyLib (https://bitbucket.org/LazyWizard/lazylib/downloads/).
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Skharr on August 20, 2019, 10:01:15 AM
Hey, nice utility mod. Thank you so much for this !

Can you add a command where you can give orders to fleets ? Like "Guard this Planet" & "Patrol this Point"
Or like "Follow me" but even through the jumppoints and hyperspace ?

Or to change the behavior of the spawned fleet through "spawnfleet"

Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kat on August 20, 2019, 02:27:28 PM
Hello.

Is there an equivalent command to the one in Nexerelin to change the owner of a planet ?

What I want to do is to populate a few more of the moons and planets, and give them to various factions.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Sonomon on August 20, 2019, 02:46:50 PM
Hey, so for some reason after extracting both LazyLib and the Command Console mod, neither will appear in the mods list in game (I made sure the folder led directly to the contents aswell). The outdated version of the mod shows up, but when I run it I get the same problem the guy before me got which was

Code
12769 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
java.lang.RuntimeException: Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
at com.fs.starfarer.loading.scripts.ScriptStore.new(Unknown Source)
at com.fs.starfarer.settings.StarfarerSettings.OO0000(Unknown Source)
at com.fs.starfarer.launcher.ModManager.getEnabledModPlugins(Unknown Source)
at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

So I combined the old version with the new LazyLib and still got the same error, I don't know if I'm supposed to check LazyLib aswell but it won't show up.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Histidine on August 21, 2019, 04:48:42 AM
Hey, so for some reason after extracting both LazyLib and the Command Console mod, neither will appear in the mods list in game (I made sure the folder led directly to the contents aswell). The outdated version of the mod shows up, but when I run it I get the same problem the guy before me got which was

Code
12769 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
java.lang.RuntimeException: Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
at com.fs.starfarer.loading.scripts.ScriptStore.new(Unknown Source)
at com.fs.starfarer.settings.StarfarerSettings.OO0000(Unknown Source)
at com.fs.starfarer.launcher.ModManager.getEnabledModPlugins(Unknown Source)
at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

So I combined the old version with the new LazyLib and still got the same error, I don't know if I'm supposed to check LazyLib aswell but it won't show up.
Hmm. You're on Starsector 0.9.1a-RC8, correct?
Could you post screenshots of your mods/ folder, mods/LazyLib and mods/Console Commands?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Sonomon on August 22, 2019, 11:55:41 AM
Quote
Hmm. You're on Starsector 0.9.1a-RC8, correct? Could you post screenshots of your mods/ folder, mods/LazyLib and mods/Console Commands?

Hey, that's all the pictures and the original starsector folder just incase, thank for the reply.

https://imgur.com/a/9wUj40B
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on August 22, 2019, 08:54:19 PM
Quote
Hmm. You're on Starsector 0.9.1a-RC8, correct? Could you post screenshots of your mods/ folder, mods/LazyLib and mods/Console Commands?

Hey, that's all the pictures and the original starsector folder just incase, thank for the reply.

https://imgur.com/a/9wUj40B

You downloaded the repository, which contains the source code needed to build the mod, not the mod itself. You want the link below that labeled "dev build", rurrently this one (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%20dev%20(build%20661).zip).
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on August 22, 2019, 09:00:23 PM
Hello.

Is there an equivalent command to the one in Nexerelin to change the owner of a planet ?

What I want to do is to populate a few more of the moons and planets, and give them to various factions.

There is not, though it'd be easy to add one. I'll add it to the todo list.


Hey, nice utility mod. Thank you so much for this !

Can you add a command where you can give orders to fleets ? Like "Guard this Planet" & "Patrol this Point"
Or like "Follow me" but even through the jumppoints and hyperspace ?

Or to change the behavior of the spawned fleet through "spawnfleet"

This one is unlikely, sorry. If I were to add the ability to give orders to fleets, I'd make it a separate mod with a UI. And since that'll likely come to vanilla at some point, making a mod like that is unfortunately a very low priority.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kat on August 23, 2019, 06:22:33 AM
Hello.
Is there an equivalent command to the one in Nexerelin to change the owner of a planet ?
What I want to do is to populate a few more of the moons and planets, and give them to various factions.
There is not, though it'd be easy to add one. I'll add it to the todo list.

Awesome, thanks ! I've been able to achieve a lot with save editing, but that sure is tedious, lol.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Sonomon on August 23, 2019, 12:24:47 PM
Quote
Hmm. You're on Starsector 0.9.1a-RC8, correct? Could you post screenshots of your mods/ folder, mods/LazyLib and mods/Console Commands?

Hey, that's all the pictures and the original starsector folder just incase, thank for the reply.

https://imgur.com/a/9wUj40B

You downloaded the repository, which contains the source code needed to build the mod, not the mod itself. You want the link below that labeled "dev build", rurrently this one (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%20dev%20(build%20661).zip).

Omg thank you lmao, I was so confused so thanks for clearing it up for me.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: tzuridis on August 27, 2019, 08:33:19 AM
Is there a way to give all items of the add commands? Like addwings all or something so I can test out all the fighters, weapons, ships etc? Or maybe there is another way to do it?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Taverius on August 27, 2019, 08:36:47 AM
Use the 'all' commands. Like allweapons etc.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: tzuridis on August 28, 2019, 12:59:53 AM
Thank you, I am not sure how I didn't see that.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: RedlineGoblin on August 31, 2019, 11:07:37 PM
I'm not sure if there's a command for this.

But able to spawn star system infrastructures? Such as Sensor Array, Comm Relay, Nav Buoy, or a stable location?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kwbr on August 31, 2019, 11:15:37 PM
The next version will have a SpawnCustomEntity command.

Until then, you can spawn one at the player fleet's location by copy+pasting the following command into the console:
Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "stable_location", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }

This just spawns a stable location, you still have to build the structures
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: RedlineGoblin on September 01, 2019, 09:19:41 AM
The next version will have a SpawnCustomEntity command.

Until then, you can spawn one at the player fleet's location by copy+pasting the following command into the console:
Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "stable_location", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }

This just spawns a stable location, you still have to build the structures

Thanks.  8)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Rudm on September 02, 2019, 04:01:22 PM
Hello first time posting here i have a question about the dev mode console.I saw on the wiki that with the G button you could generate a constellation but i think that it changed since the last patch and i would like a list of commands with devmode!Thanks for the help beforehand and sorry that i asked here from all the posts.

Edit:Also is there any way to create a derelict or a Domain era cryosleeper?Thanks!
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: BeltfedVendetta on September 07, 2019, 11:27:41 AM
This might be a bit of a dumb question, but I'm running devbuild 661 (the latest current release as of this time) and I was wondering if there is a method or command to spawn administrators? And, if so, can you change the attributes/skill levels of those administrators?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: captinjoehenry on September 07, 2019, 08:47:32 PM
How hard is it for a ship to loose negative traits after I edit the ini to make it far easier to get positive traits?  As my flagship is famous but almost all of it's traits are negative because the way it is set up it usually takes at least some amount of hull damage every battle even though it does the majority of the work taking out all the hostiles.  I edited the ini but I'm worried that it might take forever for the negative ones to be replaced
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Midnight Kitsune on September 07, 2019, 11:30:42 PM
How hard is it for a ship to loose negative traits after I edit the ini to make it far easier to get positive traits?  As my flagship is famous but almost all of it's traits are negative because the way it is set up it usually takes at least some amount of hull damage every battle even though it does the majority of the work taking out all the hostiles.  I edited the ini but I'm worried that it might take forever for the negative ones to be replaced
Wrong thread man. You want the Starship legends thread http://fractalsoftworks.com/forum/index.php?topic=15321.0
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Fantastic Chimni on September 08, 2019, 01:11:05 PM
Is it possible to add a military submarket to an already generated market?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: captinjoehenry on September 09, 2019, 04:26:32 PM
Is there a way to add blueprints with these console commands?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Wyvern on September 09, 2019, 04:43:58 PM
I'm assuming that you mean "add a blueprint to the player inventory", in which case, yes.

The command is, for example, something like "addspecial ship_bp Omen"
Use the various "list" commands to see what your options are.
"list specials" should give you the list of all available "special" items, which includes all of the blueprint packages, as well as the necessary key codes for ship/weapon/industry blueprints.  (For example, in the above, I said "ship_bp", but that's going from memory and might not be quite right - use "list specials" to find the exact string needed.  As with anything programming-related, precision is important, and trying to "addspecial ship-bp Omen" will just get you an error message.)
And "list ships" will give you all the ID strings of the various ships.  Vanilla ships are usually just the ship name, but most mods use prefixes to help preserve uniqueness, so you might see a ship ID string of "ms_tartarus" when the actual ship's name is just "Tartarus".  Also, as these strings aren't normally player-facing, people tend not to update them when ship or weapon names change during development; if you can't find what you're looking for, check the various .csv files to see if it exists with an id string that doesn't match its name.

Some specials - blueprints for individual ships or weapons or industries - need that third argument.  Others, like the various blueprint packages, don't.  I.E. "addspecial high_tech_package", with no third argument.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: CamRobbo on September 11, 2019, 05:18:07 PM
I've had an issue where when ever I try to open the console ( I press ctrl + backspace ) but when ever I do the game just closes. no error messages. the game just closes and I have to restart the game. any reason why?  I have LazyLib installed and enabled.  am just very confused why this is happening.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Fireballin17 on September 11, 2019, 06:18:28 PM
Hello! I'm quite new to the modding community but I was wondering for the next update if you could add a AddAdmin command.

Specifically so we can have more admins for colonies!
Regards,

Fireballin17
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: RedlineGoblin on September 12, 2019, 12:36:26 AM
The next version will have a SpawnCustomEntity command.

Until then, you can spawn one at the player fleet's location by copy+pasting the following command into the console:
Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "stable_location", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }

This just spawns a stable location, you still have to build the structures

Speaking of stable location, is there a way to spawn the better relays?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: React52 on September 12, 2019, 12:46:16 PM
Is there any way for commands to stay through loading the game? Every time I load a save I have to put in the same commands again
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: BeltfedVendetta on September 14, 2019, 12:24:54 PM
The next version will have a SpawnCustomEntity command.

Until then, you can spawn one at the player fleet's location by copy+pasting the following command into the console:
Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "stable_location", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }

This just spawns a stable location, you still have to build the structures

Speaking of stable location, is there a way to spawn the better relays?

There is, but whether they actually work and contribute bonuses like "naturally" spawned relays isn't something that I've confirmed or not.

I actually experimented a ton with that runcode that can spawn stable locations and you can actually spawn a lot of stuff with it, but most of it is not fully usable or accessible.

This should spawn a Domain-era comm relay you control:
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "comm_relay", "player").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }

Replace "comm_relay" with "nav_buoy" or "sensor_array" to spawn the Domain-era equivalents of those, as well. Adding "_makeshift" to them spawns the makeshift player/AI variants.

Again, just because they've spawn doesn't mean you get the benefits of them in-game. So confirm whether you do or not by looking at the modifiers to see if they appear as they should in your colonies and whatnot.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: BeltfedVendetta on September 14, 2019, 12:29:15 PM
Hello! I'm quite new to the modding community but I was wondering for the next update if you could add a AddAdmin command.

Sweet Jesus, yes, please. Despite all my playtime I have a whopping 3 administrators that I've gained. This is ridiculous. And, since my previous answer of whether or not there was ANY way to spawn administrators wasn't answered, I'm guessing that there is no way to currently spawn them.

It's like the game wants to force you to utilize Alpha core AIs. Which gets old quick with how fast the Hegemony catches on that so much as even a single computer beeps at your colony like they're playing the intergalactic version of "Pandemic 2" and you're the man in Brazil with a cough.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Dwarden on September 14, 2019, 06:23:00 PM
i was wondering would be possible to get commands which return total count of

stars, nebulas at galaxy map
fleets in hyperspace

fleets in system (all of them for start, but of course IF it's doable, then maybe even list each type count)
planets / moons / stations / outposts / colonies / relays / derelicts within star system
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Ced23Ric on September 14, 2019, 10:29:02 PM
Hello! I'm quite new to the modding community but I was wondering for the next update if you could add a AddAdmin command.
Sweet Jesus, yes, please. Despite all my playtime I have a whopping 3 administrators that I've gained. This is ridiculous. And, since my previous answer of whether or not there was ANY way to spawn administrators wasn't answered, I'm guessing that there is no way to currently spawn them.

I think I found 6 captains and 5 administrators when I was exploring star systems, just kinda, popped out of pods.

Also, as I traveled from and to, I hit every bar of colonies size 4 and up. After three months of reaching size 4, your own colonies can also spawn administrators. Highscore was 2 admins, 2 officers present for hire at the same time on one of mine.

Additionally, you can also look into X:\Starsector Install Folder\starsector-core\data\config\settings.json and find the entry for "adminMaxHireable":20, and crank that up to 50, for example. Should spawn more.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Des360 on September 19, 2019, 09:47:25 AM
Is there a command to complete a mission? Explaination: I accidentally left the game running all day while I went to do my business, being in the tutorial mission I was relatively safe from pirates, but the system (so I read) was isolated resulting in the death of Ancyra. I stabilized the jumpgates and now I'm supposed to report it to Ancyra, but the colony is no longer there. I found that getting Transverse Jump still allowed me to get escape the system and play the game normally, and so I did even building a considerable fleet and a couple colonies. Problem is that the game is now bugged: every monthly event does not trigger at all (income, custom manifactory, any sort of mission). Is there a way to use the command console to skip the mission or complete it so that I can play the game normally?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Display_name on September 21, 2019, 05:38:36 PM
 ;D I am shocked that it is actually possible to create a planet through the console commands.

If that is possible.... can I create a star? Double neutron star systems are quite rare, so is it possible to create one through console commands? What is the command if that is possible?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Histidine on September 21, 2019, 06:33:10 PM
Late, but:

Is there a command to complete a mission? Explaination: I accidentally left the game running all day while I went to do my business, being in the tutorial mission I was relatively safe from pirates, but the system (so I read) was isolated resulting in the death of Ancyra. I stabilized the jumpgates and now I'm supposed to report it to Ancyra, but the colony is no longer there. I found that getting Transverse Jump still allowed me to get escape the system and play the game normally, and so I did even building a considerable fleet and a couple colonies. Problem is that the game is now bugged: every monthly event does not trigger at all (income, custom manifactory, any sort of mission). Is there a way to use the command console to skip the mission or complete it so that I can play the game normally?
Try (copy and paste into console) runcode com.fs.starfarer.api.impl.campaign.tutorial.TutorialMissionEvent.endGalatiaPort ionOfMission()
(untested)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: ASSIMKO on September 22, 2019, 01:27:34 PM
Console Commands
An unofficial developer's console
Download latest dev (https://bitbucket.org/LazyWizard/console-commands/downloads/) (requires LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0))
Download 3.0 WIP 7.6 (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%20(3.0%20WIP).zip) (outdated)
View remaining tasks for v3.0 final (https://bitbucket.org/LazyWizard/console-commands/src/tip/src/main/mod/v3.0%20update%20progress.txt?at=default&fileviewer=file-view-default)
View progress and source code on BitBucket (https://bitbucket.org/LazyWizard/console-commands/overview)
Supports Version Checker (http://fractalsoftworks.com/forum/index.php?topic=8181)


Spoiler
(https://i.imgur.com/ToohEOu.png)
[close]


Instructions
This is installed just like any regular mod. Put it in the mods folder and make sure it's tagged in Starsector's launcher. Once in the game, you can summon the console with control+backspace and enter your commands. While the commands themselves aren't case sensitive, arguments are. For a full list of supported commands enter 'help' in the console. For more information on a specific command use 'help <command>'.

You can enter multiple commands by separating them with a semicolon. For example, "god;nocooldown;reveal;infiniteflux;infiniteammo" would run all of these combat cheats in a row. RunCode is an exception and can't be used with the command separator.

If you want to change the key that summons the console or the command separator, you can change these and several other console settings by using the "settings" command during a campaign.


Current features:
  • Input commands using a custom overlay
  • A large list of included commands, and the ability to add your own custom commands to the console
  • Write, compile and run code in-game using the Janino library
  • Doesn't require a new game, and can be safely untagged from a running game without issues
  • Should be compatible with all mods, even total conversions


Included commands:
Spoiler
Universal commands (6):
  • DevMode, Help, Reload, RunCode, SourceOf, Status

Campaign commands (40):
  • AddAptitudePoints, AddCredits, AddCrew, AddFuel, AddItem, AddMarines, AddOfficer, AddOrdnancePoints, AddShip, AddSkillPoints, AddSupplies, AddWeapon, AddWing, AddXP, AdjustRelation, AllCommodities, AllHulls, AllWeapons, AllWings, FindItem, FindShip, ForceMarketUpdate, GoTo, Hide, Home, InfiniteFuel, InfiniteSupplies, Jump, Kill, List, OpenMarket, Repair, Respec, Reveal, SetHome, SetRelation, ShowLoc, SpawnFleet, Storage, Suicide

Combat commands (19):
  • AddCommandPoints, EndCombat, Flameout, God, InfiniteAmmo, InfiniteCR, InfiniteFlux, Kill, NoCooldown, Nuke, RemoveHulks, Repair, Reveal, Rout, ShowBounds, ShowLoc, Suicide, ToggleAI, Traitor

Some commands are listed under both campaign and combat. These work in both contexts, but function in different ways.
[close]


Upcoming/planned features:
  • More commands! If you have any requests let me know in this thread and I'll try to add them to the next version.


One final note:
While I've tried to keep everything as user-friendly as possible, this is primarily intended as a tool to aid mod development. This means it does require some knowledge of Starsector's inner workings. Most importantly, you will need to know the internal IDs of various objects in order to use any commands dealing with them. The command "list" will help with this; alternatively these IDs can be found in the data files, usually in the CSVs or variant files.

Using this mod as a cheating tool will suck all of the fun out of Starsector for you. You have been warned. :)

Hello?! I would like to add a material from Fringe Defense Syndicate the material is "crystal energy". Could you tell me what to do to add this material? I tried: "addcrystal energy", + the amount I wanted and the command said there is no such command.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: BeltfedVendetta on September 23, 2019, 03:56:50 AM
Hello?! I would like to add a material from Fringe Defense Syndicate the material is "crystal energy". Could you tell me what to do to add this material? I tried: "addcrystal energy", + the amount I wanted and the command said there is no such command.

...Why did you quote the whole first post which serves as the mod info/description? That makes no sense.

Also, you can type "help" and "help all" to get a list of commands and "help list(or any other command)" to get a description of that. And if you ever want to find something like items or commodities you can "list items" or "list specials."

In which case what you want to add is likely "energy_crystals" (HMI also has "HMI_crystal"/Quantum Crystals). To do this you'd type "additem energy_crystals [amount]" without quotations or the brackets.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: ASSIMKO on September 23, 2019, 12:31:26 PM
Hello?! I would like to add a material from Fringe Defense Syndicate the material is "crystal energy". Could you tell me what to do to add this material? I tried: "addcrystal energy", + the amount I wanted and the command said there is no such command.

...Why did you quote the whole first post which serves as the mod info/description? That makes no sense.

Also, you can type "help" and "help all" to get a list of commands and "help list(or any other command)" to get a description of that. And if you ever want to find something like items or commodities you can "list items" or "list specials."

In which case what you want to add is likely "energy_crystals" (HMI also has "HMI_crystal"/Quantum Crystals). To do this you'd type "additem energy_crystals [amount]" without quotations or the brackets.


I'm sorry for the full post. And thanks for the tip.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: ASSIMKO on September 23, 2019, 02:32:16 PM
Hello?! I would like to add a material from Fringe Defense Syndicate the material is "crystal energy". Could you tell me what to do to add this material? I tried: "addcrystal energy", + the amount I wanted and the command said there is no such command.

...Why did you quote the whole first post which serves as the mod info/description? That makes no sense.

Also, you can type "help" and "help all" to get a list of commands and "help list(or any other command)" to get a description of that. And if you ever want to find something like items or commodities you can "list items" or "list specials."

In which case what you want to add is likely "energy_crystals" (HMI also has "HMI_crystal"/Quantum Crystals). To do this you'd type "additem energy_crystals [amount]" without quotations or the brackets.


I'm sorry for the full post. And thanks for the tip.

I did what you said, but the command was not recognized. type in quotation marks as I should type there in Console Commands. Please.

[attachment deleted by admin]
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: MaxNogard on September 23, 2019, 03:58:05 PM
As i understand, you have to first use the command - list items

As a result you will get a list of itens in your game. By your screenshot you already got this part. On this list there is the name of the item you are searching, assuming you did install the mod beforehand. (as example i can see in your screenshot the hmi_crystal from the HMI mod)

I don't know the name you are searching, but lets assume it's energy_crystal, then you will type

additem energy_crystal 10 - (the syntax is additem nameofitem amount)

to add 10 units of this item.

Hope this can help you
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: BeltfedVendetta on September 24, 2019, 07:35:26 AM
I did what you said, but the command was not recognized. type in quotation marks as I should type there in Console Commands. Please.

The console right there suggests what you did wrong: you typed "additems" instead of "additem." No quotation marks.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: BeltfedVendetta on September 27, 2019, 05:21:47 PM
Is it possible to add a military submarket to an already generated market?

I've also wondered about this, and I think it might be possible with runcode, but I have no idea what kind of reference or how to write out the line to enact it.
Looking through Exerelin, there's a "submarkets.csv" which lists several different ones including exerelin_prismMarket, open_market, black_market, and generic_military which has the description:
"Trade with $theFaction military base.

Weapons and other military hardware can be bought and sold here even if they're illegal on the open market. A commission and better standing with $theFaction results in higher-grade hardware being available.

Will buy locally illegal goods as part of a no-questions-asked buyback program.

Selling enough of a commodity will temporarily resolve a shortage."

So that's definitely it. And, no, in case you're wondering "addcondition" and "addindustry" doesn't work. But you should be able to somehow add it. Someone that knows more about how runcode works could probably decipher it.

I'm also interested, too, because none of my own colonies have military markets and it would be nice to have them to stock up on weapons and marines/crew occasionally. I mean, it would make sense, especially if they already have a military base on them.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LngA7Gw on September 30, 2019, 09:15:33 PM
Edit:Also is there any way to create a derelict or a Domain era cryosleeper?Thanks!

derelict_cryosleeper
e.g.
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()), 180f); }
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Yunru on October 07, 2019, 05:58:04 AM
Is there a way to change the owner of a planet or station?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: iamlenb on October 07, 2019, 01:00:14 PM
Is there a way to change the owner of a planet or station?

I believe it's:
> setmarketowner <faction>

use
> help setmarketowner to get a generic use example
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Yunru on October 07, 2019, 02:19:23 PM
Thank you! I never thought to check the overworld, was only looking in the "I'm visiting a market" choices.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Morrokain on October 09, 2019, 07:59:34 PM
When I run my TC with this mod I am getting this error on the latest dev version:

Spoiler
31552 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
java.lang.RuntimeException: Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
   at com.fs.starfarer.loading.scripts.ScriptStore.new(Unknown Source)
   at com.fs.starfarer.settings.StarfarerSettings.OO0000(Unknown Source)
   at com.fs.starfarer.launcher.ModManager.getEnabledModPlugins(Unknown Source)
   at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

Any help would be appreciated.  :) I will try the outdated version in the meantime to see if there is any difference but this was working in the past.

Nvm I was just tired. I didn't have lazylib selected and I thought I did.  ::)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: captinjoehenry on October 20, 2019, 08:55:06 AM
How can I go about spawning a planet or a moon with this mod?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: runetrantor on October 23, 2019, 03:42:46 PM
Or a station like the ones that act as colonies? (like Freeport, and such)

I am very eager to get one as a base, rather than a planet, but there's so few existing ones... D:
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: swordmania on October 24, 2019, 07:13:04 AM
I wonder: could we change a station sprite using runcode? I'd like something similar to the hegemony's main shipyards on my capital, but sadly we only have access to 3 models right now  :-\
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: iamlenb on October 24, 2019, 12:29:42 PM
Where's the list of aliases stored?  And is it possible to read them out with the list command?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Dropskiler on October 28, 2019, 07:13:02 AM
Ok. Current working code for adding planets is.
Code
 RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kp0ral on November 04, 2019, 06:36:41 AM
Hello, i'm using your mod to create command to spawn my own nebula with planet ( yes it's a lil bit a cheat and i assume xD )
https://fractalsoftworks.com/forum/index.php?topic=17150.0

But, can you implement in your CommandContext and CommonStrings some value for Hyperspace position, actually i've managed it like that :
Code
if( !context.isInCampaign() || !Global.getSector().getPlayerFleet().isInHyperspace() ) {
Console.showMessage( CommonStrings.ERROR_CAMPAIGN_ONLY );
return CommandResult.WRONG_CONTEXT;
}

Because of : system.getLocation().set( Global.getSector().getPlayerFleet().getLocationInHyperspace() );
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Sixstryder on November 06, 2019, 06:36:40 PM
Heyo. So, I'm probably just being an idiot and did something wrong but for whatever reason, starsector wont even read the console commands repository file in my mods folder. It doesn't even show up on the game's mod menu at all.
If someone can help me and/or state what I did wrong, please do.

Edit: nevermind. I downloaded the wrong file.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: ASSIMKO on November 07, 2019, 02:32:34 AM
I did what you said, but the command was not recognized. type in quotation marks as I should type there in Console Commands. Please.

The console right there suggests what you did wrong: you typed "additems" instead of "additem." No quotation marks.

Thanks. I "ll be checking.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: ASSIMKO on November 07, 2019, 12:03:13 PM
As i understand, you have to first use the command - list items

As a result you will get a list of itens in your game. By your screenshot you already got this part. On this list there is the name of the item you are searching, assuming you did install the mod beforehand. (as example i can see in your screenshot the hmi_crystal from the HMI mod)

I don't know the name you are searching, but lets assume it's energy_crystal, then you will type

additem energy_crystal 10 - (the syntax is additem nameofitem amount)

to add 10 units of this item.

Hope this can help you



Thanks. now get the crystals. Now yes.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: n3xuiz on November 12, 2019, 02:11:12 AM
any command to add industries / structures to a colonised planet? i want to make a "super-planet" with all the possible buildings. i know from a old savegame from before the industries limit was introduced that the game can handle planets with i.e. 8/4 industries without crashing. i've been searching with the help command but can't find a command to add industries to planets.

is there even one?

edit: nevermind found it. its addindustry
strangely it doesn't show up in any of the help lists.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Yunru on November 12, 2019, 03:20:01 AM
any command to add industries / structures to a colonised planet? i want to make a "super-planet" with all the possible buildings. i know from a old savegame from before the industries limit was introduced that the game can handle planets with i.e. 8/4 industries without crashing. i've been searching with the help command but can't find a command to add industries to planets.

is there even one?

edit: nevermind found it. its addindustry
strangely it doesn't show up in any of the help lists.
Help lists are context sensitive. Planet-related commands only show up while visiting a planet. (Except ChangeMarketOwner which only shows up when not.)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: n3xuiz on November 14, 2019, 09:20:46 AM
is there a command to either add a freelance admin or find where they are in the sector? i've not hired 2-3 admins in the past but now i can't find any even after going to 30+ markets. i know there is a command to add a officer but that is just a ship captain right?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Coffeeboi on November 14, 2019, 01:17:52 PM
Ok. Current working code for adding planets is.
Code
 RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
Code works great for spawning new planets in a star system. However, do you know how to spawn moons that orbit around a planet?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: ssss2222 on November 15, 2019, 03:45:49 PM
Is it possible to spawn a remnant nexus with this mod? If not, how would I go about doing it?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: IAmLegion on December 02, 2019, 05:43:10 PM
I think a good command would be on that "discovers" all ships in the game for the black market, so the black market can carry anything.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: bluestealth on December 04, 2019, 06:40:38 PM
Hello Wizard,

I want to report a bug with this mod.  My game hard-crashes to desktop when attempting to open console with a custom game window resolution via the `resolutionOverride` argument within starsector-core/data/config/settings.json.  Probably some sort of draw-related scaling issue...

The fault disappears when removing the override (windowed or full-screen doesn't appear to matter).  The particular resolution I typically play at is 2450x1350 (windowed), in-case that helps debug.

From one programmer to another, thanks for all of your modding work, it is much appreciated.

Regards,
Blue
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on December 04, 2019, 07:27:36 PM
Thanks for the report! You can "fix" this by opening saves/common/config/lw_console_settings.json.data and setting "showBackground" to false. I'll try to get a proper fix out soon.

To the others who've posted in this thread: I've read your posts. I'll try to get around to responding/adding the requested features soon! :)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: The_White_Falcon on December 07, 2019, 05:41:31 PM
Can't seem to find this on the forum; but what is the nanoforge(s) parameter for heavyindustry or oribtalworks?  I.E.  "addindustry orbitalworks prestine_nanoforge alpha_core" only adds an orbital works with an alpha core.  No setting for nanoforges seem to be set for this command (at least to the best of my abilities I have not been able to get any nanoforge type to spawn in with the addindustry command).

Are nanoforges set in the parameters for the addindustry command?  If so, what are they?

BUG REPORTS
1) I noticed a bug with the non-dev version recently released where if you increase the population; the industry max number does not increase with it.  This same thing happens whether I do a "RunCode" command or a simple "addcondition" command.
2) On rare occasions; increasing the population via console command will result in 2 population numbers in the UI.  Let's say you start out with a population of 3 for a settlement.  You use console commands to increase the population to 7.  However when you look at the settlement stats, it shows the 3 symbol still but a new population symbol representing the 7 is now next to it.  This seems to be purely a UI glitch as everything else changes in regards to the increased population.  Leaving the settlement and coming back does not make this glitch go away.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: iamlenb on December 08, 2019, 05:38:48 PM
If it happens, you can use removeindustry <population size> you want to take out of the UI.  I haven't noticed any negative effects from doing this.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: miles341 on December 08, 2019, 09:13:23 PM
Can't seem to find this on the forum; but what is the nanoforge(s) parameter for heavyindustry or oribtalworks?  I.E.  "addindustry orbitalworks prestine_nanoforge alpha_core" only adds an orbital works with an alpha core.  No setting for nanoforges seem to be set for this command (at least to the best of my abilities I have not been able to get any nanoforge type to spawn in with the addindustry command).

Are nanoforges set in the parameters for the addindustry command?  If so, what are they?

BUG REPORTS
1) I noticed a bug with the non-dev version recently released where if you increase the population; the industry max number does not increase with it.  This same thing happens whether I do a "RunCode" command or a simple "addcondition" command.
2) On rare occasions; increasing the population via console command will result in 2 population numbers in the UI.  Let's say you start out with a population of 3 for a settlement.  You use console commands to increase the population to 7.  However when you look at the settlement stats, it shows the 3 symbol still but a new population symbol representing the 7 is now next to it.  This seems to be purely a UI glitch as everything else changes in regards to the increased population.  Leaving the settlement and coming back does not make this glitch go away.
Not sure about the rest, but for the nanoforge issue I might have an idea. Not sure if you copy-pasted the code for adding the nanoforge, but you seem to have mispelled "pristine" as "prestine". Maybe that's it? Otherwise, it might be that the nanoforge code uses "baseItem_modifier" as that would keep them together when ordered alphabetically, so maybe try "nanoforge_pristine"? That logic doesn't make much sense when you compare it to the alpha core which does it the other way around, but I have no idea otherwise... Maybe the ordering needs to be different, like do the core then the nanoforge?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: morriganj on December 11, 2019, 11:07:42 PM
Is it possible to use bat files to enter console commands?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: penuy147 on December 12, 2019, 04:55:45 PM
Hi everyone
Is there a command to force complete missions? I accidentally let the planet from the tutorial mission die while exploiting their economy selling supplies to them. Basically, I'm stuck as still being in a tutorial when I want the game to become campaign. Just a command to complete the "Stabilize the Jump-points" would be nice as the person I'm supposed to tell is dead.
Thanks.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: The_White_Falcon on December 14, 2019, 09:58:41 AM
Spoiler
Can't seem to find this on the forum; but what is the nanoforge(s) parameter for heavyindustry or oribtalworks?  I.E.  "addindustry orbitalworks prestine_nanoforge alpha_core" only adds an orbital works with an alpha core.  No setting for nanoforges seem to be set for this command (at least to the best of my abilities I have not been able to get any nanoforge type to spawn in with the addindustry command).

Are nanoforges set in the parameters for the addindustry command?  If so, what are they?

BUG REPORTS
1) I noticed a bug with the non-dev version recently released where if you increase the population; the industry max number does not increase with it.  This same thing happens whether I do a "RunCode" command or a simple "addcondition" command.
2) On rare occasions; increasing the population via console command will result in 2 population numbers in the UI.  Let's say you start out with a population of 3 for a settlement.  You use console commands to increase the population to 7.  However when you look at the settlement stats, it shows the 3 symbol still but a new population symbol representing the 7 is now next to it.  This seems to be purely a UI glitch as everything else changes in regards to the increased population.  Leaving the settlement and coming back does not make this glitch go away.
[close]
Quote
Not sure about the rest, but for the nanoforge issue I might have an idea. Not sure if you copy-pasted the code for adding the nanoforge, but you seem to have mispelled "pristine" as "prestine". Maybe that's it? Otherwise, it might be that the nanoforge code uses "baseItem_modifier" as that would keep them together when ordered alphabetically, so maybe try "nanoforge_pristine"? That logic doesn't make much sense when you compare it to the alpha core which does it the other way around, but I have no idea otherwise... Maybe the ordering needs to be different, like do the core then the nanoforge?
WOW, that was such a silly mistake; thanks for pointing that out.  It does indeed work fine for the pristine_nanoforge.  As for the visual population bug, I managed to reproduce it.  I have provided a screenshot for you.

https://imgur.com/gallery/pGJRYPC
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mozon1337 on December 14, 2019, 03:30:40 PM
Hi i just down loaded this mod and when ever i try to start up the game I get this

   Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]

and when i un-check the mod it loads fine. Can someone help please?

This is also my first time modding this game so go easy on me.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: The_White_Falcon on December 15, 2019, 12:52:41 PM
Hi i just down loaded this mod and when ever i try to start up the game I get this

   Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]

and when i un-check the mod it loads fine. Can someone help please?

This is also my first time modding this game so go easy on me.

Try these steps :
1) Try downloading the mod again.  I would personally recommend you use the latest 'dev' version (Console_Commands_dev_build_667.zip).  It's older than the "regular version" (Console Commands (3.0 WIP).zip) but allows a lot more to be done in the game.
2) Once you download the file make sure to drag the zipped folder into your starsector/mods folder. 
3) Unzip the the folder (I normally use 7-zip and right-click the zipped folder and select 'unzip here' option)
4) Delete the zipped folder from the mod folder now that you have the unzipped folder.
5) Make sure you do this for all mods (unzip the files into the starsector/mods folder and remove the zipped file afterwards)
6) For safe measure, start the game as an admin (right-click starsector and select 'run as administrator')
7) When you start starsector, click the mods button and make sure the mod is selected and click save

I would personally deactivate every other mod and just keep console commands active.  Start a new game and see if it loads/starts properly.  If it does; try activating your other mods and see if you get another error.  Chances are that there is probably either a bad mod installation, a mod version conflict or maybe even one mod interfering with another.  The only way to fish out which mod is the trouble maker is to reactivate them one-by-one and load up the game to see if you get an error loading.

There is also a possibility that if you update a mod, it may not be save-compatible.  Mod authors will normally warn about this but make sure if you update a mod not to delete the previous version (remove it from the mod folder but store it somewhere else like a Starsector Backups folder on your desktop) just in case you run into this problem and don't want to start a new game.  Following this practice, if you run into an update conflict with your saved game(s) you can just remove the updated version and bring the older version back into your mods folder so you can continue with your saved campaign.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: The_White_Falcon on December 15, 2019, 01:01:14 PM
Hello, I would like to know if it's possible to use the command "list ships" with a 'contains' argument.  For instance, instead of having to look at hundreds of ships (especially if you use multiple mods) or have to navigate to the mod's ships.csv file to figure out the string name of the ship; would it be possible to add in a command like "list ships_containing <search string>" that would do a search for all ship strings containing the search string instead of just beginning with it.

EX) Stop Gap Measure mod has a Zenith ship added to the game.  One would think the beginning abbreviation for the ship would be something like "sgm_zenith".  Unfortunately this is not the case; after finally giving up looking for it using in-game console commands; I had to check for the ships.csv file in the mod's folder to figure out the beginning abbreviation was "filgap_zenith".  To save time (and hair pulls) I was curious if a simple list ships containing <search string> command could be implemented where I would just search for all ship strings containing the string "zenith".

EDIT : Was wondering if there was also a command to instantly repair disrupted industries from invasions/raids.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Agalyon on December 25, 2019, 05:13:44 AM
For a command suggestion, is there anyway to refresh config files? Some settings like the number of bounties do not update without starting a new save, and updating settings without restarting would be very cool too. Also the above suggestion for a contains argument would be fantastic.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Rendar on December 26, 2019, 09:32:01 AM
Hello guys,

I get the same error as Mozon1337 above. The steps provided by The_White_Falcon didn't help unfortunately. What Mozon1337 was a bit vague about is that the game crashes on startup, you don't even reach the main menu.

I have no other mods installed nor have I ever. I have the 0.9.1a-RC8 version of the game and I used the dev build 667 version.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: The_White_Falcon on December 26, 2019, 07:21:09 PM
Hello guys,

I get the same error as Mozon1337 above. The steps provided by The_White_Falcon didn't help unfortunately. What Mozon1337 was a bit vague about is that the game crashes on startup, you don't even reach the main menu.

I have no other mods installed nor have I ever. I have the 0.9.1a-RC8 version of the game and I used the dev build 667 version.

The error seems to be that it is unable to access the file(s) specified.  Normally this is because of 2 reasons:
1) Permissions problems (starting a program in admin mode NORMALLY solves this problem)
2) You're actually missing these files for some odd reason; in this case you should reinstall the game entirely.

Let me know if this works for you and good luck.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Rendar on December 27, 2019, 01:41:42 AM
Hello guys,

I get the same error as Mozon1337 above. The steps provided by The_White_Falcon didn't help unfortunately. What Mozon1337 was a bit vague about is that the game crashes on startup, you don't even reach the main menu.

I have no other mods installed nor have I ever. I have the 0.9.1a-RC8 version of the game and I used the dev build 667 version.

The error seems to be that it is unable to access the file(s) specified.  Normally this is because of 2 reasons:
1) Permissions problems (starting a program in admin mode NORMALLY solves this problem)
2) You're actually missing these files for some odd reason; in this case you should reinstall the game entirely.

Let me know if this works for you and good luck.

I had actually forgotten to try the admin mode. Didn't help though, but I did find what does. It said so very clearly in the first post in this thread (duh) - You need to use LazyLib. If you do, it works! It's like magic!  ::)

Thanks for the help anyway and have great New Year!
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: The_White_Falcon on December 27, 2019, 08:03:56 AM
Spoiler
Hello guys,

I get the same error as Mozon1337 above. The steps provided by The_White_Falcon didn't help unfortunately. What Mozon1337 was a bit vague about is that the game crashes on startup, you don't even reach the main menu.

I have no other mods installed nor have I ever. I have the 0.9.1a-RC8 version of the game and I used the dev build 667 version.

The error seems to be that it is unable to access the file(s) specified.  Normally this is because of 2 reasons:
1) Permissions problems (starting a program in admin mode NORMALLY solves this problem)
2) You're actually missing these files for some odd reason; in this case you should reinstall the game entirely.

Let me know if this works for you and good luck.
[close]
I had actually forgotten to try the admin mode. Didn't help though, but I did find what does. It said so very clearly in the first post in this thread (duh) - You need to use LazyLib. If you do, it works! It's like magic!  ::)

Thanks for the help anyway and have great New Year!
Glad it all worked out.  I had assumed that you guys had downloaded the requirements.  However after rereading what I typed it actually sounds like I wanted you all to NOT have LazyLib active along with Console Commands which could have also caused this issue.  My apologies for the oversight  :-[.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: TiberQ on December 29, 2019, 12:24:19 PM
Ran into a problem i cannot fix using commands.
A mod called COPS is causing alot of issues, even tho i can kill their fleets whit this command tool, i cannot reassign their planets to either death or even better, flip them to independents.

Could a kill / flip command be added for planets? effectively deleting a faction / mod from a running game.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Uberquake on December 31, 2019, 03:26:43 AM
This may have been answered somewhere within the last 50 pages of responses, but a Google search didn't return it and I thought I'd just ask. Please don't get upset with me for not wanting to re-read all 50 pages.

How do I create a command that simply combines a list of commands?

For instance: a command like, "Omnipotence" which just throws "god;nocooldown;reveal;infiniteflux;infiniteammo;infinitecr" into the console.

Also, is there a way to make it so that I wouldn't have to type that in prior to every single battle? I'd prefer to enter it once, as I start up the game, and have it just stay that way.

Thank you.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Wispborne on December 31, 2019, 07:35:51 AM
How do I create a command that simply combines a list of commands?

For instance: a command like, "Omnipotence" which just throws "god;nocooldown;reveal;infiniteflux;infiniteammo;infinitecr" into the console.

Add it to Console Commands/data/console/aliases.csv.
e.g. a new row containing:
20 omnipotence god;nocooldown;reveal;infiniteflux;infiniteammo;infinitecr

I don't think there's a way to have it auto-apply when the battle starts without making your own mod that detects when a battle starts and applies the console commands.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Uberquake on January 01, 2020, 04:28:39 AM
Thank you. Now I need to figure out how to write a mod that does exactly that.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Grintch on January 04, 2020, 04:20:58 PM
Hi. I'm new to the game and I can't get the game to launch with this mod activated. It's the only mod I have. I get an error stating:

Starsector 0.9.1a-RC8


Fatal: Failed to find script of class
[com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
Check starsector.log for more info.

Any idea what the problem could be?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Silveressa on January 05, 2020, 08:05:53 AM
Hi. I'm new to the game and I can't get the game to launch with this mod activated. It's the only mod I have. I get an error stating:

Starsector 0.9.1a-RC8


Fatal: Failed to find script of class
[com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]
Check starsector.log for more info.

Any idea what the problem could be?

You like are using either an older version of the mod, forgot to install the Lazy library mod (which is required and a link is on the first page of this thread.) Or installed an older version of it.

I have it working without issue using Console_Commands_dev_build_667.zip & Lazylib version 2.4e

Hope that helps?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: VikingKim on January 05, 2020, 09:18:43 AM
Any way to change the shortcut to open the console window?

I dont have an English keyboard and I am unable to open the console with any combination of "CTRL+BACKSLASH".
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: greyxenon on January 05, 2020, 09:40:49 AM
Is there a way to add the non-makeshift versions of things like nav relay, sensor relay, comms relay?   Not the ones that you can build at stable locations, but the better ones you can encounter sometimes?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Silveressa on January 07, 2020, 06:10:24 PM
Any way to change the shortcut to open the console window?

I dont have an English keyboard and I am unable to open the console with any combination of "CTRL+BACKSLASH".

It's not Ctrl + Backslash, but Ctrl + BACKSPACE (The bottom on the top row next to the - & = keys)

That button plus ctrl will open the console for you.  8)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: VikingKim on January 07, 2020, 09:35:04 PM
Gah, I can't believe I didn't see that. Working perfectly now that I am pressing the right buttons ;) Thank you
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Maelstrom on January 08, 2020, 10:22:05 PM
welp, I am getting this weird instant crash out of nowhere whenever i open the console. I think it might be because I disabled active gates while I have awakened gates enabled because thats when this started happening.

Aight, heres the log:

Spoiler
121004 [Thread-4] WARN  data.scripts.campaign.intel.VayraPersonBountyIntel  - stacktrace is [java.lang.Thread.getStackTrace(Unknown Source), data.scripts.campaign.intel.VayraPersonBountyIntel.advanceImpl(VayraPersonBountyIntel.java:946), com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.advance(BaseIntelPlugin.java:75), com.fs.starfarer.api.impl.campaign.intel.BaseEventManager.advance(BaseEventManager.java:114), data.scripts.campaign.intel.VayraPersonBountyManager.advance(VayraPersonBountyManager.java:273), com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.title.TitleScreenState.menuItemSelected(Unknown Source), com.fs.starfarer.title.Object.actionPerformed(Unknown Source), com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source), com.fs.starfarer.ui.I.Ò00000(Unknown Source), com.fs.starfarer.ui.I.processInput(Unknown Source), com.fs.starfarer.ui.newnew.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.D.I.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.title.TitleScreenState.processInput(Unknown Source), com.fs.starfarer.BaseGameState.traverse(Unknown Source), com.fs.state.AppDriver.begin(Unknown Source), com.fs.starfarer.combat.CombatMain.main(Unknown Source), com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source), java.lang.Thread.run(Unknown Source)] ### when it was previously null
121005 [Thread-4] WARN  data.scripts.campaign.intel.VayraPersonBountyIntel  - stacktrace is [java.lang.Thread.getStackTrace(Unknown Source), data.scripts.campaign.intel.VayraPersonBountyIntel.advanceImpl(VayraPersonBountyIntel.java:946), com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.advance(BaseIntelPlugin.java:75), com.fs.starfarer.api.impl.campaign.intel.BaseEventManager.advance(BaseEventManager.java:114), data.scripts.campaign.intel.VayraPersonBountyManager.advance(VayraPersonBountyManager.java:273), com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.title.TitleScreenState.menuItemSelected(Unknown Source), com.fs.starfarer.title.Object.actionPerformed(Unknown Source), com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source), com.fs.starfarer.ui.I.Ò00000(Unknown Source), com.fs.starfarer.ui.I.processInput(Unknown Source), com.fs.starfarer.ui.newnew.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.D.I.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.title.TitleScreenState.processInput(Unknown Source), com.fs.starfarer.BaseGameState.traverse(Unknown Source), com.fs.state.AppDriver.begin(Unknown Source), com.fs.starfarer.combat.CombatMain.main(Unknown Source), com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source), java.lang.Thread.run(Unknown Source)] ### when it was previously null
121006 [Thread-4] WARN  data.scripts.campaign.intel.VayraPersonBountyIntel  - stacktrace is [java.lang.Thread.getStackTrace(Unknown Source), data.scripts.campaign.intel.VayraPersonBountyIntel.advanceImpl(VayraPersonBountyIntel.java:946), com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.advance(BaseIntelPlugin.java:75), com.fs.starfarer.api.impl.campaign.intel.BaseEventManager.advance(BaseEventManager.java:114), data.scripts.campaign.intel.VayraPersonBountyManager.advance(VayraPersonBountyManager.java:273), com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.title.TitleScreenState.menuItemSelected(Unknown Source), com.fs.starfarer.title.Object.actionPerformed(Unknown Source), com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source), com.fs.starfarer.ui.I.Ò00000(Unknown Source), com.fs.starfarer.ui.I.processInput(Unknown Source), com.fs.starfarer.ui.newnew.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.D.I.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.title.TitleScreenState.processInput(Unknown Source), com.fs.starfarer.BaseGameState.traverse(Unknown Source), com.fs.state.AppDriver.begin(Unknown Source), com.fs.starfarer.combat.CombatMain.main(Unknown Source), com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source), java.lang.Thread.run(Unknown Source)] ### when it was previously null
121006 [Thread-4] WARN  data.scripts.campaign.intel.VayraPersonBountyIntel  - stacktrace is [java.lang.Thread.getStackTrace(Unknown Source), data.scripts.campaign.intel.VayraPersonBountyIntel.advanceImpl(VayraPersonBountyIntel.java:946), com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.advance(BaseIntelPlugin.java:75), com.fs.starfarer.api.impl.campaign.intel.BaseEventManager.advance(BaseEventManager.java:114), data.scripts.campaign.intel.VayraPersonBountyManager.advance(VayraPersonBountyManager.java:273), com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.title.TitleScreenState.menuItemSelected(Unknown Source), com.fs.starfarer.title.Object.actionPerformed(Unknown Source), com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source), com.fs.starfarer.ui.I.Ò00000(Unknown Source), com.fs.starfarer.ui.I.processInput(Unknown Source), com.fs.starfarer.ui.newnew.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.D.I.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source), com.fs.starfarer.ui.v.processInputImpl(Unknown Source), com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source), com.fs.starfarer.title.TitleScreenState.processInput(Unknown Source), com.fs.starfarer.BaseGameState.traverse(Unknown Source), com.fs.state.AppDriver.begin(Unknown Source), com.fs.starfarer.combat.CombatMain.main(Unknown Source), com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source), java.lang.Thread.run(Unknown Source)] ### when it was previously null
[close]

Looks like its actually vayra bounty related but can't tell for sure. The weird thing is I haven't even changed the mods in the slightest since my last save yet this time I keep getting this issue... Starsector is really odd sometimes...

What would be nice is if someone could explain what all these 0OOOOOOOOOOOOO mean lol
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LucusLoC on January 09, 2020, 05:06:03 PM
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'

Edit: adding the original code block here for easier access. This one will spawn a stable point.
Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "stable_location", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Maelstrom on January 09, 2020, 05:31:54 PM
so I guess I have to avoid opening the console in nebulas?

Gonna try to see id 2.0.2 has this issue as well because I had no problem with that version on my last save and evem after I updated to 2.0.3 on the same save there was no issues.

Only started with fresh saves with 2.0.3 installed.

Gonna try to this once I get back home... currently at the movies "watching" starwars episode 9 and it isnt really fun tbh 5.7/10

CGI is really good but the story is meh

Welp 2.0.2 also causes the game to crash... and the logs dont give any crash info. Will try to generate a second one.

I will mention that I changed the amount of gate codes from 6 to 50 on both 2.0.2 and 2.0.3 so maybe if I revert that back to the original 6 will fix it but I don't have strong hopes.

yup still crashes. This time I got a different crash log:

Spoiler
135864 [Thread-4] WARN  data.scripts.campaign.intel.VayraPersonBountyIntel  - stacktrace is [java.lang.Thread.getStackTrace(Unknown Source), data.scripts.campaign.intel.VayraPersonBountyIntel.advanceImpl(VayraPersonBountyIntel.java:946), com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.advance(BaseIntelPlugin.java:75), com.fs.starfarer.api.impl.campaign.intel.BaseEventManager.advance(BaseEventManager.java:114), data.scripts.campaign.intel.VayraPersonBountyManager.advance(VayraPersonBountyManager.java:273), com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.title.TitleScreenState.menuItemSelected(Unknown Source), com.fs.starfarer.title.Object.actionPerformed(Unknown Source), com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source), com.fs.starfarer.ui.I.Ò00000(Unknown Source), com.fs.starfarer.ui.I.processInput(Unknown Source), com.fs.starfarer.ui.O0Oo.o00000(Unknown Source), com.fs.starfarer.BaseGameState.traverse(Unknown Source), com.fs.state.AppDriver.begin(Unknown Source), com.fs.starfarer.combat.CombatMain.main(Unknown Source), com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source), java.lang.Thread.run(Unknown Source)] ### when it was previously null
135864 [Thread-4] WARN  data.scripts.campaign.intel.VayraPersonBountyIntel  - stacktrace is [java.lang.Thread.getStackTrace(Unknown Source), data.scripts.campaign.intel.VayraPersonBountyIntel.advanceImpl(VayraPersonBountyIntel.java:946), com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.advance(BaseIntelPlugin.java:75), com.fs.starfarer.api.impl.campaign.intel.BaseEventManager.advance(BaseEventManager.java:114), data.scripts.campaign.intel.VayraPersonBountyManager.advance(VayraPersonBountyManager.java:273), com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.title.TitleScreenState.menuItemSelected(Unknown Source), com.fs.starfarer.title.Object.actionPerformed(Unknown Source), com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source), com.fs.starfarer.ui.I.Ò00000(Unknown Source), com.fs.starfarer.ui.I.processInput(Unknown Source), com.fs.starfarer.ui.O0Oo.o00000(Unknown Source), com.fs.starfarer.BaseGameState.traverse(Unknown Source), com.fs.state.AppDriver.begin(Unknown Source), com.fs.starfarer.combat.CombatMain.main(Unknown Source), com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source), java.lang.Thread.run(Unknown Source)] ### when it was previously null
135865 [Thread-4] WARN  data.scripts.campaign.intel.VayraPersonBountyIntel  - stacktrace is [java.lang.Thread.getStackTrace(Unknown Source), data.scripts.campaign.intel.VayraPersonBountyIntel.advanceImpl(VayraPersonBountyIntel.java:946), com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.advance(BaseIntelPlugin.java:75), com.fs.starfarer.api.impl.campaign.intel.BaseEventManager.advance(BaseEventManager.java:114), data.scripts.campaign.intel.VayraPersonBountyManager.advance(VayraPersonBountyManager.java:273), com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source), com.fs.starfarer.title.TitleScreenState.menuItemSelected(Unknown Source), com.fs.starfarer.title.Object.actionPerformed(Unknown Source), com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source), com.fs.starfarer.ui.I.Ò00000(Unknown Source), com.fs.starfarer.ui.I.processInput(Unknown Source), com.fs.starfarer.ui.O0Oo.o00000(Unknown Source), com.fs.starfarer.BaseGameState.traverse(Unknown Source), com.fs.state.AppDriver.begin(Unknown Source), com.fs.starfarer.combat.CombatMain.main(Unknown Source), com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source), java.lang.Thread.run(Unknown Source)] ### when it was previously null
[close]
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Plasmatic on January 10, 2020, 07:41:05 AM
First off, I love the mod.

Though I'm having some issues, nothing crashing or anything, but i can't seem to get two commands to work..

Namingly \Clear\, and \Clear ships\

If I try storage\clear ships\ it says no such command
Storage\clear\ says the same thing

typeing in just clear simply clears the console, not my storage.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Maelstrom on January 10, 2020, 05:14:21 PM
okay so for some reason what causes console command to crash... out of ALL THE THINGS IN EXISTANCE, is these two settings:

"decivSamplingMonths":16,
"decivMinStreak":3,

For some mystical reason, if you set these settings to bigger values (to prevent random deciv events) the game just refuses to open the console without crashing. I don't see how this is related but holy *** it took a lot of digging around to figure it out. Thing is for some reason changing those values after a save was created might or might not break console commands as well. I even tested it out and for some random reason sometimes it breaks it and other times its fine...

So there you go, I have no idea how this makes sense but hey, I didn't make the mod :3 

I think I also changed those values since I believe vanilla ones were smaller so I guess it has to do with back ground simulation freaking out.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Maelstrom on January 10, 2020, 07:59:32 PM
So after even more testing it looks like this is indeed the cause of the crash. It would explain why there is no error since its not caused by a bug but rather a limitation. What still puzzles me is how back ground simulation has anything to do with console commands and why this would cause the game to CTDT...
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Althalus on January 11, 2020, 08:34:44 PM
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'

Edit: adding the original code block here for easier access. This one will spawn a stable point.
Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "stable_location", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }

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

[attachment deleted by admin]
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Plasmatic on January 17, 2020, 06:41:39 AM
First off, I love the mod.

Though I'm having some issues, nothing crashing or anything, but i can't seem to get two commands to work..

Namingly \Clear\, and \Clear ships\

If I try storage\clear ships\ it says no such command
Storage\clear\ says the same thing

typeing in just clear simply clears the console, not my storage.

In reference to my earlier question, am I correct in assuming these clear commands are supposed to empty the storage? if so, how do I use them?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: nuker22110 on January 17, 2020, 05:50:35 PM
Ok. Current working code for adding planets is.
Code
 RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
Code works great for spawning new planets in a star system. However, do you know how to spawn moons that orbit around a planet?

how to u get it to work? i get an unknown variable error for planet angle
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Jaime Wolf on January 18, 2020, 12:50:31 AM
Anyway there to ban me from this mod lol i cannot help but cheat once i found this and its bugging me. lol
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Plasmatic on January 18, 2020, 05:21:18 AM
Anyway there to ban me from this mod lol i cannot help but cheat once i found this and its bugging me. lol
uninstall it? :)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on January 18, 2020, 12:51:37 PM
Any way to change the shortcut to open the console window?

I dont have an English keyboard and I am unable to open the console with any combination of "CTRL+BACKSLASH".

I see someone already told you that it's actually control+backspace, but you can change the keystroke that summons the console with the Settings command.

If for some reason your keyboard doesn't have control or backspace, you can also change it manually by editing the "consoleKeystroke" field in saves/common/config/lw_console_settings.json.data. Set all the "true"s to "false" (these control if you need to hold shift, control, or alt), and the first number to the keycode of the key you want. Keycodes can be found here (https://docs.oracle.com/javase/7/docs/api/constant-values.html#java.awt.event.KeyEvent.VK_0). If you wanted to summon the console by pressing 9, you'd look for VK_9, which has the keycode 57. So your "consoleKEystroke" would look like "consoleKeystroke": "57|false|false|false".

Yeah, using the settings command is much easier. :)


okay so for some reason what causes console command to crash... out of ALL THE THINGS IN EXISTANCE, is these two settings:

"decivSamplingMonths":16,
"decivMinStreak":3,

For some mystical reason, if you set these settings to bigger values (to prevent random deciv events) the game just refuses to open the console without crashing. I don't see how this is related but holy *** it took a lot of digging around to figure it out. Thing is for some reason changing those values after a save was created might or might not break console commands as well. I even tested it out and for some random reason sometimes it breaks it and other times its fine...

So there you go, I have no idea how this makes sense but hey, I didn't make the mod :3 

I think I also changed those values since I believe vanilla ones were smaller so I guess it has to do with back ground simulation freaking out.

That's incredibly weird. If anything I'd expect it to crash when the console closes, not when it first opens, since the game would be playing catch-up on however many thousands of frames it skipped. I'll look into it.


First off, I love the mod.

Though I'm having some issues, nothing crashing or anything, but i can't seem to get two commands to work..

Namingly \Clear\, and \Clear ships\

If I try storage\clear ships\ it says no such command
Storage\clear\ says the same thing

typeing in just clear simply clears the console, not my storage.

In reference to my earlier question, am I correct in assuming these clear commands are supposed to empty the storage? if so, how do I use them?

You want "storage clear" and "storage clear ships". I'll update Storage's help entry to be more clear (no pun intended).


Anyway there to ban me from this mod lol i cannot help but cheat once i found this and its bugging me. lol

A command to block access to the console on specific saves has been on my todo list for a while. I've just been lacking the motivation to mod for the last several months.


Ok. Current working code for adding planets is.
Code
 RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
Code works great for spawning new planets in a star system. However, do you know how to spawn moons that orbit around a planet?

how to u get it to work? i get an unknown variable error for planet angle

@Coffeeboi: You'd have to do it manually. If you're docked with the planet you want to create a moon for, you can use $context.getEntityInteractedWith() as the anchor for an OrbitAPI you create, then spawn the moon with that orbit (which I _believe_ will handle the positioning of the planet for you).

@nuker22110: You need to replace the placeholder arguments. So Planet_Angle might be 140, Planet_Orbit_length might be 70, etc. You can find examples of addPlanet usage in starsector-core/data/scripts/world/corvus.Corvus.java. Runcode takes Java code as an argument, so checking the files in data/scripts is a good way to get ideas for how to use it.

Oh, and a general statement about runcode snippets: I'd recommend being _extremely_ careful with RunCode if you aren't a modder yourself. RunCode isn't a normal command. You're writing, compiling and running Java code at the same level as an actual mod, without any of the safeties the other console commands have to prevent you from breaking things. The benefit is that you can do almost anything a mod can do with this command, but the downside is you can ruin your savefile if you get something wrong, and mistakes might not be immediately apparent.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Malleator on January 19, 2020, 08:49:10 AM
Tried to use the code to add a stable point but I got the error in the screenshot.

This is what I use for stable locations.
Code
runcode SectorEntityToken fleet = Global.getSector().getPlayerFleet();  
      StarSystemAPI sys = (StarSystemAPI)fleet.getContainingLocation();
      SectorEntityToken stable = fleet.getContainingLocation().addCustomEntity(null, null, "stable_location", "neutral");
      float orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(fleet, sys.getCenter());
      float orbitDays = orbitRadius / (20f + new Random().nextFloat() * 5f);
      float angle = com.fs.starfarer.api.util.Misc.getAngleInDegrees(sys.getCenter().getLocation(), fleet.getLocation());
      stable.setCircularOrbit(sys.getCenter(), angle, orbitRadius, orbitDays);


Can anyone please help me understand how to fill out this command to create planets?
Code
RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
From what I understand, I replace the "System_Name" variable with the system I want to spawn the planet in.
"Added_Planet_Name" is changed to whatever I want to name the planet. Correct me if wrong.
But I don't understand how to fill out: "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length

Can someone please provide a working example of the create planet command? Thanks.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Althalus on January 19, 2020, 02:13:34 PM
Tried to use the code to add a stable point but I got the error in the screenshot.

This is what I use for stable locations.
Code
runcode SectorEntityToken fleet = Global.getSector().getPlayerFleet();  
      StarSystemAPI sys = (StarSystemAPI)fleet.getContainingLocation();
      SectorEntityToken stable = fleet.getContainingLocation().addCustomEntity(null, null, "stable_location", "neutral");
      float orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(fleet, sys.getCenter());
      float orbitDays = orbitRadius / (20f + new Random().nextFloat() * 5f);
      float angle = com.fs.starfarer.api.util.Misc.getAngleInDegrees(sys.getCenter().getLocation(), fleet.getLocation());
      stable.setCircularOrbit(sys.getCenter(), angle, orbitRadius, orbitDays);

That worked for me, thanks so much!
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Malleator on January 20, 2020, 02:15:12 PM
Is there an easy way, given a ship id, to find which mod it is from?
Additionally, is there a way to list the ids of the ships in the player's fleet?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Rasip on January 20, 2020, 05:48:06 PM
Any chance you can add a config option to disable nuke and "toggleai enemy off"?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: qman on January 26, 2020, 02:07:15 PM
Ok. Current working code for adding planets is.
Code
 RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 

how would you use this code to create a terran world in the Beta Morvah star system?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: JNexus on January 30, 2020, 11:07:41 AM
Hi there! Really usefull mod.
I was wondering if there's any command to "move" a jump point inside a system. Like relocating it.

 Because the system i choose to colonize first has this Inner Jump Point inside my red star corona (i suppose it is a "bug" of Unknown Skies, the red star is bigger than vanilla).
I didn't think AI would ammass just outside it a lot of fleets, trying to reach the jump point then fall back, damaging themselves and repeat till they die. My trade convoys too of course.

Spoiler
(https://i.ibb.co/hDK3fvk/screenshot003.png)
[close]

Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Rasip on January 30, 2020, 01:30:04 PM
I don't know of a command to move a jump point, but i have seen them close enough to giant stars to take damage trying to jump without unknown skies. I know i have seen that with nothing but Nexerelin and think i have in vanilla.

Making giants bigger probably makes it more common though.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: e on February 03, 2020, 12:29:03 AM
Is it possible to use console commands to change a planet's size? not to be confused with colony size, what i want is to change the actual planet.

If so, anyone knows a code for it?

Thanks!
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: MGD on February 07, 2020, 07:18:53 PM
right, quick question, can you use the console to finish building something on a planet?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mza325 on February 08, 2020, 02:19:52 AM
right, quick question, can you use the console to finish building something on a planet?

Fastbuild
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Valikdu on February 13, 2020, 02:15:32 PM
Would it be possible to make a command to remove a hullmod from a ship?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: generalking007 on February 13, 2020, 02:44:02 PM
Stupid question, but i downloaded this mod and lazylib, but when i star my launcher, despite having both extracted into my mod folder, the only mod that shows in the mod lsit is lazylib, so i cant activate this mod, any idea why?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Simal on February 20, 2020, 03:39:08 PM
Would there be a way to add built-in special hullmods like targeting supercomputer?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kanij on February 22, 2020, 04:38:07 PM
Anyone have an example on how to add a terran planet? I see the console command posted multiple times in the thread, however there isn't a clear example on how to do so. I looked into the java file to try and find an example however I couldn't locate it.

Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Pandora on February 23, 2020, 07:12:53 PM
Hello! I've come across a small, tiny, itty bitty problem. Ancyra has become Deciv.
Don't try to have dinner and let the game running folks!  :-[

So, what I'm thinking is this: does anyone know a command or Runcode line that could skip the Galatia tutorial mission and advance into the campaign? Even just advancing to the point where going to Jangala ends the mission would be just swell!  ;D

I've discovered what the code bellow does, and it is worse than useless. It simply makes a new error by opening the jump point before it can be stabilized, thus making it impossible to continue beyond that point.
Spoiler
runcode com.fs.starfarer.api.impl.campaign.tutorial.TutorialMissionEvent.endGalatiaPort ionOfMission()
[close]
So please, listen to my plight and help this poor unfortunate soul.  :'(

I'm going to try NEXERELIN and see if it helps out any.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on February 28, 2020, 07:47:17 AM
question since I borked a Legio Infernalis raiding station in Hyperspace can I somehow delete that station? IE I need to do a major clean up of the Hyperspace sector as Tahlan had a bug before the update where you cant really destroy those hyperspace stations meaning you are borked for life if you need to do some police work
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Pandora on February 28, 2020, 07:52:52 AM
I think you can probably delete them... Just gotta know the commands I guess. I never needed to erase them but I think that making them decived will deal with those pesky stations.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on February 28, 2020, 07:55:10 AM
so either using abandon in devmode and or destroy colony command? will the game know they were once part of the mod? I mean once abandoned they are pretty much free real estate
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: FahadXray on February 29, 2020, 12:15:32 AM
Is there a way to add an asteroid field or an asteroid belt using the console commands? I found an awesome system that had two great desert planets, I colonized them hoping to terraform them using Boggled's terraforming mod. But there are no cryovolcanic plants to colonize and build imsara's sling, and no asteroids to build a mining station on to build a Drone Control Nexus that delivers water to the planets...
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on February 29, 2020, 02:04:31 AM
Is there a way to add an asteroid field or an asteroid belt using the console commands? I found an awesome system that had two great desert planets, I colonized them hoping to terraform them using Boggled's terraforming mod. But there are no cryovolcanic plants to colonize and build imsara's sling, and no asteroids to build a mining station on to build a Drone Control Nexus that delivers water to the planets...
in theory something like
RunCode Global.getSector().getStarSystem("System_Name").addAstroidBelt("star_name", 150, 3600, 170, 200, 250, Terrain.ASTEROID_BELT, "Belt Name")

now how good this is I do not know as this is based on the Tia Texat system
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: FahadXray on February 29, 2020, 05:37:33 PM
Is there a way to add an asteroid field or an asteroid belt using the console commands? I found an awesome system that had two great desert planets, I colonized them hoping to terraform them using Boggled's terraforming mod. But there are no cryovolcanic plants to colonize and build imsara's sling, and no asteroids to build a mining station on to build a Drone Control Nexus that delivers water to the planets...
in theory something like
RunCode Global.getSector().getStarSystem("System_Name").addAstroidBelt("star_name", 150, 3600, 170, 200, 250, Terrain.ASTEROID_BELT, "Belt Name")

now how good this is I do not know as this is based on the Tia Texat system

I tried it, it gave me an error: org.codehaus.commons.compiler.CompileException: Line 1, Column 70: A method named"addAsteroidBelt" is not declared in any enclosing class nor any supertype, nor through a static import.

Is there supposed to be anything inside the parentheses after getSector?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Pandora on March 01, 2020, 03:31:31 AM
RunCode Global.getSector().getStarSystem("System_Name").addAsteroidBelt("star_name", 150, 3600, 170, 200, 250, Terrain.ASTEROID_BELT, "Belt Name")

The first Asteroid was written as astroid. That would break the code. Try it now!

Also, make sure to change the "Name" to what the the system, star and asteroid belt are named. The first two are there and the third just make one up.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on March 01, 2020, 07:18:20 AM
Anyone have an example on how to add a terran planet? I see the console command posted multiple times in the thread, however there isn't a clear example on how to do so. I looked into the java file to try and find an example however I couldn't locate it.
you need to know that terran in the planet type is in small letters

RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length)

for example
I'm in Gaap System, I want to name the planet herpa derp, and is Terran
now where do I want the planet to start example I want it to spawn at 90 degree north, and I want this planet to support a boggled Astropolis Station (IIRC it might be a minimum size of 2000 but I'm not sure), now the tricky part placing the orbit it is measured in radius and in pixels a standard system map is somewhere around 30000 pixels radius (this is better with save scumming). and then how fast do you want the planet to rotate in the map, say you want earth days = 1 year then 366 is you answer
now you can change terran to other things like gas_giant, water, barren,

RunCode Global.getSector().getStarSystem("Gaap").addPlanet("Herpa Derp", Global.getSector().getStarSystem("Gaap").getStar(), "Herpa Derp", "terran", 90, 2300, 15000, 366)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: FahadXray on March 01, 2020, 10:14:23 PM
RunCode Global.getSector().getStarSystem("System_Name").addAsteroidBelt("star_name", 150, 3600, 170, 200, 250, Terrain.ASTEROID_BELT, "Belt Name")

The first Asteroid was written as astroid. That would break the code. Try it now!

Also, make sure to change the "Name" to what the the system, star and asteroid belt are named. The first two are there and the third just make one up.

Alright so I applied it, and I got this error:

Compilation failed:org.codehaus.commons.compiler.CompileException: Line 1, Column 71: No applicable constructor/method found for actual parameters "java.lang.string, int, int, int, int, int, java.lang.string, java.lang.string"; candidates are: "public abstract com.fs.starsector.api.campaign.SectorEntityToken com.fs.starfarer.api.campaign.LocationAPI.addAsteroidBelt(com.fs.starfarer.api.campaign.SectorEntityToken, int, float, float, float, float)", ""public abstract com.fs.starfarer.api.campaign.SectorEntityToken com.fs.starfarer.api.campaign.LocationAPI.addAsteroidBelt(com.fs.starfarer.api.campaign.SectorEntityToken, int, float, float, float, float, java.lan.string, java.lang.string)"

probably has something to do with the values after the addAsteroidBelt
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Pandora on March 02, 2020, 04:58:27 AM
Hmmm, from looking at other posts, what I think happened is that it tried to create a belt using invalid coordinates...

If that's the case I can't really help you there... But what you could do is try to find YOUR coordinates and add a belt over you to see if it works.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Freetimez on March 03, 2020, 03:55:03 AM
Anyone have an example on how to add a terran planet? I see the console command posted multiple times in the thread, however there isn't a clear example on how to do so. I looked into the java file to try and find an example however I couldn't locate it.
you need to know that terran in the planet type is in small letters

RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length)

for example
I'm in Gaap System, I want to name the planet herpa derp, and is Terran
now where do I want the planet to start example I want it to spawn at 90 degree north, and I want this planet to support a boggled Astropolis Station (IIRC it might be a minimum size of 2000 but I'm not sure), now the tricky part placing the orbit it is measured in radius and in pixels a standard system map is somewhere around 30000 pixels radius (this is better with save scumming). and then how fast do you want the planet to rotate in the map, say you want earth days = 1 year then 366 is you answer
now you can change terran to other things like gas_giant, water, barren,

RunCode Global.getSector().getStarSystem("Gaap").addPlanet("Herpa Derp", Global.getSector().getStarSystem("Gaap").getStar(), "Herpa Derp", "terran", 90, 2300, 15000, 366)

Excuse my ignorance of coding/java, but why does this return java.lang.nullpointerexception? Thanks to anyone for help in advance!

RunCode Global.getSector().getStarSystem("Kapre Star System").addPlanet("Exos", Global.getSector().getStarSystem("Kapre Star System").getStar(), "Exos", "terran", 80, 2400, 6000, 250)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on March 03, 2020, 07:57:02 AM
Anyone have an example on how to add a terran planet? I see the console command posted multiple times in the thread, however there isn't a clear example on how to do so. I looked into the java file to try and find an example however I couldn't locate it.
you need to know that terran in the planet type is in small letters

RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length)

for example
I'm in Gaap System, I want to name the planet herpa derp, and is Terran
now where do I want the planet to start example I want it to spawn at 90 degree north, and I want this planet to support a boggled Astropolis Station (IIRC it might be a minimum size of 2000 but I'm not sure), now the tricky part placing the orbit it is measured in radius and in pixels a standard system map is somewhere around 30000 pixels radius (this is better with save scumming). and then how fast do you want the planet to rotate in the map, say you want earth days = 1 year then 366 is you answer
now you can change terran to other things like gas_giant, water, barren,

RunCode Global.getSector().getStarSystem("Gaap").addPlanet("Herpa Derp", Global.getSector().getStarSystem("Gaap").getStar(), "Herpa Derp", "terran", 90, 2300, 15000, 366)

Excuse my ignorance of coding/java, but why does this return java.lang.nullpointerexception? Thanks to anyone for help in advance!

RunCode Global.getSector().getStarSystem("Kapre Star System").addPlanet("Exos", Global.getSector().getStarSystem("Kapre Star System").getStar(), "Exos", "terran", 80, 2400, 6000, 250)

remove the star system from Kapre
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Freetimez on March 03, 2020, 09:45:45 AM
Thanks, that fixed it! The planet size was way too big tho, took up half the screen  ;D
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on March 04, 2020, 02:27:54 AM
I have been thinking maybe AddAsteroidBelt is technically not the right answer as the Asteroid Belt is a terrain modifier from the RingAPI... so addRing?
resulting in
OK I GOT IT

RunCode Global.getSector().getStarSystem("System_Name").addAsteroidBelt(Global.getSector().getStarSystem("System_Name"), 2000, 1500, 300, 400, 600)

(int numAsteroids,float orbitRadius,float width,float minOrbitDays,float maxOrbitDays)
OK to provide a sample on this code
Code
RunCode Global.getSector().getStarSystem("Arcadia").AddAsteroidBelt(Global.getSector().getStarSystem("Arcadia"), 2000, 1500, 300, 400, 600)
what does this all mean
I want to make an Asteroid Belt in a Star System named Arcadia in the Asteroid Belt I want to chuck in 2000 asteroids that you can interact, with the starting point of the Belt being 1500 pixels away from the star specified, with the entire asteroid belt being 300 pixels THICC, in it some asteroid takes 400 days to complete an orbit some taking 600 days to complete their orbit
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: EgoVerum on March 18, 2020, 01:24:16 AM
o7 So after putting the mod in I've got an error,
No other mods installed, 0.9.1a installation.
I select the mod launch the game.

And it will load all the way and before it changes the skin I get this error https://i.imgur.com/qymyJiF.png (https://i.imgur.com/qymyJiF.png)
Which says, fatal: failed to find script of class and some text.
Also a link to Google Drive for log, the Error seems to be about not finding a hull spec or something. https://drive.google.com/file/d/1M5K8LqwCy7hqhcF9co84rRGZoSsN5FRi/view?usp=sharing (https://drive.google.com/file/d/1M5K8LqwCy7hqhcF9co84rRGZoSsN5FRi/view?usp=sharing)

Tried with a new fresh install and got the same issue, am I missing something?

EDIT: Solution solved
Bizzarely and rarely for once 'Run as Admin' actually relavent for once.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Big Brother on March 20, 2020, 09:46:19 AM
Hey, my game keeps on crashing every time I launch the game with the console commands mod activated. I have tried launching the game as an “administrator”, but it crashes in this mode to.
“Starsector 0.9.1a-Rc8
Fatal: Failed to find script of class
[com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginlmpl]
Check Starsector.log for more info.”
This message comes up after the fame has crashed.
Anyone who can help me with this?

Edit: So, I yet again get conformation of my own stupidity. Kids do not make the same mistakes as me. When downloading a mod, you should always read the requirements for that mod. Please learn from my mistakes.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: TheSAguy on March 26, 2020, 09:51:03 AM
Hi,

Is there a way to add a Cryo-sleeper to a system?
Or add/change the resources/bonuses on a planet?

Thanks.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: geminitiger on March 28, 2020, 12:54:30 PM
Is there a way to zap a station out of existence, blessed reach is unkillable and I find that rather annoying.
edit: Or allow me to switch owners to yours truly.  ;D
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Unnamed_Shadow on April 19, 2020, 01:00:08 PM
Does anyone would know the way to add a 3rd Stable Location in a System?

I really want to have the 3 of them on my system.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: GamerRoman on April 22, 2020, 04:07:50 AM
I got a little problem with spawning one certain weapon; the Salamander MRM isn't listed with the list weapons command.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: mathyou on April 22, 2020, 01:00:02 PM
I got a little problem with spawning one certain weapon; the Salamander MRM isn't listed with the list weapons command.

Looking at the game files (starsector-core/data/weapons/weapon_data.csv), it looks like there's salamanderpod (for medium mounts) and heatseeker (for small), which is certainly named oddly and probably explains why you couldn't find it.

Does anyone would know the way to add a 3rd Stable Location in a System?

I really want to have the 3 of them on my system.

list commands will generally help with this stuff. There's a command addstablepoint that does this.

Hi,

Is there a way to add a Cryo-sleeper to a system?
Or add/change the resources/bonuses on a planet?

Thanks.

For tricky stuff, your best bet is probably searching the forum for "runcode," which will find the code snippets people have shared. In general, be careful with the command if you don't know what you're doing since it can break a safe if you do something wrong (and that might not be immediately obvious). I found this and have used it in the past. It's probably safe:

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()), 180f); }

That'll spawn a cryosleeper at your current location.

Is there a way to zap a station out of existence, blessed reach is unkillable and I find that rather annoying.
edit: Or allow me to switch owners to yours truly.  ;D

I don't know for sure, but you could try docking with it and destroycolony.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Gezzaman on April 22, 2020, 03:37:52 PM
is there a way to remove permanent hullmods from ships?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Thelockest on April 23, 2020, 02:53:06 AM
Is there a way to zap a station out of existence, blessed reach is unkillable and I find that rather annoying.
edit: Or allow me to switch owners to yours truly.  ;D

go to colony then use the command setmarketsize 4 , then use devmode to abandon the colony.
I had the same issue with the Legio Infernalis damned Invincible stations.
.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: mathyou on April 24, 2020, 11:00:46 PM
I'd love to see a command (or some other method) to copy the results of another command to the clipboard. This would help me debug issues I'm having with my adjusted sector config where it seems to be creating many more systems than I think it should. I'm trying to count the number of lines returned by list systems, which is kind of a pain in the butt. It looks like roughly 60 per page, so I can approximate without too much trouble now, but copying would have been so much faster.

I also wish for the ability to copy when I'm playing with a lot of mods and would like to be able to do partial text matching against the middle or end of strings instead of the start for some of the list outputs.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Username356 on April 26, 2020, 09:12:43 AM
Excuse me, i got a quick question.

is it possible to add Modded Ships? (as in Ship added from other mods)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mondaymonkey on April 26, 2020, 09:37:01 AM
Excuse me, i got a quick question.

is it possible to add Modded Ships? (as in Ship added from other mods)

Excuse me, what do you mean as "add modded ship"?

If it is just "add a ship from installed mod to a player's fleet", than it is certainly "yes". Just "list ships" command, find it's ID and then "addship ID". IIRC, of course.

If it something else, please specify.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Username356 on April 26, 2020, 10:32:28 AM
Excuse me, i got a quick question.

is it possible to add Modded Ships? (as in Ship added from other mods)

Excuse me, what do you mean as "add modded ship"?

If it is just "add a ship from installed mod to a player's fleet", than it is certainly "yes". Just "list ships" command, find it's ID and then "addship ID". IIRC, of course.

If it something else, please specify.


yes a ship from a mod, that's what i mean. i'm sorry if its confuse you, English isnt my main languange
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mondaymonkey on April 26, 2020, 10:36:49 AM
Quote
English isnt my main languange

We are in a same situation.

So, is it help?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Username356 on April 26, 2020, 10:45:23 AM
Quote
English isnt my main languange

We are in a same situation.

So, is it help?

Yes. that is all i need, thank you for your help. that is all i need and i hope you had a good day over there.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Alluvian on April 28, 2020, 10:46:55 AM
Is it possible to add a military submarket to an already generated market?

I've also wondered about this, and I think it might be possible with runcode, but I have no idea what kind of reference or how to write out the line to enact it.
Looking through Exerelin, there's a "submarkets.csv" which lists several different ones including exerelin_prismMarket, open_market, black_market, and generic_military which has the description:
"Trade with $theFaction military base.

Weapons and other military hardware can be bought and sold here even if they're illegal on the open market. A commission and better standing with $theFaction results in higher-grade hardware being available.

Will buy locally illegal goods as part of a no-questions-asked buyback program.

Selling enough of a commodity will temporarily resolve a shortage."

So that's definitely it. And, no, in case you're wondering "addcondition" and "addindustry" doesn't work. But you should be able to somehow add it. Someone that knows more about how runcode works could probably decipher it.

I'm also interested, too, because none of my own colonies have military markets and it would be nice to have them to stock up on weapons and marines/crew occasionally. I mean, it would make sense, especially if they already have a military base on them.

While a bit belated, here is how you can add a submarket (to an existing market) with runcode. First, you need the string (name) of the market. For this example, the market name is "garden_market".
Code
runcode for (int i = 0; i < 1; i++) {MarketAPI market = Global.getSector().getEconomy().getMarket("garden_market"); market.addSubmarket("generic_military");}

Iterating over a list of markets should also be possible.
Code
String listMarkets[] = new String[]{"garden_market", "ring_market"};
for (String marketStr : listMarkets) {...}
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Stelarwand030 on April 30, 2020, 01:38:27 AM
@LazyWizard

I was just wondering but is there a command that just adds only ships of a mod instead of all of them at once? Something like allhulls (mod x) and only mod x ships are added to the storage.

I have over a dozen mods active and when I use the allhulls command the game slows way down then eventually crashes.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Üstad on May 03, 2020, 03:36:13 PM
I figured out how to create a planet and make it orbit a star but for some reason I couldn't make it work to make "planet a" orbit "planet b" can anyone help me with that?
Title: Question About a Command
Post by: Nivri on May 03, 2020, 10:33:22 PM
Is there any command to remove the planet's "hate" to you? I kept on destroying pirate vessels that I can't trade with them anymore. It says "It would take months for the commosion ...." Maybe there is a command in the console command list?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Nivri on May 05, 2020, 07:31:20 AM
Does anyone know how to remove an uninhabited planet from a certain system?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mayu on May 12, 2020, 11:56:26 PM
I figured out how to create a planet and make it orbit a star but for some reason I couldn't make it work to make "planet a" orbit "planet b" can anyone help me with that?

Shameless bumping. I, for one, would like to know as well. I'm currently in a crusade of creating an ideal system for my empire. Somehow, I can make a planet to spawn in a system. However I can't still figure it out on how to spawn a planet to orbit another planet as its moon. If anyone knows how or has an idea to do it, please kindly share, thank you beforehand!
Title: Re: Question About a Command
Post by: Histidine on May 13, 2020, 01:41:37 AM
Is there any command to remove the planet's "hate" to you? I kept on destroying pirate vessels that I can't trade with them anymore. It says "It would take months for the commosion ...." Maybe there is a command in the console command list?
runcode Global.getSector().getCampaignUI().getCurrentInteractionDialog().getInteractionTarget().getMarket().getMemoryWithoutUpdate().unset("$playerHostileTimeout");
then undock and redock.

Does anyone know how to remove an uninhabited planet from a certain system?
This works on any planet or station you're docked with (including inhabited ones):
Code: java
runcode SectorEntityToken ent = Global.getSector().getCampaignUI().getCurrentInteractionDialog().getInteractionTarget();
if (ent.getMarket() != null) Global.getSector().getEconomy().removeMarket(ent.getMarket());
ent.getContainingLocation().removeEntity(ent);
I figured out how to create a planet and make it orbit a star but for some reason I couldn't make it work to make "planet a" orbit "planet b" can anyone help me with that?

Shameless bumping. I, for one, would like to know as well. I'm currently in a crusade of creating an ideal system for my empire. Somehow, I can make a planet to spawn in a system. However I can't still figure it out on how to spawn a planet to orbit another planet as its moon. If anyone knows how or has an idea to do it, please kindly share, thank you beforehand!
The second parameter in LocationAPI.addPlanet is the object the new planet orbits, so instead of specifying the system's star you can enter the planet to orbit.
(Use LocationAPI.getEntityById; you can view a planet's ID in devmode with the dump memory option)
Title: Re: Question About a Command
Post by: Mayu on May 13, 2020, 04:12:58 AM
I figured out how to create a planet and make it orbit a star but for some reason I couldn't make it work to make "planet a" orbit "planet b" can anyone help me with that?

Shameless bumping. I, for one, would like to know as well. I'm currently in a crusade of creating an ideal system for my empire. Somehow, I can make a planet to spawn in a system. However I can't still figure it out on how to spawn a planet to orbit another planet as its moon. If anyone knows how or has an idea to do it, please kindly share, thank you beforehand!
The second parameter in LocationAPI.addPlanet is the object the new planet orbits, so instead of specifying the system's star you can enter the planet to orbit.
(Use LocationAPI.getEntityById; you can view a planet's ID in devmode with the dump memory option)

Hello thanks for the reply, though forgive my coding illiteracy since I'm not sure how exactly I'm going to do that. This is the code I am using when creating a planet, I've seen this from the previous posts.

Code
RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
Title: Re: Question About a Command
Post by: Üstad on May 15, 2020, 09:57:19 AM

The second parameter in LocationAPI.addPlanet is the object the new planet orbits, so instead of specifying the system's star you can enter the planet to orbit.
(Use LocationAPI.getEntityById; you can view a planet's ID in devmode with the dump memory option)
Forgive me but I didn' get it, I typed the console llocationAPI.getEntityByID while in devmode but nothing happened. How can I check planet ID's exactly?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mondaymonkey on May 15, 2020, 10:53:17 AM
Is there a way to add an asteroid/dust rings to an existed planet via CC?

You should know, I spent all my character points for stamina and agility, leaving no room for intelligence to learn a Java magic, or wisdom to ignore spell ranking, so can you please give me something I can copy-paste, inserting a custom values.

Thank you!
Title: Re: Question About a Command
Post by: Algester on May 16, 2020, 03:51:04 AM
I figured out how to create a planet and make it orbit a star but for some reason I couldn't make it work to make "planet a" orbit "planet b" can anyone help me with that?

Shameless bumping. I, for one, would like to know as well. I'm currently in a crusade of creating an ideal system for my empire. Somehow, I can make a planet to spawn in a system. However I can't still figure it out on how to spawn a planet to orbit another planet as its moon. If anyone knows how or has an idea to do it, please kindly share, thank you beforehand!
The second parameter in LocationAPI.addPlanet is the object the new planet orbits, so instead of specifying the system's star you can enter the planet to orbit.
(Use LocationAPI.getEntityById; you can view a planet's ID in devmode with the dump memory option)

Hello thanks for the reply, though forgive my coding illiteracy since I'm not sure how exactly I'm going to do that. This is the code I am using when creating a planet, I've seen this from the previous posts.

Code
RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
that means
Code
RunCode Global.getSector().getStarSystem("System_name").addPlanet("Added_Planer_Name", Global.getSector().getEntityById("Planet_Name"), "Added_planet_name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length)

ok refresher
Summoning Asteroid Belts
Code
RunCode Global.getSector().getStarSystem("System_name").addAsteroidBelt(Global.getSector().getStarSystem("System_name"), numAsteroids, orbitRadius, width, minOrbitDays, maxOrbitDays)
Summoning Planets
Code
RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
Summoning Moons
Code
RunCode Global.getSector().getStarSystem("System_name").addPlanet("Added_Planer_Name", Global.getSector().getEntityById("Planet_Name"), "Added_planet_name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length)
Summoning Asteroid Fields orbiting a Planet
Code
RunCode Global.getSector().getStarSystem("System_name").addAsteroidBelt(Global.getSector().getEntityById("Planet_ID"), numAsteroids, orbitRadius, width, minOrbitDays, maxOrbitDays)
Summoning Rings on a Planet
Code
RunCode Global.getSector().getStarSystem("System_name").addRingBand(Global.getSector().getEntityById("planet_ID"), "graphic type", "texture", textureWidth, BandIndex?, color modifier, BandWidthinEngine, MiddleRadius, OrbitDays)

I still need some help on deciphering the syntax needed for the Ring renderer as its a bit "complicated"
for the ringband this is what I understand
the game needs to know which texture to use and where it's found this can be seen in the settings.json of the main game
this is located in "misc", the textures listed are rings_dust0, rings_ice0, rings_special0, rings_asteroid0. then what does it mean by textureWidth, Bandindex.
as for color modifier it goes by the naming of Color.red, Color.blue, Color.white etc..., then I'm stumped with the BandWithinEngine and MiddleRadius

the only time you would need to use getEntityById is if you are modifying an already existing planet generated by the game else I think you can also use getEntityByName for console generated ones
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mondaymonkey on May 16, 2020, 07:17:49 AM
Thank you!
Title: Re: Question About a Command
Post by: Mayu on May 16, 2020, 08:24:29 AM
I figured out how to create a planet and make it orbit a star but for some reason I couldn't make it work to make "planet a" orbit "planet b" can anyone help me with that?

Shameless bumping. I, for one, would like to know as well. I'm currently in a crusade of creating an ideal system for my empire. Somehow, I can make a planet to spawn in a system. However I can't still figure it out on how to spawn a planet to orbit another planet as its moon. If anyone knows how or has an idea to do it, please kindly share, thank you beforehand!
The second parameter in LocationAPI.addPlanet is the object the new planet orbits, so instead of specifying the system's star you can enter the planet to orbit.
(Use LocationAPI.getEntityById; you can view a planet's ID in devmode with the dump memory option)

Hello thanks for the reply, though forgive my coding illiteracy since I'm not sure how exactly I'm going to do that. This is the code I am using when creating a planet, I've seen this from the previous posts.

Code
RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
that means
Code
RunCode Global.getSector().getStarSystem("System_name").addPlanet("Added_Planer_Name", Global.getSector().getEntityById("Planet_Name"), "Added_planet_name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length)

ok refresher
Summoning Planets
Code
RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
Summoning Moons
Code
RunCode Global.getSector().getStarSystem("System_name").addPlanet("Added_Planer_Name", Global.getSector().getEntityById("Planet_Name"), "Added_planet_name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length)


Okay, thanks for helping out. I've tried your code and it goes like this.

Code
RunCode Global.getSector().getStarSystem("Inda").addPlanet("Lunaria", Global.getSector().getEntityById("Komana"), "Lunaria", "barren", 75, 90, 800, 37)

It doesn't give me any errors however, the planet appears in the middle of the star/sun of the system lol!

Spoiler
(https://i.imgur.com/ODXA81l.jpg)
[close]


Edit: Nevermind, please disregard my stupidity, I followed Histidine's previous post about the planet ID. It worked now. Thank you everyone for the help!
Title: Re: Question About a Command
Post by: rrz85012-ThrowAway on May 16, 2020, 04:46:43 PM
So I am going to do a code dump here, I found some snippet in an other thread and started running with it (didn't write down the name so, sorry?)
the nice thing about the code is that is calculates the orbit radius for you, this is based on the Player Fleet current location.

Spawn a stable location on the current Player Fleet location, with an orbit related to the systems centre star.
This is not my code.
Spoiler
Code
runcode SectorEntityToken _fleet = Global.getSector().getPlayerFleet();  
    StarSystemAPI _sys = (StarSystemAPI)_fleet.getContainingLocation();
    SectorEntityToken _stable = _fleet.getContainingLocation().addCustomEntity(null, null, "stable_location", "neutral");
    float _orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(_fleet, _sys.getCenter());
    float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 5f);
    float _angle = com.fs.starfarer.api.util.Misc.getAngleInDegrees(_sys.getCenter().getLocation(), _fleet.getLocation());
    _stable.setCircularOrbit(_sys.getCenter(), _angle, _orbitRadius, _orbitDays);
The line can be tinkcet with to change the obit speed, increase the 5f to something like 100f for a speedy boy
Code
 float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 5f);
[close]

Remove a planet or station
Spoiler
with this you can remove planets, stations and start from a star system.
Code
runcode String _id = "planet_id";
SectorEntityToken fleet = Global.getSector().getPlayerFleet();
StarSystemAPI sys = (StarSystemAPI)fleet.getContainingLocation();
sys.removeEntity(sys.getEntityById(_id));
sys.updateAllOrbits();

explanation of values
Spoiler
Code
String _id = "planet_id"; // = the id of the planet, star or station you want to be removed
[close]
to get a list of available id in a star system use the following commands
Code
list planets; // will list all stars and planets in the system
list stations; // will list all stations in the system
[close]

spawn a planet
Using the same trick to spawn a planet on Player Fleet with an orbit related to the system centre star.
Spoiler
Using this code as is will give all the planets the prefix _cmd in the id_name
Code
runcode String _name = "planet_name";
String _type = "terain_type";
float _planetRadius = 165;
SectorEntityToken _fleet = Global.getSector().getPlayerFleet();
    StarSystemAPI _sys = (StarSystemAPI)_fleet.getContainingLocation();
SectorEntityToken _star = _sys.getStar();
float _orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(_fleet, _sys.getCenter());
    float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 10f);
    float _angle = com.fs.starfarer.api.util.Misc.getAngleInDegrees(_sys.getCenter().getLocation(), _fleet.getLocation());
PlanetAPI world = _sys.addPlanet( "_cmd"+_name, _star, _name, _type,
_angle, _planetRadius, _orbitRadius, _orbitDays);
_sys.updateAllOrbits();

the following line is needed to update the secter UI planet list so it shows up nice and orderd
Code
_sys.updateAllOrbits();

again tinker with the following line the increase orbit speed, 10f to 100f for speedy boy
Code
float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 10f);
explanation of values
Spoiler
Code
String _name = "planet_name"; // = name of planet without prefix
String _type = "terain_type"; // = planet type
float _planetRadius = 165; = // = planet size, bigger number bigger planet
[close]
[close]

Spawn a moon
Like spawning a planet, but now an planet needs to be set as the orbit focus
Spoiler
the off set isn't correct, however the radius seems to be right.
Code
runcode String _id = "planet_id";
String _moonName = "moon_name";
String _terrainType = "terrain_type";
float _moonRadius = 65;
SectorEntityToken _fleet = Global.getSector().getPlayerFleet();
    StarSystemAPI _sys = (StarSystemAPI)_fleet.getContainingLocation();
SectorEntityToken _star = _sys.getEntityById(_id);
float _orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(_fleet, _star);
    float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 10f);
    float _angle = com.fs.starfarer.api.util.Misc.getAngleInDegrees(_sys.getCenter().getLocation(), _fleet.getLocation());
PlanetAPI _world = _sys.addPlanet("_cmd"+_moonName, _star, _moonName, _terrainType,
_angle, _moonRadius, _orbitRadius, _orbitDays);
_sys.updateAllOrbits();
again tinker with the following line the increase orbit speed, 10f to 100f for speedy boy
Code
float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 10f);
explanation of values
Spoiler
Code
String _id = "planet_id"; // = id of the planet is star system
String _moonName = "moon_name"; // = the name of the moon
String _terrainType = "terrain_type"; // terrain of the moon
float _moonRadius = 65; // = moon size, bigger number bigger moon
[close]
[close]

Spawn rings around a planet
Those rings CAN NOT be removed with the code above.
Because a ring doesn't get an id/name and there for can't be found.
Spoiler
Again I use the same trick to get the radius and the location.
This is also some low level system stuff, for textures are directly manipulated.
Warning using this might BRICK your save make a backup first.
if you want to know what is does read the explanation below
The offset of the circle seems of by a bit, so drop a save before you use this
Code
runcode String _planetId = "planet_id";
SectorEntityToken _fleet = Global.getSector().getPlayerFleet();
StarSystemAPI _sys = (StarSystemAPI)_fleet.getContainingLocation();
SectorEntityToken _planet = _sys.getEntityById(_planetId);
float _orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(_fleet.getLocation(), _planet.getLocation());
float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 10f);
_sys.addRingBand(_planet,
"misc",
"rings_special0",
512,
1,
Color.RED,
256,
_orbitRadius,
_orbitDays)

[close]



Summoning Rings on a Planet
Code
RunCode Global.getSector().getStarSystem("System_name").addRingBand(Global.getSector().getEntityById("planet_ID"), "graphic type", "texture", textureWidth, BandIndex?, color modifier, BandWidthinEngine, MiddleRadius, OrbitDays)

I still need some help on deciphering the syntax needed for the Ring renderer as its a bit "complicated"
for the ringband this is what I understand
the game needs to know which texture to use and where it's found this can be seen in the settings.json of the main game
this is located in "misc", the textures listed are rings_dust0, rings_ice0, rings_special0, rings_asteroid0. then what does it mean by textureWidth, Bandindex.
as for color modifier it goes by the naming of Color.red, Color.blue, Color.white etc..., then I'm stumped with the BandWithinEngine and MiddleRadius

the only time you would need to use getEntityById is if you are modifying an already existing planet generated by the game else I think you can also use getEntityByName for console generated ones

Quote
the only time you would need to use getEntityById is if you are modifying an already existing planet generated by the game else I think you can also use getEntityByName for console generated ones

https://fractalsoftworks.com/starfarer.api/index.html?overview-summary.html (https://fractalsoftworks.com/starfarer.api/index.html?overview-summary.html)
in the API Documentation LocationAPI.getEntityByName(string) is flagged as Deprecated and getEntityById(string) should be used instead.
aka newer stuff might not work with .getEntityByName().
PS: StarSystemAPI get the .getEntityByName() form LocationAPI.

Explanation of spawn rings
Spoiler
Like I said before this is low level system stuff. What happens, is that we tell the game what texture to load and where game can find it.
That is what all textureWidth, Bandindex are for. The BandWithinEngine and MiddleRadius are the size of the ring, how it needs to be displayed in game aka the size and distance.

knowing what the 4 variables are used for the code below makes a little bit more sense, but lets break it down line by line.

The code break down
Spoiler
_planetId is a text value stored to be just later, fill this with the planet/star that you want the ring to orbit around
Code
runcode String _planetId = "planet_id";
_fleet stores the player fleet that we get through: Global.getSector().getPlayerFleet();
so it can be used later
Code
SectorEntityToken _fleet = Global.getSector().getPlayerFleet();

_sys stores the current star system the player fleet is in.
again to it can be used later
Code
StarSystemAPI _sys = (StarSystemAPI)_fleet.getContainingLocation();
from the current _sys(StarSystemAPI) get the entity with id _planetId
Code
SectorEntityToken _planet = _sys.getEntityById(_planetId);

math magic, takes the location of the player fleet and the planet location to do numbers
Code
float _orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(_fleet.getLocation(), _planet.getLocation());
float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 10f);

and the part that adds the ring to the planet
using _sys as it seems to be the highest location entity aviable.
and passes _planet as the orbit focus
Code
_sys.addRingBand(_planet,
The key uner which the texture location data can be found
Code
"misc",
the texture name to be used to display the ring in game
Code
"rings_special0",
the with of the texture image file
Code
512,
the index of the texture to be used,  a texture can have multiple images
start counting at 0. So you want the 3 thing in a texture it is the number you need is 2, because 0(1), 1(2), 2(3).
Code
1,
I do not know what the colour effects, maybe the mask/lighting?
Code
Color.RED,
The with if the ring in game
Code
256,
the radius form the centre of the planer tot the centre of the player fleet.
this means that the middle of the ring will spawn on the player fleet
Code
_orbitRadius,
that amount of day it compleaits one loop around the planet
Code
_orbitDays)
[close]

after the break down we know what the line does but is is not readable.
so let take a look at it again, and I'll omit the first part.
and fill it with the name so it becomes a bit clearer
Code
_sys.addRingBand(orbitFocus, // the planet the ring orbits around
    "misc", // the location where game can find the texture data, DO NOT CHANGE
    "texture_name", // the name of the .png file to be loaded as found in Starsector\starsector-core\graphics\planets
    bandWidthInTexture, // the total width of the image file as on disk
    bandIndex, // the index of the ring to display in game
    Color.RED, // the colour that does someting?
    bandWidthInEngine, // the size of the ring as displayed in game
    middleRadius, // the radius form the orbitFocus to the middle of the spawned ring.
    orbitDays) // the amount of days it takes to to complate one loop around the orbitFocus

[close]

note to self: Don't make post on the internet late at night, I will regret this in the morning.

EDIT:
Maybe make a new thread with a layout like this post. purely for dumping working code snippets, so people can find stuff.
and not ask questions there. It can then serve as a companion thread to this one and people can be directed there for working snippets.
But I will leave that to a more respected member of this community.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on May 17, 2020, 10:18:14 PM
this is the more simplified version of the Stable Location based on the player location found way earlier of this forum post you can search for it though unless you are a lazy person
Code
runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "stable_location", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }
you can change stable location to "nav_buoy", "comm_relay", "sensor_array" while adding "nav_buoy_makeshift" so on and so forth turns them into makeshift variants

I got autogenerate Hyperspace jump points to work
Code
runcode Global.getSector().getStarSystem("System Name").autogenerateHyperspaceJumpPoints(true,true)
// the first true statement is for Gas Giants
// the second true statement is for generating Fringe Jump Points
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Lord_Asmodeus on May 30, 2020, 08:49:41 AM
So due to some error I got some blueprints for fighters that ended up being like, ship hulls instead of fighter LPC's, and I was hoping to just console up some of those fighter BP's to make up for it... but I can't seem to identify the right name for the fighter BP, as the names of the fighters isn't being recognized
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: EldrickTobin on June 01, 2020, 12:32:01 PM
So due to some error I got some blueprints for fighters that ended up being like, ship hulls instead of fighter LPC's, and I was hoping to just console up some of those fighter BP's to make up for it... but I can't seem to identify the right name for the fighter BP, as the names of the fighters isn't being recognized

TL:DR
You need to check data\hulls\wing_data.csv for the reference you're looking for.

ALSO you can put in partials for "LIST WING" and "LIST HULL"

THE LONG VERSION: (dunno if you need this or not, but here it is)

Say you were looking for some nice vanilla Broadsword 'FIGHTERS'

"list ships broadsword"
"list hulls broadsword"

(you get no results due to the size being FIGHTER)

"list wings broadsword"
broadsword_wing

(What you wanted to find but... what did you end up with? How'd you get ship hulls?)

list variants broadsword

(And here's where your problem kicks in...)

Variants starting with "broadsword":
broadsword_Fighter, broadsword_Hull

_hull is added by the game, and default settings auto-correct as follows in this fabricated but accurate example. [I've smashed into it a heap with my own added fighters]

"addwing broadsword" into "addwing broadsword_hull" instead of "addwing broadsword_wing" because of alphabetization I suspect.

So in this admittedly easy case we open up wing_data.csv and dig for "broadsword_fighter"

OH it's broadsword_WING.

"addwing broadsword_wing" and bam.

hey need 4 because the glitch gave you 4 messed up BPs? plop a 4 on the end.


And since you don't sound like you live for using the console every few minutes (`-` Hi) you're all done.

checking the source's files for if it's more than a one time glitch is outside the scope of this garbage tutorial. But no one spoke up (in the thread) and as a ADD ALL THE THINGS Ambassador I wanted to extend an olive branch.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Üstad on June 05, 2020, 07:51:49 AM
I spawned a stable location via console but eventually it has been moved away into middle of the sun. How can I remove it or relocate it?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Lord_Asmodeus on June 06, 2020, 09:42:01 AM
Thanks for the help with the fighter thing. It seems like there might be some mod-specific issues with one of the fighters but overall that solved my problem.

On another note, I can't seem to get a moon to spawn, mostly for aesthetic reasons if I'm honest but I've tried the moon spawning command line, even looked for the specific planet id with the devmode memory dump, and I keep getting a nullpointer exception which causes it to fail, which to me seems like I'm still somehow messing up the id of the planet I want the moon to be around?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: alexwtb234 on June 07, 2020, 10:02:38 AM
A amazing command would be being able to add any hullmod, even built in hullmods, to the commanded ship.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mondaymonkey on June 07, 2020, 10:21:21 AM
Is there are command to add into player's inventory certain amount of all weapons and fighter wings existed in game?

I know there are AllWeapons and AllWings, but they are spawned, IIRC in a Corvus system and only one for each.

Or is there a way to configurate addweapon and addwing commands to be applied to all weapons/wings? I mean, we can "survey all", why not "addweapon all 100"?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Aratoop on June 07, 2020, 11:28:37 AM
That's odd, when I use the all weapons or allwings command it spawns 999 of each to the abandoned station's storage
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mondaymonkey on June 07, 2020, 11:57:42 AM
RLY? Forget then.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on June 10, 2020, 04:07:30 AM
I have been looking at the API and it seems there is no way for console command to use addPlanet where the planet size and orbit is automatically generated bu the game? through the use of math utilities?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kothyxaan on June 10, 2020, 12:29:24 PM
Looking for some help with the console commands.

Is there a way to spawn an active Remnant Nexus (at the play location, sorta like the stable location spawning)?

Also the planet spawning command, how exactly is it done? Could someone show the code for what will spawn some random planet at the player location (or just any planet really that I can copy paste and use in game).

Help appreciated.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on June 10, 2020, 07:25:39 PM
Looking for some help with the console commands.

Is there a way to spawn an active Remnant Nexus (at the play location, sorta like the stable location spawning)?

Also the planet spawning command, how exactly is it done? Could someone show the code for what will spawn some random planet at the player location (or just any planet really that I can copy paste and use in game).

Help appreciated.

you could use the same code for the stable location to spawn a remnant nexus since its nearly the same thing used to make pirate stations but exactly what is the custom entity called I do not know

as for your question on planets thing is I'm still working out the kinks in the code where planet generation is technically randomized

https://pastebin.com/iYxVK2Bq

right now the code looks like that I just used the code posted by rrz85012 and added a random number generator for the planet radius between 100-300
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kothyxaan on June 11, 2020, 01:40:09 AM
Looking for some help with the console commands.

Is there a way to spawn an active Remnant Nexus (at the play location, sorta like the stable location spawning)?

Also the planet spawning command, how exactly is it done? Could someone show the code for what will spawn some random planet at the player location (or just any planet really that I can copy paste and use in game).

Help appreciated.

you could use the same code for the stable location to spawn a remnant nexus since its nearly the same thing used to make pirate stations but exactly what is the custom entity called I do not know

as for your question on planets thing is I'm still working out the kinks in the code where planet generation is technically randomized

https://pastebin.com/iYxVK2Bq

right now the code looks like that I just used the code posted by rrz85012 and added a random number generator for the planet radius between 100-300

The planet spawning is so easy now you have pointed the way. Cheers!

The Remnant Nexus one is more difficult. Still cannot figure it out, I have tried changing the stable_location  to remnant_station2_Standard and remnant_station2, but they don't work. I think it is because they are considered ships (maybe if they were added to the spawnfleet command? but then they wouldn't be static and have other ships there in the same "fleet"? meh).
I have used (when trying to get the Remant Nexus to show) the stable locations code to spawn derelicts and stations (all things from the custom_entities.json). The stations though (even when spanwed as remnant) don't do anything.
I think to get to work what I want I would need to spawn a planet with headquarters etc, and put it under remnant control (maybe tinker with their faction file).

Now I make another request for help. How do I hand a new planet over to a faction? I have made a planet, occupied it, set up its industry now I want to hand it over to another faction. I tried: SetMaketOwner Remnant
I get Error: could not find entity with name "remnant"
Nevermind you can do this in game without console commands. Mind you, there is no Remnant option, must be in the faction file somewhere.
Unless there is a console command to bypass this?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Histidine on June 11, 2020, 07:53:32 AM
SetMarketOwner command (from Nex) requires specifying the market name/ID first, then the faction.

Remnant Nexus and other stations are technically fleets, these require somewhat different and more code to spawn.
code not provided in this post
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kothyxaan on June 11, 2020, 09:13:04 AM
SetMarketOwner command (from Nex) requires specifying the market name/ID first, then the faction.

Remnant Nexus and other stations are technically fleets, these require somewhat different and more code to spawn.
code not provided in this post

Thanks, you helped me figure out the setmarketowner command.

As for the Remnant Nexus, that's what I figured. I have no idea how to get round it.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mayu on June 18, 2020, 03:59:48 AM
Is there a way to spawn the hyperspace jump point to the player's location?

Code
runcode Global.getSector().getStarSystem("System Name").autogenerateHyperspaceJumpPoints(true,true)
// the first true statement is for Gas Giants
// the second true statement is for generating Fringe Jump Points
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kat on June 18, 2020, 07:00:57 AM
How do I hand a new planet over to a faction? I have made a planet, occupied it, set up its industry now I want to hand it over to another faction.
Nevermind you can do this in game without console commands.

This is something I've been wanting for a while, how do you do it ?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: ebolamorph on June 23, 2020, 01:27:32 AM
how do i use this to increase the level cap?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: ebolamorph on June 23, 2020, 01:42:56 AM
also how do i use this to increase my deploym,ent points. I have it set to deployment size 500 but never get 500 deployment points.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Rickyvanz on June 23, 2020, 05:29:27 AM
just tested out this mod and absolutely works with all kinds of mod i use on the game.

but one thing, is there any way i could put hotkey for certain command chain so that i can press a single button for activating some command chain without having to open the console and type the command again and again?

(for example : i want to execute command "god;infiniteammo;infiniteflux;nocooldown" by pressing \ key or = key)
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mondaymonkey on June 23, 2020, 07:32:47 AM
how do i use this to increase the level cap?

Probably there are way to do this via CC. But that is definitely stupid to do so, as you can just edit your settings.json and set

"playerMaxLevel":50, to whatever value you need.

also how do i use this to increase my deploym,ent points. I have it set to deployment size 500 but never get 500 deployment points.

Same file, another string:

"maxBattleSize":500,

Set it to what you think is OK. Then in-game adjust battlesize to maximum. Remember, you can not gain more than 60% of this value in DP, as outnumbered side (enemy) get it's minimal 40%.

Also, increasing battlesize can make your computer throttle. Or even crush the game.

Quote
(for example : i want to execute command "god;infiniteammo;infiniteflux;nocooldown" by pressing \ key or = key)

Just save it somewhare and before playing Ctrl+C, ingame Ctrl+backspace, Ctrl+V, enter.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Nextia on June 23, 2020, 08:29:40 AM
Currently getting a crash when trying to load the game with this mod enabled. When disabled the game boots and works perfectly fine but I really want to play with this.

(https://i.gyazo.com/82414a385653b601ff2c8863945e97f9.png)
Modlist;
Spoiler
{"enabledMods": [
  "$$$_lightshow",
  "$$$_trailermoments",
  "Adjusted Sector",
  "anotherportraitpack",
  "anvil_industries",
  "ApproLight",
  "raccoonarms",
  "lw_autosave",
  "timid_admins",
  "blackrock_driveyards",
  "sd_boardable_unboardables_vanilla",
  "aaCari UIl",
  "CAS",
  "CombatAnalytics",
  "chatter",
  "timid_commissioned_hull_mods",
  "lw_radar",
  "COPS",
  "lw_console",
  "istl_dam",
  "diableavionics_snowblast",
  "diableavionics",
  "DisassembleReassemble",
  "edshipyard",
  "XLU",
  "FDS",
  "sun_fuel_siphoning",
  "ZGrand Sector",
  "HMI",
  "sun_hyperdrive",
  "interestingportraitspack",
  "junk_pirates_release",
  "kadur_remnant",
  "kingdomofterra",
  "lw_lazylib",
  "leadingPip",
  "ArkLeg",
  "logisticsNotifications",
  "luddenhance",
  "MagicLib",
  "missingships",
  "nexerelin",
  "OcuA",
  "Polaris_Prime",
  "PulseIndustry",
  "sun_ruthless_sector",
  "saveTransfer",
  "RC_Second_Wave_Options",
  "shabro",
  "swp",
  "bonomel_skilledup",
  "speedUp",
  "sun_starship_legends",
  "StopGapMeasures",
  "timid_supply_forging",
  "Sylphon_RnD",
  "tahlan",
  "Terraforming and Station Construction",
  "THI",
  "TORCHSHIPS",
  "transfer_all_items",
  "underworld",
  "US",
  "ungp",
  "vayrasector",
  "vayrashippack",
  "lw_version_checker",
  "vesperon",
  "toggleWeapons",
  "XhanEmpire",
  "audio_plus",
  "shaderLib"
]}
[close]
Log;
Spoiler
105443 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/BR/shaders/surface/weapons/wsprbig_turret_surface.png (using cast)
105444 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/BR/shaders/material/weapons/wsprbig_turret_material.png (using cast)
105444 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/BR/shaders/normal/weapons/wsprbig_hp_normal.png (using cast)
105445 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/BR/shaders/surface/weapons/wsprbig_hp_surface.png (using cast)
105446 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/BR/shaders/material/weapons/wsprbig_hp_material.png (using cast)
105447 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/BR/shaders/normal/ships/hellbender_normal.png (using cast)
105448 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/BR/shaders/surface/ships/hellbender_surface.png (using cast)
105448 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/BR/shaders/material/ships/hellbender_material.png (using cast)
105450 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [data/config/radar/radar_settings.json]
105451 [Thread-4] INFO  org.lazywizard.radar.RadarSettings  - Radar toggle key set to K (37)
105451 [Thread-4] INFO  org.lazywizard.radar.RadarSettings  - Using vertex buffer objects: true
105454 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Common Radar]
105457 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Common Radar]
105458 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Tiandong Heavy Industries 1.2.1a]
105462 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Common Radar]
105464 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [data/config/radar/radar_settings.json]
105472 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Common Radar]
105473 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Tiandong Heavy Industries 1.2.1a]
105477 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Common Radar]
105479 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [data/config/radar/radar_settings.json]
105485 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [data/console/console_settings.json]
105539 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/fonts/scp_16_0.png (using cast)
105554 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Combat Chatter]
105555 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Common Radar]
105556 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Console Commands]
105559 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Logistics Notifications]
105560 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Nexerelin]
105562 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Save Transfer]
105563 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Second Wave Options 0.5.3b]
105564 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Ship and Weapon Pack]
105565 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Starship Legends]
105566 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Tiandong Heavy Industries 1.2.1a]
105567 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Underworld]
105568 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Version Checker]
105878 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: org/lazywizard/console/commands/SetRelation
java.lang.NoClassDefFoundError: org/lazywizard/console/commands/SetRelation
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at java.security.SecureClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.access$100(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at org.lazywizard.console.CommandStore.reloadCommands(CommandStore.java:71)
   at org.lazywizard.console.commands.ReloadConsole.reloadConsole(ReloadConsole.java:16)
   at org.lazywizard.console.ConsoleModPlugin.onApplicationLoad(ConsoleModPlugin.java:14)
   at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lazywizard.console.commands.SetRelation
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 20 more
[close]
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Yunru on June 23, 2020, 02:39:55 PM
Currently getting a crash when trying to load the game with this mod enabled. When disabled the game boots and works perfectly fine but I really want to play with this.
How unusual. It seems LazyLib isn't loading correctly.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Rickyvanz on June 25, 2020, 10:52:26 PM
Quote
(for example : i want to execute command "god;infiniteammo;infiniteflux;nocooldown" by pressing \ key or = key)

Just save it somewhare and before playing Ctrl+C, ingame Ctrl+backspace, Ctrl+V, enter.
[/quote]

sometimes work, sometimes not, i was hoping there was a way to put custom command binding to the mod like typing "bind [commands] [key to execute]" like that.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on June 25, 2020, 11:00:19 PM
The console doesn't have the ability to set custom keybinds (though that is an interesting idea), but you can use the alias command to save and shorten inputs. For example, running alias = god;infiniteammo;infiniteflux;nocooldown would let you run all those commands at once by entering = into the console.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on June 25, 2020, 11:01:41 PM
Is there a way to spawn the hyperspace jump point to the player's location?

Code
runcode Global.getSector().getStarSystem("System Name").autogenerateHyperspaceJumpPoints(true,true)
// the first true statement is for Gas Giants
// the second true statement is for generating Fringe Jump Points
runcode Random rndm = new Random;
                StarSystemAPI starSystem = Global.getSector().getPlayerFleet().getStarSystem();
                JumpPointAPI newJumpPoint = Global.getFactory().createJumpPoint("console_added_jumppoint" + rndm.nextInt(), "Hyperspace Jump Point " + starSystem.getJumpPoints().size());
                float distance = MathUtils.getDistance(Global.getSector().getPlayerFleet().getLocation(), starSystem.getStar().getLocation());
                OrbitAPI newJumpPointOrbitAroundStar = Global.getFactory().createCircularOrbit(starSystem.getStar(), 0, distance, distance / 10);
                newJumpPoint.setOrbit(newJumpPointOrbitAroundStar);
                newJumpPoint.setStandardWormholeToHyperspaceVisual();
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: FrackaMir on June 27, 2020, 12:07:59 AM
Looking for some help with the console commands.

Is there a way to spawn an active Remnant Nexus (at the play location, sorta like the stable location spawning)?

Also the planet spawning command, how exactly is it done? Could someone show the code for what will spawn some random planet at the player location (or just any planet really that I can copy paste and use in game).

Help appreciated.

you could use the same code for the stable location to spawn a remnant nexus since its nearly the same thing used to make pirate stations but exactly what is the custom entity called I do not know

as for your question on planets thing is I'm still working out the kinks in the code where planet generation is technically randomized

https://pastebin.com/iYxVK2Bq

right now the code looks like that I just used the code posted by rrz85012 and added a random number generator for the planet radius between 100-300

The planet spawning is so easy now you have pointed the way. Cheers!

The Remnant Nexus one is more difficult. Still cannot figure it out, I have tried changing the stable_location  to remnant_station2_Standard and remnant_station2, but they don't work. I think it is because they are considered ships (maybe if they were added to the spawnfleet command? but then they wouldn't be static and have other ships there in the same "fleet"? meh).
I have used (when trying to get the Remant Nexus to show) the stable locations code to spawn derelicts and stations (all things from the custom_entities.json). The stations though (even when spanwed as remnant) don't do anything.
I think to get to work what I want I would need to spawn a planet with headquarters etc, and put it under remnant control (maybe tinker with their faction file).

Now I make another request for help. How do I hand a new planet over to a faction? I have made a planet, occupied it, set up its industry now I want to hand it over to another faction. I tried: SetMaketOwner Remnant
I get Error: could not find entity with name "remnant"
Nevermind you can do this in game without console commands. Mind you, there is no Remnant option, must be in the faction file somewhere.
Unless there is a console command to bypass this?

How do you use the Random Planet spawn code? Inputing the code while adjusting planet name and type ends up giving a Java null pointer error. Also does this code that spawns the planet at the player fleet location or random? would the Orbits and such be stable and it would remain fixed or would the planet drift off to nowhere?

I've noticed using the earlier planet spawn code that the spawned planet won't have any conditions or have stock commodities that existing planets have listed
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Rickyvanz on June 27, 2020, 03:16:33 AM
The console doesn't have the ability to set custom keybinds (though that is an interesting idea), but you can use the alias command to save and shorten inputs. For example, running alias = god;infiniteammo;infiniteflux;nocooldown would let you run all those commands at once by entering = into the console.

that is one, great alternative way  ;D

thanks for the info captain, for a moment i would use this command until custom command bindings added in the future.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on June 27, 2020, 10:41:35 AM
Looking for some help with the console commands.

Is there a way to spawn an active Remnant Nexus (at the play location, sorta like the stable location spawning)?

Also the planet spawning command, how exactly is it done? Could someone show the code for what will spawn some random planet at the player location (or just any planet really that I can copy paste and use in game).

Help appreciated.

you could use the same code for the stable location to spawn a remnant nexus since its nearly the same thing used to make pirate stations but exactly what is the custom entity called I do not know

as for your question on planets thing is I'm still working out the kinks in the code where planet generation is technically randomized

https://pastebin.com/iYxVK2Bq

right now the code looks like that I just used the code posted by rrz85012 and added a random number generator for the planet radius between 100-300

The planet spawning is so easy now you have pointed the way. Cheers!

The Remnant Nexus one is more difficult. Still cannot figure it out, I have tried changing the stable_location  to remnant_station2_Standard and remnant_station2, but they don't work. I think it is because they are considered ships (maybe if they were added to the spawnfleet command? but then they wouldn't be static and have other ships there in the same "fleet"? meh).
I have used (when trying to get the Remant Nexus to show) the stable locations code to spawn derelicts and stations (all things from the custom_entities.json). The stations though (even when spanwed as remnant) don't do anything.
I think to get to work what I want I would need to spawn a planet with headquarters etc, and put it under remnant control (maybe tinker with their faction file).

Now I make another request for help. How do I hand a new planet over to a faction? I have made a planet, occupied it, set up its industry now I want to hand it over to another faction. I tried: SetMaketOwner Remnant
I get Error: could not find entity with name "remnant"
Nevermind you can do this in game without console commands. Mind you, there is no Remnant option, must be in the faction file somewhere.
Unless there is a console command to bypass this?

How do you use the Random Planet spawn code? Inputing the code while adjusting planet name and type ends up giving a Java null pointer error. Also does this code that spawns the planet at the player fleet location or random? would the Orbits and such be stable and it would remain fixed or would the planet drift off to nowhere?

I've noticed using the earlier planet spawn code that the spawned planet won't have any conditions or have stock commodities that existing planets have listed
what did you not understand... did you look at the comments made in the pastebin

I listed every possible combination possible and you should disregard the = sign in those lines I just wrote down what they summon and do

and then before survaying a planet go to that planet and use the AddCondition console command easier this way rather than having to chuck in all details line by line
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Boggi on July 01, 2020, 09:00:55 AM
Does anyone know if there is a command to remove disruption from the high command and battery industries after a tactical bombardment. I decided to keep the planet for myself after fullfilling a mission, but I am tired of babysitting the system because no defense fleets are being created, due to the disruption. I have searched through the lists in the mod, and found several conditions I can removed for other disruptions, such as trade disruption and shipping disruption, but I cannot find a way to remove the bombing disruption. Can anyone help, or will I just need to wait out the remaining 300 days  :'(
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Yunru on July 01, 2020, 10:38:52 AM
Depends, if it's an industry itself disrupted, fastbuild might work.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on July 02, 2020, 07:59:56 AM
in the save its possible to "remove" the disruption

by making the disruption shorter to say like 1 day but that requires a bit of fudging with the
<disrupted> values per industry
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mondaymonkey on July 02, 2020, 08:03:10 AM
Why not just remove an industry, then fastbuild?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on July 02, 2020, 08:22:58 AM
because disrupted markets are tied to the market itself but then again I mainly use the gimmick on spaceports and orbital stations
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Vocation on July 02, 2020, 10:16:55 AM
How can I add more cargo space or have infinite cargo?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Mondaymonkey on July 02, 2020, 10:51:31 AM
How can I add more cargo space or have infinite cargo?

It is possible, but much easier just edit shipdata.csv in cargo column for particular ship.

Nah... it's not easier.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Algester on July 03, 2020, 12:00:51 AM
and nope even if you abandon a market disruption is tied to the market's data itself there is probably a way to lessen the cooldown without digging through the save BUTT EHHH

but allow me to enlighten people on xml data digging

the important information you want are
disrupted_industryname (Spaceport, FuelProducion, Orbital Station so and so forth)
if its a core world it will contain
$core_disrupted_industryname

the game also checks "does this market have a disrupted industry lately" logic

Code
<e z="56415">
<MExp z="56416" k="$core_disrupted_Spaceport" t="26.501207"></MExp>
<MExp z="56417" k="$core_disrupted_FuelProduction" t="64.861046"></MExp>
<MExp z="56418" k="$core_disrupted_OrbitalStationGD" t="11.502057"></MExp>
<MExp z="56419" k="$nex_stabilizePackage_cooldown" t="55.34116"></MExp>
<MExp z="56420" k="$nex_decivEvent_hasEvent" t="57.01873"></MExp>
</e>
I shall example that you can see there is disrupted industry in this area the t="float value" is the disrupted time amount so just turn them all to 1 and let the game handle the rest
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kothyxaan on July 07, 2020, 07:46:57 AM
How do I hand a new planet over to a faction? I have made a planet, occupied it, set up its industry now I want to hand it over to another faction.
Nevermind you can do this in game without console commands.

This is something I've been wanting for a while, how do you do it ?
Sorry for the lateness of reply. Well I owned the planet. So I just transfered it over to another empire.

Anyway to transfer your planet to another faction,
1)Go to your planet, choose options 1
2)Speak to the secretary of the planet, then choose the first option (transfer this market to another faction).
3)Find the faction to transfer too.

For console commands:
SetMarketOwner [market name] [faction name]

Example:
SetMarketOwner Sindria Pirate

^That will set the planet Sindria to Pirate control.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Chikanuk on July 09, 2020, 03:19:25 AM
Today for some reason "list X" commands stop working (and only them). What i done before this: 1. Install new version of imperium. 2. Disable starship legends.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: hollow on July 11, 2020, 03:40:34 AM
for some reason, devmode doesn't seem to be working fully in my save
I wanted to give an ai faction more ai and nanoforges to help against other faction but whenever I try to enter the market in devmode the option to add stuff and build orders is still greyed out

any reason why this might be happing?

Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on July 11, 2020, 06:24:26 AM
for some reason, devmode doesn't seem to be working fully in my save
I wanted to give an ai faction more ai and nanoforges to help against other faction but whenever I try to enter the market in devmode the option to add stuff and build orders is still greyed out

any reason why this might be happing?

Use the Settings command, then under Misc Console Settings set "Toggle debug flags with DevMode" to true.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Chikanuk on July 11, 2020, 07:39:47 AM
Any idea why list command stop working?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on July 11, 2020, 09:12:16 AM
Any idea why list command stop working?
There are two possibilities: either another mod is overwriting the basic List command (hopefully not the case, but you can check with the command 'sourceof list'), or they're using the CommandListener system (https://github.com/LazyWizard/console-commands/blob/master/src/main/java/org/lazywizard/console/CommandListener.java), which allows mods to selectively take over execution of existing console commands based on the arguments passed in (rather than needing to completely replace them), and they messed up their CommandListener implementation somehow.

If the command 'sourceof list' says the List command is defined in Console Commands, it's almost certainly an issue with CommandListeners. You can do runcode $print(CollectionUtils.implode(CommandStore.getListeners())) to see if any listeners have been registered.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Baleg Qhan on July 12, 2020, 12:10:12 AM
Where does the custom aliases.csv get saved by default? I feel like I have looked everywhere, but I have definitely found it before. Thanks in advance.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: LazyWizard on July 12, 2020, 06:30:36 AM
Where does the custom aliases.csv get saved by default? I feel like I have looked everywhere, but I have definitely found it before. Thanks in advance.
Aliases are saved in saves/common/config.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: LazyWizard on July 12, 2020, 10:01:57 AM
A new build is up, grab it here (https://github.com/LazyWizard/console-commands/releases).

This is a tiny update that only adds the command 'list bases', which shows the location of all active Pirate and Pather bases. This was mostly an excuse to refamiliarize myself with things after several months away from modding, so let me know if you encounter any problems.

Spoiler
(https://i.imgur.com/q7epRnp.png)
[close]
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Chikanuk on July 13, 2020, 02:32:10 AM
Update:
Command "sourceof list" say, what command "list" is from Starship legends mod.
And command runcode "$print(CollectionUtils.implode(CommandStore.getListeners()))" say what "data.scripts.console.listeners.tiadong_ForceMarketUpdateListener@9abe717, exerelin.console.listeners.ForceMarketUpdateListener@74d09bf6" (hope i didnt make any mistakes).
Im total noob in coding, but take a guess what this is conflict with Starship legends mod? If so - how can i fix it?
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: LazyWizard on July 13, 2020, 05:30:23 AM
It looks to be caused by disabling Starship Legends in its config file. Its overridden version of List immediately returns if the mod's features are disabled.

For a quick fix you can disable SL's version of List by opening Starship Legends/data/console/commands.csv in a text editor and putting a # at the start of the line that defines List. That will comment it out and prevent that command from loading. I'll send Sundog a PM about how to fix it on his end. Edit: sent!
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Chikanuk on July 13, 2020, 05:56:27 AM
Thanx for you help and wonderful mod in general. I will wait for him to update his mod, because, if i understand it correctly, doing this will revert his mod back online (right?), but i decided what this playthrough i will not use it.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: LazyWizard on July 13, 2020, 06:43:00 AM
Commenting out that line in commands.csv won't re-enable Starship Legends' features. It will only disable its version of the List command.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Chikanuk on July 13, 2020, 06:51:11 AM
Oh this is wonderful! Thanks again.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: MaXimillion on July 19, 2020, 12:16:36 AM
Trying to pull up the console gives me a silent crash to desktop at 1850x980 resolution. At 1860x980 it works fine. Didn't test other values.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: LazyWizard on July 19, 2020, 12:21:44 AM
It's a known issue that crops up occasionally with higher resolutions. You can fix it by opening saves/common/config/lw_console_settings.json.data and setting "showBackground" to false.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: MaXimillion on July 19, 2020, 02:50:21 AM
Could you add it to the main post? Took me a while to troubleshoot it and if I hadn't recently changed resolution I'd have been really stumped. Might save someone else a lot of time.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: LazyWizard on July 19, 2020, 10:55:10 AM
Good call, added.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Seth Martin on July 29, 2020, 07:26:39 PM
I dont know hoow to use the command additem because i dont know the games item id. Is there a list of item id?
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Chikanuk on July 30, 2020, 01:59:57 AM
I dont know hoow to use the command additem because i dont know the games item id. Is there a list of item id?
"List items". Same with over things, like "List weapons", etc. In general, command "help" will help (derp) you to get used to console.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Khornaar on July 31, 2020, 06:18:54 AM
Is there a command to clear star system of the floating junk? Specifically, cargo pods.

After several invasions to my "home" system and recycling invaders to useful salvage, floating cargo pods with metal leftovers offend my sensibilities. ;D
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Unnamed_Shadow on August 02, 2020, 08:44:16 PM
Is there any command to add an Administrator?

I know there is a command to add an Officer and even set his behavior and level.


Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Albreo on August 03, 2020, 12:42:56 AM
I have been using this mod on a few playthroughs now. I usually use it to jump around systems, find my first atlas. And here is what I feel the mod is lacking a bit.

- When jump with cmd that system map still won't be accessible in the sector view map. I will have to jump out and in again for it to unlock.
- Suggest for Up arrow key to cycle between the previous cmd up to 5 cmd. Also a check for only working cmd to be recorded.
- cmd to override normal fleet speed to 20 and burn speed to 40
- cmd to turn on neutrino detector with no cost or skill. Not sure if anyone will be interested in using it lol.
- Reveal cmd has value added with 2mil which is a bit overkill when everything is limited by the game engine draw distance which is about 2 screens. This number causes the interdict pulse to lag the game severely.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Khornaar on August 03, 2020, 04:50:52 AM
I have been using this mod on a few playthroughs now. I usually use it to jump around systems, find my first atlas. And here is what I feel the mod is lacking a bit.

- When jump with cmd that system map still won't be accessible in the sector view map. I will have to jump out and in again for it to unlock.
....

- cmd to turn on neutrino detector with no cost or skill. Not sure if anyone will be interested in using it lol.
- Reveal cmd has value added with 2mil which is a bit overkill when everything is limited by the game engine draw distance which is about 2 screens. This number causes the interdict pulse to lag the game severely.
Most of this is solved by typing "devmode" in the console.
Then you can:
- see inside of the unexplored star systems and jump there.
- use neutrino detector for free. (also survey planets and build on stable locations for free). You'll have to spend character point first (you can add it with console command).
- while in devmode, ctrl+z makes your sensor range functionally infinite, without affecting  the radius of interdiction pulse.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Wyvern on August 03, 2020, 09:38:54 PM
Is there an equivalent to openmarket that works for planets that are not currently inhabited?
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: DancingMonkey on August 05, 2020, 02:41:34 PM
cool mod, but where do you download it from?
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Xobra on August 06, 2020, 03:28:28 AM
cool mod, but where do you download it from?

Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: alexwtb234 on August 06, 2020, 07:30:42 AM
Would  be really cool if you could add a hulllmod regardless of requirement , like more than two logistic hulmods
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Suitedteen on August 07, 2020, 10:04:34 AM
how do I spawn in a nano Forge the M command in Dev mode  crashes the game with nextirailen
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Mondaymonkey on August 07, 2020, 10:13:59 AM
how do I spawn in a nano Forge

addspecial pristine_nanoforge - for pristine one.
addspecial corrupted_nanoforge - for the corrupted one.

Off course, that if my spelling is correct. Both commands adds only 1 item, but you can use them as many times, as you want.

Quote
the M command in Dev mode  crashes the game with nextirailen

Sorry, can not understand.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Histidine on August 07, 2020, 06:42:13 PM
Devmode commands should not be assumed to be supported for normal play. (http://fractalsoftworks.com/forum/index.php?topic=13205.msg222464#msg222464)
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Xobra on August 16, 2020, 01:13:43 PM
is it possible to rename planets/stations/markets with a command?
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Bong on August 21, 2020, 02:37:52 PM
I downloaded the mod and added it to my starsector mods folder but it doesn't show up when I open the game and browse mods to toggle
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Xobra on August 21, 2020, 02:53:03 PM
I downloaded the mod and added it to my starsector mods folder but it doesn't show up when I open the game and browse mods to toggle

did you just put the downloaded folder in, or did you actually unpack the folder first?
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Bong on August 22, 2020, 10:40:46 AM
I downloaded the mod and added it to my starsector mods folder but it doesn't show up when I open the game and browse mods to toggle

did you just put the downloaded folder in, or did you actually unpack the folder first?

Yes I extracted the files before adding it to mods but the mod still won't register, it just straight up doesn't appear when I open the game and browse through mods to toggle
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Mondaymonkey on August 22, 2020, 11:29:57 AM
I downloaded the mod and added it to my starsector mods folder but it doesn't show up when I open the game and browse mods to toggle

did you just put the downloaded folder in, or did you actually unpack the folder first?

Yes I extracted the files before adding it to mods but the mod still won't register, it just straight up doesn't appear when I open the game and browse through mods to toggle

Could you add some screens? That could help.

Also, do you have libs-mods required?
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: caekdaemon on August 24, 2020, 03:22:54 AM
Just curious, but is there a command to annex an entire faction at once, taking control of all of their stuff for the player faction? I'm doing a playthrough with the Mayasuran Navy mod which gives you control of the homeworld and all its blueprints and other goodies, but the faction is still in the game and I'm classed as a commissioned officer when I'm trying to RP as the actual faction leader, diplomacy and all.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-07-12)
Post by: Bong on August 25, 2020, 12:59:19 PM
I downloaded the mod and added it to my starsector mods folder but it doesn't show up when I open the game and browse mods to toggle

did you just put the downloaded folder in, or did you actually unpack the folder first?

Yes I extracted the files before adding it to mods but the mod still won't register, it just straight up doesn't appear when I open the game and browse through mods to toggle

Could you add some screens? That could help.

Also, do you have libs-mods required?

As it turns out, I added the wrong folder to mods, everything is running smooth now.

And yes I did Have Lazy lib installed as well thanks for asking.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-25)
Post by: ClosedBoudy on August 26, 2020, 05:15:27 AM
is there any way to unlearn a blueprint?
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-25)
Post by: LazyWizard on August 26, 2020, 05:24:07 AM
There's not a dedicated command for it, but you can use RunCode. For example:
Code
runcode $playerFaction.removeKnownShip("onslaught");
runcode $playerFaction.removeKnownFighter("cobra_wing");
runcode $playerFaction.removeKnownWeapon("taclaser");

RunCode takes Java code as its arguments. $playerFaction is a macro used as shorthand for a longer snippet of code. These macros are defined in data/console/runcode_macros.csv (https://github.com/LazyWizard/console-commands/blob/master/src/main/mod/data/console/runcode_macros.csv).

You can use "list ships", "list wings", or "list weapons" to get the IDs you need.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-25)
Post by: MPmaniac on August 28, 2020, 02:21:32 PM
Hi there! Have a problem with running the game with this mod. Crash happens after launching the game/
The note says:
Fatal: Failed to find script of class
[com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginlmpl]

Does anyone know, how to fix this?)

[attachment deleted by admin]
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-25)
Post by: LazyWizard on August 28, 2020, 02:56:26 PM
The console requires LazyLib (https://fractalsoftworks.com/forum/index.php?topic=5444.0) to function.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: JohnVicres on August 28, 2020, 03:15:55 PM
Is it possible to add a military submarket to an already generated market?

I've also wondered about this, and I think it might be possible with runcode, but I have no idea what kind of reference or how to write out the line to enact it.
Looking through Exerelin, there's a "submarkets.csv" which lists several different ones including exerelin_prismMarket, open_market, black_market, and generic_military which has the description:
"Trade with $theFaction military base.

Weapons and other military hardware can be bought and sold here even if they're illegal on the open market. A commission and better standing with $theFaction results in higher-grade hardware being available.

Will buy locally illegal goods as part of a no-questions-asked buyback program.

Selling enough of a commodity will temporarily resolve a shortage."

So that's definitely it. And, no, in case you're wondering "addcondition" and "addindustry" doesn't work. But you should be able to somehow add it. Someone that knows more about how runcode works could probably decipher it.

I'm also interested, too, because none of my own colonies have military markets and it would be nice to have them to stock up on weapons and marines/crew occasionally. I mean, it would make sense, especially if they already have a military base on them.

While a bit belated, here is how you can add a submarket (to an existing market) with runcode. First, you need the string (name) of the market. For this example, the market name is "garden_market".
Code
runcode for (int i = 0; i < 1; i++) {MarketAPI market = Global.getSector().getEconomy().getMarket("garden_market"); market.addSubmarket("generic_military");}

Iterating over a list of markets should also be possible.
Code
String listMarkets[] = new String[]{"garden_market", "ring_market"};
for (String marketStr : listMarkets) {...}

Fortunately for us mortals, Java (except the compilation thing) is relatively easy to understand! But I'm trying to add a submarket to a planet in a "random core worlds" Nexerelin scenario, and I don't know exactly why, but I can't "pick" the market? As in, I'm thrown a Null.Pointer.Exception. Not sure if your second code is the answer to my problems, but I didn't understand it, so I dunno...
Edit: nevermind, I tried List Markets and it gave me my answer lol thank you LazyWizard and everyone contributing to more codes
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: LazyWizard on August 28, 2020, 09:32:15 PM
I'd recommend everyone update to the latest dev release (link in the OP (http://fractalsoftworks.com/forum/index.php?topic=4106.0)). It fixes an issue with Version Checker failing to check for updates.

Relevant to recent conversations, it also includes dedicated AddSubmarket and RemoveSubmarket commands thanks to jaghaimo on GitHub (https://github.com/LazyWizard/console-commands/pull/1) finishing the commands I'd honestly forgotten I'd started working on over a year ago (https://github.com/LazyWizard/console-commands/commit/a022f2c52c47d2147f853e01b01ba27a5409ff95).
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: VerminVarg on August 31, 2020, 09:28:55 PM
Hey Lazywizard! any chance you could add a way to give Industry only blueprints to a player? there's a few really cool ones from mods i'd love to use that aren't out in blueprint form and the only option to get them (as far as i know anyway) is to use "Allblueprints" which takes away a good chunk of the game =/ Anyway! thanks for all your hard work man :) you've made a fantastic mod
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: WeWickYou on September 01, 2020, 12:03:56 AM
Hey Lazywizard! any chance you could add a way to give Industry only blueprints to a player? there's a few really cool ones from mods i'd love to use that aren't out in blueprint form and the only option to get them (as far as i know anyway) is to use "Allblueprints" which takes away a good chunk of the game =/ Anyway! thanks for all your hard work man :) you've made a fantastic mod

i'm pretty sure it have nothing to do with the console command mod, if you want specific industry blueprint, you should ask the owner of the mod who give the say so industry.
Console just check the game file, if something isn't directly available "inside" the game you have to ask the owner of the mod content.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Histidine on September 01, 2020, 01:34:18 AM
AddSpecial industry_bp <industry_id>

But AFAIK most mod industries are just coded to not be buildable, they don't check for whether you have the BP.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: SirHartley on September 01, 2020, 01:54:52 AM
AddSpecial industry_bp <industry_id>

But AFAIK most mod industries are just coded to not be buildable, they don't check for whether you have the BP.

Industry BPs just set a memory key, which the industry class will then check to decide if it is buildable or not.

that check has to be coded in to the industry - and most of them don't do that. Adding the Building directly is a more valid approach.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Xobra on September 01, 2020, 07:34:11 AM
is there a Parameter for addIndustry, which let adds the Industry with a remaining Building Time? Some modded Buildings disappear after there are finished and trigger an effect, but the effect won't trigger if the Industry is just added.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: WeWickYou on September 01, 2020, 12:57:15 PM
is there a Parameter for addIndustry, which let adds the Industry with a remaining Building Time? Some modded Buildings disappear after there are finished and trigger an effect, but the effect won't trigger if the Industry is just added.

For this kind of building you will have (actually) no choice but to build them, then use fastbuild (if you want) so they trigger, like astropolis station for exemple. (i think it's because the market need a clear update, when you add a fully build industry the market doesn't "properly update", there no building started nor building complete. And i think your "issue" is comming from that)

I think i game need multiple "actions" on top of having the industry to trigger the "pop" of it outside of your market.
If you want to do this kind of think (adding industry) just know that's is is building/industry who have higher priority in the list (like waystation, mining, fuelprod, refining, farm, lightindustry, heavyindustry(and the like of it like lannestate battleyard) ), so 1st produce the building who have low priority then go for the high priority so you can "overcap" the number of building while having the sayed industry with AI core on it.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: enrich235 on September 13, 2020, 05:51:07 PM
how do i change the change the shortcut to open the console. I dont have backspace on my keyboard.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: LazyWizard on September 14, 2020, 04:51:40 AM
Hey Lazywizard! any chance you could add a way to give Industry only blueprints to a player? there's a few really cool ones from mods i'd love to use that aren't out in blueprint form and the only option to get them (as far as i know anyway) is to use "Allblueprints" which takes away a good chunk of the game =/ Anyway! thanks for all your hard work man :) you've made a fantastic mod

You can use the command AllBlueprints industry to only unlock industry blueprints, but there's no command for unlocking them individually. I'll look into it.


how do i change the change the shortcut to open the console. I dont have backspace on my keyboard.

You can open saves/common/config/lw_console_settings.json.data in a plaintext editor like Notepad (not Microsoft Word) and change the first line to this:
Code
   "consoleKeystroke": "36|false|false|false",

Then load a campaign and press J to open the console, then enter the Settings command. That will open a dialog that will let you change the console summon key to whatever you want.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Barantar on October 15, 2020, 02:02:44 PM
Hey, thx for this amazing mod, it's a must have. I was wondering is there a way to add ordnance points to a specific ship by name, like addtrait in starship legends? Currently adding op is impossible on per ship basis, since it's fleet wide, even to ships in storage. I am no programmer so there is no hope writing a custom script myself.
Title: Re: [0.8.1a] Console Commands v3.0 WIP 6 (released 2017-11-30) - 0.9a dev available
Post by: ciago92 on October 22, 2020, 08:02:16 PM
-The ability to look for a planet of a specific survey level or type? Could be useful for testing things
-The ability to spawn admins

I'll look into these, thanks for the suggestions!

Hey, I've been searching around and this was all the search function gave me when I looked for Survey. Is there any sort of documentation around what parameters can be passed to Survey except the name of a system or "All"? Did you ever make any progress on those ideas? I'd love to have something where you can basically RemoteSurvey All so you can find systems with good planet combinations but still have some exporation around if they're worth it/other systems out there are easier to track if you've been there or not.

Thanks for all the tools you provide to modders and players alike!!
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Hellreaver on October 25, 2020, 04:28:44 PM
Is this supposed to work?
I have no other mods and my version is 0.9.1a... but upon starting the game i get

java.lang.RuntimeException: Failed to find script of class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl]

and a crash

No other mods installed.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Histidine on October 25, 2020, 05:31:49 PM
The OP specifically identifies LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0) as required.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Hellreaver on October 25, 2020, 07:47:06 PM
The OP specifically identifies LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0) as required.

Sorry apparently i'm an idiot, the first thing I did was download lazylib then forget to do anything with it

Thanks  :-[
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Freeasabird on October 28, 2020, 07:52:18 PM
Could you maybe add a command or set of commands that allows the player to add or remove planetary modifiers? so as to create 0% hazards ultra rich resources on a planet before/after colonization.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: ciago92 on November 01, 2020, 03:20:57 PM
Could you maybe add a command or set of commands that allows the player to add or remove planetary modifiers? so as to create 0% hazards ultra rich resources on a planet before/after colonization.

already exists, interact with the planet then use addcondition or removecondition. Use list conditions to see everything available. Having said that, I don't think you can get to 0% hazard, I think 50% is the lowest I've seen
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Freeasabird on November 02, 2020, 08:13:01 AM
already exists, interact with the planet then use addcondition or removecondition. Use list conditions to see everything available. Having said that, I don't think you can get to 0% hazard, I think 50% is the lowest I've seen

Oh Cool, alright then Thank ye
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: mathwizi2005 on November 02, 2020, 03:37:26 PM
Is there a way to spawn the hyperspace jump point to the player's location?

Code
runcode Global.getSector().getStarSystem("System Name").autogenerateHyperspaceJumpPoints(true,true)
// the first true statement is for Gas Giants
// the second true statement is for generating Fringe Jump Points
Code
runcode Random rndm = new Random;
                StarSystemAPI starSystem = Global.getSector().getPlayerFleet().getStarSystem();
                JumpPointAPI newJumpPoint = Global.getFactory().createJumpPoint("console_added_jumppoint" + rndm.nextInt(), "Hyperspace Jump Point " + starSystem.getJumpPoints().size());
                float distance = MathUtils.getDistance(Global.getSector().getPlayerFleet().getLocation(), starSystem.getStar().getLocation());
                OrbitAPI newJumpPointOrbitAroundStar = Global.getFactory().createCircularOrbit(starSystem.getStar(), 0, distance, distance / 10);
                newJumpPoint.setOrbit(newJumpPointOrbitAroundStar);
                newJumpPoint.setStandardWormholeToHyperspaceVisual();

This command is erroring out for Jump Point generation at the player and the command before only adds fringe points in non Gas Giant sectors.
Spoiler
(https://i.imgur.com/VR4x3Hn.png)
[close]

The odd thing is the syntax all looks fine.

Can the Stable location spawn command be retailored for Jump points?
Spoiler
runcode SectorEntityToken fleet = Global.getSector().getPlayerFleet();
    StarSystemAPI sys = (StarSystemAPI)fleet.getContainingLocation();
    SectorEntityToken stable = fleet.getContainingLocation().addCustomEntity(null, null, "stable_location", "neutral");
    float orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(fleet, sys.getCenter());
    float orbitDays = orbitRadius / (20f + new Random().nextFloat() * 5f);
    float angle = com.fs.starfarer.api.util.Misc.getAngleInDegrees(sys.getCenter().getLocation(), fleet.getLocation());
    stable.setCircularOrbit(sys.getCenter(), angle, orbitRadius, orbitDays);
[close]
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Freeasabird on November 04, 2020, 10:00:02 PM
how does the Addcondition (planet type) codes work? i selected a berran metalic world entered the Jungle world type it says it worked but its still a metalic world. leaving and entering the system doesn't change them. saving and quitting relaunching doesn't work either. its still a Berran metallic world when i entered Addcondition Jungle to it.

and there isn't a volcanic world type in the list. theres Cryovolcanic but no volcanic world type.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Histidine on November 05, 2020, 04:40:07 PM
AddCondition can't change planet types. It's meant to add stuff like ore deposits or the hot/cold conditions.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: BlackWater821 on December 01, 2020, 08:41:18 AM
Hi.

Seems like "BlockRetreat" command not working even it says activated?
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Themanwithnoanswers21 on December 10, 2020, 08:49:15 PM
Hey guys, I have been unable to copy/paste commands into the command console in game, I am on a mac OS X, I was wondering if any of you could help me figure this out.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Flacman3000 on December 24, 2020, 12:57:19 PM
Anyone know how the traitor function works? I type in the traitor fleet and nothing happens it says no target I highlight the ship and do traitor and no target again? any documentation? Im trying to have my ally attack my testing ship with a my new modded ship.
Title: Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
Post by: Wyvern on December 24, 2020, 05:23:19 PM
Hey guys, I have been unable to copy/paste commands into the command console in game, I am on a mac OS X, I was wondering if any of you could help me figure this out.
Use control-c for paste instead of command-c and it should work - the paste text keyboard shortcut is built into the mod and doesn't check what OS you're using.
Title: Re: [0.9.1a] Console Commands v2021.01.19
Post by: LazyWizard on January 19, 2021, 07:14:08 PM
Version 2021.01.19 is out, get it here (https://github.com/LazyWizard/console-commands/releases/download/2021.01.19/Console.Commands.2021.01.19.zip). This requires the latest version of LazyLib (https://fractalsoftworks.com/forum/index.php?topic=5444.0), which was released yesterday.

There have been several major changes over the last several months. Here are the highlights:
Title: Re: [0.9.1a] Console Commands v2021.01.19
Post by: WWladCZ on February 24, 2021, 09:02:17 AM
The reveal command does not work properly when I jump into hyperspace the sensor range is much lower than the number suggests. It does not reveal the remnant beacons I have to get close to them.
Title: Re: [0.9.1a] Console Commands v2021.01.19
Post by: Kendallizer on February 25, 2021, 11:27:37 AM
The reveal command does not work properly when I jump into hyperspace the sensor range is much lower than the number suggests. It does not reveal the remnant beacons I have to get close to them.

Yes, I've also run into this problem. It seemed like my first run with console commands, it worked, but I'm trying to adjust my settings for Adjusted Sector. After my first try, it seems to have stopped working in system and hyperspace, even though it says my sensor range is some absurd number in the game.
Title: Re: [0.9.1a] Console Commands v2021.01.19
Post by: Ares42ful on March 03, 2021, 12:01:02 PM
could someone give me a step by step to installing the mod or how to use the dev tool? I just wanna add a couple hundred thousand credits.
Title: Re: [0.9.1a] Console Commands v2021.01.19
Post by: Frostby on March 06, 2021, 01:43:46 AM
Changing the "consoleKeystroke" and load saved/new campaign always revert the lw_console_aliases.json.data.
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: LazyWizard on March 26, 2021, 11:50:53 AM
A new version with compatibility for Starsector 0.95a is out, get it here (https://github.com/LazyWizard/console-commands/releases/download/2021.03.26/Console_Commands_2021.3.26.zip). This requires the latest version of LazyLib (https://fractalsoftworks.com/forum/index.php?topic=5444.0), 2.6 or higher.
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: Satirical on March 26, 2021, 12:34:21 PM
A new version with compatibility for Starsector 0.95a is out, get it here (https://github.com/LazyWizard/console-commands/releases/download/2021.03.26/Console_Commands_2021.3.26.zip). This requires the latest version of LazyLib (https://fractalsoftworks.com/forum/index.php?topic=5444.0), 2.6 or higher.
yo this was quick and epic :O
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: PhilipAndrada on March 26, 2021, 12:44:58 PM
This forum is bound to make me happier than usual. New update for the game, and new updates for the most important mod for the (gentlemen who like to go beyond the usual norm.) on the same day? Sheesh. Andrada approves!  ;)
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: Harmful Mechanic on March 26, 2021, 02:06:43 PM
Console Commands is a major must-have for the rest of us to get our junk updated, so having it slammed out right on release day is really nice. Thanks again.
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: Midnight Kitsune on March 26, 2021, 11:48:32 PM
Getting an NPE crash anytime I mouse over the text size settings bar. Might be others as well. .95 RC9
Error:
Spoiler
60607 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.ui.newui.new$o.Object(Unknown Source)
   at com.fs.starfarer.ui.newui.new$1.createImpl(Unknown Source)
   at com.fs.starfarer.ui.impl.StandardTooltipV2Expandable.create(Unknown Source)
   at com.fs.starfarer.ui.impl.StandardTooltipV2Expandable.beforeShown(Unknown Source)
   at com.fs.starfarer.ui.Q.showTooltip(Unknown Source)
   at com.fs.starfarer.ui.U.super.new(Unknown Source)
   at com.fs.starfarer.ui.U.processInput(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.new.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Oo0O.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.Stringsuper.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

[close]
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: The_Sarge on March 27, 2021, 01:09:49 AM
A new version with compatibility for Starsector 0.95a is out, get it here (https://github.com/LazyWizard/console-commands/releases/download/2021.03.26/Console_Commands_2021.3.26.zip). This requires the latest version of LazyLib (https://fractalsoftworks.com/forum/index.php?topic=5444.0), 2.6 or higher.

Wow.

That's amazingly quick, both for this and for LazyLib!

(Now I'm crossing my fingers for an "addstorypoint" command. :D )
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: chad on March 27, 2021, 01:42:40 AM
A new version with compatibility for Starsector 0.95a is out, get it here (https://github.com/LazyWizard/console-commands/releases/download/2021.03.26/Console_Commands_2021.3.26.zip). This requires the latest version of LazyLib (https://fractalsoftworks.com/forum/index.php?topic=5444.0), 2.6 or higher.

Wow.

That's amazingly quick, both for this and for LazyLib!

(Now I'm crossing my fingers for an "addstorypoint" command. :D )

Personally, I can't wait for a command to increase the limit for the automated ships skill. It kinda feels like they nerfed player-owned ai fleets into the ground with that CR penalty...
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: BETAOPTICS on March 27, 2021, 03:15:39 AM
Hello there!

Can you help me? I am interested changing the font color in the console. What file should I be looking for to do that?
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: EpicLancer on March 27, 2021, 03:43:32 AM
:( sorry, im dumb. the issue was caused by link confusion. i followed the link in the change log to 9.1 so i had the wrong version of the game
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: ER137 on March 27, 2021, 07:37:55 AM
Hello mr.wizard,could i post your console mod on starsector chinese forum?
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: LazyWizard on March 27, 2021, 11:35:35 AM
Getting an NPE crash anytime I mouse over the text size settings bar. Might be others as well. .95 RC9
[snip]
Can you help me? I am interested changing the font color in the console. What file should I be looking for to do that?
The Settings crash is due to a known bug (https://fractalsoftworks.com/forum/index.php?topic=19997.0). I'll try to work around it if I can until it's fixed, but until then you'll need to manually edit the file saves/common/config/lw_console_settings.json.data if you want to change the console's font size or color.


(Now I'm crossing my fingers for an "addstorypoint" command. :D )
AddStoryPoints is already in for the next version!


Hello mr.wizard,could i post your console mod on starsector chinese forum?
Go ahead, you have my permission.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: LazyWizard on March 27, 2021, 07:43:32 PM
A new version of the console is up, get it here (https://github.com/LazyWizard/console-commands/releases/download/2021.03.27/Console_Commands_2021.3.27.zip).

This update adds an AddStoryPoints command. It also adds dependency tags to mod_info.json, so make sure you have at least LazyLib 2.6 and Starsector 0.95a-RC10 (the hotfix that was released earlier today) or you won't be able to enable this mod!
Title: Re: [0.95a] Console Commands v2021.03.26
Post by: BETAOPTICS on March 28, 2021, 02:38:57 AM
Can you help me? I am interested changing the font color in the console. What file should I be looking for to do that?
The Settings crash is due to a known bug (https://fractalsoftworks.com/forum/index.php?topic=19997.0). I'll try to work around it if I can until it's fixed, but until then you'll need to manually edit the file saves/common/config/lw_console_settings.json.data if you want to change the console's font size or color.

Thanks for the help! I was seriously looking for it but I am probably half blind or something. :)
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Octal on March 28, 2021, 08:07:31 PM
It would appear the text is... really, really small.
Doesn't appear to be being properly scaled
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: LazyWizard on March 28, 2021, 08:22:36 PM
Right now it uses its own scaling that's completely separate from Starsector's setting. You can change the font size with the Settings command in the campaign.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Fireballin17 on March 30, 2021, 01:03:10 PM
Just wanted to ask, would it be possible when adding marines to set how much experience they have?
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Wyvern on March 30, 2021, 05:06:34 PM
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?)
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: intrinsic_parity on March 30, 2021, 05:49:18 PM
I downloaded to kill a fleet stuck in a blackhole, and the mod is constantly giving me a 'low VRAM' warning and a 'low system ram' warning. It never did that in the last release. I increased the ram allocation and it doesn't seem to matter. The game also seems to be running fine. Any idea why that is? I'm on MacOS for what it's worth.

Edit: I think it might be an issue with lazylib not console commands.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Wyvern on March 30, 2021, 07:33:19 PM
I'm pretty sure that's an issue with just the game on MacOS - those warnings are from the base game, but it only displays them if you have mods installed. I'm pretty sure they're also bogus - something isn't registering right - because I get the same with no mods other than my own personal custom portrait mod - and I know I have the memory room to run a dozen faction mods; I've done it with previous versions of Starsector with no issues.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Cyan Leader on March 30, 2021, 07:42:45 PM
Are there any commands or ways to change the current level of the character?
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: GamertagzFTW on March 30, 2021, 10:05:01 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
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Baro on March 30, 2021, 11:15:24 PM
Super handy mod!
Is there any way to edit a planet, as in what traits it has or what type of planet it is?
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: n3xuiz on March 31, 2021, 12:49:31 AM
@Cyan Leader

you can use addxp command

@Baro yes you can edit conditions of planets but afaik not the planet type:


1. dock at the planet you want to change
2. open console
3. type list conditions
4. type addcondition X to add the ones you want (or removecondition)
5. profit :)
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: ctuncks on March 31, 2021, 11:44:54 PM
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.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: LORDHORSES on April 01, 2021, 03:45:52 AM
Can someone give me the dowland for th older version? (0.9.1a)
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: THEASD 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.
(https://ftp.bmp.ovh/imgs/2021/04/0b2dffe2429c77a3.png)
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: LazyWizard 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 (https://github.com/LazyWizard/console-commands/releases/download/2021.01.19/Console.Commands.2021.01.19.zip) 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.
(https://ftp.bmp.ovh/imgs/2021/04/0b2dffe2429c77a3.png)
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!
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Pantlessman 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.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Bob69Joe 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.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: GamertagzFTW 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.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Midnight Kitsune 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?
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Archer 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.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Üstad on April 05, 2021, 05:49:53 AM
How can I create officers with maxed out skills including elite skills?
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: ShangTai 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.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: evzhel 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.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: LazyWizard on April 06, 2021, 09:54:53 PM
A new version is up, grab it here (https://github.com/LazyWizard/console-commands/releases/download/2021.04.06/Console_Commands_2021.4.06.zip).

This fixes a few of the more pressing issues the console had post-0.95a:

I'll try to fix the remaining issues and add some more 0.95a-specific features soon.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: Cyan Leader 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.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: Dark.Revenant on April 07, 2021, 12:07:31 AM
I'd really appreciate it if the console was a full GNU environment...  :P
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: Cyan Leader 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.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: Hammer 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).
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: LazyWizard on April 07, 2021, 10:29:30 PM
I'd really appreciate if we could press up multiple times to use past commands other than just the latest one.
It's on the TODO list. I haven't gotten around to it yet, but I'll bump it up the priority list.


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).
This is an interesting one. I've tried to track down the cause, but none of my attempted fixes, er, fixed it.

Due to API limitations, the respec command for officers is less a respec and more creating a new first level officer from scratch and copying as much data as possible from the old one. I'll try a few more things to work around it, but it's possible this bug may be unfixeable for now.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: Cyan Leader on April 08, 2021, 03:47:01 AM
I appreciate that, thank you.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: SheogorathV on April 09, 2021, 11:26:59 AM
Is there any way to spawn Cyrosleepers and Inactive gates? If there is how can i do it?
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: NaranNarman on April 09, 2021, 12:05:27 PM
Hello! I'd like to report a bug, well I think it is one. I spawned a planet using the mod and the first time it worked fine. I colonized it and the colony worked like any other colony but if I use the command again, the spawned planet will bug out: If I colonize it, nothing starts building on it. The spaceport is stuck building with no time limit whatsoever and there is no growth. Fastbuild command doesn't work, it just says no industry is being built on this planet. The problem only starts when spawning in a planet for a second time using the command, I tested it in another save and that was the result. First planet is colonized fine, second doesn't. Ps. "industry construction started" notification also doesn't fire off after colonizing.

Here is the command I used:

runcode import com.fs.starfarer.api.util.Misc; String planetName = "YourPlanetName"; float planetSize = 200; float planetOrbitDays = 180; 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("farmland_bountiful"); market.addCondition("habitable"); market.addCondition("mild_climate");
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: YenGin on April 10, 2021, 01:10:38 AM
I've only gotten the Kill command to work once in campaign on accident, and I can't figure out what I'm doing wrong

Open console
Type Kill and hit enter
Close console (with esc, this might be the issue?)
Click fleet I want gone
I just fly over to it and start a conversation.
Pressing esc still gives the cancellation message.

The one time it worked the target fleet just disappeared right after I closed the conversation, but no luck with it after that.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: Meridias on April 10, 2021, 03:02:46 AM
I tend to have a ship targeted with R, open console and type kill. it will show a message telling me what it just killed, hit escape and target is byebye. Haven't had any issues.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: mattroyal363 on April 10, 2021, 04:34:43 AM
So whenever I use the Allwings and Allweapons command it gives 100 each and a 1000 each respectively when the help command states that it gives me only 1 of every lcp and 10 of every weapon. Is there a mod that is conflicting with this command?

{"enabledMods": [
  "$$$_lightshow",
  "adjustable_skill_thresholds",
  "Adjusted Sector",
  "anotherportraitpack",
  "raccoonarms",
  "lw_autosave",
  "timid_admins",
  "capturecrew",
  "Csp",
  "chatter",
  "lw_console",
  "diyplanets",
  "diableavionics_rosenritter",
  "diableavionics",
  "fluffships",
  "gunnyhegexpeditionary",
  "hte",
  "sun_hyperdrive",
  "IndEvo",
  "internalaffairs",
  "kadur_remnant",
  "lw_lazylib",
  "leadingPip",
  "ArkLeg",
  "logisticsNotifications",
  "MagicLib",
  "Mayasuran Navy",
  "old_hyperion",
  "wisp_perseanchronicles",
  "rotcesrats",
  "roider",
  "tahlan_scalartech",
  "scy_bluesky",
  "SCY",
  "SEEKER",
  "PT_ShipDirectionMarker",
  "sun_starship_legends",
  "tahlan",
  "exalted",
  "star_federation",
  "TORCHSHIPS",
  "US",
  "va11portraits",
  "vayrashippack",
  "XhanEmpire",
  "audio_plus",
  "prv",
  "shaderLib"
]}
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: zeen131 on April 10, 2021, 04:55:13 AM
I've only gotten the Kill command to work once in campaign on accident, and I can't figure out what I'm doing wrong

Open console
Type Kill and hit enter
Close console (with esc, this might be the issue?)
Click fleet I want gone
I just fly over to it and start a conversation.
Pressing esc still gives the cancellation message.

The one time it worked the target fleet just disappeared right after I closed the conversation, but no luck with it after that.

Just tested it and it seems where your cursor is isn't actually where it selecting the target from. For me it seem to hit people a bit above and to the right of where I click. Maybe it's a scaling problem? It does work but you basically gotta guess where the cursor is.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: LazyWizard on April 10, 2021, 01:40:18 PM
I've only gotten the Kill command to work once in campaign on accident, and I can't figure out what I'm doing wrong

Open console
Type Kill and hit enter
Close console (with esc, this might be the issue?)
Click fleet I want gone
I just fly over to it and start a conversation.
Pressing esc still gives the cancellation message.

The one time it worked the target fleet just disappeared right after I closed the conversation, but no luck with it after that.

Just tested it and it seems where your cursor is isn't actually where it selecting the target from. For me it seem to hit people a bit above and to the right of where I click. Maybe it's a scaling problem? It does work but you basically gotta guess where the cursor is.

Good catch on the cause. Fixed for the next version.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: LazyWizard on April 10, 2021, 01:41:10 PM
Hello! I'd like to report a bug, well I think it is one. I spawned a planet using the mod and the first time it worked fine. I colonized it and the colony worked like any other colony but if I use the command again, the spawned planet will bug out: If I colonize it, nothing starts building on it. The spaceport is stuck building with no time limit whatsoever and there is no growth. Fastbuild command doesn't work, it just says no industry is being built on this planet. The problem only starts when spawning in a planet for a second time using the command, I tested it in another save and that was the result. First planet is colonized fine, second doesn't. Ps. "industry construction started" notification also doesn't fire off after colonizing.

Here is the command I used:

runcode import com.fs.starfarer.api.util.Misc; String planetName = "YourPlanetName"; float planetSize = 200; float planetOrbitDays = 180; 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("farmland_bountiful"); market.addCondition("habitable"); market.addCondition("mild_climate");

Did you change planetName? If not, you spawned two planets with the same ID, which could be the cause of your problems.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: LazyWizard on April 10, 2021, 01:54:52 PM
A new version is up, grab it here (https://github.com/LazyWizard/console-commands/releases/download/2021.04.10/Console_Commands_2021.4.10.zip).

This fixes a few more issues with the console mod in 0.95a:
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: vladokapuh on April 10, 2021, 02:03:14 PM
Is it possible to add and remove specific skills with console commands?
If so maybe try to remove and readd the officer level skill after respec?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: YenGin on April 11, 2021, 02:44:51 AM
Tested and can confirm, Kill command works perfectly now, thank you.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: EpicLancer on April 11, 2021, 05:12:18 AM
during one of my runs i used a command ive never seen before that gave me over 2 mill sensor strength but i dont remember what it was and cant find it. was it removed?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Midnight Kitsune on April 11, 2021, 05:17:56 AM
during one of my runs i used a command ive never seen before that gave me over 2 mill sensor strength but i dont remember what it was and cant find it. was it removed?
That was reveal most likely
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: GerdyBird43 on April 11, 2021, 07:06:45 AM
If you use the reveal command then use interdict pulse your computer dies XD.

Beware when reveal command is on NOT TO USE interdict pulse.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Cyan Leader on April 11, 2021, 08:23:45 AM
This is not really a request, but maybe a AddBonusXP could be a good command for testing and resetting, using the same logic as AddXp.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Midnight Kitsune on April 11, 2021, 10:51:08 AM
Could we get an "AllSpecials" or "AllColonyItems" command to get all the colony items? And maybe one for all of the [HYPER REDACTED] weapon BPs?
Edit: Maybe an "AddGate" code as well? Sorry if I'm being greedy
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Joe on April 12, 2021, 07:22:20 AM
After reinstall PC, starsector and some mod, I find out that I can't use control+backspace to bring up the console screen anymore.
Even I disable all other mod and only enable Console Commands mod(with LazyLib 2.6), the key just won't work.
Game is 0.95aRC-12
Console Commands is v2021.04.10

Need help, thanks~  :'(
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Droll on April 12, 2021, 07:38:27 AM
Would it be possible to add a command "addStoryPoints" that does exactly what the name implies. It would work argument-wise similar to the "addSkillPoints" skill which already exists.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: iseethings on April 12, 2021, 08:14:39 AM
He already did. Just open up help in console when your in game for the exact wordage.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Droll on April 12, 2021, 02:58:14 PM
He already did. Just open up help in console when your in game for the exact wordage.

Literally the first time I typed help after I made the request I found it immediately.

Idk how I missed it so many times before.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Joe on April 13, 2021, 05:16:54 AM
After reinstall PC, starsector and some mod, I find out that I can't use control+backspace to bring up the console screen anymore.
Even I disable all other mod and only enable Console Commands mod(with LazyLib 2.6), the key just won't work.
Game is 0.95aRC-12
Console Commands is v2021.04.10

Need help, thanks~  :'(

never mind, just find out it's windows 10 20H2 problem...
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Erik3 on April 13, 2021, 06:59:06 AM
Could anyone please help me figure out how to activate a gate with this? A glitch has rendered the gate in Aztlan un-activatable for me.

I've figured out I need to access this GateEntityPlugin (http://fractalsoftworks.com/starfarer.api/index.html?overview-summary.html) somehow, but I have no experience modding Starsector and all my guesses about how to access it in the console have failed.

It might also be a popular enough cheat to add to the base set of tools.

EDIT: This thread has a workaround via save editing that worked for me https://fractalsoftworks.com/forum/index.php?topic=20716.msg315496#msg315496 As always, back up your save first.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Celepito on April 13, 2021, 01:10:16 PM
Is there a way to spawn a station derelict like e.g. a Domain-era Cryosleeper with a console command? I would read through all of this thread, but its 67 pages, so sorry if this was already answered.

Edit: Found the answer, at least specific for the Cyrosleeper.

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()), 180f); }
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Fenrir on April 13, 2021, 05:01:26 PM
Could anyone please help me figure out how to activate a gate with this? A glitch has rendered the gate in Aztlan un-activatable for me.

I've figured out I need to access this GateEntityPlugin (http://fractalsoftworks.com/starfarer.api/index.html?overview-summary.html) somehow, but I have no experience modding Starsector and all my guesses about how to access it in the console have failed.

It might also be a popular enough cheat to add to the base set of tools.
use devmode command to enter devmode and interact with the inactive gate, you might find options described with "ON/OFF", click them and make them all tell "OFF" (which means they are all active)
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Erik3 on April 13, 2021, 05:26:37 PM
Could anyone please help me figure out how to activate a gate with this? A glitch has rendered the gate in Aztlan un-activatable for me.

I've figured out I need to access this GateEntityPlugin (http://fractalsoftworks.com/starfarer.api/index.html?overview-summary.html) somehow, but I have no experience modding Starsector and all my guesses about how to access it in the console have failed.

It might also be a popular enough cheat to add to the base set of tools.
use devmode command to enter devmode and interact with the inactive gate, you might find options described with "ON/OFF", click them and make them all tell "OFF" (which means they are all active)

Thanks for the suggestion, but unfortunately no, devmode doesn't have any special options in that dialog, just dump memory and the generic options. On already-active gates it has the ones you mentioned, but not the specific "you can't scan this gate right now" dialog I'm dealing with. I've found out my problem applies to both Aztlan and Corvus, as the Hegemony/Tri-tach fleets scanning their respective gates have both vanished, yet still interfere with the scan.

Dumping memory didn't seem to show any flags related to specific gates, either.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Fenrir on April 13, 2021, 05:31:15 PM
Can we have some kind of system or planet generating command? It's been so painful searching randomly among endless seeds to spot a specifically featured system one may want to target as late game base for those who have a high demand on system planet type (I always wanted a yellow/blue star with a number of planets include a gas giant of suitable orbit with a dust ring and at least 2 moons, maybe my demand is too high :( ). A command that generate even random system in champion can greatly shorten time taken as one can do the search without starting a new save. Unluckily I never understood the concept of adding a new system via a custom mods (in fact any API confuses me). Having the ability to add pristine communication relay/sensor array/nav buoys is also appreciated.

Thanks for this wonderful and super useful mod!
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Baro on April 13, 2021, 09:55:21 PM
I'd kill for additional commands to:
-Change planet type
-Add planets, moons, stable locations
-Rename or even add new systems??
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: MagicKarpson on April 15, 2021, 08:25:22 AM
Anybody know how to make an asteroid belt in the new update? I tried using some old code from 0.91 but it didnt work.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Kurtdovah on April 16, 2021, 01:50:57 AM
Hello, sorry to disturb you but how can I use your old command "survey all"? May I create it? Or you will create it later?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Fenrir on April 16, 2021, 04:42:50 AM
Hello, sorry to disturb you but how can I use your old command "survey all"? May I create it? Or you will create it later?

Was it removed? I think I just used it not long ago... but I might be mistaken by memory.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Rauschkind on April 16, 2021, 04:59:56 AM
worked fine for me yesterday
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: speeder on April 16, 2021, 07:47:37 AM
I couldn't get the example commands to work.

Using them as a mod jus got me a ton of java errors complainign could'n load something.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: speeder on April 16, 2021, 06:26:26 PM
Spawning a gas giant:

Code
runcode import com.fs.starfarer.api.util.Misc; String planetName = "Gigantus"; float planetOrbitDays = 2000; float planetSize = 300;  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, "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");

Spawning a coronal tap:

Code
runcode import com.fs.starfarer.api.util.Misc; String planetName = "Gigantus"; 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); sys.addCustomEntity(null, null, "coronal_tap", null).setCircularOrbitPointingDown(star, angleCCW, orbitRadius, 360);

I am author of coronal tap one, but couldn't figure out how to make the special effects work... the game rules effect work fine ,but you won't see the star glowing more and the gas flowing like you see in systems where the tap was generated on game start.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Rauschkind on April 16, 2021, 06:26:54 PM
did you install the dependency mod?
Quote
(requires LazyLib 2.6 and Starsector 0.95a-RC10 or higher!)
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Kurtdovah on April 17, 2021, 12:07:54 AM
Hello, sorry to disturb you but how can I use your old command "survey all"? May I create it? Or you will create it later?

Was it removed? I think I just used it not long ago... but I might be mistaken by memory.

Yes, look the quote of the mod, the autor don't put the "surveyall" in this version
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: sprayer2708 on April 17, 2021, 10:50:26 AM
I know that was said before, but the reveal function doesn't work properly. That's because the game actually puts a hard cap on sensor range which is hidden ingame but can be found in the settings.json of the main game.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: The_White_Falcon on April 17, 2021, 11:36:42 AM
Hello, wanted to first thank you for this essential mod; been using it for years now. 

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"
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Flacman3000 on April 17, 2021, 03:20:02 PM
Any commands to remove remnant beacons or other beacons?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: evzhel on April 17, 2021, 03:38:11 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Thorgon on April 19, 2021, 12:04:42 AM
was experimenting with the add/remove condition commands and ive found a problem: removecondition does not properly remove the parasitic spores condition from the unknown skies mod
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Ramdat on April 19, 2021, 12:18:31 AM
was experimenting with the add/remove condition commands and ive found a problem: removecondition does not properly remove the parasitic spores condition from the unknown skies mod
It does if you use:
Code
removecondition us_mind
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Thorgon on April 19, 2021, 12:38:36 AM
It does if you use:
Code
removecondition us_mind

thats exactly what i did

the conditioon has been removed from the planet but it still applies the -25% fleet quality effect
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: speeder on April 19, 2021, 06:28:36 AM
The bug then is on unknown skies, not here.

You have to ask them to fix it.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Cathair on April 19, 2021, 10:12:48 AM
Having an issue with officer respeccing under Officer Management: level 6 officers that have been respecced can only level back up to 5.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Midnight Kitsune 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
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Szasz 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Szasz 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Father 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: PersistantFlame 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?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Üstad 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]
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: evzhel 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]
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Flacman3000 on April 23, 2021, 01:31:20 AM
Anyone know of commands to remove remnant beacons or other beacons?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Kurtdovah 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  :)
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: mrpeters 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: The_White_Falcon 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
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Grindfather on April 25, 2021, 07:44:18 PM
Anyone know of any commands to increase colony size?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Ramdat 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Dal 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Puddz 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Histidine on April 26, 2021, 07:36:35 PM
Converted from vanilla's StarSystemGenerator, place in the appropriate place after calculating the orbit radius:
Code: java
float planetOrbitDays = orbitRadius / (20f + random.nextFloat() * 5f);
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Puddz on April 26, 2021, 09:12:14 PM
Converted from vanilla's StarSystemGenerator, place in the appropriate place after calculating the orbit radius:
Code: java
float planetOrbitDays = orbitRadius / (20f + random.nextFloat() * 5f);

Thanks. I figured it out with this and looking through discord and just mixing and matching code lol.
Edited my original comment with it.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Celepito on April 28, 2021, 11:56:26 AM
Does anyone have a command/piece of code to add a specific hullmod to a specific ship (in your fleet, e.g. your flagship)? By that I mean some of the non-acquirable hullmods like e.g. "Automated Ship" or something.

I have looked around some, but not found anything, hence me asking.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: th3boodlebot on April 28, 2021, 12:24:32 PM
i hate to be that guy but this seems like a good place to ask:  is there a reasonable way for a neophyte to change the maximum number of industries per colony size?
Thanks in advance!
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Celepito on April 28, 2021, 12:30:51 PM
i hate to be that guy but this seems like a good place to ask:  is there a reasonable way for a neophyte to change the maximum number of industries per colony size?
Thanks in advance!

Go to "starsectore-core/data/config/settings.json", open it and search it for "maxIndustries".

You will see this [1,1,1,2,3,4,4,4,4,4], each number representing the colony size (1 to 10) and the connected max industry, e.g 2 industries at ^4. Simply change the number to what you want it to be.

(And related, two lines below that, "maxColonySize":6, you might want to change the 6 into a 10, so that your colonies can grow up to size ^10 and not just ^6.)
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: th3boodlebot on April 28, 2021, 01:05:06 PM
thank you!  Have a great day!
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Jazuke Taizago on April 28, 2021, 01:45:00 PM
Ok. I give. Trying to create a Asteroid Belt in my system that i've played around with. Problem is, keeps giving me some errors.

I've done exactly this to attempt creating it:

RunCode Global.getSector().getStarSystem("Dhuminai").addAsteroidBelt(Global.getSector().getStarSystem("Dhuminai"), 970, 7500, 350, 320, 640, Terrain.ASTEROID_BELT, "Craskar Belt")

Am i doing something very wrong or what? Been following specific instructions regarding past posts that i searched in this thread with "Asteroid" and "Belt" for the purposes of figuring out what to do and how to do. So far, progress seems stuck. I have just recently attempted learning these RunCode instructions and Commands too. So i got like no idea what i'm doing besides running off what others have done before me. I don't see a way to post a Screenshot here of what error i'm getting and it's a really long one a hassle to write all that down. But it's basically similar to this:

Compilation failed:org.codehaus.commons.compiler.CompileException: Line 1, Column 71: No applicable constructor/method found for actual parameters "java.lang.string, int, int, int, int, int, java.lang.string, java.lang.string"; candidates are: "public abstract com.fs.starsector.api.campaign.SectorEntityToken com.fs.starfarer.api.campaign.LocationAPI.addAsteroidBelt(com.fs.starfarer.api.campaign.SectorEntityToken, int, float, float, float, float)", ""public abstract com.fs.starfarer.api.campaign.SectorEntityToken com.fs.starfarer.api.campaign.LocationAPI.addAsteroidBelt(com.fs.starfarer.api.campaign.SectorEntityToken, int, float, float, float, float, java.lan.string, java.lang.string)"
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: bob888w on April 29, 2021, 12:45:20 AM
Hey, how would I use the addWeapon command if I was looking to add in some of the weapons from the hypershunt fight? The 2 I defeated gave only 1 large weapon total.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Celepito on April 29, 2021, 04:15:07 AM
Hey, how would I use the addWeapon command if I was looking to add in some of the weapons from the hypershunt fight? The 2 I defeated gave only 1 large weapon total.

"Help addweapon" will give you a short explanation. (Disclaimer, I havent used the addweapon command myself, yet.)

Assuming that it follows the same way other add commands go, you will need to get the id of the weapon you want to add.

You can get the id's either through the list command ("list weapons", likely), though that might be a bit annoying to search though if you have a lot of mod added weapons bloating the list.

So the other way would be to got to ""starsectore-core/data/weapons/weapon_data.csv" and open it up in a program like Notepad++. Search for "omega" or scroll down, the special weapons seem to be in a block below the Tachyon Lance (the is are a few dividing lines between).

Then you will likely be able to use e.g. "addweapon minipulser 10" or something to add the weapon to your fleets storage.

(Not sure about that number after the id, the last time I did something similar, it gave me a single non-stacking Synchrotron Core, so save the game beforehand, and better use the same command multiple times e.g. ten times "addweapon minipulser", instead of the one above. Just be cautious.)
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Nivri on April 29, 2021, 05:48:46 AM
anyone know a command to like reset a planet's relationship with you? I did some damage to Umbra pirates and now they won't let me sell drugs to them HAHAH.. is there a code to like reset that??
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: th3boodlebot on April 29, 2021, 06:32:19 AM
anyone know a command to like reset a planet's relationship with you? I did some damage to Umbra pirates and now they won't let me sell drugs to them HAHAH.. is there a code to like reset that??

Get the console commands mod
Control backspace
Setrelation (insert faction) (insert faction) (positive or negative value)
Example
Setrelation player pirates 50 would make them like you a lot
Remember the number is a set value NOT adding an amount
If you put 20 it doesnt add 20 it sets it as 20
The mod will explain some to you as well
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Flacman3000 on April 29, 2021, 10:33:07 PM
Anyone know of commands to remove remnant beacons or other beacons?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: DrSalty on April 30, 2021, 07:29:45 AM
Literally getting this just so I can delete enemy Doom's since they are far more OP that my own dooms to the point its unfair  :D
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Eshir on April 30, 2021, 07:38:37 AM
Ok i need help for the common game crash fix. the file for this fix
Quote
You can fix this by disabling the console's background: open saves/common/config/lw_console_settings.json.data in a program like Notepad and change "showBackground" to false.
is not there or generated to implement said fix the only file at the location specified is lw_console_aliases.json.data how do i force the right file to generate?

Edit: got it working. i was using "resolutionOverride":"1915x1015" and when i would open console the game insta CTD so it would not generate the file needed. the fix is to comment out resolution override and on launcher select the smallest available resolution. get into game and open the console and it worked turn off background save and quit the menu and close the game. re enable my custom resolution and it works
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Flacman3000 on April 30, 2021, 07:46:55 AM
Literally getting this just so I can delete enemy Doom's since they are far more OP that my own dooms to the point its unfair  :D

I must admit this is the most salty solution to game inexperience I've seen. I understand your trying to have fun but a large part of the fun is watching your ass get handed to you and asking yourself what you could have done better as is real life. Become better at the game this way and be entertained forever, I wouldn't imagine someone insta killing a DS boss as that is literally the point of the game. What you are doing whether you realize or not is ruining the game for yourself.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: KMS on April 30, 2021, 08:49:17 AM
Literally getting this just so I can delete enemy Doom's since they are far more OP that my own dooms to the point its unfair  :D

You cheated not only the game, but yourself. You didn't grow. You didn't improve. You took a shortcut and gained nothing. You experienced a hollow victory. Nothing was risked and nothing was gained. It's sad that you don't know the difference.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: DrSalty on May 01, 2021, 12:49:02 PM
Literally getting this just so I can delete enemy Doom's since they are far more OP that my own dooms to the point its unfair  :D

I must admit this is the most salty solution to game inexperience I've seen. I understand your trying to have fun but a large part of the fun is watching your ass get handed to you and asking yourself what you could have done better as is real life. Become better at the game this way and be entertained forever, I wouldn't imagine someone insta killing a DS boss as that is literally the point of the game. What you are doing whether you realize or not is ruining the game for yourself.

heh No.

It the situation I was in, I was not going to spend the next few hours just recuperating from a totally BS loss. I'm also not inexperienced, I have been playing for a few years now, its just taken me a while to bother making an account on here.

Literally getting this just so I can delete enemy Doom's since they are far more OP that my own dooms to the point its unfair  :D

You cheated not only the game, but yourself. You didn't grow. You didn't improve. You took a shortcut and gained nothing. You experienced a hollow victory. Nothing was risked and nothing was gained. It's sad that you don't know the difference.

And Hey I had way more fun annihilating the *** while it couldn't do anything after the 20 tries I had to get it to work without this mod, nothing hollow about that feeling of joy.
I'll play how I like, and if I feel a situation is being dumb and unfair, I'll happily make it unfair with a smile on my face and the "endless enjoyment" as the last guy said continues.

I gained the ability to circumvent the games crap and move on. Also "You didn't grow. You didn't improve. Nothing was risked and nothing was gained. It's sad that you don't know the difference." is about as cringe as people with "Live. Laugh. Love." on their walls.  ;D
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Arcagnello on May 01, 2021, 12:58:59 PM
Literally getting this just so I can delete enemy Doom's since they are far more OP that my own dooms to the point its unfair  :D

I must admit this is the most salty solution to game inexperience I've seen. I understand your trying to have fun but a large part of the fun is watching your ass get handed to you and asking yourself what you could have done better as is real life. Become better at the game this way and be entertained forever, I wouldn't imagine someone insta killing a DS boss as that is literally the point of the game. What you are doing whether you realize or not is ruining the game for yourself.

heh No.

It the situation I was in, I was not going to spend the next few hours just recuperating from a totally BS loss. I'm also not inexperienced, I have been playing for a few years now, its just taken me a while to bother making an account on here.

Something tells me you got got by that special bounty hunter fleet full of phase ships everyone loves so much and it showed you what true balance is  ;D

Commenting something to stay constructive: Even just low tech ships using low tech fighter LPCs can beat Dooms with some good strategies and focus fire. This game throws adversities at you as a chance to finally rise over them victorious, defeat after defeat until victory is achieved.
Cheating yourself out of a challenge is something you're entitled to do, but it would be comparable to finally buying a car and building a garage back home after a year of grueling work just to go to work using public transport every morning.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: DrSalty on May 01, 2021, 01:11:26 PM
Literally getting this just so I can delete enemy Doom's since they are far more OP that my own dooms to the point its unfair  :D

I must admit this is the most salty solution to game inexperience I've seen. I understand your trying to have fun but a large part of the fun is watching your ass get handed to you and asking yourself what you could have done better as is real life. Become better at the game this way and be entertained forever, I wouldn't imagine someone insta killing a DS boss as that is literally the point of the game. What you are doing whether you realize or not is ruining the game for yourself.

heh No.

It the situation I was in, I was not going to spend the next few hours just recuperating from a totally BS loss. I'm also not inexperienced, I have been playing for a few years now, its just taken me a while to bother making an account on here.

Something tells me you got got by that special bounty hunter fleet full of phase ships everyone loves so much and it showed you what true balance is  ;D

Commenting something to stay constructive: Even just low tech ships using low tech fighter LPCs can beat Dooms with some good strategies and focus fire. This game throws adversities at you as a chance to finally rise over them victorious, defeat after defeat until victory is achieved.
Cheating yourself out of a challenge is something you're entitled to do, but it would be comparable to finally buying a car and building a garage back home after a year of grueling work just to go to work using public transport every morning.

XD sadly no it was not that fleet, the major issue was the doom on my side was placing bombs everywhere EXCEPT for behind the enemy, while the enemy doom was placing them sloley behind my ships AND my frigates were also being dumb enough to reverse right into them and get yeeted. :P

I did manage to win without this mod after 20 tries, and on the final try none of my ships even got hurt because the doom decided to run to the other side of the map and not have my frigates ass's. So yeah, im sorry but its CLEARLY AI related.

So yeah this mod, good stuff for when AI be dumb, like my most recent, and aroura class getting almost max flux, I tell it to back off setting a point to retreat too, so it decided "lets full speed charge" in the opposite direction to the vector pointing to the point i set it to go to ... it did not work out for the AI and the result was the majority fo my fleet now backing off from lack of fire power ... I used this mod to fix that fight too.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Starslinger909 on May 01, 2021, 01:12:07 PM
How exactly do you find item ID's bc I had to make a new save bc of a mod update and now I lost a lot of progress so I would like to get back to where I was but Idk any item ids
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: DrSalty on May 01, 2021, 01:14:52 PM
How exactly do you find item ID's bc I had to make a new save bc of a mod update and now I lost a lot of progress so I would like to get back to where I was but Idk any item ids

Ususally its just the item name. So if there is a space say you want an "Alpha Core", you would write "AddItem AlphaCore" in the command line.  :)
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Starslinger909 on May 01, 2021, 01:19:13 PM
Apparently I was using the add item command instead of the add weapon command so that's why tachyon lance didn't show up lol
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Buddah on May 01, 2021, 04:40:12 PM
So is it possible to use the console commands to spawn a Coronal Hypershunt?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Flacman3000 on May 01, 2021, 09:16:10 PM
Anyone know of commands to remove remnant beacons or other beacons?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: PersistantFlame on May 03, 2021, 06:28:47 PM
Is there a way to use this mod to re-stablize jump points? If so, what do I enter?

If not, is there a command to spawn a stabilized jump point and remove the "de-stablized jump points condition" from the sector?

I didn't realize that the first gate experiment in the campaign would de-stabilize the points for that system and there's a really good Terran world there.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: CountV on May 05, 2021, 03:26:18 AM
Hello, regarding the ui scaling for the console, it doesn't seem to affecting the part where you'd type in.

The generated text (ie. from a help/list command) is larger as per the ui scaling settings, but the portion at "Enter a command, or 'help' ..." along with the the text I'm typing doesn't seem to change in size no matter what I set the text scale to. Is it possible to adjust this to follow the ui scaling with the rest of the console overlay?

Thanks.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Histidine on May 06, 2021, 02:33:50 AM
Anyone know of commands to remove remnant beacons or other beacons?
I don't know why you care enough to keep asking, but you can try this while docked with the beacon:

Code
runcode SectorEntityToken entity = Global.getSector().getCampaignUI().getCurrentInteractionDialog().getInteractionTarget();
entity.getContainingLocation().removeEntity(entity);
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: ValentineKovalev on May 06, 2021, 04:20:20 AM
How do I find out one specific blueprint. Can I enter the name of the ship?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Nivri on May 06, 2021, 04:23:31 AM
How do I find out one specific blueprint. Can I enter the name of the ship?

You can use the Addspecial command. Just enter "List ships" first to find the ship you are trying to learn. Then it would be something like "Addspecial ship_bp Wolf"
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: ValentineKovalev on May 06, 2021, 04:53:31 AM
Thank you
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: bigdady1 on May 06, 2021, 07:39:28 AM
I want to say thank you so much for making this I love using it.
Had a question I changed some conditions on a planet added ore and rare ore. And build it up and gave it to a npc faction.  Now it's bugged if I buy something from the market it crashes. Is there a way to debug it? Or has any 1 else bugged a planet ?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: mathwizi2005 on May 10, 2021, 01:03:48 AM
I'm trying to get a code that spawns a jump point at the player location and I'm doing it repurposing the old Stable Location spawn code but it keeps erroring out

Spoiler
runcode Random rndm = new Random;
    StarSystemAPI starSystem = Global.getSector().getPlayerFleet().getStarSystem();
    JumpPointAPI newJumpPoint = Global.getFactory().createJumpPoint("console_added_jumppoint" + rndm.nextInt(), "Hyperspace Jump Point " + starSystem.getJumpPoints().size());
    float distance = MathUtils.getDistance(Global.getSector().getPlayerFleet().getLocation(), starSystem.getStar().getLocation());
    OrbitAPI newJumpPointOrbitAroundStar = Global.getFactory().createCircularOrbit(starSystem.getStar(), 0, distance, distance / 10);
    newJumpPoint.setOrbit(newJumpPointOrbitAroundStar);
    newJumpPoint.setStandardWormholeToHyperspaceVisual();
[close]

Is this just overcomplicating things or are my calls no longer active?  This is from the past version
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Malhavoc on May 10, 2021, 01:52:14 PM
So was there ever an option added to "Add Administrators" or at least be able to add skills to them? Right now every Admin I have managed to find is hot garbage.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: arknok on May 11, 2021, 12:26:30 PM
this mod adds much need utily, very handy.

had a ctd when atempting to use the spawn gate command.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: JDB on May 14, 2021, 08:08:00 PM
Could a command be added to spawn a stable location in a sector, for building nav-buoys, sensor-arrays, or comm-relays on.
Could it function like the spawn asteroids command? It would enable people to place them where they want them.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: lapis_lazuli on May 18, 2021, 10:53:27 AM
is there a way to remove stellar shades from a planet? it's conflicting with a mod's function but i didn't realize it at the time until it was too late
Spoiler
used a terraform mod to remove heat from a planet but it ended up conflicting with industrial evolution's rift generator because stellar shades prevent the device from working anymore
[close]
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: YenGin on May 22, 2021, 03:52:59 AM
When I access the storage command I get this error in the dialogue, nothing has broken because of it so far, just a heads up I guess?
Spoiler
https://i.imgur.com/FzF7SRI.png
[close]
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: th3boodlebot on May 22, 2021, 04:13:56 AM
is there a way to remove stellar shades from a planet? it's conflicting with a mod's function but i didn't realize it at the time until it was too late
Spoiler
used a terraform mod to remove heat from a planet but it ended up conflicting with industrial evolution's rift generator because stellar shades prevent the device from working anymore
[close]

list industries to find the industry id
removeindustry industryid
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Bobbymoe on June 02, 2021, 07:36:07 PM
First ever post here so sorry if there's an etiquette I don't follow.

I using the 0.9a version and I've been trying to remove a neutron star from the system I want to start colonizing, but the commands I use keep coming back with errors or just don't work. Does anyone have a working command to remove neutron stars from systems?
Here is the message I get from the console  https://imgur.com/qmrCo1T (https://imgur.com/qmrCo1T)
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Fireballin17 on June 07, 2021, 07:41:17 AM
Hi Lazy!

It's me again, a question for the introduced commands,

Do you think its possible for a console command to use the Janus device and scan all the inactive objects to allow travel?

Regards,

Fireballin17.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Gal Paladin on June 08, 2021, 12:51:49 PM
So I'm having a bit of an unusual issue, when a skin of a ship with modules is added via command without specifying a variant, it doesn't have the modules which can cause a crash when the game tries to fix showing the module after applying variants via autofit.  I've heard there used to be a similar issue with normal ships with modules, and was wondering if anyone had any insight into the problem due to this problem not extending to normal ships with modules in this version of console commands.
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: MortalC12 on June 11, 2021, 11:31:04 AM
I have been thinking maybe AddAsteroidBelt is technically not the right answer as the Asteroid Belt is a terrain modifier from the RingAPI... so addRing?
resulting in
OK I GOT IT

RunCode Global.getSector().getStarSystem("System_Name").addAsteroidBelt(Global.getSector().getStarSystem("System_Name"), 2000, 1500, 300, 400, 600)

(int numAsteroids,float orbitRadius,float width,float minOrbitDays,float maxOrbitDays)
OK to provide a sample on this code
Code
RunCode Global.getSector().getStarSystem("Arcadia").AddAsteroidBelt(Global.getSector().getStarSystem("Arcadia"), 2000, 1500, 300, 400, 600)
what does this all mean
I want to make an Asteroid Belt in a Star System named Arcadia in the Asteroid Belt I want to chuck in 2000 asteroids that you can interact, with the starting point of the Belt being 1500 pixels away from the star specified, with the entire asteroid belt being 300 pixels THICC, in it some asteroid takes 400 days to complete an orbit some taking 600 days to complete their orbit

Small correction in case anyone is looking for it :

RunCode Global.getSector().getStarSystem("system_name").addAsteroidBelt(Global.getSector().getStarSystem("star_name").getStar(), 2000, 1500, 300, 400, 600)

GL HF
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Phoenixheart on June 11, 2021, 02:59:03 PM
So I found a command to spawn an Inactive Gate, but it's orbit is incredibly fast, much faster than anything in vanilla. I don't see in the syntax where it defines the speed, is that an optional field or am I just missing something?

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); }

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.

Also, is there a place where all of the syntax for these more complex runcode commands lives? I'd love to be able to look it up myself in the future.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: dreamdancer 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
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Phoenixheart on June 14, 2021, 12:22:43 PM
Perfect, thank you!
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: JoeRogan 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?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: AContraryDecision 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?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: SpaceDrake 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Kelaris 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);
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: RocketPowered 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?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: ASSIMKO on July 11, 2021, 04:15:36 AM
How Addship and addblueprit: ?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Yunru 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: ASSIMKO 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Spess Mahren 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]
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: fjc130 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?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: nocluewhatimdoing 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
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: DownTheDrain 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.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: nocluewhatimdoing on August 05, 2021, 11:11:50 AM
Me when I mod an ungodly amount of IV and V rank planets into the sector
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: demoix on August 18, 2021, 07:08:33 PM
How actually use ToggleAI command? I select my ship then enter ''ToggleAI fleet on'' , or even ''toggleai all on'' but still, my ship is not controlled by AI. Anyone can help me with how to use it properly?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: PureDesire on September 24, 2021, 03:49:13 AM
Hello,could I put this mod on fossic.org (it's a Chinese commuinty of starsector)so more Chinese can use this mod?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Kothyxaan on September 25, 2021, 01:35:47 PM
Is there now a way to spawn Remnant Nexus in a system? If so how?
If not this is a request :D
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: deoxyribonucleicacid on October 04, 2021, 11:57:17 PM
is there a way to mess with stars themselves? (i.e changing the star type, adding another starsystem etc.)

Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Blackwell on October 17, 2021, 12:27:30 PM
Hey first post on the forums so first off thanks for the mod, it's helpful when testing and even just fun for playing around in the game or getting officers who don't suck. With that said, I have a bug report about the Officer Training skill. When I use the command "respec (officer name)" it caps their max level at five and prevents them from having a second skill made elite, as far as I can tell I don't think this is a mod conflict because when I recruit new officers or add officers with console commands and level them without respecing them it allows them to level to six and allows me to give them two elite skills.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: n3xuiz on October 30, 2021, 09:04:18 AM
is there a console command to delete all debris fields in the current starsystem? i've seen code to spawn things so is this possible?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Szasz on November 02, 2021, 11:03:18 AM
Bug: ship storage is cleared on a market after using 'storage set' command.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Floorbo on November 03, 2021, 02:43:35 PM
is there any way to spawn a Coronal Hypershunt
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Histidine on November 03, 2021, 05:48:35 PM
is there any way to spawn a Coronal Hypershunt
Here (https://pastebin.com/T6jYQZCM); adds a shunt to current star system

EDIT: oops, it adds to specified star system by name
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: czezary on November 12, 2021, 02:47:07 PM
Does anyone know how to make a command to add a number of some commodity to all markets at once?

The reason is, im playing with shadowyards mod, and it comes with a custom commodity - cloned organs, for whatever reason however, cloned organs do not get exported and nearly every market in the sector vanilla or modded has a deficit of cloned organs.

Result? Almost every single procurement from traders is for cloned organs. often in quantities that are unobtainable without cheating.

So im guessing this problem could be solved by running a command that would add cloned organs to every market to end the deficit?

Could someone tell me if thats possible?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: DrStalker on November 12, 2021, 05:55:02 PM
Is there any way to make a combat command persistent?  For example, have permanent infiniteammo instead of having to bring up the console and activate it every battle.

Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Szasz on November 13, 2021, 11:57:09 PM
Does anyone know how to make a command to add a number of some commodity to all markets at once?

The reason is, im playing with shadowyards mod, and it comes with a custom commodity - cloned organs, for whatever reason however, cloned organs do not get exported and nearly every market in the sector vanilla or modded has a deficit of cloned organs.

Result? Almost every single procurement from traders is for cloned organs. often in quantities that are unobtainable without cheating.

So im guessing this problem could be solved by running a command that would add cloned organs to every market to end the deficit?

Could someone tell me if thats possible?
You are probably better off looking into ways how to tweak the mod or asking its author to take care of it. Or maybe they did but it requires a new game with the mod.
One solution for example would be introducing an industry that either demands (produces black market stock only) or produces cloned organs.
What you suggested would not be a permanent way out and repeating it -since you need to repeat it- would still feel like cheating.
Why does shadowyards need to use a practically equivalent version of harvested organs is beyond me though.
ps. Is it legal?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Vanshilar on December 11, 2021, 02:52:37 AM
Hmm. Trying to run "addofficer aggressive 6" returns the following error in 0.95.1a RC3:

Failed to execute command "addofficer aggressive 6" in context CAMPAIGN_MAP
java.lang.NullPointerException

I am using the newest version of Console Commands, running 0.95.1a RC3. This happens both in a game that was created in 0.95a as well as a fresh one that was just created in 0.95.1a RC3.

Fortunately this doesn't cause the game to crash, just that this error message is returned in console.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Zeppelin17 on December 11, 2021, 02:59:59 AM
Hi!

Is there a way to remove planet conditions (like pollution)? It would be fantastic if that could be added on the mod  :D
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: n3xuiz on December 11, 2021, 03:08:35 AM
@Zeppelin17 removecondition
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Lucky33 on December 12, 2021, 07:09:53 AM
Hmm. Trying to run "addofficer aggressive 6" returns the following error in 0.95.1a RC3:

Failed to execute command "addofficer aggressive 6" in context CAMPAIGN_MAP
java.lang.NullPointerException

I am using the newest version of Console Commands, running 0.95.1a RC3. This happens both in a game that was created in 0.95a as well as a fresh one that was just created in 0.95.1a RC3.

Fortunately this doesn't cause the game to crash, just that this error message is returned in console.

Same here. Even "addofficer" without params gives this error. Both in _MAP and _MARKET.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: DanzyDanz on December 15, 2021, 05:14:11 AM
Is there a way to start a story mission? "Project Ziggurat" won't trigger for me after meeting the Provost after waiting a week. The dialogue showed up fine but the mission objective didn't appear. Tried older save and got the same result
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Histidine on December 15, 2021, 02:17:13 PM
Is there a way to start a story mission? "Project Ziggurat" won't trigger for me after meeting the Provost after waiting a week. The dialogue showed up fine but the mission objective didn't appear. Tried older save and got the same result
This indicates the mission generation failed. You could try to generate the mission again, but unless something changed it'll fail in the same way.

(The last time this happened to me was due to the fleet clearing mod wiping the Ziggurat; there's a way to get it back with runcode, but I'm too dead rn to get it back)
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Szasz on December 16, 2021, 07:35:56 PM
SPAAAWN GAAATE
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Mikomikomiko on December 17, 2021, 12:45:16 AM
SPAAAWN GAAATE

Spoiler
runcode SectorEntityToken _fleet = Global.getSector().getPlayerFleet(); 
    StarSystemAPI _sys = (StarSystemAPI)_fleet.getContainingLocation();
    SectorEntityToken _stable = _fleet.getContainingLocation().addCustomEntity(null, null, "inactive_gate", "neutral");
    float _orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(_fleet, _sys.getCenter());
    float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 5f);
    float _angle = com.fs.starfarer.api.util.Misc.getAngleInDegrees(_sys.getCenter().getLocation(), _fleet.getLocation());
    _stable.setCircularOrbit(_sys.getCenter(), _angle, _orbitRadius, 320);
[close]

does this no longer work?
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Szasz on December 17, 2021, 04:18:19 AM
SPAAAWN GAAATE

Spoiler
runcode SectorEntityToken _fleet = Global.getSector().getPlayerFleet(); 
    StarSystemAPI _sys = (StarSystemAPI)_fleet.getContainingLocation();
    SectorEntityToken _stable = _fleet.getContainingLocation().addCustomEntity(null, null, "inactive_gate", "neutral");
    float _orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(_fleet, _sys.getCenter());
    float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 5f);
    float _angle = com.fs.starfarer.api.util.Misc.getAngleInDegrees(_sys.getCenter().getLocation(), _fleet.getLocation());
    _stable.setCircularOrbit(_sys.getCenter(), _angle, _orbitRadius, 320);
[close]

does this no longer work?
It does, thanks.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Stalkar on December 22, 2021, 07:46:40 AM
A very good utility mod
the only exception is already mentioned "addofficer" not working but that will probably be fixed

as for suggestions, some more general commands? like generate objects planets,removing stable location or altering conditions


Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Ali on December 24, 2021, 09:58:29 AM
Really hope "addofficer" is fixed soon!! :(

i like to spend a bit of time making sure i have the 10 officers i exactly want with the right portraits etc and am really missing not being able to do this atm :(

Many thanks for this for what is to me an "essential" mod!! :)

cheers
Al
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: LazyWizard on December 25, 2021, 05:59:51 PM
There's a new dev version that fixes AddOfficer. Grab it here (https://github.com/LazyWizard/console-commands/releases/download/dev-2021-12-25/Console_Commands_2021.12.25.zip).

This version should also prevent the crash when opening the console at very high resolutions with the background enabled, but I've been unable to test that as my computer doesn't experience that crash. If anyone who has that bug could confirm it's fixed, it'd be greatly appreciated.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Wyvern on December 25, 2021, 07:13:02 PM
Ah, excellent! I've been hoping for this ever since I got a level 7 officer with a portrait I didn't like...

...And it only adds regular officers, no ability to generate a high-level cryopod officer. Hm. I suppose I'll have to work out the relevant runscript myself, then.

Edit: Also, respec is still broken; with an officer specified, it null-pointers, with no officer specified, it grants two skill points for each skill you had elite.
Edit2: Though, it occurs to me, player respec as a console command is obsoleted by addStoryPoints, so having that not work properly isn't a big deal.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Killsode on December 25, 2021, 10:18:22 PM
Is there a way to scroll faster in the console? Once you add even just a few ship heavy mods scrolling through the ships list can take quite a while.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: SpaceDrake on December 25, 2021, 11:27:31 PM
Ah, excellent! I've been hoping for this ever since I got a level 7 officer with a portrait I didn't like...

...And it only adds regular officers, no ability to generate a high-level cryopod officer. Hm. I suppose I'll have to work out the relevant runscript myself, then.

Editing the save file directly to change officer names and portraits is pretty straightforward, though; that one doesn't really need the console, just a save-and-exit and a little time in a text editor, with maybe a client restart to be safe.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Ali on December 26, 2021, 12:00:50 PM
There's a new dev version that fixes AddOfficer. Grab it here (https://github.com/LazyWizard/console-commands/releases/download/dev-2021-12-25/Console_Commands_2021.12.25.zip).

This version should also prevent the crash when opening the console at very high resolutions with the background enabled, but I've been unable to test that as my computer doesn't experience that crash. If anyone who has that bug could confirm it's fixed, it'd be greatly appreciated.

Thanks so much for the prompt update!  ;D
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: dragoon_103 on December 28, 2021, 02:30:26 AM
Was playing around with the beyond the sector mod, seems the generated sectors are still in the game after you leave.

Would it be possible to remove an entire system, both everything inside it and all traces of it on the hyperspace map, as well as it in the system list?

I had a look at how the Legacy of Arkgneisis removes its system ship and system if its destroyed, but I haven't been able to get anything to work in game.

Not sure how I would be able to convert this into a workable runcode command
Spoiler
Code

code taken from loa_AnargaiaDeathManager.java in the Legacy of Arkgneisis


@author Nicke535
//The system we are keeping track of
    private StarSystemAPI system;

SectorAPI sector = Global.getSector();

//Now, we kill the system completely. We also register that we're done with our job
                    sector.removeScript(this);
                    isDone = true;
                    List<SectorEntityToken> jumpPointsToRemove = new ArrayList<>(system.getJumpPoints());
                    for (SectorEntityToken point : Global.getSector().getHyperspace().getJumpPoints()) {
                        if (point instanceof JumpPointAPI) {
                            JumpPointAPI jump = ((JumpPointAPI)point);
                            for (JumpPointAPI.JumpDestination dest : jump.getDestinations()) {
                                if (dest.getDestination() != null &&
                                    system.equals(dest.getDestination().getStarSystem())) {
                                    jumpPointsToRemove.add(point);
                                    break;
                                }
                            }
                        }
                    }
                    for (SectorEntityToken point : jumpPointsToRemove) {
                        point.getContainingLocation().addHitParticle(point.getLocation(), Misc.ZERO, 200f,
                                1f, 2f, Color.white);
                        ((JumpPointAPI)point).clearDestinations();
                        Global.getSector().getHyperspace().removeEntity(point);
                    }
                    sector.removeStarSystem(system);
[close]
Any help with this would be appreciated, as I have like 30+ extra useless systems in my intel log and still floating around my game.

EditL
I've gotten around to getting this much maybe written

runcode Global.getSector().removeStarSystem(StarSystemAPI.getBaseName("ang"));

It spits out an error:
no applicable constructor/method found for actual perameters "java.land.String"; candidates are public abstract java.lang.String.com.fs.starfarer.api.campaign.StarSystemAPI.getBaseName()"

not sure where I go from hereto provide the systemID, or how to provide it.

Also looking at the api, for removeStarsystem, I don't really understand what it means by the (StarSystemAPI system) part on the api documentation, or how I would use it properly
removeStarSystem(StarSystemAPI system)
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Stelarwand030 on January 01, 2022, 02:08:31 PM
Upcoming/planned features:
  • More commands! If you have any requests let me know in this thread and I'll try to add them to the next version.

I was just wondering but can you add a command that just adds only ships of a mod instead of all of them at once? Something like allhulls (mod x) and only mod x ships are added to the storage.

I have over a dozen mods active and when I use the allhulls command the game slows way down then eventually crashes.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: AsianGamer on January 04, 2022, 02:30:04 PM
Hey, I was wondering how to add specific blueprints for wings. Is that not possible?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Venatos on January 06, 2022, 10:55:42 AM
There's a new dev version that fixes AddOfficer. Grab it here (https://github.com/LazyWizard/console-commands/releases/download/dev-2021-12-25/Console_Commands_2021.12.25.zip).

This version should also prevent the crash when opening the console at very high resolutions with the background enabled, but I've been unable to test that as my computer doesn't experience that crash. If anyone who has that bug could confirm it's fixed, it'd be greatly appreciated.

im sorry to say that i still CTD when i try to open it. weirdly enough, only when i use the new nvidia driverside upscaling (from 1662p to 2160p). when i use 2160p directly, it works just fine.
thats one weird and specific bug...
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Jaghaimo on January 09, 2022, 04:05:35 AM
Could you update the remote version file as well? It still points at April release:

https://raw.githubusercontent.com/LazyWizard/console-commands/master/src/main/mod/console.version

Speaking of which, could you remove quotation of the patch component? `4` without quotes will be compared as a number, so will be lower than say `10` (thus no need for `0` in front of it).
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Szasz on January 09, 2022, 04:58:06 AM
Hey, I was wondering how to add specific blueprints for wings. Is that not possible?
It is not only possible, it's quite easy to do.
Code
addspecial fighter_bp warthog_wing
You may use "list fighters" command to see valid IDs for wings.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: SpaceDrake on January 09, 2022, 06:06:47 AM
Upcoming/planned features:
  • More commands! If you have any requests let me know in this thread and I'll try to add them to the next version.

Oh, I'd also like to throw my hat into the ring for a command to add/remove d-mods (and/or perhaps s-mods) from a given ship. You need pretty finicky code to do it right now, so it'd be a lot nicer to have one command that can do it cleanly.

Thank you for your work on this as always, LazyWizard!
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Mastr5135 on January 16, 2022, 02:37:09 PM
Hi new to this I looked pretty far back and couldn't find a add story point script is there a certain reason for this?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Obsidian Actual on January 16, 2022, 06:38:31 PM
Hi new to this I looked pretty far back and couldn't find a add story point script is there a certain reason for this?

I suspect the opening post of this thread does not necessarily provide an exhaustive list of default commands.

addstorypoint <number> seems to have worked pretty well since StarSector 0.95a onwards.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: shilum on January 19, 2022, 12:01:31 PM
I was wondering if there was a way to add stable points in the systems? (for comm relay, sensors, and nav relay)
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Chronia on January 19, 2022, 12:41:39 PM
I was wondering if there was a way to add stable points in the systems? (for comm relay, sensors, and nav relay)

I realize you're posting in the Console Commands thread (so you're probably looking for a console command), but wanted to point out that this is actually a vanilla feature. You can emergency burn up to the star (as if it were a planet) and there will be an option to add a stable point. You need an alpha core, fuel, and machinery (and a story point if it's a black hole).

Also, if I recall correctly, the "Captain's Log" mod adds a console command for this.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: SpaceDrake on January 19, 2022, 12:42:35 PM
Hi new to this I looked pretty far back and couldn't find a add story point script is there a certain reason for this?

I suspect the opening post of this thread does not necessarily provide an exhaustive list of default commands.

addstorypoint <number> seems to have worked pretty well since StarSector 0.95a onwards.

It actually needs to be addstorypoints, which I consistently trip over.

Heck, that's another suggestion: can "addstorypoint" and "addskillpoint" be aliases for "addstorypoints" and "addskillpoints"?

Also, if I recall correctly, the "Captain's Log" mod adds a console command for this.

It does indeed.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: itBeABruhMoment on January 21, 2022, 05:10:25 PM
Upcoming/planned features:
  • More commands! If you have any requests let me know in this thread and I'll try to add them to the next version.

Oh, I'd also like to throw my hat into the ring for a command to add/remove d-mods (and/or perhaps s-mods) from a given ship. You need pretty finicky code to do it right now, so it'd be a lot nicer to have one command that can do it cleanly.

Thank you for your work on this as always, LazyWizard!

I wrote a mod that adds a random dmod adding, general hullmod adding, and ship duplicating command if that's of any use. Note that some of the ship editing commands don't work properly in the refit screen for unknown reasons, so don't do that. Forum page: https://fractalsoftworks.com/forum/index.php?topic=23024.msg345913#msg345913 (https://fractalsoftworks.com/forum/index.php?topic=23024.msg345913#msg345913)
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: DDwarrirofire on February 02, 2022, 04:34:30 PM
I"m attempting to spawn a lvl7 officer but not finding that. Is this possible?

Respec just points to null point. Considered possible spawning one in a derelict the way the game does but hit a dead end there.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Grizzlyadamz on February 05, 2022, 04:55:55 PM
Hello! I'm having trouble spawning blueprints from the seeker mod and monsieur Tartiflette doesn't know why off the top of his head.
The correct hull ID "SKR_cassowary" isn't "valid ship_bp data", (the other SKR hulls are also invalid), allblueprints is indicating it can't be unlocked, and I'm not seeing any no_drop tags in the files. I also went ahead and deleted the hide-from-codex tag, added rare_bp and set rarity to ,0.01, (instead of ,,) in amateurish attempts to get it recognized. No luck.

Any idea what could cause this?? I've also tried typos (and checked for them in ship_data.csv) to no avail.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Grizzlyadamz on February 05, 2022, 05:04:25 PM
I"m attempting to spawn a lvl7 officer but not finding that. Is this possible?

Respec just points to null point. Considered possible spawning one in a derelict the way the game does but hit a dead end there.
You probably have to change the global setting for maximum spawned officer level. The level-7s you can find are actually generated at the start of the game, and there's only a specific number of them to be found.
Alternatively, just use allofficerskills (officernameornumber) on your favorite lieutenant to make them a spawn of Ares.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: FrackaMir on February 06, 2022, 01:51:52 AM
There's a new dev version that fixes AddOfficer. Grab it here (https://github.com/LazyWizard/console-commands/releases/download/dev-2021-12-25/Console_Commands_2021.12.25.zip).

This version should also prevent the crash when opening the console at very high resolutions with the background enabled, but I've been unable to test that as my computer doesn't experience that crash. If anyone who has that bug could confirm it's fixed, it'd be greatly appreciated.

Not quite certain but updated it to the new version but still am getting Add Officer errors of campaign_map and campaign_market, seems the issue somehow persists or is conflicting with some other mod perhaps?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: liliyn on February 11, 2022, 09:01:23 AM
is there anyway to remove a system jump point?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Sutopia on February 16, 2022, 10:47:04 PM
Hello,

Do you have an insight as of why an override implementation of SettingsAPI can break your mod?

Hi there

I do mean S-mods, and I'm using the Progressive S-mod mod with the XP etc etc.  I patched with the update that you uploaded (I think it's the update, the files are dated to 2/16 after RAR extraction) and issue still persists.  If I disable the mod the game save cannot be loaded, says hullmod doesn't exist or something

Here's the screens, you can see the Bazaar Falcon and the Cetan (LG) mech green markers for the s-mods do not always show unless clicked on.  When I click my Cerus the markers disappear

Spoiler
(https://i.imgur.com/SOTtkEQ.jpg)
(https://i.imgur.com/bdUEUzr.jpg)


[close]

I believe I can fix that.

In the second screenshot it seems like you have two S-mods but only one bar is showing, is that expected?

Usually the in-built S-mods show up together rather than separate and are labeled as (S) when you hover the cursor over the ship.  However if I hover over the mech you can see that only Heavy Armor has a (S) after it but Integrated Targeting Unit doesn't.

Spoiler

(https://i.imgur.com/hkh0pxi.jpg)

[close]
Patch c is released that fixed *most* of it except for when you select your own ship (flagship, player character as officer). I'm still trying to figure out that one.

Update: patch D fully fixed the S-mod display issue, sorry for the inconvenience!

Hi sorry for all the posts, but figured I'd keep you updated.

Using version "2.1.0b" that's the most recent download I think?

So the built-in hull mod green markers seem to show correctly, but the duplicates are still there. 
Only weird thing now is for some reason console commands are being affected, the text has turned into blocks.
I did this with a new game because I thought it was not save game compatible, same issue.
Ran the game without Concord enabled, issue with text display is gone.
Sorry



Spoiler

(https://i.imgur.com/8FP0V5c.jpg)
(https://i.imgur.com/tUz2rRt.jpg)


[close]
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: FrackaMir on February 19, 2022, 07:58:23 AM
Is there anyway to add and remove system Jump points? like inner, outer and fringe as well as gas giants?

Couple of the jump points are in the range of the coronal effect of the Yellow Supergiant and some jump points interlope over each other
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Dabger1 on February 19, 2022, 06:00:52 PM
so im getting a crash when i hit M to spawn a derelict with devmode enabled important seeming bits below

any idea how to fix this?
=================================================================================

49846 [Thread-3] INFO  org.lazywizard.console.Console  - > devmode
49846 [Thread-3] INFO  org.lazywizard.console.Console  - Dev mode is now enabled.
49846 [Thread-3] INFO  com.fs.starfarer.loading.scripts.B  - Loading class: org.lazywizard.console.BaseCommand$CommandResult
51534 [Thread-7] INFO  sound.public  - Cleaning up music with id [miscallenous_corvus_campaign_music.ogg]
51703 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
51834 [Thread-9] INFO  sound.public  - Creating streaming player for music with id [miscallenous_corvus_campaign_music.ogg]
51835 [Thread-9] INFO  sound.OooO  - Playing music with id [miscallenous_corvus_campaign_music.ogg]

====================================================================

{"enabledMods": [
  "adjustable_skill_thresholds",
  "BSC",
  "lw_console",
  "degenerateportraitpack",
  "diableavionics",
  "GrandColonies",
  "hte",
  "IndEvo",
  "lw_lazylib",
  "exshippack",
  "MagicLib",
  "missingships",
  "nexerelin",
  "shadow_ships",
  "Terraforming & Station Construction",
  "US",
  "vesperon",
  "shaderLib"
]}
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Requal on February 20, 2022, 04:35:41 PM
Ok weird question...

If you accidentally added too much skill points is there a way to remove some?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Dabger1 on February 20, 2022, 05:56:10 PM
Ok weird question...

If you accidentally added too much skill points is there a way to remove some?

i know this pain all too well...
but as for your question, not that i am personally aware of, but someone else might have something
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Dragoncrusher on February 20, 2022, 08:24:33 PM
Ok weird question...

If you accidentally added too much skill points is there a way to remove some?

You just do "addskillpoints -#" basically its the same but you add -
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Requal on February 21, 2022, 02:41:01 PM
Ok weird question...

If you accidentally added too much skill points is there a way to remove some?

You just do "addskillpoints -#" basically its the same but you add -

It is so logical that it just doesn't come up in the mind.
Thnx
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: kokuto on March 05, 2022, 11:07:00 PM
For some reason when I try the AddOfficer command, it gives a java.lang.NullPointerException
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: TheSAguy on March 06, 2022, 07:46:10 AM
Hi,

Is there a command that will show/reveal all the Gates?

Thanks.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: LikeableKiwi on March 20, 2022, 10:28:46 PM
Is there a way to add D-mods? The upkeep of having multiple paragons are killing me.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Zelrod92 on March 30, 2022, 11:34:41 PM
Hello, I have a problem with both the commands AllHulls and addHull. They always says Added 0 ships to storage.

When I ad a new mod I will get a java.nullpointerexeption for the first time and then Added 0 ships to storage once again.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Boggi on April 02, 2022, 06:54:03 PM
I'm having the same issue with the allhulls command, but im nog getting the java error. It is from a fresh install with latest version and the latest version of all mods downloaded clean, about 70ish.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Kris_xK on April 04, 2022, 09:07:17 AM
I've got a strange, likely self inflicted bug where the "list ships" command results in 0. List ships with a qualifier also results in 0. All other list functions worked fine. Using Addship works fine as well.

As far as I can tell its only the list ships command. It has lasted a couple restarts but I haven't tried to isolate any mods that is causing it. It likely a mod, as it was working fine last month, and I've recently cracked 110 active mods.

I'm not expecting a resolution, just reporting.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Zelrod92 on April 04, 2022, 11:29:08 AM
Well for me not even list ships work correctly, however after some test, this problem comes from other mods. With some mods I have no problems. However I still haven't manage to find the mods that cause the error to occur.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Kris_xK on April 04, 2022, 03:11:54 PM
This error is apparently related to the Concord mod.

Try redownloading Concord. I just did and it worked.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Zelrod92 on April 05, 2022, 12:08:51 PM
For me even after redownloading CONCORD, I still have the same error.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: HopeFall on April 08, 2022, 01:02:49 PM
Relogging fixes it temporarily.
Title: Re: Unofficial Developer's Console (beta ready for download)
Post by: Kermer101 on April 09, 2022, 08:34:18 AM
Mr creator of the mod is there a way i can edit a planet's properties? for example add organics or remove cold?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Üstad on April 15, 2022, 01:23:40 PM
AllOfficerSkills add outdated skills such as Shield Modulation, Phase Modulation, Reliability Engineering and Ranged Specialization. It needs update OP  :)
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: hua on April 18, 2022, 08:18:24 AM
UGV
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: React52 on April 20, 2022, 10:51:47 PM
is there any way that I can just pre-load commands? so I don't have to put them in every time.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: LordBlade on April 21, 2022, 01:00:36 PM
Does the console allow you to remove D mods from ships?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: LordBlade on April 24, 2022, 07:00:18 PM
I'm super confused with this "custom script" thing.


Basically I was looking for a way to make it so that I could activate "God Fleet", "InfiniteAmmo Fleet" and "InfiniteFlux Fleet" all as one command (like say just "Uber") for when I want to just cheat an easy win in combat (or generally muck about with ships).


Can someone help me with this?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Princess_of_Evil on April 25, 2022, 01:12:06 AM
I spliced together two commands to make one that creates both an asteroid belt and its ring band.
Back up the save before you mess with it. This can actually BRICK saves.

I want to make an Asteroid Belt in a Star System named Arcadia, near planet #2. (For tech-oriented people: it isn't 0-indexed. The planet #0 is the central star.) (You can use getEntityById, i just found it clunkier. For stars, it's probably better to use getStar(), getSecondary() and getTertiary().)
I want to chuck in 50 asteroids that you can interact, with the starting point of the Belt being 700 pixels away from the star specified, with the entire asteroid belt being 240 pixels THICC, in it some asteroid takes 400 days to complete an orbit some taking 600 days to complete their orbit, with the ring itself taking 500 days to orbit. I want to name it Ring of Power.
I want the ring to have the texture #3. (It can be any value 0-3, though 1 and 2 are very similar.)

Quote
RunCode Global.getSector().getStarSystem("Arcadia").addAsteroidBelt((PlanetAPI)Global.getSector().getStarSystem("Arcadia").getPlanets().get(2), 50, 700f, 240f, 400f, 600f, Terrain.ASTEROID_BELT, "Ring of Power");
Global.getSector().getStarSystem("Arcadia").addRingBand((PlanetAPI)Global.getSector().getStarSystem("Arcadia").getPlanets().get(2), "misc", "rings_asteroids0", 256, 3, Color.RED, 240f, 700f, 500f)
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Vanshilar on April 25, 2022, 05:05:03 PM
Basically I was looking for a way to make it so that I could activate "God Fleet", "InfiniteAmmo Fleet" and "InfiniteFlux Fleet" all as one command (like say just "Uber") for when I want to just cheat an easy win in combat (or generally muck about with ships).

There's the "alias" command (and the associated "aliasremove" command), so to do this you should be able to type in:

alias uber god fleet;infiniteammo fleet;infiniteflux fleet
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: LordBlade on April 26, 2022, 06:03:11 PM
There's the "alias" command (and the associated "aliasremove" command), so to do this you should be able to type in:

alias uber god fleet;infiniteammo fleet;infiniteflux fleet
Thank you.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: LordBlade on April 27, 2022, 03:41:00 PM
So with the "setrelation" command, can you change the relations with individual NPCs?
And how would that be formatted?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Tigasboss on May 04, 2022, 09:51:10 AM
Is it possible to change a star system background using this mod?
I know its possible to make planets and add stable points to a star system using "runcode" and code made by other users.
I tried to find code that would let me do that but the closest thing i found was a code that would create and entirely new star system.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: The_White_Falcon on May 14, 2022, 07:15:32 PM
As of today I have the latest version of CONCORD mod; however I've noticed the list ships command stops working after a while in-game.  I have to exit/re-launch the game to fix the issue every time.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Moth on May 16, 2022, 08:12:29 AM
Is there a command that would let me speed up the building time of some things in my colony? or would speedup the time in general for example like x3 x4?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: GreameCheese on May 16, 2022, 09:57:06 PM
Is there a command that would let me speed up the building time of some things in my colony? or would speedup the time in general for example like x3 x4?
You can use 'fastbuild' while interacting with the planet to finish building projects,  not sure about adjusting the overall speeds.
---
Unrelated to Moth's problem, in my journey for a solution to deleting or removing nascent gravity wells connected to planets, I was gifted with this:

Interact with the planet before running
Code
runcode List<SectorEntityToken>allEntities=Global.getSector().getHyperspace().getAllEntities();SectorEntityToken token = $context.getEntityInteractedWith();for(SectorEntityToken entity:allEntities){if (entity instanceof NascentGravityWellAPI&&entity!=null){ NascentGravityWellAPI nascwell= (NascentGravityWellAPI) entity;if (nascwell.getTarget() == token){LocationAPI location = nascwell.getContainingLocation();location.removeEntity(nascwell);}}}
[edit]If this^ gives you a "concurrent" error, try again.
If you had my problem of the nascent gravity wells being misaligned after moving some planets, then after deleting the wells use
Code
runcode Global.getSector().getStarSystem("System Name").autogenerateHyperspaceJumpPoints(false,false)
-the first true statement is for Gas Giants||the second true statement is for generating Fringe Jump Points
and now you'll have shiny new gravity wells in the correct location!

I just wanted to leave this here in case anyone else needs it.
Happy Solar Engineering.

PS: Awesome mod can't play without it thank you~
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Juroguy on May 22, 2022, 12:53:59 PM
Would a command that adds additional planets or asteroid fields to a sector be possible?

Or would it have problems with save states and worldgen?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: FunkyCirno69 on May 24, 2022, 03:56:43 PM
Hi, i was using this mod for a long time but i want to report a bug: when i input "list ships" it says zero ships found, despite the "list weapons" working well. Can you help me fix this? Regards
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Opera on May 28, 2022, 12:19:58 AM
Exception when attempting to respec freshly hired level 2 officer:

Code
91201 [Thread-3] INFO  org.lazywizard.console.Console  - > respec Farel Conley
91201 [Thread-3] INFO  org.lazywizard.console.Console  - Performing respec of Farel Conley...
91224 [Thread-3] ERROR org.lazywizard.console.Console  - Failed to execute command "respec Farel Conley" in context CAMPAIGN_MAP
java.lang.NullPointerException
   [starfarer.api.jar]   at com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.pickSkill(OfficerManagerEvent.java:578)
   [starfarer.api.jar]   at com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.createOfficer(OfficerManagerEvent.java:482)
   [lw_Console.jar]   at org.lazywizard.console.commands.Respec.respecOfficer(Respec.java:32)
   [lw_Console.jar]   at org.lazywizard.console.commands.Respec.runCommand(Respec.java:140)
   [lw_Console.jar]   at org.lazywizard.console.Console.runCommand(Console.java:328)
   [lw_Console.jar]   at org.lazywizard.console.Console.parseInput(Console.java:382)
   [lw_Console.jar]   at org.lazywizard.console.ConsoleOverlayInternal.checkInput(ConsoleOverlay.kt:469)
   [lw_Console.jar]   at org.lazywizard.console.ConsoleOverlayInternal.show(ConsoleOverlay.kt:218)
   [lw_Console.jar]   at org.lazywizard.console.ConsoleOverlay.show(ConsoleOverlay.kt:48)
   [lw_Console.jar]   at org.lazywizard.console.ConsoleCampaignListener.processCampaignInputPreCore(ConsolePlugins.kt:19)
   [starfarer.api.jar]   at com.fs.starfarer.api.campaign.listeners.ListenerUtil.processCampaignInputPreCore(ListenerUtil.java:53)
   [starfarer_obf.jar]   at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source)
   [starfarer_obf.jar]   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   [fs.common_obf.jar]   at com.fs.state.AppDriver.begin(Unknown Source)
   [starfarer_obf.jar]   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   [starfarer_obf.jar]   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   [starfarer_obf.jar]   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   [core Java]   at java.lang.Thread.run(Unknown Source)

I would also like to suggest a command to search markets for a specific hullmod, similar to what findship command does.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: ryujinblade on May 28, 2022, 06:49:46 PM
so for whatever reason, i cannot get the console to come up. i removed all my mods except what was needed for console to run, nothing. i uninstalled starsector and deleted all user files and restarted my pc and reinstalled star sector. but i still cannot start the console, i have tried fullscreen and windowed. i have tried everything to get this to work and i have no idea whats going on, it was working fine earlier today and i added carters free traders and truly automated ships earlier today before starting a new run and ever since even with clean installs and what not, i cannot get this to run, any tips would be appreciated
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: [email protected] on May 31, 2022, 10:47:39 PM
nice

Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: [email protected] on May 31, 2022, 10:49:20 PM
nice
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: OriginalInternetExplorer on June 06, 2022, 08:34:35 AM
Hi, i was using this mod for a long time but i want to report a bug: when i input "list ships" it says zero ships found, despite the "list weapons" working well. Can you help me fix this? Regards

Hey. I'm also having this issue. I can add blueprints via commands just fine, the command just isn't listing any. (I only noticed this after making some modifications to an existing, modded ship - not sure if it's related) 
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Kothyxaan on June 08, 2022, 09:11:02 AM
Hello, I'm looking for a way to add a market to a planet that I will spawn in. Does anyone know a code to do this. As in I spawn a planet (I can do this bit) then add a faction market onto the planet. I know how to add industries and conditions.
Help appreciated!
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: n3xuiz on June 08, 2022, 09:23:24 AM
@Kothyxaan

dock with planet you want to spawn the submarket in and the type addsubmarket

list see what options there are list submarkets
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Kothyxaan on June 08, 2022, 12:05:14 PM
@Kothyxaan

dock with planet you want to spawn the submarket in and the type addsubmarket

list see what options there are list submarkets
I tried this, but it only works on a planet with a market. I even changed it population level etc.
I spawned a planet and added the submarkets etc, but no go. I think I need a command to make it belong to a faction. Whixch is what im trying to do.
Cheers though.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: n3xuiz on June 09, 2022, 12:03:41 AM
to assign a planet to a faction afaik you need the nexerelin mod then you can setmarketowner to a faction. same as before: list factions...
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Liral on June 09, 2022, 07:47:38 AM
Will this mod support newline characters in the help string?  I have written a rich, verbose one, which is confusing in one paragraph.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Kothyxaan on June 09, 2022, 11:04:32 AM
to assign a planet to a faction afaik you need the nexerelin mod then you can setmarketowner to a faction. same as before: list factions...

I know this, but I wanted to make an unpopulated planet populated and then give to a faction and you cant do that in the method you suggest. I already tried this.
I have nexerilin mod.
Here is what I did.
I spawned the planet.
I went to the planet.
The planet options window opened up "survey, mine etc".
I opened the console.
setpopulation 4
setmarketsize 4
addsubmarket open_market
Now would be the "setmarketowner [market name here] [faction name here]" phase.
But you cannot, because it has no "market". A "market" in the game logic is a planet already colonised with a faction. The "open_market" is not considered a market for the "setmarketowner" command.
I was hoping for a way to bypass the colonisation phase because I didn't want to start my own faction at that time. Now I have made one it doesn't matter anymore.
I still want to know if it is possible (and how) for future reference.

Edit
Thanks for trying to help though.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: NudePokemonCards on June 15, 2022, 10:41:14 AM
Hi, i was using this mod for a long time but i want to report a bug: when i input "list ships" it says zero ships found, despite the "list weapons" working well. Can you help me fix this? Regards

Hey. I'm also having this issue. I can add blueprints via commands just fine, the command just isn't listing any. (I only noticed this after making some modifications to an existing, modded ship - not sure if it's related)

Had this same problem. I removed the Magellan Protectorate and Junk Yard Dogs mods from my mod list and the list ships command seems to work again
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: aurafort on June 19, 2022, 12:23:58 AM
someone made a command in https://fractalsoftworks.com/forum/index.php?topic=14512.0 (https://fractalsoftworks.com/forum/index.php?topic=14512.0) about adding a Stable Location

how do i add this to the Mod?

Quote
[runcode SectorEntityToken fleet = Global.getSector().getPlayerFleet(); 
      StarSystemAPI sys = (StarSystemAPI)fleet.getContainingLocation();
      SectorEntityToken stable = fleet.getContainingLocation().addCustomEntity(null, null, "stable_location", "neutral");
      float orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(fleet, sys.getCenter());
      float orbitDays = orbitRadius / (20f + new Random().nextFloat() * 5f);
      float angle = com.fs.starfarer.api.util.Misc.getAngleInDegrees(sys.getCenter().getLocation(), fleet.getLocation());
      stable.setCircularOrbit(sys.getCenter(), angle, orbitRadius, orbitDays);]

Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: AshtonCrowe on June 25, 2022, 11:04:13 AM
Having Issues opening Console Command Window with CTRL Backspace it will crash instantly with no error message. I have the newest versions of Console & lazylib Resolution 1842 x 1036. Trying to do the fix listed on main page is a catastrophic fail as i do not have the option to remove the background as it just doesn't exist. https://gyazo.com/793b2f4bbc0395c85cf9c9397245a14b

I have not modified any game files aside from giving my game 8GB to work with. The game does not crash at any point unless i specifically try to open the Console Command.

Anyone have a fix for this? I have disabled all other mods only running LazyLib & Console Commands while this is what i normally run https://gyazo.com/9dbdd589b96eb5d19027738ef6b85f1b
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Ali on July 13, 2022, 03:24:02 PM
Is it possible to get a list of in built it hullmods like "advanced targeting core" and be able to add them to ships with the console pls?

cheers
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Jewel724 on July 14, 2022, 08:28:20 PM
I'm getting an output of "added 0 hulls to storage" when I try to run that command. Am I missing something?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Zelrod92 on July 16, 2022, 02:57:29 AM
It is because of CONCORD.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Jewel724 on July 17, 2022, 01:57:56 AM
It is because of CONCORD.
Is there a fix or workaround for it?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: torvon on August 04, 2022, 02:35:42 PM
Hey folks! Amazing mod. Been trying to fight my own ships in the simulator, but couldn't find options for the console in the readme or on google.

Is this option hidden somewhere, perhaps? Thanks!
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: ihugyourmom on August 05, 2022, 11:20:38 AM
hey, is there a way to survey all planets in all systems? basically revealing all content in each system/planet

I tried various arguments to no veil (survey [arg]).

edit:
Seems it was/is a mod interfering, so some systems just wont survey with the arg "all".

tl;dr
"survey all", works as intended.

regards.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Killsode on August 10, 2022, 08:03:21 AM
what menu or target must you use for the addofficer command to work at all? i always just get "java.lang.NullPointerExecption"
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: MysteriousWriter on August 11, 2022, 04:41:23 PM
Heya folks, just wondering if there's a command to add ordnance points to a specific ship?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Pagan Pope on August 12, 2022, 05:47:05 PM
Helo, i need help regarding how to add asteriod belts around stars and planets, been trying it for a week but every code i find here on forums that i copy and paste desont work.
Is there a working code that i can just copy and paste to make it work, or should i give up cause its imposible to do without any coding or code edditing?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: tigartar on August 15, 2022, 04:10:17 AM
Not sure if it's just me(I think so) but 1 of the following mods(I think) is making it so that the god command doesn't work on player nor fleet does anyone know which mod that might be?

I did check and it does give the message that the command was enabled

Spoiler
  "$$$_lightshow",
  "$$$_trailermoments",
  "pantera_ANewLevel40",
  "Adjusted Sector",
  "raccoonarms",
  "AttunedDriveField",
  "automatedcommands",
  "lw_autosave",
  "timid_admins",
  "better_variants",
  "blackrock_driveyards",
  "CaptainsLog",
  "chatter",
  "su_Concord",
  "lw_console",
  "console_examplecommands",
  "diyplanets",
  "istl_dassaultmikoyan",
  "DetailedCombatResults",
  "diableavionics",
  "forge_production",
  "sun_fuel_siphoning",
  "GrandColonies",
  "hte",
  "sun_hyperdrive",
  "IndEvo",
  "Imperium",
  "kadur_remnant",
  "lw_lazylib",
  "leadingPip",
  "lockedAndLoaded",
  "logisticsNotifications",
  "luddenhance",
  "MagicLib",
  "make_paragon_great_again",
  "missingships",
  "su_CarrierHullmod",
  "more_hullmods",
  "sun_new_beginnings",
  "nexerelin",
  "JYDR",
  "planet_search",
  "pt_qolpack",
  "RealisticCombat",
  "scan_those_gates",
  "SCY",
  "speedUp",
  "StarfarersWorkshop",
  "sun_starship_legends",
  "stelnet",
  "StopGapMeasures3",
  "Sylphon_RnD",
  "tahlan",
  "Terraforming & Station Construction",
  "transfer_all_items",
  "transpoffder",
  "underworld",
  "US",
  "ungp",
  "URW",
  "vayrasector",
  "vayrashippack",
  "WEAPONARCS",
  "whichmod",
  "audio_plus",
  "shaderLib"
[close]
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Aldazar on August 27, 2022, 03:31:32 AM
When I'm trying to use the kill command I can't click anything because the background window is covered by the console window. Any help please?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: PasDeBras on August 27, 2022, 03:54:04 AM
what menu or target must you use for the addofficer command to work at all? i always just get "java.lang.NullPointerExecption"
That command needs arguments to work properly, but the console should tell you that instead of returning an exception. I would suggest a clean install of the mod. Use help AddOfficer for tips on how to use it.
A correct syntax would include type and level i believe, so the command would look like : AddOfficer Steady 2.

Heya folks, just wondering if there's a command to add ordnance points to a specific ship?
No there isn't, but you could use Which Mod (https://fractalsoftworks.com/forum/index.php?topic=22367.0 (https://fractalsoftworks.com/forum/index.php?topic=22367.0)) to figure out from where the ship you want to edit comes from, then directly edit the game/mod files to reflect the changes you want (usually in a folder tree resembling this : Root/Data/Hulls/ship_data.csv) with a text editor like notepad++ (https://notepad-plus-plus.org/downloads/) or sublimetext (https://www.sublimetext.com/) or in this csv case Ron's Editor (https://www.ronsplace.eu/products/ronseditor).

Not sure if it's just me(I think so) but 1 of the following mods(I think) is making it so that the god command doesn't work on player nor fleet does anyone know which mod that might be?

I did check and it does give the message that the command was enabled
Type settings to access console option and configure what entity will be affected by the command you typed.

When I'm trying to use the kill command I can't click anything because the background window is covered by the console window. Any help please?
Type help kill for a quick tip on how to use it. Been ages since i did it but i seem to remember you have to quit the console screen, click on a fleet, then strike ESC to exit kill mode.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Aldazar on August 27, 2022, 10:23:52 PM
I can't the background is so dark and the entire window is the dev console so I am unable to click on fleets. I have to press escape to even interact with the map...
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Killsode on August 28, 2022, 12:51:38 AM
what menu or target must you use for the addofficer command to work at all? i always just get "java.lang.NullPointerExecption"
That command needs arguments to work properly, but the console should tell you that instead of returning an exception. I would suggest a clean install of the mod. Use help AddOfficer for tips on how to use it.
A correct syntax would include type and level i believe, so the command would look like : AddOfficer Steady 2.

Well, two things. 1, 'help addofficer' states that the personality, level, faction, and name are all option, if all of them are empty its supposed to add a level 1 steady officer.
2, i must apologize for this one as i didnt provide clear information before, the error is "Failed to execute command "addofficer" in context CAMPAIGN_MAP".

The error is the same when docked at a market, it just changes to "context CAMPAIGN_MARKET"

frankly it just appears that the addofficer command is entirely borked for my installation

Updated to latest dev and its fine, my installation was 2021-4-10 because update always said it was up to date, whoops. Although now showing the background in the console doesnt work, GL_INVALID_OPERATION. but it seems everything else works so its aight.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: dfd13 on August 28, 2022, 12:39:02 PM
Hello, I am having issues. "AllHulls" is not working. Is this a known issue?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: PasDeBras on August 28, 2022, 01:22:46 PM
frankly it just appears that the addofficer command is entirely borked for my installation

Updated to latest dev and its fine, my installation was 2021-4-10 because update always said it was up to date, whoops. Although now showing the background in the console doesnt work, GL_INVALID_OPERATION. but it seems everything else works so its aight.

Sorry to hear that, maybe some other mod conflict? Have you checked if everything whas up to date?
Hello, I am having issues. "AllHulls" is not working. Is this a known issue?
What isn't working? Details?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: dfd13 on August 28, 2022, 02:23:39 PM
frankly it just appears that the addofficer command is entirely borked for my installation

Updated to latest dev and its fine, my installation was 2021-4-10 because update always said it was up to date, whoops. Although now showing the background in the console doesnt work, GL_INVALID_OPERATION. but it seems everything else works so its aight.

Sorry to hear that, maybe some other mod conflict? Have you checked if everything whas up to date?
Hello, I am having issues. "AllHulls" is not working. Is this a known issue?
What isn't working? Details?

So I set a planet as home, upon typing "AllHulls" I get "0 hulls added to storage" message.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Phenir on August 28, 2022, 02:43:09 PM
Hello, I am having issues. "AllHulls" is not working. Is this a known issue?
What isn't working? Details?

So I set a planet as home, upon typing "AllHulls" I get "0 hulls added to storage" message.
I had the same issue. Concord mod was causing it for me. You can see talk about it in that the mod's thread.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: dfd13 on August 29, 2022, 04:45:14 PM
I dont have concord mod, but looking it up, I think the issue may be a faction mod. Which one it is I have no idea.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: LordThunderous15 on August 31, 2022, 07:12:32 PM
Hey, i am having trouble finding the command that lists ALL planets/systems. I have gone through i think every command, please help?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Stelarwand030 on September 03, 2022, 02:14:15 PM
Upcoming/planned features:
  • More commands! If you have any requests let me know in this thread and I'll try to add them to the next version.

I have asked this before but can you add a CC that adds in ships/weapons for a single mod only? when I try and use allhulls and allweapons my game slows way down and freezes for several seconds. And when I try and view the ships I only get a few FPS. Having a CC that adds the ships/weapons of only one mod would be very helpfull.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Slyve on September 04, 2022, 05:54:18 AM
I'm also getting the nullpointer exception when trying to respec officers. Is the feature currently broken or am i doing something wrong?

(https://i.postimg.cc/1n3LNXbT/2022-09-04-14-53-23-Starsector-0-95-1a-RC6.png) (https://postimg.cc/1n3LNXbT)
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Killsode on September 04, 2022, 07:30:17 AM
I'm also getting the nullpointer exception when trying to respec officers. Is the feature currently broken or am i doing something wrong?

(https://i.postimg.cc/1n3LNXbT/2022-09-04-14-53-23-Starsector-0-95-1a-RC6.png) (https://postimg.cc/1n3LNXbT)

ditto, on the most up to date version.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Ovid on September 10, 2022, 01:07:20 AM
I know there's a command to adjust relations with factions. That's a great one. But is there a command for adjusting the relationship meter of specific NPCs?

For example, Iron Shell mod has a few NPCs that have bonuses if you grind up their relationship. But only one of them has the easy path of "give AI cores, improve relationship with NPC". I'd love a way to skip all the specific mission grinding.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: MichaelTheGreat on September 10, 2022, 07:42:00 AM
so, as I was learning how to use this properly, I simplified a few of the commands by making them named a number 1-8 and I was trying to launch a batch of them all at once is that at all possible? because I feel like I may be doing it wrong, or this might just not be possible.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: GeneralWaffles on September 13, 2022, 04:42:00 PM
Alrighty after looking through this thread. i noticed all the custom code people were making and it got me thinking. How would you go about spawning in a derelict mothership? would it be as simple as taking say the code for the cryosleeper and replacing it with the domain motherships name or is there more neuance to it. I ask because i completely lack any understanding of code and it very much hurts my brain.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: TheLemu on September 14, 2022, 05:05:04 AM
Any plans for an addition 'list' command pertaining to planet types?
Correct me if I'm wrong but all available planet types, both vanilla and modded, are already loaded in at the start of the game, right? Wouldn't a command to list all of them be relatively simple?
Sure, I can simply dive into the files of various mods with custom planets, but I think that a command like this would simplify the life of quite a few people who like to spawn planets and making custom systems via commands.
Also, excuse my ignorance but I can't code to save my life, so ignore this request if it's unreasonable.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Damonvi on September 15, 2022, 08:01:08 PM
shameless ignorant non-coder here.

can anyone post up (if it hasnt already been posted) a code line to edit a planet in a system? what i mean specifically, is if i wanted to change, for ex., a barren planet to a cryovolcanic, what would that code look like?

otherwise, how could i spawn a (for the sake of consistency) cryovolcanic planet into a specific system?

much appreciated to the man that takes the time to reply to this!
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Midnight Kitsune on September 15, 2022, 10:09:20 PM
shameless ignorant non-coder here.

can anyone post up (if it hasnt already been posted) a code line to edit a planet in a system? what i mean specifically, is if i wanted to change, for ex., a barren planet to a cryovolcanic, what would that code look like?

otherwise, how could i spawn a (for the sake of consistency) cryovolcanic planet into a specific system?

much appreciated to the man that takes the time to reply to this!
Editing a planet's conditions is easily done via the "addconditions" and "removeconditions" commands. Certain conditions, like biome type, will auto replace the previous one but others you will need to add or remove one at a time
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Damonvi on September 17, 2022, 01:19:16 AM
editing conditions is easy. what i was looking for was for the planet to visually change in relation to the type it's given.

in my example. if i went to a barren planet, and did "addcondition cryovolcanic", the planet will still be labeled as barren, have the jpeg of a barren planet, but the only change will be that it now has a wide condition icon saying it's now a cryovolcanic planet.

i was hoping the edit would update the visuals of the planet, as well as changing it's typing.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Midnight Kitsune on September 17, 2022, 06:45:48 PM
Did you try leaving the system then re-entering it? Or leaving, saving, reloading and re-entering it to see if it updates?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: tigartar on September 18, 2022, 09:21:43 PM
For anyone who wants to make a planet orbit around another planet

runcode PlanetAPI planet = (PlanetAPI) $loc.getEntityById("desired planet"); $loc.addPlanet("cc_barren", planet, "Barren World", "barren", VectorUtils.getAngle(planet.getLocation(), $playerLoc), 150, MathUtils.getDistance(planet.getLocation(), $playerLoc), 120)

Change "desired planet" to the planet you want it to be orbiting around (can be gained by typing list planets in console)
Change "cc_barren" to something fitting(Not too sure right now what it does again)
Change "Barren World" to your desired name
Change "barren" to the type of world(can be gained by typing list conditions)
Change the 150 before mathUtils for size
Change the 120 at the end for planet_orbit_length


If you are not happy with the planet you made dock at it and run the below code to get rid off it

runcode SectorEntityToken ent = Global.getSector().getCampaignUI().getCurrentInteractionDialog().getInteractionTarget(); if (ent.getMarket() != null) Global.getSector().getEconomy().removeMarket(ent.getMarket()); ent.getContainingLocation().removeEntity(ent);


Am still trying to figure out how to write the adding market data so for now it is just a blank planet (Maybe someone knows how we can do it based on type so that we don't have to manually pick and choose?)

And for spawning a general planet to move around a star run the following code

runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); $loc.addPlanet("cc_barren", star, "Barren World"", "barren", VectorUtils.getAngle(star.getLocation(), $playerLoc), 150, MathUtils.getDistance(star.getLocation(), $playerLoc), 120)

To get a planet to follow a specific star in your system run the following code and change "change to star name" to the star you found in the list planets it would look something like this
"system_a488" < this is your main star
"system_a488_b < this is your second star And so on

runcode PlanetAPI star = (PlanetAPI) $loc.getEntityById("change to star name"); $loc.addPlanet("cc_barren", star, "Barren World", "barren", VectorUtils.getAngle(star.getLocation(), $playerLoc), 150, MathUtils.getDistance(star.getLocation(), $playerLoc), 120)

I hope this will help for the few of us who keep asking how to do this, once i find out or someone shares with me how to add conditions based on planet type i will update this post to include that
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Sigma Draconis on September 19, 2022, 01:12:50 PM
I have a weird issue where sometimes when i use the list ships command the console stops being able to list ships, saying that there are no ships in the game.

Here's the img link for it:
https://media.discordapp.net/attachments/939876903693729834/1021513888086368376/IMG_20220919_171045458.jpg
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Damonvi on September 24, 2022, 07:05:03 PM
Did you try leaving the system then re-entering it? Or leaving, saving, reloading and re-entering it to see if it updates?


found a different way of handling it. utilized a terraforming mod to get a frozen/tundra planet from a barren planet, instead of just editing the barren planet, and just added extreme cold condition from commands.


on a different note, is there a way to add nebula clouds to a system? i use a mod called "ramscoop", which syphons fuel and supplies from nebulas (not hyperspace nebulas), and i found/made the perfect system, however, it doesnt have a nebula, so i cant "top up for free, but time". any of you mega-brained guys know how to spawn one of those clouds in, or is that out of reach?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: rarewhalerw on September 25, 2022, 06:47:48 AM
Did you try leaving the system then re-entering it? Or leaving, saving, reloading and re-entering it to see if it updates?
Is there any way to make all faction go war without typing "setrelation all (faction) -100" 1 by 1?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: TheLemu on September 25, 2022, 12:32:06 PM
Is there any way to make all faction go war without typing "setrelation all (faction) -100" 1 by 1?
You can use the 'alias' command to string together several relation commands like for example:
"alias war setrelation all Hegemony -100; setrelation all (faction) -100; (...)" and so on until you list all the factions you're playing with.
Afterwards you'll just need to type in "war" into the console to trigger an all-out war. This command will work on all saves and subsequent new playthroughs.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Lethargic on September 29, 2022, 01:15:29 PM
Hello i found something annoying that makes it unable to list ships or hull, has anyone ever had this problem before?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: cytokine on October 02, 2022, 02:12:16 AM
I tried using the Traitor command in the sim, but it accepts no arguments, and it wont let me click on things?

Also, why would Spawnfleet not "match vanilla fleet compositions"?
edit: spawnfleet player 200 seems to follow your current faction doctrine, so maybe the disclaimer is outdated.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Cry0genic on October 03, 2022, 08:08:29 AM
Did you try leaving the system then re-entering it? Or leaving, saving, reloading and re-entering it to see if it updates?

I did, and neither worked. The wide-icon conditions simply disappear, although checking through the console reveals that it still has those conditions. However, nothing is changed in regards to how the planet performs, or what texture it uses.
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: NoCleverness on October 07, 2022, 02:45:36 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.
Is there a way to run this without spawning the nav buoy and such? I tried deleting the parts that spawn them, but keep getting a nullpointer error. Also, is there a way to spawn the solar array entities in orbit?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: MadLSA97 on October 08, 2022, 02:56:16 AM
Hey, so this is my first post and I have basically no coding knowledge, but I really want to spawn an asteroid ring around my star. I have a minning station, but after using DIY's project Genesis to build a planet I realised that it deleted ALL the asteroid rings, not only the one in which you activate it.

If someone could help me I'd apreciate it
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Wyvern on October 11, 2022, 05:33:18 PM
Hey, so this is my first post and I have basically no coding knowledge, but I really want to spawn an asteroid ring around my star. I have a minning station, but after using DIY's project Genesis to build a planet I realised that it deleted ALL the asteroid rings, not only the one in which you activate it.

If someone could help me I'd apreciate it

While your fleet is in the system you want an asteroid belt in, call up console commands, and run something like this:
Code
runcode StarSystemAPI system = (StarSystemAPI)Global.getSector().getPlayerFleet().getContainingLocation();
system.addAsteroidBelt( system.getCenter(), 80, 3000, 200, 400, 460 );
Adjust numbers to taste; they are, in order: number of asteroids, radius of asteroid belt (how far it is from the star - 2000 is one grid-square on the map), width of asteroid belt, minimum days to orbit, maximum days to orbit.
(There's a second addAsteroidBelt method that also takes a terrainID string and a asteroid belt name string, but... I don't actually know what needs to go into the terrainID field.)



And while I'm here, here's a useful little script I worked out for adding a convenient gate when using a nex own-faction start (that will almost certainly not put you in a system with a gate.)
Note that this requires you to be docked at the planet you want to put a gate around.
Code
runcode SectorEntityToken planet = $context.getMarket().getPrimaryEntity();
LocationAPI system = planet.getContainingLocation();
CustomCampaignEntityAPI gate = system.addCustomEntity( null, null, "inactive_gate", "neutral" );
gate.setCircularOrbit( planet, 0, 800, 300 );

And create a randomized level 7 officer (for when the ones the game gave you were just bad):
Code
runcode PersonAPI pers = com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.createOfficer( Global.getSector().getFaction( Factions.PLAYER ), 7, com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.SkillPickPreference.ANY, false, Global.getSector().getPlayerFleet(), true, true, 5, null ); Global.getSector().getPlayerFleet().getFleetData().addOfficer( pers )
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: Hyperion505 on October 18, 2022, 03:49:57 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?

I'd like to know if this would be possible a well.

Edit: Also, is it possible to change a stars' type? Like change a neutron star to something else?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Nalesh on October 25, 2022, 11:36:03 PM
Is there a way to change relations with a character, not a faction?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Geekin88 on October 30, 2022, 08:17:41 PM
is there a way to add a rift generator to my colony. i tried the simple console command addindustry inevo_riftgen and it gets added but there is no functionality to it. no option to actually use it in the menu.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Bangle on October 31, 2022, 03:10:18 AM
Is there a way to change relations with a character, not a faction?

You have to turn on Devmode and then interact with the individual.
 
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: raptormother on October 31, 2022, 08:46:06 AM
is there a way to add a rift generator to my colony. i tried the simple console command addindustry inevo_riftgen and it gets added but there is no functionality to it. no option to actually use it in the menu.

It's much simpler than that, just do AddIndustry RiftGen
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Farlarzia on October 31, 2022, 09:35:02 AM
Hi Lazy.

A suggestion:
Could the add officer command support adding arbitrary officer levels, or up to 7?

Currently it just gives you an officer up to your normal max officer level, which makes it difficult to test stuff with above cap pod officers.

And thanks for the mod.
Couldn't tell you how many likely thousands of times I've plugged in commands to go through through testing stuff (and then fix random nonsense that can sometimes happen in actual playthroughs) .

Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Wyvern on October 31, 2022, 12:41:34 PM
Hi Lazy.

A suggestion:
Could the add officer command support adding arbitrary officer levels, or up to 7?
Due to low-level implementation details, this is actually a surprisingly difficult ask... unless you're willing to accept it adding officers with randomly selected skills, in which case I worked out the runcode for that a couple days back:
And create a randomized level 7 officer (for when the ones the game gave you were just bad):
Code
runcode PersonAPI pers = com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.createOfficer( Global.getSector().getFaction( Factions.PLAYER ), 7, com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.SkillPickPreference.ANY, false, Global.getSector().getPlayerFleet(), true, true, 5, null ); Global.getSector().getPlayerFleet().getFleetData().addOfficer( pers )
For reference, in the above, the 7 is the officer level, and the 5 is how many elite skills they get. I don't suggest messing around with any of the other parameters unless you know what you're doing. (In which case: mess away, it'll probably be fine.)
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: dslinspace on November 01, 2022, 09:20:09 PM
I couldnt find a way to search comments in this thread, how do I remove D-mods from ships?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: SpaceDrake on November 02, 2022, 12:03:16 AM
I couldnt find a way to search comments in this thread, how do I remove D-mods from ships?

I mean the easiest way is to console yourself exactly enough money to cover a restoration and just do it that way.

Removing specific ones is trickier and requires a specific runcode command; it hasn't been turned into a bespoke console command yet.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: SlavenOlupina on November 07, 2022, 09:41:36 PM
Hey there,
cheers for the tons of fun provided by this mod.

Im having some inconsistent behaviour by a command i though i should share. Was using "addxp" to add myself story points on max lvl but out of the blue the command stopped giving experience and started either taking it all if there is any or giving 0 if i dont have any.
It has 0 impact on gameplay since im max lvl and there is a command "addstorypoints" which works but though you should know.

As far as i understand im using latest version provided by download link on the first page. Same with lazylib.

Regards,
Slaven
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Bangle on November 08, 2022, 06:22:49 AM
Question:
Is it possible to spawn a planet with an nascent gravity well?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Malhavoc on November 10, 2022, 12:27:30 PM
So I've seen a lot of folks complaining about the "list ships" console command bringing up 0 results, and seen various claims as to what the culprit might be.

I've seen some folks say it is the CONCORD mod, it is faction mods, and some people say that it is just the current version of the game that is to blame.

Does anyone really know what the problem is and do they have any workarounds? Entirely restarting Starsector sometimes clears the issue, and other times it doesn't do anything. It is also a horrendously tedious method of fixing things.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Wyvern on November 10, 2022, 12:34:38 PM
Well, it's definitely not "just the current version of the game"; I've had no problems with that command.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Tabi on November 12, 2022, 11:35:34 AM
What console commands are there to set relationships between individual characters? Like High Hegemon Daud or whoever?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Sigma Draconis on November 12, 2022, 02:14:10 PM
So I've seen a lot of folks complaining about the "list ships" console command bringing up 0 results, and seen various claims as to what the culprit might be.

I've seen some folks say it is the CONCORD mod, it is faction mods, and some people say that it is just the current version of the game that is to blame.

I can confirm that it is the Concord mod. It seems to have buggy interactions with console commands, causing ships to not show in the "list ships" command at seemingly random times. It seems that sometimes it does show, but once it stops showing the ships it won't show them again until the next time the game is started, in which the process repeats. Removing the Concord mod solves it.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Vundaex on November 20, 2022, 08:34:13 AM
Awesome mod, allowed me to make some fleet tests pretty easily.
The command "AllHulls" combined with mods adding many ships makes my game crash (fatal error). :/
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: WeWickYou on November 20, 2022, 11:01:09 AM
Spawning a gas giant:

Code
runcode import com.fs.starfarer.api.util.Misc; String planetName = "Gigantus"; float planetOrbitDays = 2000; float planetSize = 300;  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, "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");

Spawning a coronal tap:

Code
runcode import com.fs.starfarer.api.util.Misc; String planetName = "Gigantus"; 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); sys.addCustomEntity(null, null, "coronal_tap", null).setCircularOrbitPointingDown(star, angleCCW, orbitRadius, 360);

I am author of coronal tap one, but couldn't figure out how to make the special effects work... the game rules effect work fine ,but you won't see the star glowing more and the gas flowing like you see in systems where the tap was generated on game start.

good to know, did you find a way to have the effect now?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Vundaex on November 20, 2022, 12:58:42 PM
Does anyone understand what this means?
Happens every time I use the command "allhulls" and browse the ships in the storage.

854178 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: System with id [drone_pd] not found
java.lang.RuntimeException: System with id [drone_pd] not found
   at com.fs.starfarer.combat.entities.Ship.<init>(Unknown Source)
   at com.fs.starfarer.loading.specs._.o00000(Unknown Source)
   at com.fs.starfarer.title.Object.M.super(Unknown Source)
   at com.fs.starfarer.title.Object.M.render(Unknown Source)
   at com.fs.starfarer.coreui.Oo0o.o00000(Unknown Source)
   at com.fs.starfarer.ui.OoO0.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.campaign.ui.fleet.FleetMemberView.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.coreui.G.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.e$Oo.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.e.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.coreui.publicsuper.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.coreui.X.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.o0OO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.N.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.OO0O.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.N.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.do.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.o0Oo.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.render(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.render(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Ruddygreat on November 20, 2022, 04:46:03 PM
Does anyone understand what this means?
Happens every time I use the command "allhulls" and browse the ships in the storage.

854178 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: System with id [drone_pd] not found
<the rest of the error>

you've got a mod using a vanilla system that got renamed / removed, try updating all of your mods
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Vundaex on November 21, 2022, 06:05:43 AM
you've got a mod using a vanilla system that got renamed / removed, try updating all of your mods

Thanks I'll have a look!
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: DiscRover on November 22, 2022, 08:59:39 AM
I understand it's redundant in a sense but is there a find hullmod command? Like the find ships command that scrounges the market but for hull mods? Cause findItem doesn't work
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Vundaex on November 24, 2022, 10:53:58 AM
Almost none of the combat commands seem to be working.
Only "endcombat" seemed to work, unless I'm missing something.
Stuffs like "kill" (well, it asks for a target, but how?), "god" etc don't do anything on my side.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Tillerton on November 24, 2022, 01:55:09 PM
Is there any way for us to be able to adjust character relationship at all? Like I kinda don't want to spend doing random quest for Alviss Sebestyen till he like me enough for the main quest to kick off.  :-\


Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Histidine on November 25, 2022, 09:19:10 PM
Been asked a few times so I figured I may as well mention it here:
There's a vanilla devmode command in dialog (>> (dev) options) to raise (or lower) reputation with the person you're talking to.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Kumanix on November 26, 2022, 12:58:03 AM
Been asked a few times so I figured I may as well mention it here:
There's a vanilla devmode command in dialog (>> (dev) options) to raise (or lower) reputation with the person you're talking to.
Is there any code to add a npc to your contact list?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: sulo1719 on November 30, 2022, 08:45:49 AM
it would be nice to add "add exp" command to ships from progressive s-mods
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Norath on December 04, 2022, 07:39:19 PM
Is there a handy code to Move or Remove a gate inside a system ?

Im using this code to remove debris field but the gate is still in a bad spot XD
Code
 
runcode SectorEntityToken fleet = Global.getSector().getPlayerFleet();
        List<SectorEntityToken> sectorEntityTokens = fleet.getContainingLocation().getAllEntities();

        for(int i = 0; i < sectorEntityTokens.size(); i++)
        {
            if(sectorEntityTokens.get(i) instanceof CampaignTerrainAPI)
            {
                if(((CampaignTerrainAPI)sectorEntityTokens.get(i)).getPlugin().containsEntity(fleet))
                {
                    fleet.getContainingLocation().removeEntity((SectorEntityToken)sectorEntityTokens.get(i));
                }
            }
        }
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Ports on December 13, 2022, 10:36:42 PM
hi guys. new to mods. can someone please point me in the direction of the download button or subscribe button? dont know how this works.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Ruddygreat on December 14, 2022, 01:36:20 AM
hi guys. new to mods. can someone please point me in the direction of the download button or subscribe button? dont know how this works.

the link is embedded in the blue "download latest dev" text in the original post, though I've copied it below as well

https://github.com/LazyWizard/console-commands/releases/download/dev-2021-12-25/Console_Commands_2021.12.25.zip
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Tito on December 24, 2022, 07:14:19 AM
Rift generator doesn't work when added through console commands. Option to use it doesn't show up in menu, even using devmode.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Stelarwand030 on December 24, 2022, 07:46:06 PM
Upcoming/planned features:
  • More commands! If you have any requests let me know in this thread and I'll try to add them to the next version.

I have asked this several times before but can you add a CC that adds in ships/weapons for a single mod only? when I try and use allhulls and allweapons my game slows way down and freezes for several seconds. And when I try and view the ships I only get a few FPS. Having a CC that adds the ships/weapons of only one mod would be very helpful.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Darkwhip on December 24, 2022, 08:43:22 PM
List hulls seems to be empty ffor me and i cant find anything either
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: mark.sucka on January 01, 2023, 11:23:34 PM
Any help from the community on using console command to add the ability to use an ability?

To the point, one of my mods is conflicting with another.  Upon attaining a certain character skill, access to both hullmods and an ability are supposed to unlock for the player.  I tried changing the mod code, but my attempt isn't working as hoped, and I thought it might be easier to just brute force adding the hullmods and the ability to my save.  Adding the hullmods was easy enough, just changing the respective line in hull_mods.csv as unlocked = TRUE.  But the only option I can see to add the ability is through the abilities.csv file and set unlockedAtStart = TRUE...which works perfectly...for a new start.  Changing the flag to TRUE mid-playthrough does not add it as something I can add to my hotbar sadly.

Is there a code to affect that?
runcode $playerfaction.addability("ability_name"); was my best guess which sadly didn't do the trick
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Ikhtiyar on January 03, 2023, 09:49:25 AM
anyone know if there is a "list" file where all the conditions are listed? like i could just retrieve them  and then add them to my text file and then copy paste them via console? for example- AddCondition rare_ore_ultrarich, AddCondition ore_ultrarich?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Kris_xK on January 03, 2023, 10:47:14 AM
Either use "list conditions" in the console for all conditions.

You can find core conditions in "starsector-core\data\campaign\market_conditions.csv"
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Fire-101R on January 03, 2023, 04:18:52 PM
Hello,im from the chinese starsector forum,can i upload your Console Commands mod to chinese forum?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: DeCell on January 14, 2023, 12:18:06 PM
Any way to spawn Remnant Nexus station?
Thanks.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Bulletkin on January 19, 2023, 09:33:50 AM
List hulls seems to be empty ffor me and i cant find anything either

I heard that having Concord installed messes with console commands, somehow. I had a similar problem, and removing it worked. Maybe try that? I'm not 100% sure.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Volsungare on January 21, 2023, 02:00:25 PM
Is there a way to use the console to find cryosleeper ships? I found one a while back but I forget what system. And with an expanded sector, I don't want to spend hours re-checking systems.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Flacman3000 on January 21, 2023, 11:30:41 PM
Anyone know how to get the console up with a steam deck? If not how do I change the hotkey without ingame settings command? I can't click shift + backspace at the same time.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: OldPayphone on January 27, 2023, 09:39:54 PM
Using AllHulls does nothing. It shows added 0 ships to storage. Using the other add all commands work but that one for some reason.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: TalRaziid on January 29, 2023, 05:29:20 PM
What is the command for listing/adding hullmods or their BPs?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: OldPayphone on February 02, 2023, 07:54:52 PM
Mod also does not work with list ships.

Mod overall needs a better way to find any ship you want, especially with modded ships. I would like to play with ships from mods but they are hard to find and this mod you would think would make it possible but sadly doesn't.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Killsode on February 02, 2023, 10:30:14 PM
Mod also does not work with list ships.

eh? are you sure you've got a functioning version becase "List ships" should work perfectly, if you do "list ships -filter-" it'll only show things that have that filter in either its hullid or its name.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Bulletkin on February 03, 2023, 09:50:12 AM
Mod also does not work with list ships.

eh? are you sure you've got a functioning version becase "List ships" should work perfectly, if you do "list ships -filter-" it'll only show things that have that filter in either its hullid or its name.

Might be an incompatibility with concord. Had a similar issue with 'list ships', and removing concord fixed it.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Ysf94 on February 03, 2023, 09:56:33 AM
Can someone help me. I Get "The Console overlay encountered an error and was destroyed: java.lang.IllegalStateException: Function is not supported"  when I press control + backspace. this happens only with the latest version (2021.12.25). I tried to start a new game with only console commands and lazylib 2.7b enabled but it still wont work.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Megadagik on February 08, 2023, 11:33:12 PM
Gonna read back but, is there a command for giving yourself story points? Used mine to  escape a (REDACTED) infested system, used like 10 and  its irritating me
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: st0mpa on February 12, 2023, 09:52:16 AM
I cannot find one but is there a conamd for giving yourself administraitors like there is regular officers?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: TechSupportScammer on February 19, 2023, 07:11:04 PM
Hello fellow spacers!

I have been on a modded playthrough of starsector with many mods including the console commands mod.

I have been using TASC (terraforming and station construction) mod to colonise stations.
however, i was wondering if there was a way to add markets to abandoned stations (or, more specifically, the "makeshift_station" customentity so that i can use TASC's "colonise abandoned station" ability to do exactly that.

The problem as of now is that the spawned-in station (using other console commands found on this great thread) cannot be colonised due to -after having looked at the code of TASC- needing a station that has been decivilised/abandoned, or at least a station having been colonised prior to it being abandoned/decivilised.
(The makeshift_station CustomEntities cannot be colonised due to possibly this reason, or because they don't have a market at all...yeah probably that...)

I was hoping someone could help me with a console command to either : add a market to stations, or perhaps trigger a pirate/pather base construction event at the designated star-system...
(Another important thing is that i can only take-over the temporary bases of pirates and pathers by using the "DestroyColony" console command - which is not great because it breaks the slim veil of immersion i long for, but also calls me a monster each time i do it...)

So, yeah...
if anyone has cracked the code to adding markets to Market-less stations, or other CustomEntities, could someone kindly help me ?


Unrelated to all this, I was wondering if somebody knew how to spawn/create a remnant nexus at the player's fleet location...

thank you all very kindly,
a pleasure to be a part of the community of this great game !
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Histidine on February 20, 2023, 07:01:22 AM
I was hoping someone could help me with a console command to either : add a market to stations, or perhaps trigger a pirate/pather base construction event at the designated star-system...
Turned out to be a two-liner (tested on Telepylus Station), although I haven't checked if this makes it colonizable with TASC. Also the dialog description may be a bit weird afterwards.
Run when docked with the station:
Code: java
runcode SectorEntityToken entity = Global.getSector().getCampaignUI().getCurrentInteractionDialog().getInteractionTarget();
Misc.setAbandonedStationMarket(entity.getId(), entity);
Quote
Unrelated to all this, I was wondering if somebody knew how to spawn/create a remnant nexus at the player's fleet location...

Quick and dirty port, generates an undamaged Remnant station that starts spawning fleets after about a day.
Spoiler
Code: java
runcode import com.fs.starfarer.api.impl.campaign.fleets.FleetFactoryV3;
import com.fs.starfarer.api.impl.campaign.procgen.themes.BaseThemeGenerator;
import com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantOfficerGeneratorPlugin;
import com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantThemeGenerator;
import com.fs.starfarer.api.util.DelayedActionScript;
import com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantStationFleetManager;

String type = "remnant_station2_Standard";
Random random = new Random();
final CampaignFleetAPI fleet = FleetFactoryV3.createEmptyFleet(Factions.REMNANTS, FleetTypes.BATTLESTATION, null);

FleetMemberAPI member = Global.getFactory().createFleetMember(FleetMemberType.SHIP, type);
fleet.getFleetData().addFleetMember(member);

fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_AGGRESSIVE, true);
fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_NO_JUMP, true);
fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_ALLOW_DISENGAGE, true);
fleet.addTag(Tags.NEUTRINO_HIGH);

fleet.setStationMode(true);

RemnantThemeGenerator.addRemnantStationInteractionConfig(fleet);

fleet.clearAbilities();
fleet.addAbility(Abilities.TRANSPONDER);
fleet.getAbility(Abilities.TRANSPONDER).activate();
fleet.getDetectedRangeMod().modifyFlat("gen", 1000f);

fleet.setAI(null);

/*RemnantThemeGenerator.setEntityLocation(fleet, loc, null);
RemnantThemeGenerator.convertOrbitWithSpin(fleet, 5f);*/
final LocationAPI loc = Global.getSector().getCurrentLocation();
loc.addEntity(fleet);
CampaignFleetAPI player = Global.getSector().getPlayerFleet();
fleet.setLocation(player.getLocation().x, player.getLocation().y);

boolean damaged = type.toLowerCase().contains("damaged");
String coreId = Commodities.ALPHA_CORE;
if (damaged) {
fleet.getMemoryWithoutUpdate().set("$damagedStation", true);
fleet.setName(fleet.getName() + " (Damaged)");
}

AICoreOfficerPlugin plugin = Misc.getAICoreOfficerPlugin(coreId);
PersonAPI commander = plugin.createPerson(coreId, fleet.getFaction().getId(), random);

fleet.setCommander(commander);
fleet.getFlagship().setCaptain(commander);

if (!damaged) {
RemnantOfficerGeneratorPlugin.integrateAndAdaptCoreForAIFleet(fleet.getFlagship());
RemnantOfficerGeneratorPlugin.addCommanderSkills(commander, fleet, null, 3, random);
}

member.getRepairTracker().setCR(member.getRepairTracker().getMaxCR());

loc.addScript(new DelayedActionScript(1) {
@Override
public void doAction() {
int maxFleets = 10; /* close enough */
RemnantStationFleetManager activeFleets = new RemnantStationFleetManager(
fleet, 1f, 0, maxFleets, 15f, 8, 24);
loc.addScript(activeFleets);
}
});
[close]
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: TechSupportScammer on February 20, 2023, 06:47:34 PM
I was hoping someone could help me with a console command to either : add a market to stations, or perhaps trigger a pirate/pather base construction event at the designated star-system...
Turned out to be a two-liner (tested on Telepylus Station), although I haven't checked if this makes it colonizable with TASC. Also the dialog description may be a bit weird afterwards.
Run when docked with the station:
Code: java
runcode SectorEntityToken entity = Global.getSector().getCampaignUI().getCurrentInteractionDialog().getInteractionTarget();
Misc.setAbandonedStationMarket(entity.getId(), entity);
Quote
Unrelated to all this, I was wondering if somebody knew how to spawn/create a remnant nexus at the player's fleet location...

Quick and dirty port, generates an undamaged Remnant station that starts spawning fleets after about a day.
Spoiler
Code: java
runcode import com.fs.starfarer.api.impl.campaign.fleets.FleetFactoryV3;
import com.fs.starfarer.api.impl.campaign.procgen.themes.BaseThemeGenerator;
import com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantOfficerGeneratorPlugin;
import com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantThemeGenerator;
import com.fs.starfarer.api.util.DelayedActionScript;
import com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantStationFleetManager;

String type = "remnant_station2_Standard";
Random random = new Random();
final CampaignFleetAPI fleet = FleetFactoryV3.createEmptyFleet(Factions.REMNANTS, FleetTypes.BATTLESTATION, null);

FleetMemberAPI member = Global.getFactory().createFleetMember(FleetMemberType.SHIP, type);
fleet.getFleetData().addFleetMember(member);

fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_AGGRESSIVE, true);
fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_NO_JUMP, true);
fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_ALLOW_DISENGAGE, true);
fleet.addTag(Tags.NEUTRINO_HIGH);

fleet.setStationMode(true);

RemnantThemeGenerator.addRemnantStationInteractionConfig(fleet);

fleet.clearAbilities();
fleet.addAbility(Abilities.TRANSPONDER);
fleet.getAbility(Abilities.TRANSPONDER).activate();
fleet.getDetectedRangeMod().modifyFlat("gen", 1000f);

fleet.setAI(null);

/*RemnantThemeGenerator.setEntityLocation(fleet, loc, null);
RemnantThemeGenerator.convertOrbitWithSpin(fleet, 5f);*/
final LocationAPI loc = Global.getSector().getCurrentLocation();
loc.addEntity(fleet);
CampaignFleetAPI player = Global.getSector().getPlayerFleet();
fleet.setLocation(player.getLocation().x, player.getLocation().y);

boolean damaged = type.toLowerCase().contains("damaged");
String coreId = Commodities.ALPHA_CORE;
if (damaged) {
fleet.getMemoryWithoutUpdate().set("$damagedStation", true);
fleet.setName(fleet.getName() + " (Damaged)");
}

AICoreOfficerPlugin plugin = Misc.getAICoreOfficerPlugin(coreId);
PersonAPI commander = plugin.createPerson(coreId, fleet.getFaction().getId(), random);

fleet.setCommander(commander);
fleet.getFlagship().setCaptain(commander);

if (!damaged) {
RemnantOfficerGeneratorPlugin.integrateAndAdaptCoreForAIFleet(fleet.getFlagship());
RemnantOfficerGeneratorPlugin.addCommanderSkills(commander, fleet, null, 3, random);
}

member.getRepairTracker().setCR(member.getRepairTracker().getMaxCR());

loc.addScript(new DelayedActionScript(1) {
@Override
public void doAction() {
int maxFleets = 10; /* close enough */
RemnantStationFleetManager activeFleets = new RemnantStationFleetManager(
fleet, 1f, 0, maxFleets, 15f, 8, 24);
loc.addScript(activeFleets);
}
});
[close]

Thanks a million Histidine !
I tried both of these out and they work like a charm!
(It works perfectly with TASC's abandoned station colonisation too ! )
Finally i can craft the custom sector scenarios in-game to watch factions duke it out for my roleplaying satisfaction.

Big fan of your work with Nexerelin and all your help with other things and mods that i cannot even begin to list.
Here's to you and starsector, the community and the future !

- The Jimbo's Bimbos,
Captain Jimbongulous Spitte

(https://i.postimg.cc/BvRSfKmx/screenshot000.png)


Glorious Chaos !
(https://i.postimg.cc/fbPLWFRS/screenshot002.png)
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Gold on March 05, 2023, 07:51:22 PM
There's this item that i forgot belonged to what mod called the transpoofer, essentially for four days it'll trick other fleets into thinking you belong to a certain fraction when you turn ur transponder on. However I did this with the Hegemony and it has permanently set my transponder to it, is there any way I can fix this?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Crowley_black on March 05, 2023, 10:53:20 PM
There's this item that i forgot belonged to what mod called the transpoofer, essentially for four days it'll trick other fleets into thinking you belong to a certain fraction when you turn ur transponder on. However I did this with the Hegemony and it has permanently set my transponder to it, is there any way I can fix this?
That is an item from the industrial revolution mod if I recall correctly, do you have the latest version of IndEvo? because from what I see in the forum and had tested out myself there is no problem with the transpoofer in the current latest version which is industrial evolution 3.2c
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: HopeFall on March 08, 2023, 10:34:15 AM
This might not be pretty. Might not have cool ships. Might have zero visuals. But it's the single greatest mod on this index. Thank you.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Malhavoc on March 10, 2023, 11:42:33 AM
So does anyone know what the runcode is to add certain hullmods to ships, without making them into permamods?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: OmegaReaper on March 23, 2023, 11:50:32 AM
Hello New player here,

I downloaded LazyLib 2.7b and the recent Console Commands v2021.12.25 via nexus mods on vortex launcher with the current StarSector Support 1.3.0 extension added.

Now I enable LazyLib via the mod section on startup screen, it says it requires game version 0.95 ta-RC3 but current game version is 0.95 ta-RC6, it looks like an A but could be O. It gives me a warning saying it might work in this version. Control + Backspace does not work. Any help would be appreciated.
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Millard on March 28, 2023, 07:49:26 AM
is it possible to change the faction of a colony through the console commands?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Dadada on April 02, 2023, 02:40:48 AM
is it possible to change the faction of a colony through the console commands?
Examples should be something like that but the "help setmarketowner" should give you what you need:
setmarketowner Willard_Station Legio_Infernalis
setmarketowner Rubaiz player
setmarketowner Zaebzi_outpost Scy_Nation
SetMarketOwner Char ORA
or
SetMarketOwner Char O.R.A
and so on

Also capitalization: SetMarketOwner but ehh...
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Lawrence Master-blaster on April 18, 2023, 08:48:21 PM
Is there a way to use the mod to spawn the omega bounty fleet, or at least forcefully trigger the mission again?

Is there a way to spawn mercenary officers?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Kothyxaan on April 21, 2023, 12:54:11 PM
I was hoping someone could help me with a console command to either : add a market to stations, or perhaps trigger a pirate/pather base construction event at the designated star-system...
Turned out to be a two-liner (tested on Telepylus Station), although I haven't checked if this makes it colonizable with TASC. Also the dialog description may be a bit weird afterwards.
Run when docked with the station:
Code: java
runcode SectorEntityToken entity = Global.getSector().getCampaignUI().getCurrentInteractionDialog().getInteractionTarget();
Misc.setAbandonedStationMarket(entity.getId(), entity);
Quote
Unrelated to all this, I was wondering if somebody knew how to spawn/create a remnant nexus at the player's fleet location...

Quick and dirty port, generates an undamaged Remnant station that starts spawning fleets after about a day.
Spoiler
Code: java
runcode import com.fs.starfarer.api.impl.campaign.fleets.FleetFactoryV3;
import com.fs.starfarer.api.impl.campaign.procgen.themes.BaseThemeGenerator;
import com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantOfficerGeneratorPlugin;
import com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantThemeGenerator;
import com.fs.starfarer.api.util.DelayedActionScript;
import com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantStationFleetManager;

String type = "remnant_station2_Standard";
Random random = new Random();
final CampaignFleetAPI fleet = FleetFactoryV3.createEmptyFleet(Factions.REMNANTS, FleetTypes.BATTLESTATION, null);

FleetMemberAPI member = Global.getFactory().createFleetMember(FleetMemberType.SHIP, type);
fleet.getFleetData().addFleetMember(member);

fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_AGGRESSIVE, true);
fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_NO_JUMP, true);
fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_ALLOW_DISENGAGE, true);
fleet.addTag(Tags.NEUTRINO_HIGH);

fleet.setStationMode(true);

RemnantThemeGenerator.addRemnantStationInteractionConfig(fleet);

fleet.clearAbilities();
fleet.addAbility(Abilities.TRANSPONDER);
fleet.getAbility(Abilities.TRANSPONDER).activate();
fleet.getDetectedRangeMod().modifyFlat("gen", 1000f);

fleet.setAI(null);

/*RemnantThemeGenerator.setEntityLocation(fleet, loc, null);
RemnantThemeGenerator.convertOrbitWithSpin(fleet, 5f);*/
final LocationAPI loc = Global.getSector().getCurrentLocation();
loc.addEntity(fleet);
CampaignFleetAPI player = Global.getSector().getPlayerFleet();
fleet.setLocation(player.getLocation().x, player.getLocation().y);

boolean damaged = type.toLowerCase().contains("damaged");
String coreId = Commodities.ALPHA_CORE;
if (damaged) {
fleet.getMemoryWithoutUpdate().set("$damagedStation", true);
fleet.setName(fleet.getName() + " (Damaged)");
}

AICoreOfficerPlugin plugin = Misc.getAICoreOfficerPlugin(coreId);
PersonAPI commander = plugin.createPerson(coreId, fleet.getFaction().getId(), random);

fleet.setCommander(commander);
fleet.getFlagship().setCaptain(commander);

if (!damaged) {
RemnantOfficerGeneratorPlugin.integrateAndAdaptCoreForAIFleet(fleet.getFlagship());
RemnantOfficerGeneratorPlugin.addCommanderSkills(commander, fleet, null, 3, random);
}

member.getRepairTracker().setCR(member.getRepairTracker().getMaxCR());

loc.addScript(new DelayedActionScript(1) {
@Override
public void doAction() {
int maxFleets = 10; /* close enough */
RemnantStationFleetManager activeFleets = new RemnantStationFleetManager(
fleet, 1f, 0, maxFleets, 15f, 8, 24);
loc.addScript(activeFleets);
}
});
[close]

THANK YOU KINDLY! This is something I was looking for for a long time!
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Moth on May 04, 2023, 09:59:07 AM
Is there a way to change how a planet looks? Im trying to change a cryovulcanic world to just a vulcanic one (cuz i need a very hot planet and i use a excuse of "the nearby gas giant with the plasma dynamo has had a malfunction and scorched the orbiting cryovulcanic world" for cheating). So far i changed the conditions (added very hot and meteor impacts) but i still can't figure out how to change the planet type or appearance. Could anyone help with this?
Title: Re: [0.95.1a] Console Commands v2021.12.25
Post by: Histidine on May 05, 2023, 05:05:58 AM
Is there a way to change how a planet looks? Im trying to change a cryovulcanic world to just a vulcanic one (cuz i need a very hot planet and i use a excuse of "the nearby gas giant with the plasma dynamo has had a malfunction and scorched the orbiting cryovulcanic world" for cheating). So far i changed the conditions (added very hot and meteor impacts) but i still can't figure out how to change the planet type or appearance. Could anyone help with this?
Need to change and apply the planet spec. Test runcode using code cribbed from TASC, copy and paste into console:

Spoiler
Code: java
runcode import com.fs.starfarer.loading.specs.PlanetSpec;
MarketAPI market = Global.getSector().getCampaignUI().getCurrentInteractionDialog().getInteractionTarget().getMarket();
    {
        String newPlanetType = "terran";    /* set your desired planet type here, look at planets.json for IDs */
        PlanetSpecAPI myspec = market.getPlanetEntity().getSpec();
        Iterator allSpecs = Global.getSettings().getAllPlanetSpecs().iterator();
        while(allSpecs.hasNext())
        {
            PlanetSpecAPI spec = (PlanetSpecAPI)allSpecs.next();
            if (spec.getPlanetType().equals(newPlanetType))
            {
                myspec.setAtmosphereColor(spec.getAtmosphereColor());
                myspec.setAtmosphereThickness(spec.getAtmosphereThickness());
                myspec.setAtmosphereThicknessMin(spec.getAtmosphereThicknessMin());
                myspec.setCloudColor(spec.getCloudColor());
                myspec.setCloudRotation(spec.getCloudRotation());
                myspec.setCloudTexture(spec.getCloudTexture());
                myspec.setGlowColor(spec.getGlowColor());
                myspec.setGlowTexture(spec.getGlowTexture());
                myspec.setIconColor(spec.getIconColor());
                myspec.setPlanetColor(spec.getPlanetColor());
                myspec.setStarscapeIcon(spec.getStarscapeIcon());
                myspec.setTexture(spec.getTexture());
                myspec.setUseReverseLightForGlow(spec.isUseReverseLightForGlow());
                ((PlanetSpec)myspec).planetType = newPlanetType;
                ((PlanetSpec)myspec).name = spec.getName();
                ((PlanetSpec)myspec).descriptionId = ((PlanetSpec)spec).descriptionId;
                break;
            }
        }
        market.getPlanetEntity().applySpecChanges();
        market.getPlanetEntity().setTypeId(newPlanetType);
        // rest is just updating market conditions
}
[close]
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: LazyWizard on May 05, 2023, 11:40:25 AM
There's a new dev version out that fixes some compatibility issues with 0.96a. Grab it here (https://github.com/LazyWizard/console-commands/releases/download/2023.05.05/Console_Commands_2023.5.05.zip).
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: lobosan on May 08, 2023, 09:36:55 PM
Thank you for the update!
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: sycspysycspy on May 09, 2023, 10:45:50 PM
Pressing 'M' would spawn a ship wrackage nearby in which you could find all the blueprints and a bunch AI Cores? I am not sure what is the cause of this, seems to be the console commands.

I have 4 mods enabled:
LazyLib
Combat Radar
Graphicslib
Console Commands


P.S. I checked again, it seems that the issue has nothing to do with console command. I somehow enalbed devMode (but I can't remember why and how did I enable it).
Edit: I have checked again, it's not me who changed the setting and enabled the DevMode, something happened and the DevMode is enabled all by itself and I have no clue how.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Darkspire91 on May 11, 2023, 07:20:18 PM
I'm having an issue when I press ctrl + backspace. The game just closes, no error window to check the logs. Tried redownloading the mod, removed the clear commands mod, removed all mods but 'console commands'. No dice.

EDIT: Went with the nuclear option and just completely re-installed Starsector. That did the trick.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Ranger Dimitri on May 14, 2023, 05:44:29 PM
Where does one download the 0.95 version of the mod? A number of people would no doubt be playing the older version for at least a bit longer while the mods continue to update and bugfixes are done for 0.96 still. Myself included.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: tantananan on May 15, 2023, 01:22:31 AM
I'm having an issue when I press ctrl + backspace. The game just closes, no error window to check the logs. Tried redownloading the mod, removed the clear commands mod, removed all mods but 'console commands'. No dice.

EDIT: Went with the nuclear option and just completely re-installed Starsector. That did the trick.

Happened to me too. I can also confirm that reinstalling the game fixed it. thanks!
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: DanzyDanz on May 21, 2023, 07:30:51 AM
Is there a way to add a specific skills to an officer?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: DuoTian on May 22, 2023, 05:42:43 PM
Hello!
Is there a way to spawn abandoned station (in fleet position if possible)?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: SyndrianStan on June 01, 2023, 06:55:28 PM
Is there anyway to use the commands provided in this mod and is it compatible still?
https://fractalsoftworks.com/forum/index.php?topic=19210.0
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: mrpras on June 10, 2023, 06:36:49 AM
Could it be possible to create timed command aliases which are triggered regularly or at specific points in game?

Examples would be gamestart, combatstart, daily, monthly, annual, levelup

For example at gamestart I might want to run a custom script which removes the hegemony from the game, converting them to remnant (AI won the war lol)

Code
alias removehegemony setmarketowner eventide remnant; setmarketowner sphinx remnant; setmarketowner tigra_city remnant; setmarketowner citadel_arcadia remnant; setmarketowner nirut remnant; setmarketowner ancyra remnant; setmarketowner jangala remnant; setmarketowner holtz_refining_company remnant; setmarketowner chicomoztoc remnant; setmarketowner coatl remnant; setmarketowner yama remnant; setmarketowner nachketa remnant; setmarketowner raesvelg remnant; setmarketowner ragnar_complex remnant; setmarketowner l4_asgard_orbital_complex remnant; setmarketowner chibog_outpost remnant; setmarketowner carthage remnant

So my "gamestart alias" might have this command, an addhullmod, infinitefuel or whatever else.

My "daily alias" might have a command to reset colony threat to zero for example. My monthly might have a command to reset a specific relationship (forcing pirates to +100 or something similar for example).

Note these examples might not be useful for you, this isn´t a post about cheating using the console. But I can imagine daily and monthly aliases could be useful to enforce or workaround certain conditions in the game and I for one would find them extremely useful.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Opera on June 12, 2023, 02:26:37 PM
Attempting to respec level 1 officer results in Null pointer exception:

Code
INFO  org.lazywizard.console.Console  - > respec Dennis Vaughn
INFO  org.lazywizard.console.Console  - Performing respec of Dennis Vaughn...
ERROR org.lazywizard.console.Console  - Failed to execute command "respec Dennis Vaughn" in context CAMPAIGN_MAP
java.lang.NullPointerException
   [starfarer.api.jar]   at com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.pickSkill(OfficerManagerEvent.java:610)
   [starfarer.api.jar]   at com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.createOfficer(OfficerManagerEvent.java:508)
   [lw_Console.jar]   at org.lazywizard.console.commands.Respec.respecOfficer(Respec.java:32)
   [lw_Console.jar]   at org.lazywizard.console.commands.Respec.runCommand(Respec.java:140)
   [lw_Console.jar]   at org.lazywizard.console.Console.runCommand(Console.java:328)
   [lw_Console.jar]   at org.lazywizard.console.Console.parseInput(Console.java:382)
   [lw_Console.jar]   at org.lazywizard.console.ConsoleOverlayInternal.checkInput(ConsoleOverlay.kt:469)
   [lw_Console.jar]   at org.lazywizard.console.ConsoleOverlayInternal.show(ConsoleOverlay.kt:218)
   [lw_Console.jar]   at org.lazywizard.console.ConsoleOverlay.show(ConsoleOverlay.kt:48)
   [lw_Console.jar]   at org.lazywizard.console.ConsoleCampaignListener.processCampaignInputPreCore(ConsolePlugins.kt:19)
   [starfarer.api.jar]   at com.fs.starfarer.api.campaign.listeners.ListenerUtil.processCampaignInputPreCore(ListenerUtil.java:59)
   [starfarer_obf.jar]   at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source)
   [starfarer_obf.jar]   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   [fs.common_obf.jar]   at com.fs.state.AppDriver.begin(Unknown Source)
   [starfarer_obf.jar]   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   [starfarer_obf.jar]   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   [starfarer_obf.jar]   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   [core Java]   at java.lang.Thread.run(Thread.java:748)

I debugged this and it seems the problem is that respec command calls OfficerManagerEvent.createOfficer with pref argument being null, while pickSkill function which gets passed this argument expects it to be an instance of SkillPickPreference.


Title: Re: [0.96a] Console Commands v2023.05.05
Post by: BoogieMan on June 17, 2023, 10:09:33 AM
Planets added with "Spawn Planet" don't appear to be functioning for me. They don't show up on the colony list, have not met demands even if I manually supply them, and building set to be built do not progress. They don't even show that the system has a comm relay, although it does.

Did I do something wrong? Is there a way to fix this?

EDIT: As far as I can tell, using the "SpawnPlanet" is the culprit because all of the planets spawned by it are named "planet_0" and even renaming them afterwards doesn't fix them. The same thing happens if I use another spawn script I found but neglect to change the name and spawn more than 1 planet with the same name.

I could be misusing SpawnPlanet, maybe you can add flags afterwards, but I'd figured I'd leave this here in case someone else ends up finding this informative.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: lai03 on June 26, 2023, 04:28:25 AM
Is there any way to spawn special items without doing it one at a time? Adding digits at the end of the command doesn't give you a stack of them.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Indie Winter on July 05, 2023, 08:11:53 AM
I'm trying to make it so certain planets will not get invaded by existing factions, much like there's an option for to exclude markets that are present at the start of the game from invasion using the boolean settings in nex. Can something like that be done via the console commands? I ask because I'm trying to hand certain planets over to the Vayra Sector factions (as they no longer spawn on their own in 0.96) and enable them to survive without getting immediately swarmed by every other AI faction
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: LazyWizardPlsIWilLuvU4Eva on July 12, 2023, 03:53:51 AM
Suggestion: currently the AddOfficer command can only create male officers, would be good to be able to choose gender, it has effects on dialogue and stuff.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Selfcontrol on July 12, 2023, 09:11:16 AM
Suggestion: currently the AddOfficer command can only create male officers, would be good to be able to choose gender, it has effects on dialogue and stuff.

Addofficer does not only create male officer. It's random. I use it from time to time and I get female officers (female name and portrait) too.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: FlareFluffsune on July 13, 2023, 05:19:39 AM
Can I use this to complete missions quickly?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Mikomikomiko on July 14, 2023, 10:02:18 PM
Suggestion: currently the AddOfficer command can only create male officers, would be good to be able to choose gender, it has effects on dialogue and stuff.

Addofficer does not only create male officer. It's random. I use it from time to time and I get female officers (female name and portrait) too.

I believe the person above you meant with regards to the campaign.xml where the new officer will have

g="MALE"></n>

regardless of portrait and name when you open the save file
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: d_ted on July 15, 2023, 07:23:02 PM
Howdy;

You probably though about it but I'm gonna' write it anyway.

It would be awesome to use UP (and DOWN) key to... uuum... search previous (and next with DOWN) commands we wrote before. I don't know how but -for example- Crusader Kings 2 and 3 save your commands on a text file and bring them back even if you quit and restart the game a year later. Cool ehh? ;D
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: GriffinMan on July 20, 2023, 04:18:40 AM
Hi, I'm currently trying to get a multi-moon planet to spawn as a test but every time I try I just get a "java.lang.NullPointerException" error and I only get a single planet with one moon and I'm not sure why (Being fair, I have no coding experience and am hacking this together by looking at other code that worked and trying to expand this. 
For reference:
Spoiler
Code
runcode import com.fs.starfarer.api.util.Misc; String planetName = "Invictus"; String moonName = "Vitae"; String moon2Name = "Neptunia"; String moon3Name = "Nidvallir"; float planetOrbitDays = 180; float planetSize = 200; float moonOrbitRadius = planetSize * 4; float moonRadius = planetSize / 4; float moonOrbitDays = 40; float moon2OrbitRadius = planetSize * 6; float moon2Radius = planetSize / 6; float moon2OrbitDays = 60; float moon3OrbitRadius = planetSize * 8; float moon3Radius = planetSize / 6; float moon3OrbitDays = 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); PlanetAPI moon2 = sys.addPlanet(moon2Name, planet, moon2Name, "ocean", 0, moon2Radius, moon2OrbitRadius, moon2OrbitDays); market = sys.getEntityById(moon2Name).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, moon2OrbitRadius, moon2OrbitDays); sys.addCustomEntity(null, null, "nav_buoy", "player").setCircularOrbitPointingDown(planet, 180, moon2OrbitRadius, moon2OrbitDays); sys.addCustomEntity(null, null, "sensor_array", "player").setCircularOrbitPointingDown(planet, 270, moon2OrbitRadius, moon2OrbitDays); PlanetAPI moon3 = sys.addPlanet(moonName, planet, moonName, "barren", 0, moon3Radius, moon3OrbitRadius, moon3OrbitDays); market = sys.getEntityById(moon3Name).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, moon3OrbitRadius, moon3OrbitDays); sys.addCustomEntity(null, null, "nav_buoy", "player").setCircularOrbitPointingDown(planet, 180, moon3OrbitRadius, moon3OrbitDays); sys.addCustomEntity(null, null, "sensor_array", "player").setCircularOrbitPointingDown(planet, 270, moon3OrbitRadius, moon3OrbitDays);
[close]
Title: Re: [0.95a] Console Commands v2021.03.27
Post by: Ed Wood on July 25, 2023, 01:40:19 AM
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.
Is there a way to run this without spawning the nav buoy and such? I tried deleting the parts that spawn them, but keep getting a nullpointer error. Also, is there a way to spawn the solar array entities in orbit?

Any progress with the solar array?
I also like to know how to spawn solar array to a planet...
PLOX beautiful people of mass editing solve this problem to me!
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: ZeroXSEED on July 27, 2023, 08:18:47 AM
Spawning a gas giant:

Code
runcode import com.fs.starfarer.api.util.Misc; String planetName = "Gigantus"; float planetOrbitDays = 2000; float planetSize = 300;  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, "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");

Spawning a coronal tap:

Code
runcode import com.fs.starfarer.api.util.Misc; String planetName = "Gigantus"; 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); sys.addCustomEntity(null, null, "coronal_tap", null).setCircularOrbitPointingDown(star, angleCCW, orbitRadius, 360);

I am author of coronal tap one, but couldn't figure out how to make the special effects work... the game rules effect work fine ,but you won't see the star glowing more and the gas flowing like you see in systems where the tap was generated on game start.

Hey speeder, does the same command can spawn ice giant?
Title: Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
Post by: Kat on August 05, 2023, 09:30:39 AM
Is there an equivalent command to the one in Nexerelin to change the owner of a planet ?

What I want to do is to populate a few more of the moons and planets, and give them to various factions.

There is not, though it'd be easy to add one. I'll add it to the todo list.

Any word on this ?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Jack Ardan on August 05, 2023, 12:56:42 PM
Is there a way to make bounty missions that i accepted

go from 120 days to 240 days ?
(make it not expire)
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: devildrive04 on August 17, 2023, 02:10:21 PM
Is there a command to copy and paste codes from the forums to the game?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Wyvern on August 17, 2023, 03:38:42 PM
Is there a command to copy and paste codes from the forums to the game?
control-v will paste the contents of the OS-level clipboard into console commands' console. Copying from the forum to the OS-level clipboard is OS-dependent, however; in many cases that will be control-c, but it might also be command-c, depending.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: DerkaDur on August 19, 2023, 08:49:41 PM
Is there a command that lets you find a derelict ship, like the Halbmond from Tahlan? I tried toying around but I'm not sure what command would tell me its location on the map.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: SpaceDrake on August 19, 2023, 09:42:14 PM
Here's a bit of an odd one: is there a known console command or runcode for assigning a Vayra's Sector bounty-on-player to the player on demand? It's something I'd like to do as part of a challenge run I have in mind.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Kadatherion on August 20, 2023, 03:05:36 AM
Is there a command that lets you find a derelict ship, like the Halbmond from Tahlan? I tried toying around but I'm not sure what command would tell me its location on the map.

Not here, but there's one in the ship browser mod (which itself was part of another console addon mod that got merged into that). BUT I've got to add the command, which has worked perfectly fine in my older runs, breaks in my current one. It does list some of the derelicts before stopping for a java error, which leads me to believe it probably is a faulty mod interaction rather than an issue with the command per se, but it also means your mileage may vary depending on your modlist.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: DerkaDur on August 21, 2023, 10:40:05 PM
Oh cool, is that the SCVE mod?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Kadatherion on August 21, 2023, 10:53:17 PM
Oh cool, is that the SCVE mod?

Nope, it's this one: https://fractalsoftworks.com/forum/index.php?topic=26261.0

The command is FindDerelict.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: newsundrawnshadow on August 25, 2023, 05:18:47 AM
Hey I was using this recently (Hate supply issues) I noticed that upon continuing a game the commands are not maintained between save and load was wondering if there was plans to allow that it would be nice also in Infinite CP could be used on the whole fleet or selected ships.

I hope you have a good day/night
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: 102HLZ on August 25, 2023, 09:09:48 PM
Excuse me sir,may I have the courtesy to upload this mod to Chinese Starsector forum (https://www.fossic.org/forum.php)?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: TheLord999 on September 05, 2023, 09:39:21 AM
Hello, hello, this mod is super useful though I have a quick question, some modded bounties don't span, even if I met the requirement for it to spawn, so is there a command that force the dialogue the bounty to start (no matter the place)/forcefully activate the bounty, thank you in advance.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: rogerbacon on September 05, 2023, 05:01:17 PM
I've loved this mod for many years and have made a few commands but I'm trying to add one now and it is not working.

I'm trying to create a command that adds a DamageDealtModifier listener to a ship. Currently it mods the ship in other ways and it's working fine but when I add the code for the DamageDealtModifier listener something is wrong and it doesn't appear in the list of registered commands.

I'm adding this listener
Code
public static class HighScatterAmpDamageDealtMod implements DamageDealtModifier {
protected ShipAPI ship;
public HighScatterAmpDamageDealtMod(ShipAPI ship) {
this.ship = ship;
}

public String modifyDamageDealt(Object param,
    CombatEntityAPI target, DamageAPI damage,
    Vector2f point, boolean shieldHit) {

if (!(param instanceof DamagingProjectileAPI) && param instanceof BeamAPI) {
damage.setForceHardFlux(true);
}

return null;
}
}

and I'm calling it in the runCommand method with
ship.addListener(new HighScatterAmpDamageDealtMod(ship));

Any idea why it isn't working?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Deadbeat Duahia on September 17, 2023, 11:51:33 AM
Does anybody know the console command to get rid rid of extreme heat on a planet?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: n3xuiz on September 17, 2023, 12:23:34 PM
Does anybody know the console command to get rid rid of extreme heat on a planet?
removecondition extreme_heat

you can find the names of conditions with list conditions
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Deadbeat Duahia on September 17, 2023, 12:25:31 PM
Does anybody know the console command to get rid rid of extreme heat on a planet?
removecondition extreme_heat

you can find the names of conditions with list conditions

Oh, well that was simple, thanks!
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: w00d on September 20, 2023, 12:15:09 AM
game regularly crashes after i created a planet and then try open the planet fleet storage.

did i break my game? :p

252187 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at org.niatahl.tahlan.hullmods.barcodes.Wrath.advanceInCampaign(Wrath.kt:24)
   at com.fs.starfarer.campaign.fleet.FleetData.syncIfNeeded(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetData.sort(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetData.sort(Unknown Source)
   at com.fs.starfarer.coreui.intsuper.  0000(Unknown Source)
   at com.fs.starfarer.coreui.intsuper.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.n.buttonPressed(Unknown Source)
   at com.fs.starfarer.ui.I. 00000(Unknown Source)
   at com.fs.starfarer.ui.I.processInput(Unknown Source)
   at com.fs.starfarer.ui.W.super(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: heh on September 22, 2023, 01:35:42 PM
i just set storage an a colony of mine and all of my stored ships dissapeared, ALL of them, many unique ones, some far too expensive ones

does anyone know how to fix this, or am i just supposed to reset my 10+ cycle run?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: RedDragon924 on September 27, 2023, 07:01:28 PM
Hey, does anyone know how to change the name of a planet with a code or in the code? I used a code a couple pages back to spawn a couple planets, forgetting to change the name on the copied code. I didn't think it'd be a problem but, now that I've colonized both planets, the game seems to think only one exists, weirdly putting the other on a permanent pause.

EDIT: Nevermind. Asked somewhere else and got an answer. Thanks to anybody who was looking into it.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Jazuke Taizago on October 05, 2023, 10:09:21 AM
Is it possible to add a Command that lets you add and remove various Skills, even from AI Cores and Mods to Player or perhaps other Officers in your Fleet? I saw a few people ask the same, at least two other ones and they never got a reply.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: blackvipermwg on October 09, 2023, 02:00:13 PM
Hi, why is that when you use God and InfiniteCR your ships still may end up disabled or destroyed and have poor performance due to low CR? Same with using Repair.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: TheGamer on October 16, 2023, 11:56:30 PM
Does anyone know how to spawn a remnant nexus?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Chester Stoned on October 31, 2023, 09:47:41 AM
Is there a way to adjust relation with specific NPC commanders? (mainly so I can speed thru the UAF and get to november auxillary lol)
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Addicted Starfarer on October 31, 2023, 10:31:21 AM
Is there a way to adjust relation with specific NPC commanders? (mainly so I can speed thru the UAF and get to november auxillary lol)

you don't need a command for this you can just open your save file via notepad++ and look for the name of the npc, you can basically figure what is what from how the code is made, forgot which stat code it is but it stays in proportion to the current relation you have if i remember correctly its in a decimal form value i.e. 27/100 = 0.27 hence 1.0 is 100
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: mortache on November 05, 2023, 08:23:49 AM
Any way to add Stellar shade and mirror array like Eventide and those spawning randomly sometimes? TASC mod only adds one or the other and I wanna try it vanilla
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Clockwokis on November 07, 2023, 07:35:40 PM
can i remove this mid save? i only want to use it for 1 annoying battle and dont want the temptation after
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: hobolyra on November 10, 2023, 10:22:15 PM
I can't seem to find it, but is there a way to target a ship you own and add a hullmod / built in? It only seems to target the planet or system I'm on, even when in the refit or fleet screen.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Histidine on November 11, 2023, 05:50:54 PM
can i remove this mid save? i only want to use it for 1 annoying battle and dont want the temptation after
You can yeah.

I can't seem to find it, but is there a way to target a ship you own and add a hullmod / built in? It only seems to target the planet or system I'm on, even when in the refit or fleet screen.
Doesn't exist in console, would need a runcode to add to a ship by name (which I'm too tired to write, but maybe someone else will).
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Obsidian Actual on November 13, 2023, 05:14:05 PM
I can't seem to find it, but is there a way to target a ship you own and add a hullmod / built in? It only seems to target the planet or system I'm on, even when in the refit or fleet screen.

For that, might I recommend you download Ship Browser (https://fractalsoftworks.com/forum/index.php?topic=26261.0) by itBeABruhMoment and look up the instructions for the AddHullMods console command.
(By making use of this forbidden console command you assume all liability for any resulting cheater's remorse, et cetera et cetera...)
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: ZanDraluss on November 14, 2023, 03:53:46 AM
Is there any command to add max logistic hull mod for fleet? Thank you.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Addicted Starfarer on November 14, 2023, 09:00:38 AM
Is there any command to add max logistic hull mod for fleet? Thank you.

hmm... i think you'll want to modify this inside the settings file in the base vanilla game, if i remember correctly this can be modified there
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Andrei123459 on December 16, 2023, 02:04:39 AM
why it does say that it is not supported?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: BallHauler on January 01, 2024, 05:18:16 PM
Is there a command to modify the coordinates of a system's anchor point in hyperspace? As well as those of its jump points
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: nerodarker on January 02, 2024, 05:08:07 PM
is there a command to add all colony improvement items or see a list of all the items?
 i installed a mod with extra colony improvements and want to add them to see what they all do.
Title: Re: [0.95a] Console Commands v2021.04.10
Post by: AmeliaWatson on January 09, 2024, 05:20:58 AM
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]

How do I change this to remove all S-mods instead?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: miu on January 26, 2024, 09:14:42 AM
Is there a command to remove suspicion from a colony? Volturn got taken over by the luddics and the suspicion level that I got after transfering heavy arms to the luddic shrine won't go away.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: nimtiz22 on February 06, 2024, 02:16:22 AM
is it safe to use with .97a?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: 3NN10_s0m3_R4V3N on February 06, 2024, 02:52:04 AM
is it safe to use with .97a?

I tried it and simply replaced the version requirement in the JSON file. So far, no problems occurred although I'd wait for an official update for this mod just to be on the safe side.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: nimtiz22 on February 06, 2024, 08:20:04 AM
is it safe to use with .97a?

I tried it and simply replaced the version requirement in the JSON file. So far, no problems occurred although I'd wait for an official update for this mod just to be on the safe side.
thanks will test for my end as well
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: jwarper on February 06, 2024, 06:53:18 PM
Any way to add Stellar shade and mirror array like Eventide and those spawning randomly sometimes? TASC mod only adds one or the other and I wanna try it vanilla

I am trying to do this as well.  I took a look at Hybrasil.java file to see how it is deployed for Eochu Bres, but have been unsuccessful so far.  I keep getting null pointer exception. 

Hope someone can shed some light on this:

Code
runcode PlanetAPI planet = (PlanetAPI) $loc.getEntityById("planet_5"); SectorEntityToken planet_mirror1 = $loc.addCustomEntity("planet_mirror1", "stellar mirror", "stellar_mirror", "neutral"); planet_mirror1.setCircularOrbitPointingDown(planet, 0, 220, 40); planet_mirror1.setCustomDescriptionId("stellar_mirror");
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: queen-of-moths on February 09, 2024, 04:34:10 AM
Any way to add Stellar shade and mirror array like Eventide and those spawning randomly sometimes? TASC mod only adds one or the other and I wanna try it vanilla

I am trying to do this as well.  I took a look at Hybrasil.java file to see how it is deployed for Eochu Bres, but have been unsuccessful so far.  I keep getting null pointer exception. 

Hope someone can shed some light on this:

Code
runcode PlanetAPI planet = (PlanetAPI) $loc.getEntityById("planet_5"); SectorEntityToken planet_mirror1 = $loc.addCustomEntity("planet_mirror1", "stellar mirror", "stellar_mirror", "neutral"); planet_mirror1.setCircularOrbitPointingDown(planet, 0, 220, 40); planet_mirror1.setCustomDescriptionId("stellar_mirror");

I was able to get it to work like this:

Code
RunCode SectorAPI sector = Global.getSector();
StarSystemAPI system = sector.getStarSystem("[star_id]");

SectorEntityToken mirror1 = system.addCustomEntity("mirror1", "Stellar Mirror Alpha", "stellar_mirror", "player");
mirror1.setCircularOrbitPointingDown(system.getEntityById("[planet_id]"), 0, 220, 40);
mirror1.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror2 = system.addCustomEntity("mirror2", "Stellar Mirror Beta", "stellar_mirror", "player");
mirror2.setCircularOrbitPointingDown(system.getEntityById("[planet_id]"), 120, 220, 40);
mirror2.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror3 = system.addCustomEntity("mirror3", "Stellar Mirror Gamma", "stellar_mirror", "player");
mirror3.setCircularOrbitPointingDown(system.getEntityById("[planet_id]"), 240, 220, 40);
mirror3.setCustomDescriptionId("stellar_mirror");

This creates a set of three mirrors around the planet, like Eochu Bres. Obivously, you need to change [star_id] and [planet_id] for their actual IDs.

You can get the star ID by running the command "list systems" and picking the appropriate name on the left.

You get the planet ID by going to the target system and running the command "list planets" and picking the appropriate value. Planet IDs are different to star IDs since they contains "system_xxx:" at the start, where it looks like each "x" is a hexadecimal number. My planet id for example was "system_d1a:planet_2". You can also get this value by running the Devmode command, interacting with the planet, and selecting Dump Memory - the value you want is $id.

You might want to change the names and IDs of the arrays you add to be easier to refer to as well.

This command doesn't actually add the market condition for a stellar array though, if you want that as well you should interact with the planet and run:

Code
AddCondition solar_array
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Sabatouer on February 09, 2024, 08:08:38 AM
Is there a method to resetting unique quests, specifically from mods?  I completely lost track of time and failed one, letting the duration run its course (skill issue, I know).
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Antichrist Hater on February 10, 2024, 05:17:48 PM
How do I get this mod working on the latest version?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Lawrence Master-blaster on February 11, 2024, 12:47:42 PM
How do I get this mod working on the latest version?

Change gameVersion in mod_info.json
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Not_A_Chinese_Spy on February 23, 2024, 01:27:51 AM
I seem to be encountering an issue where the text size seems to be increasing automatically
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: deveros77 on February 25, 2024, 09:33:25 PM
Any way to add Stellar shade and mirror array like Eventide and those spawning randomly sometimes? TASC mod only adds one or the other and I wanna try it vanilla


I was able to get it to work like this:

Code
RunCode SectorAPI sector = Global.getSector();
StarSystemAPI system = sector.getStarSystem("[star_id]");

SectorEntityToken mirror1 = system.addCustomEntity("mirror1", "Stellar Mirror Alpha", "stellar_mirror", "player");
mirror1.setCircularOrbitPointingDown(system.getEntityById("[planet_id]"), 0, 220, 40);
mirror1.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror2 = system.addCustomEntity("mirror2", "Stellar Mirror Beta", "stellar_mirror", "player");
mirror2.setCircularOrbitPointingDown(system.getEntityById("[planet_id]"), 120, 220, 40);
mirror2.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror3 = system.addCustomEntity("mirror3", "Stellar Mirror Gamma", "stellar_mirror", "player");
mirror3.setCircularOrbitPointingDown(system.getEntityById("[planet_id]"), 240, 220, 40);
mirror3.setCustomDescriptionId("stellar_mirror");

This creates a set of three mirrors around the planet, like Eochu Bres. Obivously, you need to change [star_id] and [planet_id] for their actual IDs.

You can get the star ID by running the command "list systems" and picking the appropriate name on the left.




i am doing this

Quote

RunCode SectorAPI sector = Global.getSector();
StarSystemAPI system = sector.getStarSystem("[penelope's star]");

SectorEntityToken mirror1 = system.addCustomEntity("mirror1", "Stellar Mirror Alpha", "stellar_mirror", "player");
mirror1.setCircularOrbitPointingDown(system.getEntityById("[penelope2]"), 0, 220, 40);
mirror1.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror2 = system.addCustomEntity("mirror2", "Stellar Mirror Beta", "stellar_mirror", "player");
mirror2.setCircularOrbitPointingDown(system.getEntityById("[penelope2]"), 120, 220, 40);
mirror2.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror3 = system.addCustomEntity("mirror3", "Stellar Mirror Gamma", "stellar_mirror", "player");
mirror3.setCircularOrbitPointingDown(system.getEntityById("[penelope2]"), 240, 220, 40);
mirror3.setCustomDescriptionId("stellar_mirror");


i am getting multiple errors (for every line) can you point me where and what am i doing wrong?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: TheLord999 on February 26, 2024, 02:30:44 AM
Hello Hello, so I have a pretty annoying bug. So I was doing modded bounties (the two bounties given by pirates in the scalarTech mod) and couldn't find the bounty fleets (and I mean it, I couldn't find either of them, I'm pretty sure I searched every pixel of the system they were in and nothing), I suppose some pirate/[REDACTED]/something form another mod came by and deleted the fleet, but the bounties were still up, that or the fleet didn't spawn at all, which fair. However, the biggest comes after when I try to reset the bounties, with the Magiclib_bountyreset, or something like I don't remember the command at the top of my head, and DELETED the bounty from the savefile I had to return to a previous save I did, just to be sure of what I saw. I suppose it is caused by how the bounty board works now. I just bringing it to your attention. I'm going to do a new game anyway since I'm going to add a lot of (faction) mods to the my game.
I thank you in advance if you manage to see what's causing the problem and solve it.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: queen-of-moths on February 26, 2024, 10:20:16 AM
Any way to add Stellar shade and mirror array like Eventide and those spawning randomly sometimes? TASC mod only adds one or the other and I wanna try it vanilla


I was able to get it to work like this:

Code
RunCode SectorAPI sector = Global.getSector();
StarSystemAPI system = sector.getStarSystem("[star_id]");

SectorEntityToken mirror1 = system.addCustomEntity("mirror1", "Stellar Mirror Alpha", "stellar_mirror", "player");
mirror1.setCircularOrbitPointingDown(system.getEntityById("[planet_id]"), 0, 220, 40);
mirror1.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror2 = system.addCustomEntity("mirror2", "Stellar Mirror Beta", "stellar_mirror", "player");
mirror2.setCircularOrbitPointingDown(system.getEntityById("[planet_id]"), 120, 220, 40);
mirror2.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror3 = system.addCustomEntity("mirror3", "Stellar Mirror Gamma", "stellar_mirror", "player");
mirror3.setCircularOrbitPointingDown(system.getEntityById("[planet_id]"), 240, 220, 40);
mirror3.setCustomDescriptionId("stellar_mirror");

This creates a set of three mirrors around the planet, like Eochu Bres. Obivously, you need to change [star_id] and [planet_id] for their actual IDs.

You can get the star ID by running the command "list systems" and picking the appropriate name on the left.




i am doing this

Quote

RunCode SectorAPI sector = Global.getSector();
StarSystemAPI system = sector.getStarSystem("[penelope's star]");

SectorEntityToken mirror1 = system.addCustomEntity("mirror1", "Stellar Mirror Alpha", "stellar_mirror", "player");
mirror1.setCircularOrbitPointingDown(system.getEntityById("[penelope2]"), 0, 220, 40);
mirror1.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror2 = system.addCustomEntity("mirror2", "Stellar Mirror Beta", "stellar_mirror", "player");
mirror2.setCircularOrbitPointingDown(system.getEntityById("[penelope2]"), 120, 220, 40);
mirror2.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror3 = system.addCustomEntity("mirror3", "Stellar Mirror Gamma", "stellar_mirror", "player");
mirror3.setCircularOrbitPointingDown(system.getEntityById("[penelope2]"), 240, 220, 40);
mirror3.setCustomDescriptionId("stellar_mirror");


i am getting multiple errors (for every line) can you point me where and what am i doing wrong?

You need to remove the square brackets from your tags:

Code
RunCode SectorAPI sector = Global.getSector();
StarSystemAPI system = sector.getStarSystem("penelope's star");

SectorEntityToken mirror1 = system.addCustomEntity("mirror1", "Stellar Mirror Alpha", "stellar_mirror", "player");
mirror1.setCircularOrbitPointingDown(system.getEntityById("penelope2"), 0, 220, 40);
mirror1.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror2 = system.addCustomEntity("mirror2", "Stellar Mirror Beta", "stellar_mirror", "player");
mirror2.setCircularOrbitPointingDown(system.getEntityById("penelope2"), 120, 220, 40);
mirror2.setCustomDescriptionId("stellar_mirror");

SectorEntityToken mirror3 = system.addCustomEntity("mirror3", "Stellar Mirror Gamma", "stellar_mirror", "player");
mirror3.setCircularOrbitPointingDown(system.getEntityById("penelope2"), 240, 220, 40);
mirror3.setCustomDescriptionId("stellar_mirror");
This works for me. Remember that you need the AddCondition solar_array line to actually add the market condition.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: LordShotGun on February 26, 2024, 01:35:24 PM
Is there a command combo to quickly give hyperspace topography data? So I can get reverse polarity at the start of the game.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: DrKaczka on March 03, 2024, 07:59:28 AM
The mod in mod index is labeled as working in 0.97 version of starsector, but when i try to enable it it says that its incompatible and wont let me enable it
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: moyashii on March 04, 2024, 08:33:22 PM
Hey, I've used this mod ever since it first came out. Gotta say it's so nice for QoL and messing around. Much respect!

I've been wondering if there's any way or code to run, to change a binary system into a normal star? Like a yellow primary for example.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: GeeGold on March 05, 2024, 12:38:55 AM
when update it's not compatible with 0.97a-rc11 :'(
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Dadada on March 05, 2024, 02:18:05 AM
It is. Open the Console Commands folder and open the mod_info.json, there you will find:
    "gameVersion": "0.96a-RC6",
Either delete the whole line or change 0.96a-RC6 into 0.97.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: balordezul on March 07, 2024, 09:44:29 AM
Is there a command to refund or stop construction? Ran into a bug with another mod and the UI is not working to let me cancel the station action.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Wyvern on March 07, 2024, 09:57:08 AM
Is there a command to refund or stop construction? Ran into a bug with another mod and the UI is not working to let me cancel the station action.
Try removeindustry and addcredits. (Note that removeindustry with no arguments will list the existing industries at the market you're at, which can be particularly useful if you don't offhand know the industry ID.)
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Cerevox on March 08, 2024, 10:24:29 PM
Is there a command to add or remove a skill from an officer? I have found ways to add officers at levels, but not to add skills. My specific issue is that I keep starting games with the companion officer and manage to not give them their unique skill and want a console command to do it after the game starts, since my brain just refuses to remember to click a skill inthe menu, or I double click and unselect the skill.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Princess_of_Evil on March 09, 2024, 01:30:01 AM
RunCode com.fs.starfarer.api.impl.campaign.intel.events.HostileActivityEventIntel.get().addFactor(new com.fs.starfarer.api.impl.campaign.intel.events.HAPirateBaseDestroyedFactor(-69));

To change points for Colony Crises, if anyone wants it.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Albreo on March 10, 2024, 06:17:27 AM
The SpawnFleet command doesn't work anymore?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: ranoss on March 10, 2024, 09:08:21 AM
is it safe to use with .97a?

Just made an account to report that so far it looks like it is working after editing the mod_info.json file.

Getting back into starsector after the recent updates and I've really appreciated all the interactions on the forum. Super helpful!
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: ashP.2 on March 13, 2024, 08:02:31 AM
How do we update the mod ?

I tried to change to change the  "gameVersion": "0.96a-RC6" into  "gameVersion": "0.97a-RC11"  in the mod_info.json but it didn't work.

Can someone explain the process step by step ?
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Wyvern on March 13, 2024, 09:29:38 AM
How do we update the mod ?

I tried to change to change the  "gameVersion": "0.96a-RC6" into  "gameVersion": "0.97a-RC11"  in the mod_info.json but it didn't work.

Can someone explain the process step by step ?
That is literally exactly the needed step, so something else must have gone wrong. Did you edit mod_info.json with the windows default text-editor and accidentally end up with the file renamed to mod_info.json.txt or something? When you say "it didn't work" - how does it not work? Can you see the mod at all when you try launching Starsector? What does it show as the required version there? (If you can't see the mod at all, then that means that it can't read the mod_info.json file at all, which could be evidence of an accidental file name change, or could be evidence of some sort of permissions issue, or, etc.)
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: ashP.2 on March 13, 2024, 12:32:34 PM
i used the "visual studio code" application to "gameVersion": "0.96a-RC6" into  "gameVersion": "0.97a-RC11"  in the mod_info.json but it didn't work.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Wyvern on March 13, 2024, 12:48:17 PM
but it didn't work.
When you say "it didn't work" - how does it not work? Can you see the mod at all when you try launching Starsector? What does it show as the required version there? (If you can't see the mod at all, then that means that it can't read the mod_info.json file at all, which could be evidence of an accidental file name change, or could be evidence of some sort of permissions issue, or, etc.)

Also, did you actually check the file name?
Keeping in mind that windows in particular loves to hide parts of filenames, i.e., if you just look in the folder and see "oh, that file is named mod_info.json", it could still actually be named mod_info.json.txt because windows will lie about that unless you've explicitly told it not to.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: ddrake on March 13, 2024, 04:44:55 PM
Is there a way to increase a contacts relation points via a command? Both of the relation commands seem to apply only to factions.

EDIT: Go into Devmode and within the chat with the contact there's options to increase it.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: n3xuiz on March 16, 2024, 02:54:20 AM
seconded the request for hyperspace topography points. i just don't feel like exploring the whole sector and grinding this every run.
Title: Re: [0.95a] Console Commands v2021.04.06
Post by: Ryder on March 16, 2024, 09:03:20 AM
A new version is up, grab it here (https://github.com/LazyWizard/console-commands/releases/download/2021.04.06/Console_Commands_2021.4.06.zip).

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.

I am still getting null point error when using respec {OfficerName or Number}
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Lascerandi on March 22, 2024, 08:59:24 PM
Is there a command combo to quickly give hyperspace topography data? So I can get reverse polarity at the start of the game.

seconded the request for hyperspace topography points. i just don't feel like exploring the whole sector and grinding this every run.

For Hyperspace Topography i just edited my save file. Note that while the passives work, the ones that need you to click the skill don't appear on your bar, so you need to set it first at 399, get 1 point for Reverse Polarity, then set it at 699 for Generate Slipsurge.

<com.fs.starfarer.api.impl.campaign.intel.events.ht.HyperspaceTopographyEventInt el

this is the line to search for with ctrl+f, the line beneath should look like -

<progress>816</progress>

The number should match your current number in game. Just change the number to what you need
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: jtcbrown on March 23, 2024, 09:59:40 AM
Any chance of making OP changes to ships less...  all or nothing?  Either a way to add them to only a single ship, or one to adjust it by a percentage of total rather than flat amount? 

I like hull mods, and you can't bloody fit hull mods and y'know actual weapons or fighters on many, many ships.  Which takes 100 OP on a big ship, but 100 OP on a small ship is "all the hull mods and you still have leftover."  I don't want to cheat *that hard* :D
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: Vundaex on March 25, 2024, 02:58:12 PM
allhulls and allweapons dont seem to be working with the latest version 0.97.
Storages are empty.
Title: Re: [0.96a] Console Commands v2023.05.05
Post by: digitalizedMind on March 27, 2024, 12:17:45 AM
SetMarketOwner is really buggy. If I try to use it on a colony with a space in the name, it usually targets the wrong colony. If i misspell even a single letter, it usually targets the wrong colony instead of cancelling. Just now I had an incident where I was trying to change the owner of "Kaliyan", but the command was targeting "Kalabagang". Tried it again in case it's case sensitive, did the same thing. I renamed the colony to "Kameron" and the command started targeting "Kroni Ledge". This command is almost unusable I swear...

allhulls and allweapons dont seem to be working with the latest version 0.97.
Storages are empty.

They work fine for me on 0.97a-RC11. Did you use storage set first?