Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Blog post: Skills and Story Points (07/08/19)

Author Topic: Upcoming Starship Legends Integration Options for Faction Mods  (Read 212 times)

Sundog

  • Admiral
  • *****
  • Posts: 773
    • View Profile
Upcoming Starship Legends Integration Options for Faction Mods
« on: September 13, 2019, 09:50:56 PM »

I've been working on a batch of new features for starship legends, and some of them interact with faction content, so I wanted to give faction mod authors/maintainers the chance to weigh in on how the integration process will work. Little of what I describe in this post is set in stone, so please feel free to let me know if you think any of it needs to be changed. These are the new features:
  • A bar event informing the player of famous or legendary flagships in fleets that already exist in the sector (enabled by default for fleets of factions visible in the intel screen, disabled by default otherwise)
  • A bar event informing the player of famous or legendary derelict ships that have been lost out in the sector's outskirts (inidividual hulls must be whitelisted for this feature, along with probability weights)
  • But most importantly, NPC fleets will have reputations much like the ships in the player's fleet, and each faction can have different probabilities for their fleets to have each trait. It looks like this:


Or, if you're up against drones or anything else that doesn't make sense for the commander to define the fleet's reputation, this:
Spoiler
[close]

As an example of the ways factions can influence the reputations of their fleets, here is a list of short descriptions for the vanilla factions:
Spoiler
  • Hegemony fleets frequently have traits related to weapons and durability.
  • Tri Tachyon fleets have a high chance to get traits that modify fighters and phase ships.
  • Sindrian Diktat fleets usually have increased range and reduced mobility, with a high chance of weapon related traits.
  • Luddic fleets are almost always poorly maintained and believed to be cursed, but often deal more damage.
  • Persian League fleets are likely to get traits that modify fighters, shields, and flux stats.
  • Domain drone fleets all have the same traits, improving staying power at the expense of speed and accuracy.
  • Remnant fleets all have the same traits, making them even more powerful at the expense of increased overload and vent duration.
  • Independent and pirate fleets have decent chance to get the blockade runner trait, which is normally unavailable to other factions.
  • Fleets from modded factions that haven't integrated with starship legends will get a balanced set of randomized traits.
[close]

I'd be happy to configure and add the necessary integration files directly to starship legends, so if you want me to handle it, please provide me with the following information:
Spoiler
  • The faction file name (e.g. "\data\world\factions\hegemony.faction")
  • Whether or not the fleets of your faction should be able to have famous flagships
  • Whether or not your faction's markets should allow the famous derelict bar event
  • Whether or not your faction's markets should allow the famous flagship bar event
  • The hull IDs of any ships that should have a chance to be famous derelicts
  • A description of what types of traits the fleets of your faction should be likely to get
[close]

I've tried to make it as easy as possible to integrate with these features (it doesn't even require a new file). If you want to handle integration yourself, you'll want to add the json below to the "custom" section of your ".faction" file and edit it to your liking. All of the fields are optional (you shouldn't need most of it), and may be deleted if you just want to use the default for that field.

