Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Updated the Forum Rules and Guidelines (02/29/20); Blog post: GIF Roundup (04/11/20)

Pages: 1 ... 37 38 [39] 40 41 ... 58

Author Topic: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)  (Read 587292 times)

gofastskatkat

  • Ensign
  • *
  • Posts: 49
    • View Profile
    • Email

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?
Logged

Arkiuz

  • Ensign
  • *
  • Posts: 37
    • View Profile

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.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1294
    • View Profile
    • GitHub Profile

If I might make a suggestion for this?

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

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

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


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

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

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

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


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

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


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

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

That said, there is the alias 'tc' (short for "toggle cheats") that activates god, infiniteflux, infiniteammo, and reveal in one command. You can use "list aliases" to see the full list of aliases (and aliases will be editable in-game soon).
Logged

zothos

  • Ensign
  • *
  • Posts: 8
    • View Profile

could it be that some items should not be added to the player inventory? For example "modspec" breaks the game :D
Logged

Statius

  • Ensign
  • *
  • Posts: 2
    • View Profile

could it be that some items should not be added to the player inventory? For example "modspec" breaks the game :D
Can't you just use addhullmod for that? I think the issue with just adding modspec to your inventory is that it's adding the item to give you a mod, but doesn't have a hull mod specified on the item.
Logged

zothos

  • Ensign
  • *
  • Posts: 8
    • View Profile

Its more or less not an issue for me. I just tried some of the items and the game crashed. I was also able to add a prestine nanoforge to my game with some sort of metadata, that also crashed the game. Should i collect these crashes and report them or are these kind of problems known?
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1294
    • View Profile
    • GitHub Profile

I've already changed it for the next version so you can't spawn a blueprint or modspec without data (the cause of your first crash).

There's nothing I can do about the player passing in garbage data, but I'm also not able to recreate that crash with the pristine nanoforge. Do you remember what data you passed in?
Logged

zothos

  • Ensign
  • *
  • Posts: 8
    • View Profile

I tried recreating the issue with the nanoforge but so far no luck, maybe just a mixup with a modspec item that should not be added to the player inventory in the first place. I will try my best again in the next version :) Thanks for your help!
Logged

cybersol

  • Ensign
  • *
  • Posts: 18
    • View Profile

I just wanted to say this mod is awesome. I originally installed it to fix a bug I encountered with a mission and an explore data event conflicting. More recently I been testing some of the mechanics in the game around colony and planets. Here is some code I learned that may be useful to others:

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

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

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

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

And just because I thought of it now, another suggestion for a feature that I could not find yet is to respec an officer or administrator. But seriously man, thanks for the mod!
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1294
    • View Profile
    • GitHub Profile

Good work!

Which reminds me:
Spoiler
[close]

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

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

As for Respec supporting officers/administrators, it's on my to-do list.
Logged

cybersol

  • Ensign
  • *
  • Posts: 18
    • View Profile

I figured you were working on this from an earlier comment. But seeing more RunCode examples would have helped me (especially Global access and imports from more of the API), so I thought I would post what I found. Also, the code to fix the stars in Penelope's took some time to figure out, and it's a nice but not broken system after you fix the planets there.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1294
    • View Profile
    • GitHub Profile

The "good work" comment wasn't meant to be sarcastic or patronizing, and I apologize if it came across that way. I'm glad to see more examples of RunCode use out there. It's one of the more esoteric commands in the mod, with some hidden caveats that make using it tricky. The lack of documentation for it just makes things worse.

Here's a bit of information that might have helped you earlier:
  • RunCode compiles its arguments using Janino, the same script compiler that Starsector uses to compile loose scripts in data/scripts. That means no generic support, as well as a few other limitations.
  • There are macros to make writing snippets easier, for example you can do "runcode $playerFleet.setNoEngaging(999f)". You can find the default macros in data/console/runcode_macros.csv.
  • It by default imports some but not all of the common API classes you'll want to use. The list of default imports can be found in data/console/runcode_imports.csv.
  • In the current version, at least, you can't write multiple lines of code, so long snippets quickly become an unreadable mess. In the next version you'll be able to enter a newline by pressing shift+enter.
« Last Edit: December 02, 2018, 08:55:36 PM by LazyWizard »
Logged

DingooS

  • Ensign
  • *
  • Posts: 1
    • View Profile

Have any date to release the next update? i want sooooo much to use the update version of the console commands!
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1294
    • View Profile
    • GitHub Profile

SoonTM. The update is nearly done, but I ran into a few complications with the new commands regarding industries and market conditions. Also, the changelog is currently about 80 commits out of date, so that'll be fun.

If you're desperate, you can download the current dev here. You can see what's been added here, and what's left to do here.

I'd avoid using AddIndustry until it's finished (it works, but doesn't upgrade existing structures correctly yet), but aside from that I'm not aware of any other bugs. Every other issue with the previous dev should have been fixed. Please let me know if you encounter any new ones!

Edit: you know what, let's mark this as one last proper WIP release before 3.0 final. It should be stable enough. I'll have Version Checker notify users that it's available.
« Last Edit: December 07, 2018, 08:16:20 AM by LazyWizard »
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1294
    • View Profile
    • GitHub Profile
Re: [0.9a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
« Reply #584 on: December 07, 2018, 08:16:01 AM »

Edit: you know what, let's mark this as one last proper WIP release before 3.0 final. It should be stable enough.

:-[

I uploaded a quick fix for a crash during the tutorial, get it here.

Note to self: in the future, don't tempt fate.
« Last Edit: December 07, 2018, 09:25:29 AM by LazyWizard »
Logged
Pages: 1 ... 37 38 [39] 40 41 ... 58