1
General Discussion / Replacing / editing the default ships of a faction
« on: May 31, 2021, 07:50:59 AM »
Hey everyone, I have a question regarding modding or editing the game files. Let me start off by saying I have no modding experience and limited coding experience.
I’m wondering if it’s possible to replace a factions default ships with other ships, possibly even modded ones, with some file editing or through console commands. I like adding factions through mods, and I love the standard hand-crafted core worlds and the main questline (instead of random core worlds), but that pretty much means I’m always fighting the same ships. It is always the hegemony busting my balls for transporting illegal trade goods and doing AI inspections on my colonies. If I want a modded faction to be my enemy, I have to pretty much attack it for no good reason, just so it will attack me back. Can I somehow replace all the hegemonies default ships (so all the moras, dominators, onslaughts...) with different ships? I would love for example If it was diable avionics (a modded faction) that would do the AI inspections. If I wanted to do that, would it be easier to edit the diable avionics files or the hegemony files? Is it easier to edit the default ships, or rather the “doctrines” and “laws” of a faction? If I could just swap the faction ships around, for example give the ludic path high-tech ships, and the hegemony midline ships, that would be awesome.
There is a console command (from the console commands mod) “SetMarketOwner” that allows you to swap around the faction planets, but it won’t change their doctrines and policies, so that doesn’t really work, unless I could combine it with some file editing.
I also checked the modding tutorial on the wiki, specifically https://starsector.fandom.com/wiki/Intro_to_Modding#Campaign_Spawning_.28also_required_for_Custom_Production_from_Colonies.29_2 , but if i understand that correctly, I would have to edit all the tags of every single ship, so that seems a bit unreasonable. A file that seems relevant is “*\starsector-core\data\world\factions\hegemony.faction” , but I’m not sure how to go about editing the values, or rather what to edit. For example there is a value called "knownShips", but it has both a list of tags and a list of hulls, so do I need to edit both lists? Do I also need to edit "knownWeapons" and "knownHullMods"? Won’t it somehow break something else, for example the XIV variants? There are also the "illegalCommodities" and “custom” values, which seem to be relevant to my interests, but there I don’t see anything about AI inspections in the file…
I would really appreciate it if someone could point me on the right path on how to accomplish this, I would rather not haphazardly replace some lines that I don’t understand just so my game crashes 5 hours into a playthrough, just because I'm also running nexerlin or something...
Also, I feel like there must be a ton of people that have a similar stance on the hand-crafted core worlds and faction mods, so for those super smart and ambitious modding guys around here, I guess this is like a mod suggestion…
Thanks!
I’m wondering if it’s possible to replace a factions default ships with other ships, possibly even modded ones, with some file editing or through console commands. I like adding factions through mods, and I love the standard hand-crafted core worlds and the main questline (instead of random core worlds), but that pretty much means I’m always fighting the same ships. It is always the hegemony busting my balls for transporting illegal trade goods and doing AI inspections on my colonies. If I want a modded faction to be my enemy, I have to pretty much attack it for no good reason, just so it will attack me back. Can I somehow replace all the hegemonies default ships (so all the moras, dominators, onslaughts...) with different ships? I would love for example If it was diable avionics (a modded faction) that would do the AI inspections. If I wanted to do that, would it be easier to edit the diable avionics files or the hegemony files? Is it easier to edit the default ships, or rather the “doctrines” and “laws” of a faction? If I could just swap the faction ships around, for example give the ludic path high-tech ships, and the hegemony midline ships, that would be awesome.
There is a console command (from the console commands mod) “SetMarketOwner” that allows you to swap around the faction planets, but it won’t change their doctrines and policies, so that doesn’t really work, unless I could combine it with some file editing.
I also checked the modding tutorial on the wiki, specifically https://starsector.fandom.com/wiki/Intro_to_Modding#Campaign_Spawning_.28also_required_for_Custom_Production_from_Colonies.29_2 , but if i understand that correctly, I would have to edit all the tags of every single ship, so that seems a bit unreasonable. A file that seems relevant is “*\starsector-core\data\world\factions\hegemony.faction” , but I’m not sure how to go about editing the values, or rather what to edit. For example there is a value called "knownShips", but it has both a list of tags and a list of hulls, so do I need to edit both lists? Do I also need to edit "knownWeapons" and "knownHullMods"? Won’t it somehow break something else, for example the XIV variants? There are also the "illegalCommodities" and “custom” values, which seem to be relevant to my interests, but there I don’t see anything about AI inspections in the file…
I would really appreciate it if someone could point me on the right path on how to accomplish this, I would rather not haphazardly replace some lines that I don’t understand just so my game crashes 5 hours into a playthrough, just because I'm also running nexerlin or something...
Also, I feel like there must be a ton of people that have a similar stance on the hand-crafted core worlds and faction mods, so for those super smart and ambitious modding guys around here, I guess this is like a mod suggestion…
Thanks!