Any way to change the shortcut to open the console window?
I dont have an English keyboard and I am unable to open the console with any combination of "CTRL+BACKSLASH".
I see someone already told you that it's actually control+backspace, but you can change the keystroke that summons the console with the Settings command.
If for some reason your keyboard doesn't have control or backspace, you can also change it manually by editing the "consoleKeystroke" field in saves/common/config/lw_console_settings.json.data. Set all the "true"s to "false" (these control if you need to hold shift, control, or alt), and the first number to the keycode of the key you want. Keycodes can be found
here. If you wanted to summon the console by pressing 9, you'd look for VK_9, which has the keycode 57. So your "consoleKEystroke" would look like "consoleKeystroke": "57|false|false|false".
Yeah, using the settings command is much easier.
okay so for some reason what causes console command to crash... out of ALL THE THINGS IN EXISTANCE, is these two settings:
"decivSamplingMonths":16,
"decivMinStreak":3,
For some mystical reason, if you set these settings to bigger values (to prevent random deciv events) the game just refuses to open the console without crashing. I don't see how this is related but holy *** it took a lot of digging around to figure it out. Thing is for some reason changing those values after a save was created might or might not break console commands as well. I even tested it out and for some random reason sometimes it breaks it and other times its fine...
So there you go, I have no idea how this makes sense but hey, I didn't make the mod :3
I think I also changed those values since I believe vanilla ones were smaller so I guess it has to do with back ground simulation freaking out.
That's incredibly weird. If anything I'd expect it to crash when the console closes, not when it first opens, since the game would be playing catch-up on however many thousands of frames it skipped. I'll look into it.
First off, I love the mod.
Though I'm having some issues, nothing crashing or anything, but i can't seem to get two commands to work..
Namingly \Clear\, and \Clear ships\
If I try storage\clear ships\ it says no such command
Storage\clear\ says the same thing
typeing in just clear simply clears the console, not my storage.
In reference to my earlier question, am I correct in assuming these clear commands are supposed to empty the storage? if so, how do I use them?
You want "storage clear" and "storage clear ships". I'll update Storage's help entry to be more clear (no pun intended).
Anyway there to ban me from this mod lol i cannot help but cheat once i found this and its bugging me. lol
A command to block access to the console on specific saves has been on my todo list for a while. I've just been lacking the motivation to mod for the last several months.
Ok. Current working code for adding planets is.
RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length)
Code works great for spawning new planets in a star system. However, do you know how to spawn moons that orbit around a planet?
how to u get it to work? i get an unknown variable error for planet angle
@Coffeeboi: You'd have to do it manually. If you're docked with the planet you want to create a moon for, you can use $context.getEntityInteractedWith() as the anchor for an OrbitAPI you create, then spawn the moon with that orbit (which I _believe_ will handle the positioning of the planet for you).
@nuker22110: You need to replace the placeholder arguments. So Planet_Angle might be 140, Planet_Orbit_length might be 70, etc. You can find examples of addPlanet usage in starsector-core/data/scripts/world/corvus.Corvus.java. Runcode takes Java code as an argument, so checking the files in data/scripts is a good way to get ideas for how to use it.
Oh, and a general statement about runcode snippets: I'd recommend being _extremely_ careful with RunCode if you aren't a modder yourself. RunCode isn't a normal command. You're writing, compiling and running Java code at the same level as an actual mod, without any of the safeties the other console commands have to prevent you from breaking things. The benefit is that you can do almost anything a mod can do with this command, but the downside is you can ruin your savefile if you get something wrong, and mistakes might not be immediately apparent.