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.
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?
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]
it's completely halting the main thread while the console is visible.
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]
We can do the rest fairly easily, if we're already allowed to capture mouse-click events and keystrokes.
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.
import org.lwjgl.opengl.GL11;
import org.lwjgl.util.glu.GLU;
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.
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.
Linky (http://www.mediafire.com/?yisxug9x8r9hdim)That's the released version, not the development version.
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 :)
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.
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
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?
BaseCommand spawnShip = new AddShip();
spawnShip.runCommand("onslaught_Elite");
[...]
Wow, this looks very impressive! I'm looking forward to trying this and digging into the code to learn!
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
Glad I could help.Great dedication to the mod I must say
I'm putting the final touches on the next release right now. Here's the changelog so far:Quote0.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
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
Great dedication to the mod I must say
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.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
Changelog:SpoilerQuote0.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! ;)
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 :)
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. :)
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?!
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
This is going to be of greatest help to me. How can we thank you, LW? :DI'm surprised he isn't working for them I must say
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
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
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. >:DThis 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. ;)
where does one learn all of this
Hmm. I'd be careful about using a multi-threaded approach - almost none of the core game classes are thread-safe.
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 :)
Thank you, very inspirationalwhere 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.
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. :)
QuoteAlso: 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
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.
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;
}
}
Hmm. So the console calls API methods from that thread, right?
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 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
OT topic, but whatever happened to the Economy mod?
Every time I try to juggle multiple large projects I end up neglecting one of them.
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
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
I'm an uncle now.
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
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)
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);
}
}
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.
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
wait what is the burst delay u apply on that, when u set as infinite?
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
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
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
1.2 (January 12, 2012)
========================
Fixed crash when using invincibility cheats
Fixed position of in-battle messages when using large ships
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...
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. :)
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
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.
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
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
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?
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
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.
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.
It works fine with Excelerin,
But you have to start a new game with both mods active, otherwise it won't generate again :/
[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 :)
This is most weird, on starting a new game, do you get a green message?
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.
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.
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]
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
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]
1.6b (September 18, 2013)
===========================
Fixed bug where NoCooldown prevented projectile weapons from firing in .6a
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 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?
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.
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.
How can i enable console in mac?
So that's where the catch is. I tried it on 0.6.1a
Thanks for support ;)
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.
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.
I've noticed that spawning in modded ships won't work sometimes.
Just to chime in on this - it turns out I didn't quite fix that bug.
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;
}
}
command,class,syntax,help
AddSkillPoints,org.lazywizard.console.commands.AddSkillPoints,addskillpoints <amount>,"Adds the specified amount of skill points to your character."
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.
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 linesHe 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
How about a CR timer disabler command? No more frigate CR decay?
Just noticed on the OP, its still says just to use backspace without control, thought I would just let you know
I had that problem to fixed it by downloading latest lazylibYup, that, strangely, was it.
[...] not to mention the command interface being hidden behind the game.
...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
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
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)
A small compatibility update is up, get it here (http://www.mediafire.com/download/1mp1gfjk4fmh6mx/Console_Commands_2.0_WIP_8.zip).You most likely already know this, but the console storage causes a CTD. Error log:
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:Spoiler450957 [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]
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?
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?
This is what happens when I spend an hour in other tabs before finishing my reply, I guess. ;)
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
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?
Either way, including it in something like this is surprising, and I think really speaks to your skill- I mean, god damn.
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.
I have a problem, I wrote AddCredits<100000000> and it says ERRROR: credits amount must be a whole number!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.
what is the proble?
I have a problem, I wrote AddCredits<100000000> and it says ERRROR: credits amount must be a whole number!
what is the proble?
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
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!
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!
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.
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.
there should be a command that unlocks the Ordnance point limit for player's shipsalso 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.
Here's something that should make life a bit easier: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?Spoiler(https://i.imgur.com/Uqt5djq.png)[close]
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
allhulls doesnt seem to work with Nexerlin with supported faction mods installed, nor does the storage work anymore.
Ive got no idea how addship works. plz help ???
setrelationship player targetFaction num
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!
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
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!i was just about to ask "already?! are you a wizard?", but, well....
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.
The 'Respec' command gives you way more skill points than you should have. Does it still work off the old progression?
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;
}
}
If possible you might want to update the spawn fleet command to include officers
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
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
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.
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.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.you just can't trust wizards and their crazy magics.
I looked it over to make sure it wasn't there before I asked @.@
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
Right, i think I got one that you don't have! I _DOUBLE_ checked both the lists^I'm guessing this isn't possible?
Is there any way to clear a specific fleet from the campaign screen? or failing that, destroy all spawned fleets?
Right, i think I got one that you don't have! I _DOUBLE_ checked both the lists^I'm guessing this isn't possible?
Is there any way to clear a specific fleet from the campaign screen? or failing that, destroy all spawned fleets?
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
I don't want to update now as I kinda liked this ideaYour spawnfleet got a little bug , it seems EVERY ship now has an officer ;DAh, the danger of thinking a minor last-minute change isn't worth testing. :)
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 don't want to update now as I kinda liked this ideaYour spawnfleet got a little bug , it seems EVERY ship now has an officer ;DAh, the danger of thinking a minor last-minute change isn't worth testing. :)
I would like that.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 don't want to update now as I kinda liked this ideaYour spawnfleet got a little bug , it seems EVERY ship now has an officer ;DAh, the danger of thinking a minor last-minute change isn't worth testing. :)
I added inside my mod folder a data/commands
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)
List<CommoditySpecAPI> specs = getAllSpecs();
for (CommoditySpecAPI spec : specs)
{
doSomething(spec);
}
List specs = getAllSpecs();
for (Iterator iter = specs.iterator(); iter.hasNext(); )
{
CommoditySpecAPI spec = (CommoditySpecAPI) iter.next();
doSomething(spec);
}
Got another bug for that traitor command: missiles launched from the traitorous ship will target said launching ship BUT will not connect
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.
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. :)
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.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..?
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.
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)
How long does FoceMarketUpdate take usually?
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
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?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
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.
A command to make fleets ignore you completely would be awesomeSo basically setting your sensor profile to 0?
Would that do it? If so then it would be very welcome.Sadly the hide command, which does set your profile to zero, won't make you TOTALLY invisible
Sometimes I just want to be able to hyperspace without wading through 12 fleets of losers who waste my time.
Would that do it? If so then it would be very welcome.Sadly the hide command, which does set your profile to zero, won't make you TOTALLY invisible
Sometimes I just want to be able to hyperspace without wading through 12 fleets of losers who waste my time.
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!
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?
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?
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.
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.
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.
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?
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.
Another suggestion: a FindWing command? I am finding it increasingly difficult to locate mining pods.
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.
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.
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 outSay 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
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?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?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
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:
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...What was the exact command you used? And are you talking named bounties like in vanilla or IBB bounties from SWP?
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.
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...What was the exact command you used? And are you talking named bounties like in vanilla or IBB bounties from SWP?
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.
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)
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
Pretty sure you already know about this, but the allweapons command doesnt add the chips for the wings in that you place on carriers nowTry allwings instead?
Pretty sure you already know about this, but the allweapons command doesnt add the chips for the wings in that you place on carriers nowTry allwings instead?
Oops! Well I guess that is a bug thenPretty sure you already know about this, but the allweapons command doesnt add the chips for the wings in that you place on carriers nowTry 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 thenit'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 mindsOops! Well I guess that is a bug thenit's to be expected, they're an entirely new type of inventory item.
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
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)
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:Worse case scenario, you could use the back up saveCodeERROR 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...
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)
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:SpoilerCodeERROR 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...
Cheers, the setcommission command is going to get some heavy use :P
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).
Just be aware that it is buggy and not all commands work. (Allwings for example)
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?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.
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
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
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
so why is this considered 0.7.2a? it works fine now :PBecause not all commands and such have been tested
CharacterDataAPI playerStats = CampaignEngine.getInstance().getCharacterData();
for (HullModSpecAPI spec : Global.getSettings().getAllHullModSpecs())
if (!spec.isHidden() && !spec.isAlwaysUnlocked() && !playerStats.knowsHullMod(spec.getId()))
playerStats.addHullMod(spec.getId());
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.CodeCharacterDataAPI playerStats = CampaignEngine.getInstance().getCharacterData();
for (HullModSpecAPI spec : Global.getSettings().getAllHullModSpecs())
if (!spec.isHidden() && !spec.isAlwaysUnlocked() && !playerStats.knowsHullMod(spec.getId()))
playerStats.addHullMod(spec.getId());
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
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?
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
Any plans to add multiple officers in one go? or is this possible already?If you push up arrow, the console will autofill the last entered command
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
Ah many thanks mk! That's v.handy to know! Cheers! ;DYou can also do multiple commands at once using the semicolon as a "breaker"
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.
Would it be possible to make it so that pressing up multiple times would go through the last few inputted commands?
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
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).
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.
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).
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.
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
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
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?
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.
update
I can't seem to figure how to spawn a pirate respawn or invasion fleet, anyone know how?
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.
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.
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.
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.
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)
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.
Also, just to make sure: you're using a Mac, right? If not, then I'm trying to fix the wrong thing.
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.
[email protected] ~/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
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
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.
Is it possible to implement console command that clears storage?
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
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.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.
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.
- The console can no longer be summoned inside of campaign menus. This was a bug, not a feature.
-snip-
Simply giving myself a commander without buying feels like cheating.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
but sometimes the offers you get are pathetic. Maybe a way to refresh merecenaries, like one refreshes markets?
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
Should the default console hotkey be changed? Pressing Backspace in combat in dev mode ends the engagement instantly with a player victory.
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.
Here lies LazyWizardShould 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. ;)
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.
finditem heavy_machinery
Hi there,Do you have the latest version? I think he updated CC to include at least mouse wheel scrolling
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.
You can create an allis and make it where one command does everything
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.
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 )
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 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
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?
Would this work for blueprints as well?I'm gonna add some "wishlist items" here for console if you don't mindAlready in! Use "AddSpecial <id> [optionalData]", and "list specials" to get the valid IDs.
-The ability to spawn in stuff like nanoforges. Should be simple right?
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
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?
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?
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.
could it be that some items should not be added to the player inventory? For example "modspec" breaks the game :DCan'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.
RunCode Global.getSector().getStarSystem("Galaver").getEntityByName("Hantu Raya").getMarket().removeCondition("high_gravity")
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")
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)
Edit: you know what, let's mark this as one last proper WIP release before 3.0 final. It should be stable enough.
Added a DestroyColony command. You monster.
DestroyColony commandAhem.
Added a DestroyColony command. You monster.
Toggling dev mode off with the devmode command does not prevent full control of other faction's colonies
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
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".
can you respec commanders and yourself with any command?YOu can respec yourself with the "respec" command. However you ca NOT respec officers currently.
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....
Reloading the save fixed it but yes it was probably nexerelinThe 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).
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); }
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:Coderuncode 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); }
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
RunCode ((FleetMemberAPI)$playerFleet.getFleetData().getMembersInPriorityOrder().get(0)).getVariant().addPermaMod("defective_manufactory")
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?
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.
(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
let this post serve as a warning to ye all (lazy pls push this change to the release version i;m beg)
Have been using the dev version without problems. I do only use it for a select few commands however.
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?
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?
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!)
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
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?
#
# 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
{
"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
}
why commands like god, InfiniteFlux, InfiniteAmmo, InfiniteCR dont work for ally ships?
I might be blind but is there a way to auto run specific commands on specific parts eg combat or campaign(upon startup)
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 :)
Hey can i get some help, When i press ctrl+backspace the game just shuts down. im on linux
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")
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)
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)
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 wasHmm. You're on Starsector 0.9.1a-RC8, correct?Code12769 [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?
QuoteHmm. 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
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.
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"
Hello.There is not, though it'd be easy to add one. I'll add it to the todo list.
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.
QuoteHmm. 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).
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:Coderuncode 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); }
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:Coderuncode 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
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 replacedWrong thread man. You want the Starship legends thread http://fractalsoftworks.com/forum/index.php?topic=15321.0
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:Coderuncode 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
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:Coderuncode 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?
Hello! I'm quite new to the modding community but I was wondering for the next update if you could add a AddAdmin command.
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.
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()
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:SpoilerUniversal 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.
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.
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.
Is it possible to add a military submarket to an already generated market?
Edit:Also is there any way to create a derelict or a Domain era cryosleeper?Thanks!
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); }
Is there a way to change the owner of a planet or station?
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)
if( !context.isInCampaign() || !Global.getSector().getPlayerFleet().isInHyperspace() ) {
Console.showMessage( CommonStrings.ERROR_CAMPAIGN_ONLY );
return CommandResult.WRONG_CONTEXT;
}
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.
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
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.Help lists are context sensitive. Planet-related commands only show up while visiting a planet. (Except ChangeMarketOwner which only shows up when not.)
is there even one?
edit: nevermind found it. its addindustry
strangely it doesn't show up in any of the help lists.
Ok. Current working code for adding planets is.Code works great for spawning new planets in a star system. However, do you know how to spawn moons that orbit around a planet?CodeRunCode 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)
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).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?
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.
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?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.
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.
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.
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.
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! ::)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 :-[.
Thanks for the help anyway and have great New Year!
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.
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?
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".
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); }
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); }
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).Coderuncode 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.Coderuncode 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); }
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.
Ok. Current working code for adding planets is.Code works great for spawning new planets in a star system. However, do you know how to spawn moons that orbit around a planet?CodeRunCode 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)
Anyway there to ban me from this mod lol i cannot help but cheat once i found this and its bugging me. loluninstall it? :)
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".
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.
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?
Anyway there to ban me from this mod lol i cannot help but cheat once i found this and its bugging me. lol
Ok. Current working code for adding planets is.Code works great for spawning new planets in a star system. However, do you know how to spawn moons that orbit around a planet?CodeRunCode 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 to u get it to work? i get an unknown variable error for planet angle
Tried to use the code to add a stable point but I got the error in the screenshot.
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);
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)
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.Coderuncode 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);
Ok. Current working code for adding planets is.CodeRunCode 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)
right, quick question, can you use the console to finish building something on a planet?
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
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
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").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.
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)
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)
RunCode Global.getSector().getStarSystem("Arcadia").AddAsteroidBelt(Global.getSector().getStarSystem("Arcadia"), 2000, 1500, 300, 400, 600)
I got a little problem with spawning one certain weapon; the Salamander MRM isn't listed with the list weapons command.
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.
Hi,
Is there a way to add a Cryo-sleeper to a system?
Or add/change the resources/bonuses on a planet?
Thanks.
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); }
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
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
Excuse me, i got a quick question.
is it possible to add Modded Ships? (as in Ship added from other mods)
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.
English isnt my main languange
QuoteEnglish isnt my main languange
We are in a same situation.
So, is it help?
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.
runcode for (int i = 0; i < 1; i++) {MarketAPI market = Global.getSector().getEconomy().getMarket("garden_market"); market.addSubmarket("generic_military");}
String listMarkets[] = new String[]{"garden_market", "ring_market"};
for (String marketStr : listMarkets) {...}
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?
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");
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):
runcode SectorEntityToken ent = Global.getSector().getCampaignUI().getCurrentInteractionDialog().getInteractionTarget();
if (ent.getMarket() != null) Global.getSector().getEconomy().removeMarket(ent.getMarket());
ent.getContainingLocation().removeEntity(ent);
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.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.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!
(Use LocationAPI.getEntityById; you can view a planet's ID in devmode with the dump memory option)
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)
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?
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)
that meansThe 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.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!
(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.CodeRunCode 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)
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)
RunCode Global.getSector().getStarSystem("System_name").addAsteroidBelt(Global.getSector().getStarSystem("System_name"), numAsteroids, orbitRadius, width, minOrbitDays, maxOrbitDays)
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)
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)
RunCode Global.getSector().getStarSystem("System_name").addAsteroidBelt(Global.getSector().getEntityById("Planet_ID"), numAsteroids, orbitRadius, width, minOrbitDays, maxOrbitDays)
RunCode Global.getSector().getStarSystem("System_name").addRingBand(Global.getSector().getEntityById("planet_ID"), "graphic type", "texture", textureWidth, BandIndex?, color modifier, BandWidthinEngine, MiddleRadius, OrbitDays)
that meansThe 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.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!
(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.CodeRunCode 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)
CodeRunCode 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 PlanetsCodeSummoning MoonsRunCode 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)
CodeRunCode 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)
RunCode Global.getSector().getStarSystem("Inda").addPlanet("Lunaria", Global.getSector().getEntityById("Komana"), "Lunaria", "barren", 75, 90, 800, 37)
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);
float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 5f);
runcode String _id = "planet_id";
SectorEntityToken fleet = Global.getSector().getPlayerFleet();
StarSystemAPI sys = (StarSystemAPI)fleet.getContainingLocation();
sys.removeEntity(sys.getEntityById(_id));
sys.updateAllOrbits();
String _id = "planet_id"; // = the id of the planet, star or station you want to be removed
list planets; // will list all stars and planets in the system
list stations; // will list all stations in the system
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();
_sys.updateAllOrbits();
float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 10f);
String _name = "planet_name"; // = name of planet without prefix
String _type = "terain_type"; // = planet type
float _planetRadius = 165; = // = planet size, bigger number bigger planet
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();
float _orbitDays = _orbitRadius / (20f + new Random().nextFloat() * 10f);
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
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)
Summoning Rings on a PlanetCodeRunCode 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
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
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)
_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
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); }
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
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
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.
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
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
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
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.
how do i use this to increase the level cap?
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.
(for example : i want to execute command "god;infiniteammo;infiniteflux;nocooldown" by pressing \ key or = key)
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.
(for example : i want to execute command "god;infiniteammo;infiniteflux;nocooldown" by pressing \ key or = key)
Is there a way to spawn the hyperspace jump point to the player's location?runcode Random rndm = new Random;Coderuncode 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
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?
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.
what did you not understand... did you look at the comments made in the pastebinLooking 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
How can I add more cargo space or have infinite cargo?
<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>
Sorry for the lateness of reply. Well I owned the planet. So I just transfered it over to another empire.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 ?
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?
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.
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.
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.
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.Most of this is solved by typing "devmode" in the console.
- 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.
cool mod, but where do you download it from?
how do I spawn in a nano Forge
the M command in Dev mode crashes the game with nextirailen
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
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?
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
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?
runcode $playerFaction.removeKnownShip("onslaught");
runcode $playerFaction.removeKnownFighter("cobra_wing");
runcode $playerFaction.removeKnownWeapon("taclaser");
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".Coderuncode 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.CodeString listMarkets[] = new String[]{"garden_market", "ring_market"};
for (String marketStr : listMarkets) {...}
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
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.
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.
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
how do i change the change the shortcut to open the console. I dont have backspace on my keyboard.
"consoleKeystroke": "36|false|false|false",
-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!
The OP specifically identifies LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0) as required.
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
Is there a way to spawn the hyperspace jump point to the player's location?Coderuncode 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 PointsCoderuncode 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();
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.
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.
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
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.
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 )
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.
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.
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 investm