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)

Author Topic: [0.95.1a] Additional Search Commands  (Read 6788 times)

itBeABruhMoment

  • Commander
  • ***
  • Posts: 157
    • View Profile
[0.95.1a] Additional Search Commands
« on: November 23, 2021, 08:33:48 AM »

Additional Search and Fleet Building Commands

To my knowledge, nobody has made console commands to search for entities such as research stations, so I made a mod that does that and a bit more. I've also added some commands for easier fleet building for my 0.95.1 fleet testing craze. This mod requires the Console Commands Mod to work. Note that case matters in the arguments of all the commands.Download here

The Commands:

Spoiler
FindSystemsWithTags <manditory1stTag> [optionalAdditionalTags]

List the star systems with all of the tags specified in the arguments. A list of tags can be found in com.fs.starfarer.api.impl.campaign.ids.Tags of the StarSector API. Input the string that corresponds to the tag obtained by viewing Constant Field Values.

GetTagsCurrentSystem

Lists the tags of the system the player is in.

FindNumConstellations

Find the number of constellations in the sector with a totally not scuffed implementation.

FindEntitiesByName  <nameOfEntity>

List the location of every entity with a specified name. The name of a entity is usually the same as its in game description.

FindEntitiesByType  <nameOfEntity>

List the location of every entity with a specified custom entity type. Custom entity types can be found in custom_entities.json.

ListEntitiesCurrentLocation

List the full name and custom entity type of every entity in the player's current location.

FindDerelict <hullid>

List the location of every derelict ship with of a specified hull type. Use the command "list ships" to see the names of hull types

AddHullMods <shipSelection> <[hullModId1,hullModId2,hullModId3]>

Permanently adds the hull mods specified in the second argument to the ships specified in "shipSelection". "shipSelection" can be a number (eg. 5), a range (eg, 5-10) or the word all. The numbers in "ShipSelection"  corresponds to the order ships appears in the fleet or refit screen. For example the fifth ship in the refit screen is ship 5. Then second argument is a list of any number of hull mod ids separated by commas and enclosed by square brackets WITH NO SPACES. Hull mod ids can be found in hull_mods.csv

AddDMods <shipSelection> <numDmods>

Adds "numDmods" dmods to the ships specified by "shipSelection". "NumDmods" is a number. "shipSelection" can be a number (eg. 5), a range (eg, 5-10) or the word all. The numbers in "ShipSelection"  corresponds to the order ships appears in the fleet or refit screen. For example the fifth ship in the refit screen is ship 5.

AddOfficerb [personality] [level]
The exact same command and code as the default AddOfficer but it doesn't produce a null pointer exception for some reason. I'll leave it here until the original is fixed

CloneShip <shipNumber> [numberOfClones]

Clones a specified ship in the player fleet  "shipNumber" times. If no number of clones is specified one is made. "shipNumber" corresponds to the order ships appears in the fleet or refit screen. For example the fifth ship in the refit screen is ship 5. "numberOfClones" is the number of copies that will be made.

Note that some of the fleet editing commands don't work in the refit screen for some reason under some circumstances. No clue why
[close]

Sample Commands:

Spoiler
research stations
"FindEntitiesByName Research Station" or "FindEntitiesByType station_research_remnant"

derelict mudskipper mk2's
"FindDerelict mudskipper2"

hypershunts
"FindSystemsWithTags has_coronal_tap"

cryosleepers
"FindSystemsWithTags theme_derelict_cryosleeper"

motherships
"FindSystemsWithTags theme_derelict_mothership"

the ultimate trash fleet
"AddDmods all 5"

copy the 5th ship in your fleet 10 times
"CloneShip 5 10"
[close]

Change Log
Spoiler
Dec 21, 2021 release 2.0
-updated to 0.95.1
-added the commands "AddHullmods", "AddDmods', "AddOfficerb", and "CloneShip"
-renamed files as good practice to avoid conflicts
[close]
« Last Edit: February 11, 2022, 12:57:28 PM by itBeABruhMoment »
Logged

DerkaDur

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: [0.95a] Additional Search Commands
« Reply #1 on: January 07, 2022, 10:59:42 AM »

Do you think it would be safe to add without starting a new save?
Logged

itBeABruhMoment

  • Commander
  • ***
  • Posts: 157
    • View Profile
