Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 68 69 [70] 71 72 ... 74

Author Topic: [0.95a] Console Commands v2021.04.10  (Read 893277 times)

Dal

  • Lieutenant
  • **
  • Posts: 57
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1035 on: April 25, 2021, 10:54:38 PM »

It would be great to have a command to add Marine XP. I don't know what my other 4000 marines are doing while raiding for blueprints but it sure isn't getting any practice in.
Logged

Puddz

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1036 on: April 26, 2021, 07:09:34 PM »

So I'm trying to spawn in a planet and two moons. But I want the main planets orbit to make sense. Make sense in the case that it orbits the star at the right velocity depending on how far away the fleet is compared to the star. But I dont know how to change this code to swap from using the orbit days to the system I want.

Code
runcode SectorEntityToken fleet = Global.getSector().getPlayerFleet(); String planetName = "YourPlanetName"; String moonName = "YourMoonName"; String moonName2 = "YourMoonName2"; StarSystemAPI sys = (StarSystemAPI)fleet.getContainingLocation(); float orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(fleet, sys.getCenter()); float planetOrbitDays = orbitRadius / (20f + new Random().nextFloat() * 5f); float planetSize = 300; float moonOrbitRadius = planetSize * 3; float moon2OrbitRadius = planetSize * 5; float moonRadius = planetSize / 2; float moon2Radius = planetSize / 3; float moonOrbitDays = moonOrbitRadius / (20f + new Random().nextFloat() * 5f); float moon2OrbitDays = moon2OrbitRadius / (20f + new Random().nextFloat() * 5f); Vector2f playerCoords = $playerFleet.getLocation(); float angleCCW = Misc.getAngleInDegreesStrict(playerCoords); PlanetAPI star = sys.getStar(); PlanetAPI planet = sys.addPlanet(planetName, star, planetName, "gas_giant", angleCCW, planetSize, orbitRadius, planetOrbitDays ); MarketAPI market = sys.getEntityById(planetName).getMarket(); market.addCondition("volatiles_plentiful"); market.addCondition("IndEvo_RuinsCondition"); market.addCondition("US_floating"); market.addCondition("ruins_vast"); PlanetAPI moon = sys.addPlanet(moonName, planet, moonName, "terran", 0, moonRadius, moonOrbitRadius, moonOrbitDays); market = sys.getEntityById(moonName).getMarket(); market.addCondition("organics_plentiful"); market.addCondition("farmland_bountiful"); market.addCondition("ore_ultrarich"); market.addCondition("rare_ore_ultrarich"); market.addCondition("volatiles_plentiful"); market.addCondition("habitable"); market.addCondition("mild_climate"); market.addCondition("solar_array"); market.addCondition("IndEvo_RuinsCondition"); market.addCondition("ruins_vast"); PlanetAPI moon2 = sys.addPlanet(moonName2, planet, moonName2, "arid", 0, moon2Radius, moon2OrbitRadius, moon2OrbitDays); market = sys.getEntityById(moonName2).getMarket(); market.addCondition("organics_plentiful"); market.addCondition("farmland_bountiful"); market.addCondition("ore_ultrarich"); market.addCondition("rare_ore_ultrarich"); market.addCondition("volatiles_plentiful"); market.addCondition("habitable"); market.addCondition("mild_climate"); market.addCondition("solar_array"); market.addCondition("IndEvo_RuinsCondition"); market.addCondition("ruins_vast");

Edit: So I figured it out kind of. It'll spawn a gas giant with 1 terran moon, and 1 arid moon. and a bunch of good conditions with them to. Along with industrial evolution ruins and normal ruins. Shouldn't be hard to customize yourself.
« Last Edit: April 26, 2021, 09:11:23 PM by Puddz »
Logged

Histidine

  • Admiral
  • *****
  • Posts: 3443
    • View Profile
    • Bitbucket profile
    • Email
Re: [0.95a] Console Commands v2021.04.10
« Reply #1037 on: April 26, 2021, 07:36:35 PM »

Converted from vanilla's StarSystemGenerator, place in the appropriate place after calculating the orbit radius:
Code: java
float planetOrbitDays = orbitRadius / (20f + random.nextFloat() * 5f);
Logged

Puddz

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1038 on: April 26, 2021, 09:12:14 PM »

Converted from vanilla's StarSystemGenerator, place in the appropriate place after calculating the orbit radius:
Code: java
float planetOrbitDays = orbitRadius / (20f + random.nextFloat() * 5f);

Thanks. I figured it out with this and looking through discord and just mixing and matching code lol.
Edited my original comment with it.
Logged

Celepito

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1039 on: April 28, 2021, 11:56:26 AM »

Does anyone have a command/piece of code to add a specific hullmod to a specific ship (in your fleet, e.g. your flagship)? By that I mean some of the non-acquirable hullmods like e.g. "Automated Ship" or something.

I have looked around some, but not found anything, hence me asking.
« Last Edit: April 28, 2021, 12:32:31 PM by Celepito »
Logged

th3boodlebot

  • Commander
  • ***
  • Posts: 128
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1040 on: April 28, 2021, 12:24:32 PM »

i hate to be that guy but this seems like a good place to ask:  is there a reasonable way for a neophyte to change the maximum number of industries per colony size?
Thanks in advance!
Logged

Celepito

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1041 on: April 28, 2021, 12:30:51 PM »

i hate to be that guy but this seems like a good place to ask:  is there a reasonable way for a neophyte to change the maximum number of industries per colony size?
Thanks in advance!

Go to "starsectore-core/data/config/settings.json", open it and search it for "maxIndustries".

