Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: Lord Heart Night on July 19, 2020, 05:23:52 PM

Title: Total noob here, how to create faction?
Post by: Lord Heart Night on July 19, 2020, 05:23:52 PM
I have no idea what im doing but ive always kinda fancied making a faction, specifically a faction that kinda used remnant ships, remnant nexus for stations and actually made said faction an actual threat rather than just ships to blow up for AI brain harvesting.

But i have no experience coding so im kinda after pointers, any help would be appreciated
thank you.
Title: Re: Total noob here, how to create faction?
Post by: Thaago on July 19, 2020, 06:15:49 PM
Here is a step by step guide!

https://starsector.fandom.com/wiki/Intro_to_Modding
Title: Re: Total noob here, how to create faction?
Post by: Mondaymonkey on July 19, 2020, 10:30:29 PM
If you are really want to do this - you may consider me as tester and <minimal> support.

Road map is approximately:

1. Create a star system (or create a planet in existed system) that will be home for your faction.
2. Create a sceleton of the faction, including flags, known blueprints, used portraits and etc, etc.
3. Create custom planetary structures (like station - nexus) and probably custom resources, used in there.
4. ...
5. Other cool AI stuff.
Title: Re: Total noob here, how to create faction?
Post by: Lord Heart Night on July 21, 2020, 01:59:15 PM
If you are really want to do this - you may consider me as tester and <minimal> support.

Road map is approximately:

1. Create a star system (or create a planet in existed system) that will be home for your faction.
2. Create a sceleton of the faction, including flags, known blueprints, used portraits and etc, etc.
3. Create custom planetary structures (like station - nexus) and probably custom resources, used in there.
4. ...
5. Other cool AI stuff.
I'll want to make this game as other mod friendly as possible so im unlikely to add anything too "new", especially as i want these guys to be full [REDACTED]
Title: Re: Total noob here, how to create faction?
Post by: Lord Heart Night on July 21, 2020, 01:59:54 PM
Here is a step by step guide!

https://starsector.fandom.com/wiki/Intro_to_Modding
Thank you for this, much appreciated
Title: Re: Total noob here, how to create faction?
Post by: Lord Heart Night on July 25, 2020, 08:19:39 AM
Here is a step by step guide!

https://starsector.fandom.com/wiki/Intro_to_Modding

