Author Topic: Faction Allies  (Read 806 times)

Offline Jacen Sevas

  • Regular Member
  • Foreigner
  • *
  • Posts: 4
Faction Allies
« on: March 08, 2017, 11:16:52 pm »
In Factions.xml there's an Allies and Enemies line, by default all factions have every other faction set to enemy. I tried setting some factions as allies to each other but after 30 seconds the credits roll and it says you were defeated, every time. I've even messed around with Campaigns.xml but it seems like the only way to fix this is to make every faction enemies of each other again. Does anyone know a way to fix this? Or at least a different way to simulate factions being allies?

Offline Kad_Venku

  • Administrator
  • Senior Lt.
  • ******
  • Posts: 85
Re: Faction Allies
« Reply #1 on: March 08, 2017, 11:44:20 pm »
Does anyone know a way to fix this?
What those settings basically do is defining which other factions a faction can attack.
You can set factions to non-hostile this way, but there is no way to create actual alliances between existing factions. Also, you're going to break the battle behaviour.
Consider a planet with two "friendly" factions A and B having units there and a third faction C which is hostile to at least one of the friendly factions, it will initiate staged battles like so: A vs. B; A vs. C, and depending on the outcome, B vs. C. And then the game no longer knows what to do and bugs out completely.
So in short: Don't change those settings, because it messes up the game big deal.

Or at least a different way to simulate factions being allies?
I would argue yes, but simulating an alliance is a very involved process including heavy scripting as well as proper presentation and representation of the added game logic. With all that done, it is possible to create a diplomacy system and simulate alliances (without using the game's default features) and introduce it as a self contained game mechanic. Problem here is, the diplomacy mechanic is unique to our mod and one of its major features, so I can't and won't just give that away, way before release. Once the mod has been released, we'll provide full access to the source code including a full documentation of how we implemented that feature. I hope you understand that.

Offline Jacen Sevas

  • Regular Member
  • Foreigner
  • *
  • Posts: 4
Re: Faction Allies
« Reply #2 on: March 09, 2017, 07:35:53 am »
Ah I see. that sucks but does make sense, and makes me question why they put in an Allies line in the first place. I suppose either unimplemented ideas or it was needed to complete the enemies coding

And yeah, I completely understand you not wanting to just giving away that coding. I guess I'll just have to be even more excited for the release then. And wow, this mod is going to be so great it's even going to make my personal mods better  :D
« Last Edit: March 09, 2017, 07:38:20 am by Jacen Sevas »

Offline Wariscool

  • Staff
  • Ensign
  • ***
  • Posts: 34
Re: Faction Allies
« Reply #3 on: March 09, 2017, 10:20:07 am »
However if you want armies to be fighting along side each other, I would maybe suggest attempting to modify the factions for skirmish mode. There is no GC here to worry about, so there is probably more chance of getting it to work this way. Of course this will probably still break the GC. Maybe think along the lines of an extra starbase or something.

Offline Jacen Sevas

  • Regular Member
  • Foreigner
  • *
  • Posts: 4
Re: Faction Allies
« Reply #4 on: March 10, 2017, 02:41:51 am »
Interesting, thanks I'll give it a try. Although i mostly wanted to do this for GC, this will still be a great way to test it out while i wait for the diplomacy coding to be released. How do you think this will work with multiplayer? Could I get a second person to play as an allied faction?