If you want to test it, here's a poorly tested dev version of starship legends. Neither of the bar events are implemented yet, but all the faction/fleet reputation functionality should be working.
Code
"starshipLegendsConfig":{
# Prevents references to crew in the faction's fleets, sometimes substituting
# "crew" with "AI persona"
"useCrewlessTraitNames":false,

# Changes the short description prior to listing traits. Enter %s where the
# commander's name should be, if you want it to apear at all
"descriptionOverride":"The ships in %s's fleet are known for having the following traits:",

# Allows the fleets of this faction to have famous flagships, which the
# player may find out about from a bar event
"allowFamousFlagshipsInFleets":true,

# If true, the bars at markets owned by your faction will sometimes have
# patrons that offer information about the whereabouts of famous
# flagships or derelicts
"allowFamousFlagshipBarEvent":true,
"allowFamousDerelictBarEvent":true,

# Ships in this list may be chosen as a derelict for the derelict bar event
# Generally, only ships defined by your faction mod should be listed here
"derelictFrequency":{
"my_hull_id":1, # 1 is as common as it gets. Higher values will be clamped
"my_other_hull_id":0.1, # This hull will have 10% of the chance to be chosen
},

# Ships in this list may be chosen as a derelict for the derelict bar event,
# but only at markets owned by your faction
"exclusiveDerelictFrequency":{

# Since this ship id is also in derelictFrequency, the sum of both
# probabilities will be used at at your markets. Probabilities are
# not capped for this list
"my_other_hull_id":0.5,
},

# Edit the values in the lists below to change the probability of fleets from
# this faction getting traits. Higher numbers make traits more likely.
# To disable a trait, set its value to 0. Removing a trait from the list will
# only revert it to the default value.
"goodTraitFrequency":{
"peak_cr_time":1,
"repair":1,
"malfunction":1,
"mount_durability":1,
"engine_durability":1,
"hull_integrity":1,
"armor_strength":1,
"emp_resistance":1,
"engine_power":1,
"maneuverability":1,
"damage":1,
"weapon_stability":1,
"turret_rotation":1,
"range":1,
"fighter_damage":0.25,
"fighter_speed":0.25,
"fighter_durability":0.25,
"refit_time":0.25,
"overload_time":1,
"flux_capacity":1,
"flux_dissipation":1,
"vent_rate":1,
"shield_raise_rate":1,
"shield_stability":1,
"shield_strength":1,
"phase_cost":0,
"phase_cooldown":0,
"blockade_runner":0,
},

"badTraitFrequency":{
"peak_cr_time":1,
"repair":1,
"malfunction":1,
"mount_durability":1,
"engine_durability":1,
"hull_integrity":1,
"armor_strength":1,
"emp_resistance":1,
"engine_power":1,
"maneuverability":1,
"damage":1,
"weapon_stability":1,
"turret_rotation":1,
"range":1,
"fighter_damage":0.25,
"fighter_speed":0.25,
"fighter_durability":0.25,
"refit_time":0.25,
"overload_time":1,
"flux_capacity":1,
"flux_dissipation":1,
"vent_rate":1,
"shield_raise_rate":1,
"shield_stability":1,
"shield_strength":1,
"phase_cost":0,
"phase_cooldown":0,
"cursed":1,
"phase_mad":0,
},

# By defining a "forcedPreset", all fleets in the faction will have the traits you
# specify, in the specified order. This list will override the frequency lists
# above, until they run out of traits
"forcedPreset":{

# The number of traits each fleet in the faction will have, unless the player
# modifies the max traits possible, in which case it will be scaled proportionally
# The default max number of traits is 8
"defaultNumberOfTraits":6,

"goodTraits":[
# Put good traits here. The first traits listed will be chosen first. At
# least defaultNumberOfTraits must be chosen if you want to prevent other
# good traits from being chosen
],

"badTraits":[
# Put bad traits here. The first traits listed will be chosen first. At
# least half of defaultNumberOfTraits should be chosen if you want to prevent
# other bad traits from being chosen
],

# Move traits from below to the lists above. Feel free to delete the unused traits list later
"unusedTraitsThatAreOnlyHereForYourConvenience":[
"peak_cr_time",
"repair",
"malfunction",
"mount_durability",
"engine_durability",
"hull_integrity",
"armor_strength",
"emp_resistance",
"engine_power",
"maneuverability",
"damage",
"weapon_stability",
"turret_rotation",
"range",
"fighter_damage",
"fighter_speed",
"fighter_durability",
"refit_time",
"overload_time",
"flux_capacity",
"flux_dissipation",
"vent_rate",
"shield_raise_rate",
"shield_stability",
"shield_strength",
"cursed",
]
}

# This section allows you to define forced presets as above, but only for
# commanders with specific names (like IBB commanders, for example)
"forcedCommanderPresets":{

# By defining "Commander Name" below, all fleets with commanders named
# "Commander Name" will have the specified traits
"Commander Name":{

# Everything in this section may be defined in the same way as the
# contents of the "forcedPreset" section
"defaultNumberOfTraits":6,
"goodTraits":[
],
"badTraits":[
],
}
}
}

I'm happy to help with integration in any way I can, so feel free to ask for clarification/help/etc.
« Last Edit: September 17, 2019, 09:10:09 PM by Sundog »
Logged

Vayra

  • Admiral
  • *****
  • Posts: 501
  • jangala delenda est
    • View Profile
Re: Upcoming Starship Legends Integration Options for Faction Mods
« Reply #1 on: September 13, 2019, 11:26:50 PM »

Can we manually enable/disable the bar events during play, or will they automatically only happen when the faction is present (at least one non-hidden market) in the sector?

EDIT: Oh, duh, just read the comment on that. Could an option be added to enable them in specific other-faction bars, possibly with settings to make it happen only when the main-faction is present or all the time?
Logged
Kadur Remnant: http://fractalsoftworks.com/forum/index.php?topic=6649
Vayra's Sector: http://fractalsoftworks.com/forum/index.php?topic=16058
Vayra's Ship Pack: http://fractalsoftworks.com/forum/index.php?topic=16059

im gonna push jangala into the sun i swear to god im gonna do it

Sundog

  • Admiral
  • *****
  • Posts: 773
    • View Profile
Re: Upcoming Starship Legends Integration Options for Faction Mods
« Reply #2 on: September 14, 2019, 08:29:05 AM »

Could an option be added to enable them in specific other-faction bars, possibly with settings to make it happen only when the main-faction is present or all the time?
Hmm... not sure exactly what you mean, but I could add a globally accessible method for manually toggling whether or not bar events are available for specific markets. Something like this:
Code
setAvailabilityOfFamousDerelictEventAtMarket(MarketAPI market, boolean isAvailable);
setAvailabilityOfFamousFlagshipEventAtMarket(MarketAPI market, boolean isAvailable);
« Last Edit: September 14, 2019, 09:15:26 AM by Sundog »
Logged

Sundog

  • Admiral
  • *****
  • Posts: 773
    • View Profile
Re: Upcoming Starship Legends Integration Options for Faction Mods
« Reply #3 on: September 14, 2019, 04:51:42 PM »

Due to popular demand (aka Meso) I'll also make it possible to integrate in a more conventional way; by placing your info in "\data\config\starship_legends\factionConfigurations.json" and creating a JSON object keyed to each faction ID. Like this:

Code
"my_faction_id":{
"allowFamousFlagshipsInFleets":false,
"allowFamousFlagshipBarEvent":false,
"allowFamousDerelictBarEvent":true,

        #along with any other default setting overrides
},
"my_other_faction_id":{
#...
},
« Last Edit: September 14, 2019, 04:54:54 PM by Sundog »
Logged