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 ... 500 501 [502] 503 504 ... 706

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1699791 times)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7515 on: June 04, 2021, 01:55:15 PM »

IIRC it's already set to "hiddenEverywhere" so shouldn't show up!
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 839
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7516 on: June 04, 2021, 04:03:08 PM »

I'm looking for methods to edit a factions' colour and music list in-game.
As far as I can see, I can get the music via .getFaction().getMusicMap(), returning a transient map that I could, in theory, edit.
Colour, however, doesn't seem to be exposed - or am I missing something?

thanks again,
heya, in case you missed it - I'm still looking for a way to do this.
Logged

Sarissofoi

  • Captain
  • ****
  • Posts: 405
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7517 on: June 04, 2021, 04:21:49 PM »

IIRC it's already set to "hiddenEverywhere" so shouldn't show up!
That is great to hear.
Thanks for help.
Cheers.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7518 on: June 04, 2021, 07:09:52 PM »

I'm looking for methods to edit a factions' colour and music list in-game.
As far as I can see, I can get the music via .getFaction().getMusicMap(), returning a transient map that I could, in theory, edit.
Colour, however, doesn't seem to be exposed - or am I missing something?

thanks again,
heya, in case you missed it - I'm still looking for a way to do this.

Ah, sorry, I did miss it! Taking a quick look, I don't believe changing the colors like this is possible.
Logged

Chozo

  • Ensign
  • *
  • Posts: 29
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7519 on: June 05, 2021, 12:39:40 AM »

REMOVED: am dumb
« Last Edit: June 14, 2021, 11:54:35 PM by Chozo »
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7520 on: June 05, 2021, 01:17:26 PM »

