Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 59 60 [61] 62 63 ... 93

Author Topic: [0.96a] Console Commands v2023.05.05  (Read 1535636 times)

ClosedBoudy

  • Ensign
  • *
  • Posts: 17
    • View Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-25)
« Reply #900 on: August 26, 2020, 05:15:27 AM »

is there any way to unlearn a blueprint?
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-25)
« Reply #901 on: August 26, 2020, 05:24:07 AM »

There's not a dedicated command for it, but you can use RunCode. For example:
Code
runcode $playerFaction.removeKnownShip("onslaught");
runcode $playerFaction.removeKnownFighter("cobra_wing");
runcode $playerFaction.removeKnownWeapon("taclaser");

RunCode takes Java code as its arguments. $playerFaction is a macro used as shorthand for a longer snippet of code. These macros are defined in data/console/runcode_macros.csv.

You can use "list ships", "list wings", or "list weapons" to get the IDs you need.
« Last Edit: August 26, 2020, 05:33:56 AM by LazyWizard »
Logged

MPmaniac

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-25)
« Reply #902 on: August 28, 2020, 02:21:32 PM »

Hi there! Have a problem with running the game with this mod. Crash happens after launching the game/
The note says:
Fatal: Failed to find script of class
[com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginlmpl]

Does anyone know, how to fix this?)

[attachment deleted by admin]
« Last Edit: August 28, 2020, 02:23:19 PM by MPmaniac »
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-25)
« Reply #903 on: August 28, 2020, 02:56:26 PM »

The console requires LazyLib to function.
Logged

JohnVicres

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
« Reply #904 on: August 28, 2020, 03:15:55 PM »

Is it possible to add a military submarket to an already generated market?

I've also wondered about this, and I think it might be possible with runcode, but I have no idea what kind of reference or how to write out the line to enact it.
Looking through Exerelin, there's a "submarkets.csv" which lists several different ones including exerelin_prismMarket, open_market, black_market, and generic_military which has the description:
"Trade with $theFaction military base.

Weapons and other military hardware can be bought and sold here even if they're illegal on the open market. A commission and better standing with $theFaction results in higher-grade hardware being available.

Will buy locally illegal goods as part of a no-questions-asked buyback program.

Selling enough of a commodity will temporarily resolve a shortage."

So that's definitely it. And, no, in case you're wondering "addcondition" and "addindustry" doesn't work. But you should be able to somehow add it. Someone that knows more about how runcode works could probably decipher it.

I'm also interested, too, because none of my own colonies have military markets and it would be nice to have them to stock up on weapons and marines/crew occasionally. I mean, it would make sense, especially if they already have a military base on them.

While a bit belated, here is how you can add a submarket (to an existing market) with runcode. First, you need the string (name) of the market. For this example, the market name is "garden_market".
Code
runcode for (int i = 0; i < 1; i++) {MarketAPI market = Global.getSector().getEconomy().getMarket("garden_market"); market.addSubmarket("generic_military");}

Iterating over a list of markets should also be possible.
Code
String listMarkets[] = new String[]{"garden_market", "ring_market"};
for (String marketStr : listMarkets) {...}

Fortunately for us mortals, Java (except the compilation thing) is relatively easy to understand! But I'm trying to add a submarket to a planet in a "random core worlds" Nexerelin scenario, and I don't know exactly why, but I can't "pick" the market? As in, I'm thrown a Null.Pointer.Exception. Not sure if your second code is the answer to my problems, but I didn't understand it, so I dunno...
Edit: nevermind, I tried List Markets and it gave me my answer lol thank you LazyWizard and everyone contributing to more codes
« Last Edit: August 28, 2020, 03:19:35 PM by JohnVicres »
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
« Reply #905 on: August 28, 2020, 09:32:15 PM »

I'd recommend everyone update to the latest dev release (link in the OP). It fixes an issue with Version Checker failing to check for updates.

Relevant to recent conversations, it also includes dedicated AddSubmarket and RemoveSubmarket commands thanks to jaghaimo on GitHub finishing the commands I'd honestly forgotten I'd started working on over a year ago.
Logged

VerminVarg

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
« Reply #906 on: August 31, 2020, 09:28:55 PM »

Hey Lazywizard! any chance you could add a way to give Industry only blueprints to a player? there's a few really cool ones from mods i'd love to use that aren't out in blueprint form and the only option to get them (as far as i know anyway) is to use "Allblueprints" which takes away a good chunk of the game =/ Anyway! thanks for all your hard work man :) you've made a fantastic mod
Logged

