Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: A Handful of 0.95a Modding/Mod Creation Questions  (Read 1171 times)

CorsairZero

  • Ensign
  • *
  • Posts: 19
    • View Profile
A Handful of 0.95a Modding/Mod Creation Questions
« on: August 03, 2021, 07:18:35 PM »

1. Location of/file for salvaging and combat experience rewards (profitable trades and survey exp. were both in data/config/settings.json). If there are other sources of exp. not related to the tutorial that I missed (I'm not sure if main storyline grants exp. rewards), what are they and where are the files?
2. Location of/file for mechanical systems/formulas, such as the calculation(s) for armor's effect on incoming damage, and ECCM/Nav Rating mechanics.
3. How are mods prioritized/ordered without a mod organizer tool? Is there a good StarSector specific mod organization/ordering tool/program, or is Nexus Mod Manager considered the gold standard around here?
4. Are there common mod creation issues that tend to lead to crashes or performance issues, or I should be careful of ?
5. Given that I'm out of my depth on this one, are there any existing mods which improve the AI especially while: in combat, operating near suns/blackholes (Archean Order specifically), and/or near Pirates they aren't at war with who have their transponders off in civilized space (Adamantium Consortium specifically)?
6. What is "DPStoHit" under the armor section of data/config/settings.json?
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7221
  • Harpoon Affectionado
    • View Profile
Re: A Handful of 0.95a Modding/Mod Creation Questions
« Reply #1 on: August 03, 2021, 09:01:09 PM »

Hi, welcome to the forum! I can't answer all of these but:

3) In general there is no need for a mod organizer tool. Nexus Mod Manager is fine for those who are used to it, but I would guess that most people do not use any manager. Because of the architecture the mods build on there are generally very few conflicts, and for certain elements (like AI plugins) there is a priority system baked into the way they are used. Mod conflicts do happen, but generally once the authors get told about them they fix them as its an unintentional bug.

4) Probably the largest issue is memory leaks and null pointer exceptions from mishandled references. As modding is done in Java (or Kotlin which I don't know) this can be a thorny issue at times.

5) Pretty much no. It is possible to write complete overhauls of the AI for in combat, but the one attempt never made it to being feature complete and is no longer up to date. I am unsure for campaign behaviors if a complete replacement is possible, though I know several mods (like Nexerelin) give orders to make fleets go after targets.

6) I think this controls the armor penetration for continuous fire weapons like beams? Not entirely sure. If thats the case it should be at .5 (beams have a hit strength of half their damage per second for armor/hull damage purposes even though their effects are calculated more frequently than that.)
Logged

CorsairZero

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: A Handful of 0.95a Modding/Mod Creation Questions
« Reply #2 on: August 04, 2021, 09:32:09 AM »

Thanks for the warm welcome and reply Thaago.

3) I would be using it to guarantee that if two separate mods changed the same value, such as a specific weapon's/ship's stats or how much bonus speed boost the 0-flux state gives, that I'd get the right one to overwrite the vanilla values and the other to be discarded/ignored. As a side note, it's quite strange to me is how few conflicts there are for StarSector mods compared to Bethesda's titles, which were generally considered very mod friendly and makes me think that I may be thinking about StarSector modding from a unnecessarily narrow perspective. But I digress.

4) After a player increases their xmx & xms values in vmparams, are memory leaks still an issue outside of attempting to add large amounts of interacting/moving parts, such as Nexerelin with a lot of custom factions or the massive combat scenarios by adjusting max allowed deployment points per side to say 1000+, thus putting too much "weight" on the systems/engine to simulate/calculate in a short amount of time? While I'm at it, is the game simulating all the actors/actions everywhere in the sector while the player character (PC) isn't nearby, or only the actors/actions within a certain range of the PC and things like debris fields and derelict ships are generated around the PC to give the illusion of simulating everything in the sector?

5) Alright.

6) The value for "DPStoHit" is 0.5. So assuming it is for beam weapons for now, are they being calculated as (2 or >2?) instances of damage per second while hitting armor/hull, each instance at 50% the weapon's listed DPS for the purpose of armor's damage reduction (DR) for both armor itself and (armor's reduced DR for the) hull?
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7221
  • Harpoon Affectionado
    • View Profile
Re: A Handful of 0.95a Modding/Mod Creation Questions
« Reply #3 on: August 04, 2021, 02:41:15 PM »

NP! :D

3) Eeeerm lemme see: changes of that nature would be controlled by the CSV merge/load order which I actually have no idea what the rule is (been a long time since I've needed to mess with it). Anyone reading who remembers how csv merging of duplicate entries works?

4) If there's a real memory leak than increasing memory will only delay the problem and the game will still get unstable after a certain length of time. For just massive numbers of mods that take system memory but don't have leaks, increasing the memory will let you run more of them. A bigger problem with many many mods is video card memory: more mods means more graphics means more loaded sprites which can take up a surprising amount of video memory, especially with graphicslib and normal mapping. Exceeding it will give a large performance cost and there really isn't anything to be done about it.

