Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Advanced faction modding  (Read 919 times)

Okim

  • Admiral
  • *****
  • Posts: 2161
    • View Profile
    • Okim`s Modelling stuff
Advanced faction modding
« on: January 10, 2022, 09:27:48 PM »

Hey,

haven't found any exact info on this, so making a thread.

Is there any way to keep a faction from having colonies / stations? Just be a 'ghost' faction that is present in news, spawns fleets from independent colonies / stations or random spots on the map.
There are some refugees, merc and scavengers factions in the game folders, but they don't have anything in their files indicating a 'switch' that makes them 'just spawning fleets'.

I believe that these triggers are hidden in API which i would like to avoid messing with :D

IonDragonX

  • Admiral
  • *****
  • Posts: 816
    • View Profile
Re: Advanced faction modding
« Reply #1 on: January 10, 2022, 11:49:59 PM »

Is there any way to keep a faction from having colonies / stations? Just be a 'ghost' faction that is present in news, spawns fleets from independent colonies / stations or random spots on the map.
Not really. Each faction oriented mod maker would have to double their work, making one mod they actually want and another mod to be your 'ghost' faction idea.
Logged

SCC

  • Admiral
  • *****
  • Posts: 4142
    • View Profile
Re: Advanced faction modding
« Reply #2 on: January 11, 2022, 12:16:01 AM »

You should check out how Starlight Cabal from Underworld works. They don't have their own colonies and are based from TT colonies instead.

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Advanced faction modding
« Reply #3 on: January 11, 2022, 12:19:11 AM »

Is there any way to keep a faction from having colonies / stations? Just be a 'ghost' faction that is present in news, spawns fleets from independent colonies / stations or random spots on the map.
There are some refugees, merc and scavengers factions in the game folders, but they don't have anything in their files indicating a 'switch' that makes them 'just spawning fleets'.
It is possible, but you'd have to pretty much implement all mechanics yourself as it is not natively supported by the game. There are no "hidden" triggers to do that: Mercs and scavengers are exactly what you are asking for, "factions" without markets with a special implementation you'd have to reproduce.
Logged
 

Okim

  • Admiral
  • *****
  • Posts: 2161
    • View Profile
    • Okim`s Modelling stuff
Re: Advanced faction modding
« Reply #4 on: January 12, 2022, 02:33:19 PM »

Any idea why is this happening?

162452 [Thread-3] INFO  com.fs.starfarer.api.impl.campaign.intel.FactionHostilityIntel  - Making factions hostile: Interstellar States of America <-> Russian Stellar Federation
162512 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.api.impl.campaign.intel.FactionHostilityManager.getConflictId(FactionHostilityManager.java:23)
   at com.fs.starfarer.api.impl.campaign.intel.FactionHostilityManager.getHostilties(FactionHostilityManager.java:51)
   at com.fs.starfarer.api.impl.campaign.intel.FactionHostilityManager.areHostilities Ongoing(FactionHostilityManager.java:46)
   at com.fs.starfarer.api.impl.campaign.intel.FactionHostilityManager.startHostiliti es(FactionHostilityManager.java:122)
   at com.fs.starfarer.api.impl.campaign.intel.FactionHostilityManager.startHostiliti es(FactionHostilityManager.java:118)
   at com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl.addScriptsIfNeeded(CoreLifecyclePluginImpl.java:579)
   at com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl.onNewGameAfterEconom yLoad(CoreLifecyclePluginImpl.java:802)
   at com.fs.starfarer.campaign.save.CampaignGameManager.o00000(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.dialogDismissed(Unknown Source)


It gets stuck on this line. I've checked faction ids - nothing is missing there:

   public static String getConflictId(FactionAPI a, FactionAPI b) {
      String id1 = a.getId();
      String id2 = b.getId();
      if (id1.compareTo(id2) < 0) {
         return id1 + "_" + id2;
      }
      return id2 + "_" + id1;
   }


Okim

  • Admiral
  • *****
  • Posts: 2161
    • View Profile
    • Okim`s Modelling stuff
Re: Advanced faction modding
« Reply #5 on: January 12, 2022, 02:54:14 PM »

I now suspect some API coded forced relationship changes somewhere.
Which probably include some Ludd or Syndicate factions which i don't have any more...

Okim

  • Admiral
  • *****
  • Posts: 2161
    • View Profile
    • Okim`s Modelling stuff
Re: Advanced faction modding
« Reply #6 on: January 12, 2022, 03:01:40 PM »

Yeah, i was right.

Persean League vs Hegemony and Ludd Church vs Tri-Tachyon wars are prescripted as well.