Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/25)

Pages: 1 ... 681 682 [683] 684 685 ... 778

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

avallanch

  • Ensign
  • *
  • Posts: 39
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10230 on: October 13, 2023, 03:37:23 AM »

Is there any easy way to override one function from one of the mods?
Namely i want to mess with progress on Engineering Hub from Industrial Evolution
I've already found the function in the java file tried messing with it by adding it as part of separate mod to override it, but i have failed....
Any advices?
Logged

mikkrish

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10231 on: October 13, 2023, 05:54:32 PM »

Hi,

I want to rebalance economy in my playthrough but found that I cannot change ship prices in those Bar events in bar_events.csv:
Code
bar event id,tags,freq,prob,min dur,max dur,min timeout,max timeout,min accepted timeout,max accepted timeout,plugin
hmdf,,10,1,30,40,15,20,60,90,com.fs.starfarer.api.impl.campaign.missions.HandMeDownFreighter
sShip,,10,1,30,40,15,20,60,90,com.fs.starfarer.api.impl.campaign.missions.SurplusShipHull
hijack,,10,1,30,40,15,20,60,90,com.fs.starfarer.api.impl.campaign.missions.HijackingMission

Is it possible to adjust those prices?
Logged

shoi

  • Admiral
  • *****
  • Posts: 730
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10232 on: October 13, 2023, 08:16:31 PM »

How can someone check if a built-in mod is s-modded? Apparently these don't count as Smod
of course i find the method after posting

Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1329
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10233 on: October 14, 2023, 08:07:52 AM »

Question - there are some older mods that I still like to use so I modify them myself. One of the thing I did was alter the hullmods for the new S-mod thing.

I edited both the java files of hullmods to the add the if (sMod) branch and the hullmods.cvs to add the SModDesc descriptions, but in-game no S-mod description show up, nor even the S-mod ui category. Am I missing something?

Hmm, nothing else comes to mind. Make sure the hullmod class is extending BaseHullMod - though if it wasn't, I think you'd have noticed due to other problems, so that's probably not it.

... are you testing this in the main menu? S-mod stuff only shows up in the campaign.

Fixed it.
I named the column SModDesc instead of sModDesc. Now it works! Thanks
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 26038
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10234 on: October 14, 2023, 01:34:24 PM »

Is there any easy way to override one function from one of the mods?
Namely i want to mess with progress on Engineering Hub from Industrial Evolution
I've already found the function in the java file tried messing with it by adding it as part of separate mod to override it, but i have failed....
Any advices?

The source is probably compiled into class files (in a jar) and the .java file is likely provided by the mod just for reference, so changing it wouldn't do anything. Basically: if you're not comfortable setting up a dev environment and compiling stuff, this is going to be tricky.

I want to rebalance economy in my playthrough but found that I cannot change ship prices in those Bar events in bar_events.csv:
Code
bar event id,tags,freq,prob,min dur,max dur,min timeout,max timeout,min accepted timeout,max accepted timeout,plugin
hmdf,,10,1,30,40,15,20,60,90,com.fs.starfarer.api.impl.campaign.missions.HandMeDownFreighter
sShip,,10,1,30,40,15,20,60,90,com.fs.starfarer.api.impl.campaign.missions.SurplusShipHull
hijack,,10,1,30,40,15,20,60,90,com.fs.starfarer.api.impl.campaign.missions.HijackingMission

Is it possible to adjust those prices?


Each of these classes has a BASE_PRICE_MULT static member variable that you could adjust in your ModPlugin's onApplicationLoad() method.

Fixed it.
I named the column SModDesc instead of sModDesc. Now it works! Thanks

Ah, that would do it.
Logged

Stokes52

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10235 on: October 15, 2023, 07:31:12 PM »

Hello, I am trying to make a simple mod to faction military markets.

Specifically, I would like to add Diktat Lion Guard variant ships to Diktat Military markets.  Even better, if I can gate certain ships behind reputation. The idea is to make it exactly like buying XIV variants from the Hegemony from their military markets if you have enough reputation.

I have already figured out how to make it so that LG variants appear in general Diktat faction markets, but I want to make it so that the LG variants are ONLY sold in the military market (to the most loyal Diktat servants), not the general market.

How can I go about doing this?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 26038
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10236 on: October 16, 2023, 09:46:44 AM »

It's not going to work *exactly* like it does for the Hegemony because the XIV ships are part of the standard Hegemony fleet and the military submarket automatically works off that.

For what you want, you could either implement your own version of the submarket plugin (and create a different submarket for it, and swap it in instead of the standard military one for the colonies you want). Or you could implement a SubmarketUpdateListener and do the work there.
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3151
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10237 on: October 16, 2023, 05:25:23 PM »