(Sorry for all the questions lately. I've been doing a lot of experimenting with skills.)

Under what object would I call dynamic and edit the stat mod: COORDINATED_MANEUVERS_MAX? Is that the correct way to adjust the nav rating speed bonus?

Purpose:
I'm trying to add an effect to a skill that would reduce the maximum speed bonus possible from the nav rating for the enemy fleet if the flagship has the skill. Preferably I'd like to cut it in half. This is intended to not effect the nav rating ratio in any way but only the max bonus and only for the enemy fleet if possible.

I'm not sure what you mean by this. You can have a look at com.fs.starfarer.api.impl.campaign.skills.CommandAndControl.java for an example, though.

(Generally speaking, "show references" in your IDE is your friend for this kind of thing!)

Thanks yeah the example shows that MutableCharacterStats is what I want here. Though I think I may need to reference the script that applies the bonuses (CoordinatedManeuversScript I think is what its called but its not in front of me at the moment) for what I want to do because I'm assuming the stats that are passed into the apply method of a skill script are the player's/officer's stats when I'm looking to adjust the enemy fleet's max coordinated maneuvers bonus.

In Intellij, "show references" is called "find usages" I think and right yeah I should be better about that before asking and not assume its hidden source or that I won't be able to find it.
Logged

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7521 on: June 06, 2021, 06:59:13 AM »

IIRC it's alphabetical by the mod's name? But I forget if it's last or first that wins. Could be wrong here, honestly, been a while since I dug into it.
Did a simple test with two mods with CSVs identical bar the price of a blueprint package:
The higher in the (alphabetical?) list gets the priority.

Oddly, it works based on the mod's Name not it's ID.

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7522 on: June 06, 2021, 10:40:12 AM »

Is it possible to check if a hullmods is s-modded?

Edit: Also, are default_ship_roles loaded on each start-up, or are they per-save?
If I remove the file from a mod, will that ship's mods stop spawning?

6chad.noirlee9

  • Captain
  • ****
  • Posts: 368
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7523 on: June 06, 2021, 11:37:53 AM »

Spoiler
5338348 [Thread-3] INFO  com.fs.starfarer.api.impl.campaign.intel.SurveyPlanetMissionIntel  - Created SurveyPlanetMissionIntel: Bhelxiope, faction: Mayasura
5340199 [Thread-3] INFO  sound.oo0O  - Cleaning up music with id [Seeking_Answers.ogg]
5340207 [Thread-7] INFO  sound.oo0O  - Cleaning up music with id [Sovereignty.ogg]
5340314 [Thread-9] INFO  sound.oo0O  - Creating streaming player for music with id [Ambush.ogg]
5340319 [Thread-9] INFO  sound.OooO  - Playing music with id [Ambush.ogg]
5341292 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager$RouteSegment.isInSystem(RouteManager.java:141)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager$RouteData.getInterpolatedHyperLocation(RouteManager.java:379)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.shouldSpawn(RouteManager.java:651)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.spawnAndDespawn(RouteManager.java:617)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.advance(RouteManager.java:577)
   at com.fs.starfarer.api.impl.campaign.CoreScript.advance(CoreScript.java:128)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

got the above error when the bounty i was after was about to show up in campaign
i cant tell by looking what may be causing the error
was hoping someone else could point me in the right direction
i have a LOT of mods so......shot in the dark

Logged
edit: edit: maybe were just falling with style LOL.  make a bubble, make the space in front of it smaller and just fall forward

Kenshkrix

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7524 on: June 06, 2021, 11:50:58 AM »

Is it possible to check if a hullmods is s-modded?
ShipVariantAPI has a getSMods() method, so you could presumably do a check against that.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7525 on: June 06, 2021, 11:52:16 AM »

Is it possible to check if a hullmods is s-modded?

Edit: Also, are default_ship_roles loaded on each start-up, or are they per-save?
If I remove the file from a mod, will that ship's mods stop spawning?

variant.getSMods().contains(mod id)

I believe it's loaded on each startup!

Spoiler
5338348 [Thread-3] INFO  com.fs.starfarer.api.impl.campaign.intel.SurveyPlanetMissionIntel  - Created SurveyPlanetMissionIntel: Bhelxiope, faction: Mayasura
5340199 [Thread-3] INFO  sound.oo0O  - Cleaning up music with id [Seeking_Answers.ogg]
5340207 [Thread-7] INFO  sound.oo0O  - Cleaning up music with id [Sovereignty.ogg]
5340314 [Thread-9] INFO  sound.oo0O  - Creating streaming player for music with id [Ambush.ogg]
5340319 [Thread-9] INFO  sound.OooO  - Playing music with id [Ambush.ogg]
5341292 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager$RouteSegment.isInSystem(RouteManager.java:141)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager$RouteData.getInterpolatedHyperLocation(RouteManager.java:379)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.shouldSpawn(RouteManager.java:651)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.spawnAndDespawn(RouteManager.java:617)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.advance(RouteManager.java:577)
   at com.fs.starfarer.api.impl.campaign.CoreScript.advance(CoreScript.java:128)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

got the above error when the bounty i was after was about to show up in campaign
i cant tell by looking what may be causing the error
was hoping someone else could point me in the right direction
i have a LOT of mods so......shot in the dark

Ahh, can't really say what mod it might be from. This looks like it's caused by a RouteSegment whose "from" entity was removed from the Sector entirely, which means it was probably a non-permanent object such as a fleet. Fixed up that particular crash on my end, but, right, impossible to tell from the stack trace what mod might've caused it, or, indeed, if it was a combination of mods, or a mod plus vanilla. For example, it looks like a mod doing seeming something unrelated (such as dynamically removing a planet) could cause this.

Is it possible to check if a hullmods is s-modded?
ShipVariantAPI has a getSMods() method, so you could presumably do a check against that.

(Right! Ninja'ed - I appreciate you taking the time to answer, that really helps me a lot.)
Logged

Jaghaimo

  • Admiral
  • *****
  • Posts: 661
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7526 on: June 06, 2021, 11:56:05 AM »

I'm taking this waaaay to seriously, but: I'd like to set up a gitlab CI pipeline for a silly mod I'm making. It needs the API jar to compile, of course. Am I correct assuming that the terms of LICENSE.txt make it's a no-go?
You are fine, already asked Alex for that, and he said OK: https://fractalsoftworks.com/forum/index.php?topic=5061.msg298924#msg298924

Also, I have some pipelines set up in my template (uses Gradle, fetches all deps automatically and bundles starsector.api.jar): https://github.com/jaghaimo/starsector-mod
« Last Edit: June 06, 2021, 11:57:36 AM by Jaghaimo »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7527 on: June 06, 2021, 11:58:45 AM »

(Oh, I missed this one - apologies!)
Logged

Kenshkrix

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7529 on: June 06, 2021, 12:33:30 PM »

Thanks!
Follow-up question: Is there a way to have a hullmod uninstall itself from a ship?
ShipVariantAPI also has the methods removeMod(), removePermaMod(), and removeSuppressedMod() which all take the mod id as a String.

The online API is pretty convenient to search through even if you don't have access to an IDE (or haven't set one up).
Logged
Pages: 1 ... 500 501 [502] 503 504 ... 706