For in combat performance, more entities will tax the CPU and bring frames down, and more mods will do the same as many mods are using scripts that loop over enemies/compare in an O(n^2) fashion. Even without more entities some mods will impose small performance losses due to just doing checks etc for their gameplay during combat, but in general authors are aware and keep things tight. Mods like Lazylib/magiclib etc are really good to use because the authors put work into doing implementations that are not performance hogs.

One pitfall I forgot to mention earlier: engines are surprisingly performance intensive. If you are making a faction that spams little fighters/drones, giving them more than 1 engine can tax weaker systems (and even in the base game I wish the fighters would get less engines).

The game lowers framerate but keeps the "speed" of combat the same until it hits 30 FPS. Then as framerate slows the game slows down too (so a game playing at 15 FPS is going at half speed).

The game does not simulate all entities everywhere - a lot of things get 'packed up' when the player is not around. I think everything in the system the player is currently in is simulated. This is a potential modding pitfall as there are ways of adding things that don't get packed up, I think? Not entirely sure. Things like hunter fleets chasing the player and expedition fleets are simulated travelling through hyperspace I think (again if someone knows better please correct).

6) I believe beams have their damage applied every 1/10th of a second vs the armor's current value, using a 'damage' of 1/10th the DPS but a 'damage for the purposes of armor reduction' of 1/2 DPS (this would be the DPStoHit it seems). The formula for damage reduction fraction is (damage for purposes of armor reduction)/((damage for purposes of armor reduction) + (armor value with modifiers)), which is then multiplied by the damage being dealt. (There are some threads about armor mechanics and I believe the wiki is up to date: https://starsector.fandom.com/wiki/Armor
Logged

Wispborne

  • Captain
  • ****
  • Posts: 411
  • Discord: wispborne
    • View Profile
Re: A Handful of 0.95a Modding/Mod Creation Questions
« Reply #4 on: August 04, 2021, 04:22:28 PM »

3. How are mods prioritized/ordered without a mod organizer tool? Is there a good StarSector specific mod organization/ordering tool/program, or is Nexus Mod Manager considered the gold standard around here?

There are two mod managers for Starsector, a custom one (https://fractalsoftworks.com/forum/index.php?topic=21995.0) and Vortex (with this extension: https://www.nexusmods.com/site/mods/179).

Neither is required or even very useful, as installing mods is just dragging the mod folder into the game's /mods folder, and both programs do pretty much the same thing.

The main advantage of using a mod manager might be to separate packs of mods if you're playing more than one game with different mods. Vortex supports mod profiles, not sure if the custom mod manager does as well.

Also some mods use .7z or .rar, so I guess a mod manager means you don't need to install 7zip to extract them, but...
Logged
Mod: Persean Chronicles | Mod Manager: SMOL | Tool: VRAM Estimator | Tool: Forum+Discord Mod Database | If I'm inactive for 3 months, anyone can use any of my work for anything (except selling it or its derivatives).

CorsairZero

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: A Handful of 0.95a Modding/Mod Creation Questions
« Reply #5 on: August 05, 2021, 11:31:35 PM »

There are two mod managers for Starsector, a custom one (https://fractalsoftworks.com/forum/index.php?topic=21995.0) and Vortex (with this extension: https://www.nexusmods.com/site/mods/179).

Neither is required or even very useful, as installing mods is just dragging the mod folder into the game's /mods folder, and both programs do pretty much the same thing.

The main advantage of using a mod manager might be to separate packs of mods if you're playing more than one game with different mods. Vortex supports mod profiles, not sure if the custom mod manager does as well.

Also some mods use .7z or .rar, so I guess a mod manager means you don't need to install 7zip to extract them, but...

I would be using it to guarantee that if two separate mods changed the same value, such as a specific weapon's/ship's stats or how much bonus speed boost the 0-flux state gives, that I'd get the right one to overwrite the vanilla values and the other to be discarded/ignored.

Mod installation, uninstallation, activation, deactivation, and the .7z/.rar file formats and their related software are non-issues for me.
Logged