Wiki

Clone wiki

DynaSector / Faction integration file list

To integrate a faction into DynaSector, you'll need to edit the following files:

Important

Faction config json

data/factions

  • Weightings for what stuff this faction uses; edit the other configs to let those factions know how much of our stuff we should be using as well

factions.csv

data/factions

  • Where to find the above config for the faction

ship_roles.xlsx

weapon_categories.xlsx

data/factions

  • Self-explanatory (well, commented at least)
  • Edit the .xlsx, export sheet 1 as .csv after editing

DSModPlugin.java

package: data.scripts

  • Faction mod existence check goes here

DS_NGCAddFactionOptions.java

package: com.fs.starfarer.api.impl.campaign.rulecmd

  • Starting game options: category, fleet types available, start location, starting relationships, displayed strings

DS_Util.java

package: data.scripts.util

  • enum RequiredFaction: Helper for checking if your faction is loaded (for game start options)

DS_FleetInjector.java

package: data.scripts.campaign.fleets

  • Register your faction here to allow DynaSector functionality for its fleets (AFFECTED_FACTIONS)
  • Add an entry for your faction to the FactionStyle enum
  • Includes fleet prefix strings and theme picker for DS-affected fleets (be sure to add custom fleets to the case/switch in injectFleet)
  • Faction can be prevented from using other factions' stuff (NO_SHARING_WEAPONS)

DS_SubmarketUtils.java

package: data.scripts.campaign.submarkets

  • Register your faction in AFFECTED_FACTIONS

DS_Database.java

package: data.scripts.variants

  • List of weapons, ships and wings that DS should not care about (IBB bosses, testing stuff, TWIG parts, etc.)
  • Disallow certain variant archetypes or factions from using certain hullmods
  • Shield quality groupings: terrible, bad, okay, good

Secondary

DS_BaseRandomBattle.java

package: data.missions

  • Register your faction here to make it available in the random battle
  • Also fleet size mult, allowed background planets, faction name and ship prefix

DS_FleetFactory.java

package: data.scripts.campaign

  • getNumerals(CampaignFleetAPI fleet): Handling for numerals after ship name

DS_VariantRandomizer

package: data.scripts.variants

  • createVariant():
    • Variant type preferences (PD, strike, etc.) for certain hulls
    • Asymmetry, broadside settings for certain hulls
    • Custom OP multipliers for certain factions
  • doUpgrades()
    • Faction and hull preferences for which stats to emphasize when generating a ship variant
    • Hullmod picking logic (add custom hullmods here)
    • Some hulls have custom handling for weapon groups as needed

DS_VariantNamer

package: data.scripts.variants

  • Variant names

DS_WeaponGrouper

package: data.scripts.variants

  • Put weapons in the provided lists to help the weapon grouper handle them smartly

DS_FleetRandomizer

package: data.scripts.variants

  • Add bosses to SPECIAL_SHIPS

nexerelin_options.json

  • Controls whether player_npc gets your faction's stuff by default

Updated