Where do you set SubmarketUpdateListeners to listen? Was looking at that yesterday and didn't find it.
Logged

Stokes52

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10238 on: October 17, 2023, 04:39:00 AM »

It's not going to work *exactly* like it does for the Hegemony because the XIV ships are part of the standard Hegemony fleet and the military submarket automatically works off that.

For what you want, you could either implement your own version of the submarket plugin (and create a different submarket for it, and swap it in instead of the standard military one for the colonies you want). Or you could implement a SubmarketUpdateListener and do the work there.

Thanks for the response.

So if I just added the Lion Guard ships to the normal Diktat fleets, would it behave the same as the XIV fleets? I notice for the XIV variants, they are typically found in good condition in the military market, locked behind rep, or more rarely you can find heavily d modded versions in the civilian market. Is that how it will work if I just add LG ships to the Diktat fleets?
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 712
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10239 on: October 17, 2023, 05:18:20 AM »

Is there any way to influence the distance from its target at which a fleet does the "ORBIT_AGGRESSIVE" or "DEFEND_LOCATION" Fleet Assignment?
« Last Edit: October 17, 2023, 05:33:50 AM by Lukas04 »
Logged

ShadowRhino

  • Lieutenant
  • **
  • Posts: 65
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10240 on: October 17, 2023, 02:04:00 PM »

Is there a way to add factions that are part of a mod during an existing save without having to start a new game. One example being LOST SECTOR, that might not add everything during an existing playthrough but it does add the new faction that's part of the mod if you add the mod to an existing game?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 26038
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10241 on: October 17, 2023, 04:36:37 PM »

Where do you set SubmarketUpdateListeners to listen? Was looking at that yesterday and didn't find it.

Global.getSector().getListenerManager().addListener() or something very similar. *Most* listeners (except for some older ones) go there. One way to check is look at the ListenerUtil class which has the code that invokes all the listeners, so you can see if it's grabbing stuff from ListenerManager (and if not, it's probably not present in ListenerUtil and is therefore an older/more specialized listener).


So if I just added the Lion Guard ships to the normal Diktat fleets, would it behave the same as the XIV fleets? I notice for the XIV variants, they are typically found in good condition in the military market, locked behind rep, or more rarely you can find heavily d modded versions in the civilian market. Is that how it will work if I just add LG ships to the Diktat fleets?

It should work the same way, yes.


Is there any way to influence the distance from its target at which a fleet does the "ORBIT_AGGRESSIVE" or "DEFEND_LOCATION" Fleet Assignment?

Checking - ORBIT_AGGRESSIVE, no. DEFEND_LOCATION: you can set MemFlags.FLEET_PATROL_DISTANCE in the fleet's memory.

Is there a way to add factions that are part of a mod during an existing save without having to start a new game. One example being LOST SECTOR, that might not add everything during an existing playthrough but it does add the new faction that's part of the mod if you add the mod to an existing game?

That's mostly up to the mod to support or not; probably too involved for someone to just do without a pretty good understanding of how that specific mod works.
Logged

Audax

  • Captain
  • ****
  • Posts: 343
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10242 on: October 18, 2023, 06:53:27 AM »

Is it possible to get the base module of a module in the refit screen?

The ShipAPI has getParentStation but for ShipVariantAPI it doesn't have that. I have data that needs a uniqueID to save and use to reference stuff but since modules generate a fake fleetmember I couldn't really use that and the next best thing was using the base module fleetmember to have a reference to its modules. any work around or solutions for this?

nathan67003

  • Captain
  • ****
  • Posts: 258
  • Excellent imagination, mediocre implementation.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10243 on: October 18, 2023, 09:58:49 AM »

How would one go about/where should one look into API docs-wise for  the following task?

I've been fiddling a world script for a custom star system but I wanted to try and trigger the automated Market Conditions generator before adding my own ones and removing the ones I don't want for more variation. So for instance:
Code: java
PlanetAPI planet = system.addPlanet(blah);
//trigger Market Conditions autogenerator here
//if(planet.getMarket.<condition> is present) planet.getMarket().removeCondition(<condition>)
//repeat preceding line for all conditions that I want removed from planet
planet.getMarket().addCondition(<condition>);
Logged
I have some ideas but can't sprite worth a damn and the ideas imply really involved stuff which I've no clue how to even tackle.

vicegrip

  • Captain
  • ****
  • Posts: 339
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10244 on: October 19, 2023, 12:16:48 PM »

Is there a way, aside from changing a missile's velocity, to minimize the "sway" of a homing missile? They tend to travel in a snaking s pattern to their target rather than constantly keep their nose pointed. I know some missiles like the Squall will pre-aim then travel in a straight line, but they don't exhibit homing ability aside from that initial sequence.
Pages: 1 ... 681 682 [683] 684 685 ... 778