Re: [0.95a] Additional Search Commands
« Reply #2 on: January 07, 2022, 11:59:36 AM »

It should be fine to add and remove
Logged

DreXav

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: [0.95a] Additional Search Commands
« Reply #3 on: February 04, 2022, 12:12:50 PM »

Incredible set of commands I have always wished for!
Will let you know if I run into any issues :)
Logged

default

  • Lieutenant
  • **
  • Posts: 80
    • View Profile
Re: [0.95a] Additional Search Commands
« Reply #4 on: February 04, 2022, 12:25:27 PM »

Finally, some commands for searching, so I will finally know if I missed anything in a dust belt somewhere way off in the fringe. Why did I not see this sooner?
Logged
"There's nothing like a trail of blood to find your way back home."

Timtumm

  • Ensign
  • *
  • Posts: 34
    • View Profile
Re: [0.95.1a] Additional Search Commands
« Reply #5 on: February 07, 2022, 03:38:25 PM »

Maybe I am not good at following instructions. Neither of these gave me anything:

FindSystemsWithTags HAS_CORONAL_TAP

FindSystemsWithTags THEME_DERELICT_CRYOSLEEPER

Thanks.
Logged

Stelarwand030

  • Lieutenant
  • **
  • Posts: 58
    • View Profile
Re: [0.95.1a] Additional Search Commands
« Reply #6 on: February 08, 2022, 01:30:33 PM »

This is awesome. I am so glad I found it.

Do you think you can make a command that only gives you the ships of a single mod? Like "addships mod1" and you get only the ships of mod1.

I can pay for it.
« Last Edit: February 08, 2022, 10:50:16 PM by Stelarwand030 »
Logged

itBeABruhMoment

  • Commander
  • ***
  • Posts: 157
    • View Profile
Re: [0.95.1a] Additional Search Commands
« Reply #7 on: February 11, 2022, 12:53:01 PM »

Maybe I am not good at following instructions. Neither of these gave me anything:

FindSystemsWithTags HAS_CORONAL_TAP

FindSystemsWithTags THEME_DERELICT_CRYOSLEEPER

Thanks.

Those tags correspond to strings that are all lowercase, so the correct commands should be FindSystemsWithTags has_coronal_tap and FindSystemsWithTags theme_derelict_cryosleeper. I'll fix the example commands in the samples
Logged

itBeABruhMoment

  • Commander
  • ***
  • Posts: 157
    • View Profile
Re: [0.95.1a] Additional Search Commands
« Reply #8 on: February 11, 2022, 01:01:32 PM »

This is awesome. I am so glad I found it.

Do you think you can make a command that only gives you the ships of a single mod? Like "addships mod1" and you get only the ships of mod1.

I can pay for it.

That's a good idea, but I'm working on another project for the foreseeable future so don't count on it.
Logged

Timtumm

  • Ensign
  • *
  • Posts: 34
    • View Profile
Re: [0.95.1a] Additional Search Commands
« Reply #9 on: February 15, 2022, 05:47:02 AM »

...

Those tags correspond to strings that are all lowercase, so the correct commands should be FindSystemsWithTags has_coronal_tap and FindSystemsWithTags theme_derelict_cryosleeper. I'll fix the example commands in the samples

Thanks for this. Lower case worked. I then had to mouse-over the entire map to find the two systems with that name, but I can't think of a way around that.
Logged

itBeABruhMoment

  • Commander
  • ***
  • Posts: 157
    • View Profile
Re: [0.95.1a] Additional Search Commands
« Reply #10 on: February 17, 2022, 05:58:22 PM »

...

Those tags correspond to strings that are all lowercase, so the correct commands should be FindSystemsWithTags has_coronal_tap and FindSystemsWithTags theme_derelict_cryosleeper. I'll fix the example commands in the samples

Thanks for this. Lower case worked. I then had to mouse-over the entire map to find the two systems with that name, but I can't think of a way around that.

the jump command allows you to travel to a system by its name
Logged

Xalimur

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: [0.95.1a] Additional Search Commands
« Reply #11 on: June 04, 2023, 01:04:39 PM »

Update on 0.96?
Logged

itBeABruhMoment

  • Commander
  • ***
  • Posts: 157
    • View Profile
Re: [0.95.1a] Additional Search Commands
« Reply #12 on: June 05, 2023, 04:29:37 PM »

Logged