You will see this [1,1,1,2,3,4,4,4,4,4], each number representing the colony size (1 to 10) and the connected max industry, e.g 2 industries at ^4. Simply change the number to what you want it to be.

(And related, two lines below that, "maxColonySize":6, you might want to change the 6 into a 10, so that your colonies can grow up to size ^10 and not just ^6.)
Logged

th3boodlebot

  • Commander
  • ***
  • Posts: 128
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1042 on: April 28, 2021, 01:05:06 PM »

thank you!  Have a great day!
Logged

Jazuke Taizago

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1043 on: April 28, 2021, 01:45:00 PM »

Ok. I give. Trying to create a Asteroid Belt in my system that i've played around with. Problem is, keeps giving me some errors.

I've done exactly this to attempt creating it:

RunCode Global.getSector().getStarSystem("Dhuminai").addAsteroidBelt(Global.getSector().getStarSystem("Dhuminai"), 970, 7500, 350, 320, 640, Terrain.ASTEROID_BELT, "Craskar Belt")

Am i doing something very wrong or what? Been following specific instructions regarding past posts that i searched in this thread with "Asteroid" and "Belt" for the purposes of figuring out what to do and how to do. So far, progress seems stuck. I have just recently attempted learning these RunCode instructions and Commands too. So i got like no idea what i'm doing besides running off what others have done before me. I don't see a way to post a Screenshot here of what error i'm getting and it's a really long one a hassle to write all that down. But it's basically similar to this:

Compilation failed:org.codehaus.commons.compiler.CompileException: Line 1, Column 71: No applicable constructor/method found for actual parameters "java.lang.string, int, int, int, int, int, java.lang.string, java.lang.string"; candidates are: "public abstract com.fs.starsector.api.campaign.SectorEntityToken com.fs.starfarer.api.campaign.LocationAPI.addAsteroidBelt(com.fs.starfarer.api.campaign.SectorEntityToken, int, float, float, float, float)", ""public abstract com.fs.starfarer.api.campaign.SectorEntityToken com.fs.starfarer.api.campaign.LocationAPI.addAsteroidBelt(com.fs.starfarer.api.campaign.SectorEntityToken, int, float, float, float, float, java.lan.string, java.lang.string)"
Logged

bob888w

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1044 on: April 29, 2021, 12:45:20 AM »

Hey, how would I use the addWeapon command if I was looking to add in some of the weapons from the hypershunt fight? The 2 I defeated gave only 1 large weapon total.
Logged

Celepito

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1045 on: April 29, 2021, 04:15:07 AM »

Hey, how would I use the addWeapon command if I was looking to add in some of the weapons from the hypershunt fight? The 2 I defeated gave only 1 large weapon total.

"Help addweapon" will give you a short explanation. (Disclaimer, I havent used the addweapon command myself, yet.)

Assuming that it follows the same way other add commands go, you will need to get the id of the weapon you want to add.

You can get the id's either through the list command ("list weapons", likely), though that might be a bit annoying to search though if you have a lot of mod added weapons bloating the list.

So the other way would be to got to ""starsectore-core/data/weapons/weapon_data.csv" and open it up in a program like Notepad++. Search for "omega" or scroll down, the special weapons seem to be in a block below the Tachyon Lance (the is are a few dividing lines between).

Then you will likely be able to use e.g. "addweapon minipulser 10" or something to add the weapon to your fleets storage.

(Not sure about that number after the id, the last time I did something similar, it gave me a single non-stacking Synchrotron Core, so save the game beforehand, and better use the same command multiple times e.g. ten times "addweapon minipulser", instead of the one above. Just be cautious.)
Logged

Nivri

  • Ensign
  • *
  • Posts: 27
    • View Profile
    • Email
Re: [0.95a] Console Commands v2021.04.10
« Reply #1046 on: April 29, 2021, 05:48:46 AM »

anyone know a command to like reset a planet's relationship with you? I did some damage to Umbra pirates and now they won't let me sell drugs to them HAHAH.. is there a code to like reset that??
Logged

th3boodlebot

  • Commander
  • ***
  • Posts: 128
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1047 on: April 29, 2021, 06:32:19 AM »

anyone know a command to like reset a planet's relationship with you? I did some damage to Umbra pirates and now they won't let me sell drugs to them HAHAH.. is there a code to like reset that??

Get the console commands mod
Control backspace
Setrelation (insert faction) (insert faction) (positive or negative value)
Example
Setrelation player pirates 50 would make them like you a lot
Remember the number is a set value NOT adding an amount
If you put 20 it doesnt add 20 it sets it as 20
The mod will explain some to you as well
Logged

Flacman3000

  • Commander
  • ***
  • Posts: 188
  • A man cannot put his shaft into the unknown.
    • View Profile
    • Email
Re: [0.95a] Console Commands v2021.04.10
« Reply #1048 on: April 29, 2021, 10:33:07 PM »

Anyone know of commands to remove remnant beacons or other beacons?
Logged
Ryzen 7 2700x, 1080ti, 16GB DDR4 RAM and playing SS on a SSD - Always stay ahead because when you're ahead you're rear anatomy is open to interpretation.

DrSalty

  • Ensign
  • *
  • Posts: 30
    • View Profile
Re: [0.95a] Console Commands v2021.04.10
« Reply #1049 on: April 30, 2021, 07:29:45 AM »

Literally getting this just so I can delete enemy Doom's since they are far more OP that my own dooms to the point its unfair  :D
Logged
Pages: 1 ... 68 69 [70] 71 72 ... 74