Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: Uniquifying the Factions, Part 2 (04/30/22)

Pages: 1 ... 583 584 [585] 586 587 ... 593

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20458
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8760 on: May 16, 2022, 11:53:31 AM »

Would Best of the Best skill still affect it, AI can have that skill right?

Yes and I'm not sure offhand.

Also is there a way to increase ECM cap to %20 just like Nav rating?

Yes but you'd, IIRC, have to edit the script and recompile it/provide your own version etc.

Hey, how feasible is it to just make a texture pack? In a completely different artstyle, even?

I know I might be able to replace the ship image files, but how hard would it be to make it into a mod so that the player wouldn't have to manually replace the files?

That should be doable - if you just provide a mod with images in the same folder and with the same names as the vanilla ones, the game should load those instead of the vanilla ones.
Logged

Big Bee

  • Lieutenant
  • **
  • Posts: 71
  • bugs are cool
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8761 on: May 16, 2022, 12:02:18 PM »

That should be doable - if you just provide a mod with images in the same folder and with the same names as the vanilla ones, the game should load those instead of the vanilla ones.

Whoah nice! That's extremely convenient!

I love how easily modifiable stuff is in this game.
Logged
Hi I'm not very used to forums sorry

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20458
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8762 on: May 16, 2022, 12:15:28 PM »

:D
Logged

theDragn

  • Commander
  • ***
  • Posts: 216
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8763 on: May 17, 2022, 03:29:26 AM »

How do I force a bar event to spawn under certain conditions (or even just get the creation code to be called very frequently)? I've tried AddBarEvent, but that doesn't call any of the event's creation code, and I have no clue what I need to do in order to get it to do that. It's basically a slightly modified surplus ship bar event - I've got it working fine under normal conditions, but I'd like it to not be random.

I've also tried adding the priority tag to the entry in bar_events.csv and making the freq/prob entries large numbers, with no effect.

Edit- I think this might answer this question but I need to sleep so I can't test it at the moment. (it was not)

I'm basically trying to create a bar event from bar_events.csv through my own code, rather than the existing RNG, and I have no clue how.
« Last Edit: May 17, 2022, 12:13:12 PM by theDragn »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20458
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8764 on: May 17, 2022, 01:31:01 PM »

Would the BeginMission <mission id> command do the trick for you?
Logged

theDragn

  • Commander
  • ***
  • Posts: 216
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8765 on: May 17, 2022, 02:32:19 PM »

If I use BeginMission and use the bar event ID, I get an error; if I make a person_missions.csv entry and use that ID (and point it to my bar event script) it doesn't error out, but none of the data set on event creation seems to get stored in the "right" memory - all the $heOrShe and similar stuff in the dialog isn't replaced, showing the ship/NPC doesn't work, and adding the ship to the player inventory at the end produces an NPE. Using dev mode to dump the memory doesn't show any of the stuff that would normally get set with the bar event, but logging shows that the create() method is getting called successfully.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20458
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8766 on: May 17, 2022, 03:48:00 PM »

You'd need to still Call <eventRef> updateData and all that other kinds of stuff.
Logged

Audax

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8767 on: May 19, 2022, 01:10:57 PM »

Is it possible to generate commodities within a hullmod?

Examples would be generating 100 food per day

Was thinking of using advanceInCampaign() but not sure how to go about implementing it yet and if its performant if possible.
Logged

theDragn

  • Commander
  • ***
  • Posts: 216
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8768 on: May 19, 2022, 09:56:14 PM »

How do I force a bar event to spawn under certain conditions (or even just get the creation code to be called very frequently)? I've tried AddBarEvent, but that doesn't call any of the event's creation code, and I have no clue what I need to do in order to get it to do that. It's basically a slightly modified surplus ship bar event - I've got it working fine under normal conditions, but I'd like it to not be random.

I've also tried adding the priority tag to the entry in bar_events.csv and making the freq/prob entries large numbers, with no effect.

Edit- I think this might answer this question but I need to sleep so I can't test it at the moment. (it was not)

I'm basically trying to create a bar event from bar_events.csv through my own code, rather than the existing RNG, and I have no clue how.
Techpriest helped me figure this one out. The thing to know is: ((ArrayList) Global.getSector().getEconomy().getMarket("market id here").getMemoryWithoutUpdate().get("$BarCMD_shownEvents")).add("bar_event_id_here");

« Last Edit: May 20, 2022, 02:08:23 AM by theDragn »
Logged

Audax

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8769 on: May 20, 2022, 09:09:48 AM »

Is it possible to generate commodities within a hullmod?

Figured out how to do it, I just check if a day has passed then adding the commodity to inventory. Works well enough, not sure about performance but its only the player who would be using the hullmod anyways.
Logged

Üstad

  • Commander
  • ***
  • Posts: 112
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8770 on: May 20, 2022, 02:15:50 PM »

Is there a way to decrease AI officer spam  :o
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20458
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8771 on: May 20, 2022, 06:08:51 PM »

Is there a way to decrease AI officer spam  :o

Hmm - there's "officerAIMaxMercsMult" in settings.json, but since I wouldn't call what that affects anything close to "spam", I'm not quite sure if that's what you mean. The other settings in that general section should let you control pretty much what you want, though, unless it's for specific fleets the game spawns with settings that override that.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 3834
    • View Profile
    • Bitbucket profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8772 on: May 21, 2022, 06:58:16 AM »

Is there a way to tell which submarket the player is currently looking at (within either fleet or cargo screens)?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20458
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8773 on: May 21, 2022, 08:02:46 AM »

I think you should be able to keep track of it by using SubmarketInteractionListener.reportPlayerOpenedSubmarket(). I don't believe there's any method to actually query that state.
Logged

Üstad

  • Commander
  • ***
  • Posts: 112
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8774 on: May 21, 2022, 12:51:04 PM »

Is there a way to decrease AI officer spam  :o

Hmm - there's "officerAIMaxMercsMult" in settings.json, but since I wouldn't call what that affects anything close to "spam", I'm not quite sure if that's what you mean. The other settings in that general section should let you control pretty much what you want, though, unless it's for specific fleets the game spawns with settings that override that.
I just want to lower AI officer numbers, the current number is 1. Does making it 0.5 make them %50 less officers or it affects only the over the limit ones? Like the limit is 10 and having half mercenary officer only affects after 10?

What about remnant ships, how do I lower AI core officers? What does "baseFPPerOfficer" do?

Thanks for the answer Alex  :)
Logged
Pages: 1 ... 583 584 [585] 586 587 ... 593