WeWickYou

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
« Reply #907 on: September 01, 2020, 12:03:56 AM »

Hey Lazywizard! any chance you could add a way to give Industry only blueprints to a player? there's a few really cool ones from mods i'd love to use that aren't out in blueprint form and the only option to get them (as far as i know anyway) is to use "Allblueprints" which takes away a good chunk of the game =/ Anyway! thanks for all your hard work man :) you've made a fantastic mod

i'm pretty sure it have nothing to do with the console command mod, if you want specific industry blueprint, you should ask the owner of the mod who give the say so industry.
Console just check the game file, if something isn't directly available "inside" the game you have to ask the owner of the mod content.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
« Reply #908 on: September 01, 2020, 01:34:18 AM »

AddSpecial industry_bp <industry_id>

But AFAIK most mod industries are just coded to not be buildable, they don't check for whether you have the BP.
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 839
    • View Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
« Reply #909 on: September 01, 2020, 01:54:52 AM »

AddSpecial industry_bp <industry_id>

But AFAIK most mod industries are just coded to not be buildable, they don't check for whether you have the BP.

Industry BPs just set a memory key, which the industry class will then check to decide if it is buildable or not.

that check has to be coded in to the industry - and most of them don't do that. Adding the Building directly is a more valid approach.
Logged

Xobra

  • Lieutenant
  • **
  • Posts: 63
    • View Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
« Reply #910 on: September 01, 2020, 07:34:11 AM »

is there a Parameter for addIndustry, which let adds the Industry with a remaining Building Time? Some modded Buildings disappear after there are finished and trigger an effect, but the effect won't trigger if the Industry is just added.
Logged

WeWickYou

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
« Reply #911 on: September 01, 2020, 12:57:15 PM »

is there a Parameter for addIndustry, which let adds the Industry with a remaining Building Time? Some modded Buildings disappear after there are finished and trigger an effect, but the effect won't trigger if the Industry is just added.

For this kind of building you will have (actually) no choice but to build them, then use fastbuild (if you want) so they trigger, like astropolis station for exemple. (i think it's because the market need a clear update, when you add a fully build industry the market doesn't "properly update", there no building started nor building complete. And i think your "issue" is comming from that)

I think i game need multiple "actions" on top of having the industry to trigger the "pop" of it outside of your market.
If you want to do this kind of think (adding industry) just know that's is is building/industry who have higher priority in the list (like waystation, mining, fuelprod, refining, farm, lightindustry, heavyindustry(and the like of it like lannestate battleyard) ), so 1st produce the building who have low priority then go for the high priority so you can "overcap" the number of building while having the sayed industry with AI core on it.
Logged

enrich235

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
« Reply #912 on: September 13, 2020, 05:51:07 PM »

how do i change the change the shortcut to open the console. I dont have backspace on my keyboard.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
« Reply #913 on: September 14, 2020, 04:51:40 AM »

Hey Lazywizard! any chance you could add a way to give Industry only blueprints to a player? there's a few really cool ones from mods i'd love to use that aren't out in blueprint form and the only option to get them (as far as i know anyway) is to use "Allblueprints" which takes away a good chunk of the game =/ Anyway! thanks for all your hard work man :) you've made a fantastic mod

You can use the command AllBlueprints industry to only unlock industry blueprints, but there's no command for unlocking them individually. I'll look into it.


how do i change the change the shortcut to open the console. I dont have backspace on my keyboard.

You can open saves/common/config/lw_console_settings.json.data in a plaintext editor like Notepad (not Microsoft Word) and change the first line to this:
Code
   "consoleKeystroke": "36|false|false|false",

Then load a campaign and press J to open the console, then enter the Settings command. That will open a dialog that will let you change the console summon key to whatever you want.
Logged

Barantar

  • Ensign
  • *
  • Posts: 4
    • View Profile
Re: [0.9.1a] Console Commands v3.0 (latest build 2020-08-28)
« Reply #914 on: October 15, 2020, 02:02:44 PM »

Hey, thx for this amazing mod, it's a must have. I was wondering is there a way to add ordnance points to a specific ship by name, like addtrait in starship legends? Currently adding op is impossible on per ship basis, since it's fleet wide, even to ships in storage. I am no programmer so there is no hope writing a custom script myself.
Logged
Pages: 1 ... 59 60 [61] 62 63 ... 93