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 ... 359 360 [361] 362 363 ... 706

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5400 on: October 16, 2019, 12:54:41 PM »

Ahh, engineSlotChanges apparently doesn't use "styleId" - so, just "style":"COBRA_BOMBER" should work.
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 #5401 on: October 16, 2019, 01:23:07 PM »

Ahh, engineSlotChanges apparently doesn't use "styleId" - so, just "style":"COBRA_BOMBER" should work.

Just tried it and yes it does! Thanks. :)
Logged

prav

  • Captain
  • ****
  • Posts: 381
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5402 on: October 16, 2019, 02:40:23 PM »

What are the requirements for a module to not count towards station survival, like the high-tech station's shield module?
Logged

Timid

  • Admiral
  • *****
  • Posts: 640
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5403 on: October 16, 2019, 07:18:48 PM »

Is it possible for the next version of Starsector to incorporate a print code? To record something of vital importance and easier debugging? Having it get debugged in starsector.log is hard to read when you include in other mods and the game itself.

Dwarden

  • Commander
  • ***
  • Posts: 196
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5404 on: October 17, 2019, 02:03:55 AM »

i do know that selling blueprint to blackmarket will result into Pirates after 90+ days to start utilize related designs

the question is, how enable it for other faction(s)?

like selling to the 'military' market type shall yield similar effect, if 'enabled' for that faction

(also if someone already uses that for theirs custom modded faction, please say)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5405 on: October 17, 2019, 09:23:51 AM »

What are the requirements for a module to not count towards station survival, like the high-tech station's shield module?

See: Misc.isActiveModule().

(Zero OP, no weapon groups, no fighter wings.)

Is it possible for the next version of Starsector to incorporate a print code? To record something of vital importance and easier debugging? Having it get debugged in starsector.log is hard to read when you include in other mods and the game itself.

I'm not sure what you're asking. Where would it print? If you want to print to console (which may work if you run the game from the command line/using the .bat file, you could use System.out.println() and that might work, but the logs print to console as well in that case.

You could also add a unique string to your logging output and do some combination of tail -f and grep etc to only show those lines, probably...


i do know that selling blueprint to blackmarket will result into Pirates after 90+ days to start utilize related designs

the question is, how enable it for other faction(s)?

like selling to the 'military' market type shall yield similar effect, if 'enabled' for that faction

(also if someone already uses that for theirs custom modded faction, please say)

See: com.fs.starfarer.api.impl.campaign.CoreScript.reportPlayerMarketTransaction(). At the end of that method is a commented out section that does this, which you can use as a starting point for adding similar/equivalent code. Whatever class does this needs to extend BaseCampaignEventListener and call super(true) in its constructor to register the listener.

Logged

Ed

  • Captain
  • ****
  • Posts: 442
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5406 on: October 17, 2019, 04:10:02 PM »

How do i add my ships to the Prism high end vendor without having a faction?
Logged
Check out my ships

King Alfonzo

  • Admiral
  • *****
  • Posts: 679
  • -- D O C T O R --
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5407 on: October 17, 2019, 08:53:38 PM »

Two quick questions:

I'm sure this is a very straightforward thing to do, but how does one add a condition to a market with an industry, and then remove the condition if the industry is removed?

Further, I have a hullmod that I don't want to be bought or sold as a reward. I've poked through everything, and while industry and ship blueprints can be given no_sell and no_drop, that doesn't appear to exist for hullmods. Is there a way around this?

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5408 on: October 18, 2019, 05:42:20 AM »

I'm very new to modding and I have no java experience, but I'm willing to learn and would like to work on a special faction that raids and has dormant fleets in debris fields. Is this feasible? I've tried looking for tutorials on making special factions that don't have homes or bases but it doesn't seem like there's much out there. Anyone have suggestions on where to find some instruction on it? Thanks.
You'll probably want to look at different gameplay features in the modiverse that each do a different bit of what you want.
e.g. for hidden that spawn when the player enters the star system, you could use a LimitedFleetManager (of which vanilla's PirateFleetManager and LuddicPathFleetManager are examples). Nexerelin's Remnant raids spawn without a source market, although raid code in general is pretty complex.

How do i add my ships to the Prism high end vendor without having a faction?
For the Nexerelin version, it'll will automatically work if your ships are added to an already-registered faction (e.g. one of the vanilla factions).
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5409 on: October 18, 2019, 09:14:17 AM »

I'm sure this is a very straightforward thing to do, but how does one add a condition to a market with an industry, and then remove the condition if the industry is removed?

Two basic approaches: one is to add the condition in the Industry.apply() method and remove it in unapply(). The condition would have to be resistant to being added and removed many times, though, i.e. it shouldn't store data in data members etc, as Industry.unapply() gets called pretty often and not just when the industry is removed.

Another would be to add it in Industry.apply(), if it's not already present, and then remove it in the condition's advance() method, if you detect that the market no longer has an industry.

Either way, you'll want to:
String conditionId = market.addCondition(...) to add it, and

market.removeSpecificCondition(conditionId) to remove it. Or, if you're removing it in the condition's advance method:
market.removeSpecificCondition(condition.getIdForPluginModifications());

(See: RecentUnrest for an example of this.)



Further, I have a hullmod that I don't want to be bought or sold as a reward. I've poked through everything, and while industry and ship blueprints can be given no_sell and no_drop, that doesn't appear to exist for hullmods. Is there a way around this?

Set hidden to true in hull_mods.csv. (If hiddenEverywhere is set to true, it won't show up in the refit screen, btw; regular "hidden" just makes it not dropped/sold/installable).
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 #5410 on: October 18, 2019, 02:32:24 PM »

Can I override the max FP settings in missions without overriding the MissionAPI class? I can't seem to get it above 150 and I want it to be 250 to test performance improvements (roughly) without having to invest a ton of time in a campaign
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5411 on: October 18, 2019, 02:37:23 PM »

Wouldn't changing battleSize accomplish this?
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 #5412 on: October 18, 2019, 02:45:58 PM »

Wouldn't changing battleSize accomplish this?

You mean the settings file entry? No that doesn't seem to have an effect unless my settings file entries are out of date (possible).

Or is that a variable in the mission class I missed?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5413 on: October 18, 2019, 02:49:18 PM »

I mean in the gameplay settings menu - the settings entries set the min/max/default values for the slider.
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 #5414 on: October 18, 2019, 03:28:37 PM »

I mean in the gameplay settings menu - the settings entries set the min/max/default values for the slider.

Ok got it. But the default setting should be 220 in that case if I set that in the settings file, right? I'll do some investigating and get back to you.
Logged
Pages: 1 ... 359 360 [361] 362 363 ... 706