Faction Relations

Is it possible to set two factions' relationship between one another through XML files without there being a scenario? I've been looking for a while through the code and the forums, but the closest thing on the forums is a thread with one or two posts that just repeat the question, and the closest I've found in the code was AllyPlayer (which would work, but does not seem to work outside of scenarios) and SetDiplomaticState (Which I am unsure if it can target players, since I found this under TreatyDef). Any help would be appreciated.

8,612 views 6 replies
Reply #1 Top

In the setup you can put them on the same team so there should be a tag for the xml to do what you want.

There is also the Alliance, Research Treaty and Military Treaty etc that you may be able to have auto renew every 50 turns.

Reply #2 Top

The problem with the first one is that you'd more than likely have to crack open a .GC3sav to find it, which I have no idea to do.

The problem with the second one is that I'm attempting to make one of the factions like a mindless partner that will not attack a specific faction but will attack everyone else. With having an alliance, the problem is you'd have to open dialog with them, which I'm trying to prevent so they won't get chummy with anyone else.

Reply #3 Top

Yeah, just set them to the same team when you do your galaxy setup.

Reply #4 Top

The "slave" faction I'm creating is set to have a minor/special AI, so that humans can't play them, so setting them as the same team before a game is not possible. I'm wondering instead if there is a way to define special behaviors. Is it possible to edit special behaviors?

Reply #5 Top

Could you MOD a trait some how.

Reply #6 Top

 That could be possible, though not without some help. First question: Is it possible to edit <Target> or <Scope> to choose a specific thing only? For target I've only found generic things like Faction (who is giving/receiving, but not the reverse.), Shipyard, Ship, Colony, etc. and for scope all I could find is global. They do not seem to have an enum or an xml that defines targets, it seems. The other question is if it's possible to import other files and use functions in them--if possible, I would import both the FactionsDef.xml and TreatyDef.xml so that I can have who and what would happen with who. But, this would be useless if I can't define who.