Having gpne through the guide, theres nothing here about factions themselves
Title: Re: Total noob here, how to create faction?
Post by: Mondaymonkey on July 25, 2020, 08:52:42 AM
Is that (https://fractalsoftworks.com/forum/index.php?topic=1282.0) better?
Title: Re: Total noob here, how to create faction?
Post by: Thaago on July 25, 2020, 09:33:20 AM
Here is a step by step guide!

https://starsector.fandom.com/wiki/Intro_to_Modding

Having gpne through the guide, theres nothing here about factions themselves

Huh, that section is empty! Hmmm. Well, here is some documentation on the .faction file: https://starsector.fandom.com/wiki/.faction_File_Overview

And here for making a star system: (though I note that the intro to modding has a longer version)
https://starsector.fandom.com/wiki/Star_System_Tutorial

Is that (https://fractalsoftworks.com/forum/index.php?topic=1282.0) better?

Hmmm, thats quite old... I don't know if generator files are used anymore.



It seems like this is an area where it would be good for the modding community to put together a resource (under the faction heading in the intro to modding is the perfect place :p).

For right now, what is it exactly that you want to accomplish? Do you want custom ships in your faction? A custom flag? Its own star system?
Title: Re: Total noob here, how to create faction?
Post by: Mondaymonkey on July 25, 2020, 09:44:18 AM
Hmmm, thats quite old... I don't know if generator files are used anymore.

Oh, yes it is outdated. However it is the best explanation how to create faction based on existed faction's files so far. Doing absolutely same reverse-engineering things with modern faction files will do the job.

Title: Re: Total noob here, how to create faction?
Post by: Mondaymonkey on July 25, 2020, 09:55:28 AM
Actually... I do not think .faction files do need tutorials. See the hegemony.faction file, there are lots of #comments and the rest is intuitive. Better than any tutorial:

Spoiler
Code: hegemony.faction
{
id:"hegemony",
"color":[245,150,30,255],
"displayName":"Hegemony",
"displayNameWithArticle":"the Hegemony",
"logo":"graphics/factions/hegemony.png",
"crest":"graphics/factions/crest_hegemony.png",
"shipNamePrefix":"HSS",
"shipNameSources":{
"HEGEMONY":1,
"BRITISH_NAVY":1,
"ROMAN":2,
"GREEK":1,
"SPACE":1,
"GENERAL":1,
},
"names":{
"old english":1,
"modern":1,
"world":1,
"future":1,
"myth":1,
},

# variantOverrides restricts hulls to listed variants and adjusts their probability
"variantOverrides":{
},

# multiplier for how often hulls show up in the faction's fleets
"hullFrequency":{
"tags":{
"heg_aux_bp":2,
"XIV_bp":0.25,
},
"hulls":{
"buffalo2":0, # just say no
},
},
# ships the faction gets access to when importing S&W out-of-faction
"shipsWhenImporting":{
"tags":["base_bp", "heg_aux_bp", "lowtech_bp"],
"hulls":[
],
},
"knownShips":{
"tags":["base_bp", "heg_aux_bp", "lowtech_bp", "midline_bp", "XIV_bp", "hegemony"],
"hulls":[
"atlas",
"monitor",
"prometheus",
"legion",
"onslaught",
"gryphon",
"eagle",
"valkyrie",
],
},
# listing ships here will make the faction mostly use them even if other hulls become available
"priorityShips":{
"tags":[],
"hulls":[
"condor",
"mora",
"legion",
"onslaught",
"onslaught_xiv",
],
},
"knownFighters":{
"tags":["base_bp", "lowtech_bp", "midline_bp", "hegemony"],
"fighters":[
"thunder_wing",
"hoplon_wing",
],
},
"priorityFighters":{
"tags":[],
"fighters":[
],
},
"knownWeapons":{
"tags":["base_bp", "lowtech_bp", "midline_bp", "hightech_bp", "missile_bp", "hegemony"],
"weapons":[
"railgun",
"dualflak",
"heavymauler",
"hveldriver",
"gauss",
"mjolnir",
"sabotpod",
"phasecl",
"cyclone",
"hurricane",
],
},
"priorityWeapons":{
"tags":[],
"weapons":[
],
},
"knownHullMods":{
"tags":["base_bp", "hegemony"],
"hullMods":[
"advancedshieldemitter",
"turretgyros",
"armoredweapons",
"augmentedengines",
"autorepair",
"expanded_deck_crew",
"magazines",
"missleracks",
"extendedshieldemitter",
"frontemitter",
"frontshield",
"heavyarmor",
"insulatedengine",
"targetingunit",
"nav_relay",
"operations_center",
"fluxbreakers",
"stabilizedshieldemitter",
"frontshield",  # makeshift
"surveying_equipment",
"efficiency_overhaul",
],
},
"factionDoctrine":{
"warships":4,
"carriers":2,
"phaseShips":1,

"officerQuality":5,
"shipQuality":1,
"numShips":1,

"shipSize":4,

"aggression":2,

"combatFreighterProbability":0.1,      # instead of some portion of the freighters in a fleet
"combatFreighterCombatUseFraction":0,  # as part of the normal combat lineup
"combatFreighterCombatUseFractionWhenPriority":0,   # as part of normal combat lineup, when marked as priority ship
"autofitRandomizeProbability":0.1,

"commanderSkillsShuffleProbability":0,
"commanderSkills":[
"officer_management",
"coordinated_maneuvers",
"fighter_doctrine",
"electronic_warfare",
],
},
"illegalCommodities":[
"drugs",
"organs",
"hand_weapons",
"ai_cores",
],
"music":{
"theme":"music_hegemony_market_neutral",
"market_neutral":"music_hegemony_market_neutral",
"market_hostile":"music_hegemony_market_hostile",
"market_friendly":"music_hegemony_market_friendly",
"encounter_neutral":"music_hegemony_encounter_neutral",
"encounter_hostile":"music_hegemony_encounter_hostile",
"encounter_friendly":"music_hegemony_encounter_friendly",
},
"internalComms":"hegemony_internal",
#"tariffFraction":0.4,
#"tollFraction":0.1,
#"fineFraction":0.25,
"portraits":{
"standard_male":[
"graphics/portraits/portrait_hegemony01.png",
"graphics/portraits/portrait_hegemony02.png",
"graphics/portraits/portrait_hegemony05.png",
"graphics/portraits/portrait_hegemony07.png",
"graphics/portraits/portrait_hegemony09.png",
"graphics/portraits/portrait_hegemony12.png",
"graphics/portraits/portrait_hegemony13.png",
"graphics/portraits/portrait_mercenary01.png",
"graphics/portraits/portrait_mercenary03.png",
"graphics/portraits/portrait13.png",
"graphics/portraits/portrait15.png",
#"graphics/portraits/portrait26.png",
"graphics/portraits/portrait33.png",
],
"standard_female":[
"graphics/portraits/portrait_hegemony03.png",
"graphics/portraits/portrait_hegemony04.png",
"graphics/portraits/portrait_hegemony08.png",
"graphics/portraits/portrait_hegemony10.png",
"graphics/portraits/portrait_hegemony11.png",
"graphics/portraits/portrait_hegemony14.png",
"graphics/portraits/portrait_mercenary02.png",
"graphics/portraits/portrait16.png",
"graphics/portraits/portrait34.png",
"graphics/portraits/portrait37.png",
],
},
"ranks":{
"ranks":{
"factionLeader":{"name":"High Hegemon"},
"spaceCommander":{"name":"Commander"},
},
"posts":{
"factionLeader":{"name":"High Hegemon"},
"patrolCommander":{"name":"Patrol Commander"},
"fleetCommander":{"name":"Fleet Commander"},
"baseCommander":{"name":"Base Commander"},
},
},
"custom":{
"offersCommissions":true,
"engagesInHostilities":true,
"buysAICores":true,
"AICoreValueMult":1,
"AICoreRepMult":2,
"buysSurveyData":true,
"hostilityImpactOnGrowth":true,
"caresAboutAtrocities":true,
"punitiveExpeditionData":{
"vsCompetitors":false,
"vsFreePort":true,
"canBombard":false,
"territorial":true,
},
},


},
[close]

All newbie modder needs - change line by line according to what he want.

EDIT: In this particular case editing remnants.faction would be more effective:
Spoiler
Code
{
id:"remnant",
"displayName":"Remnants",
"displayNameWithArticle":"the remnant",
"displayNameLong":"AI Remnants",
"displayNameLongWithArticle":"the AI Remnants",
"entityNamePrefix":"Remnant",
"personNamePrefix":"Remnant",
"personNamePrefixAOrAn":"a",
"displayNameIsOrAre":"are",

"logo":"graphics/factions/ai_remnant.png",
"crest":"graphics/factions/crest_ai_remnant.png",
"shipNamePrefix":"TTDS",

"color":[70,255,235,255],
"baseUIColor":[70,255,235,255],
#"color":[100,100,100,255],
#"baseUIColor":[155,155,155,255],

#"darkUIColor":[31,94,112,175],
#"gridUIColor":[70,200,255,75],

"showInIntelTab":false,

"shipNameSources":{
"MERCANTILE":1,
"SPACE":1,
"DERELICT_DRONE":1,
},
"names":{
"ai":1,
},
"variantOverrides":{
},
# multiplier for how often hulls show up in the faction's fleets
"hullFrequency":{
"tags":{
},
"hulls":{
},
},
# ships the faction gets access to when importing S&W out-of-faction
"shipsWhenImporting":{
"tags":["remnant"],
"hulls":[
],
},
"knownShips":{
"tags":["remnant"],
"hulls":[
],
},
# listing ships here will make the faction mostly use them even if other hulls become available
"priorityShips":{
"tags":[],
"hulls":[
],
},
"knownFighters":{
"tags":["remnant"],
"fighters":[
],
},
"priorityFighters":{
"tags":[],
"fighters":[
],
},
"knownWeapons":{
"tags":["base_bp", "lowtech_bp", "midline_bp", "hightech_bp", "missile_bp", "remnant"],
"weapons":[
"lightneedler",
"railgun",
"dualflak",
"heavymauler",
"hveldriver",
"heavyneedler",
"gauss",
"mjolnir",
"multineedler",
"sabotpod",
"phasecl",
"cyclone",
"hurricane",
"squall",
"locust",
"pdburst",
"amblaster",
"phasebeam",
"heavyblaster",
"heavyburst",
"ionpulser",
"ionbeam",
"plasma",
"guardian",
"tachyonlance",
],
},
"priorityWeapons":{
"tags":[],
"weapons":[
],
},
"knownHullMods":{
"tags":["base_bp", "remnant"],
"hullMods":[
"advancedshieldemitter", # accelerated
"advancedoptics",
"turretgyros",
"armoredweapons",
"augmentedengines",
"autorepair",
"converted_hangar",
"eccm",
"ecm",
"expanded_deck_crew",
"magazines",
"missleracks",
"extendedshieldemitter",
"frontemitter",
"frontshield",  # makeshift
"hardenedshieldemitter",
"heavyarmor",
"insulatedengine",
"pointdefenseai",
"targetingunit",
"nav_relay",
"adaptiveshields", # omni
"operations_center",
"recovery_shuttles",
"fluxbreakers",
"solar_shielding",
"stabilizedshieldemitter",
"surveying_equipment",
],
},
"factionDoctrine":{
"warships":4,
"carriers":2,
"phaseShips":1,

"officerQuality":5,
"shipQuality":3,
"numShips":1,

"shipSize":4,

"aggression":3,

"combatFreighterProbability":0,      # instead of some portion of the freighters in a fleet
"combatFreighterCombatUseFraction":1, # as part of the normal combat lineup
"combatFreighterCombatUseFractionWhenPriority":1,   # as part of normal combat lineup, when marked as priority ship
"autofitRandomizeProbability":0.25,

"commanderSkillsShuffleProbability":0,
"commanderSkills":[
"electronic_warfare",
"officer_management",
"coordinated_maneuvers",
"fighter_doctrine",
],
},
"shipRoles":{
"remnantStation1":{
"remnant_station2_Damaged":10,
"remnant_station2_Standard":10,
},
},
"illegalCommodities":[
],
"music":{
"encounter_hostile":"music_tritach_encounter_hostile",
},
#"internalComms":"hegemony_internal",
"portraits":{
"standard_male":[
"graphics/portraits/portrait_ai1b.png",
"graphics/portraits/portrait_ai2b.png",
"graphics/portraits/portrait_ai3b.png",
],
"standard_female":[
"graphics/portraits/portrait_ai1b.png",
"graphics/portraits/portrait_ai2b.png",
"graphics/portraits/portrait_ai3b.png",
],
},
"ranks":{
"ranks":{
},
"posts":{
},
},
"custom":{
"engageWhenEvenStrength":true,
"allowsTransponderOffTrade":true, # to prevent cargoscan dialog from "patrols"
"postsNoBounties":true,
"fightToTheLast":true, # order a full assault instead of retreating, in most cases
},
"fleetTypeNames":{
"patrolSmall":"Fragment",
"patrolMedium":"Sub-Ordo",
"patrolLarge":"Ordo",
"battlestation":"Nexus",
},
},
[close]
Title: Re: Total noob here, how to create faction?
Post by: Lord Heart Night on October 17, 2020, 02:32:10 AM
That is exactly what i was looking for, Thank you