Mods inter-compatibility and integration[edit | edit source]

Starsector's modding scene is vivid and constantly active, but despite a wide breath of mods of wildly different impact, scope and complexity, rare are two mods you cannot use together. Maintaining such unconstrained modding landscape for the players requires a little extra work on the part of the modders. It is a meme today that veteran modders are control freaks that demand other mods do not alter their work automatically and rather give the option of manually making them work together, but this is often for good reasons and those same modders will often get out of their way to quickly make their mod compatible with newcomers' in a way that is bug-free, provided they have the tools required for it.

Cross-mods integration best practices[edit | edit source]

Given the openness of the modding API, every mod that affects other mods run the risk of breaking something they did not foresee. This has nothing to do with "balance" or "not fitting the vision of the mod": for example a mod allowing to duplicate any ship would break a unique cruiser with a fancy special ability coded in a way that assumes it cannot fight alongside itself, regardless of how adequate the price of duplication is. Another example would be a mod adding a "ship for sale finder" revealing the location of hidden exploration goodies. Or a "high end market" suddenly selling hardware that is supposed to be the reward for a quest or a boss fight... There are so many ways even the best idea can break other mods unintentionally.

Therefore the best practice in term of inter-mod compatibility is to always rely on whitelists.

Depending on the exact workings of the mod, it can be a "faction" whitelist sometimes together with a short ships/weapons/wings blacklist if needed, or a direct whitelist although those can be very long.

In a second time, having ways to integrate a mod's whitelist/blacklists via code can come in handy to modders that prefer to work in a java environment or to tie the integration to in-game triggers.

Cross-mod integration via the modSettings.json file and data/config/modFiles folder[edit | edit source]

MagicLib offers classes to easily merge data from a shared modSettings.json file. Go to the MagicLib page for more details

MagicLib[edit | edit source]

            # The default trail data file is "data/config/modFiles/magicTrail_data.csv"
            # Mods that do not want to use the shared modFiles folder can point to their own file here
            # List weapons that can "interfere" with each-other reducing the ship's dissipation when several are mounted on the same hull.
            # "id" : "intensity",
            # id = weapon.csv id
            # intensity = interferences_rates id in MagicLib's settings. By default it can be WEAK MILD STRONG.
            # "sample_weapon1":"WEAK",
            # "sample_weapon2":"MILD",
            # "sample_weapon3":"STRONG",

Additionally MagicTrails automatically manages adding ribbon trails to projectiles using this file: data/config/modFiles/magicTrail_data.csv. The mod contains a blank file with detailed explanation for all attributes.

Diable Avionics[edit | edit source]

        "missile_resist_derecho": [
            # Lists missiles id that should loose guidance but not get flamed out by the Derecho ECM system
        "missile_immune_derecho": [
            # Lists missiles id that should not get affected at all by the Derecho ECM system
            # please be mindful to not break player expectations, only very special projectiles should be immune
            # Such as phased missiles or "smart" bullets
        "wanzers": [
            # Lists "wanzer" wings that are affected by the "Wanzer gantry" hullmod

Nexerelin[edit | edit source]

		    #increases the "cost" of stealing a given ship
			#"mining_wing": 0.5,
			#"dedicated_mining_frigate": 5,
			#"dedicated_mining_destroyer": 20,

Persean Chronicles[edit | edit source]

  "PerseanChronicles": {
      # Controls what systems/markets may be used as quest starting/mid/ending locations.
      # Valid for v1.0.1 and later
    "entity_tags_to_blacklist": [
        # SectorEntityTokens containing a tag listed here will be blacklisted.
    "system_ids_to_blacklist": [
        # Star systems with an id listed here will be blacklisted.
    "market_ids_to_blacklist": [
        # Markets with an id listed here will be blacklisted.
    "faction_ids_to_whitelist": [
        # Markets whose controlling faction's id is listed here will be *whitelisted*.
        # Vanilla factions are whitelisted by default.

Scy Nation[edit | edit source]

            # Lists faction ids that should have their known ships and weapons sold in Amity's Freeport discount trader.
            # Lists ships, weapons and wings ids that should be culled from Amity's Freeport discount trader.
            # Consider that tier 3 weapons/wings and ships above 5/10/14/23 FP are already culled from that store automatically.

The Vass[edit | edit source]

			# A list of projectiles which will not be cloned by the Isochronal Field under any circumstances
			# Can be practical for some very-heavily scripted weapons, but do check if it works without this 
			# setting first; the code has some built-in attempts to be compatible with many scripted projectiles
			#   Example:
		    # mySuperCoolScriptedMissile,
		"clone_despite_nonoriginal_projs": {
			# A map of projectiles which will be cloned despite being the non-original projectile of a weapon (this
			# could for example be shrapnel from a shotgun). To work, the projectile needs to list the "fake" weapon
			# that spawns the projectile to be cloned. Be careful about adding stuff here, your script needs to make 
			# sure no infinite looping happens (such as only ever splitting the original projectile, for a shotgun)
			#   Example:
		    # myShotgunProj1 : myShotGunFakeWeapon1,

Cross-mod integration via other files[edit | edit source]

All items (48)

Community content is available under CC-BY-SA unless otherwise noted.