Sins of a Solar Empire : Real-Time Strategy. Unrivalled Scale.
© 2003-2016 Ironclad Games Corporation Vancouver, BC. All rights reserved.
© 2006-2016 Stardock Entertainment

Factions: A bunch of Strings with Possibilities

By on July 24, 2012 7:46:03 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Lavo_2

Join Date 05/2010
+104

Before going into the crux of this topic, let's start with asking, what exactly is a "faction"? When you go into the diplomacy menu, you will see that under a race's relationship statuss, you will see either "Loyalist" or "Rebel". This is what a faction is; in other words, it's a string. Strings are interesting as they can have the same value, but have a different ID. For example, you can have two strings, IDS_PLAYERFACTIONNAME_LOYALIST1 and IDS_PLAYERFACTIONNAME_LOYALIST2, with the actual value of these strings both being "Loyalist". This is notable as it means, if one so desires, one can change the faction of a player, according to how Sins processes this, while not truly changing anything for the player visually, i.e. from the status quo. This will be expanded in more detail later on.

Now onto how this actually works. In research files/requirements, there is an value called "RequiredFactionNameID". Currently, there is nothing in the game that makes use of this. What it means is that a player's faction can determine whether X tech can be researched, or even whether X ability or Y ship can be used according to their faction. The latter is merely an alternative to requiring Z research being done, which is interesting and brings up it's own realm of possibilities. However, in truth, it isn't all that revolutionary. The former is, and that is the focus of this discussion. Before I go on, I will lightly touch upon the abilities portion, as it will of no doubt be useful to some people.

The aforementioned abilities requiring X faction is useful, as one can setup a ship with multiple abilities, for the purpose of this example let us call them "Shield Restore", "Increase Weapon Output", and "Buff Allied Ship". They are only in use when the player is a part of the Loyalist, Rebel, and Neutral faction, respectfully. These three abilities are on Some Battleship, a cruiser of the Yureg race. The Yureg race is by default set to being a part of the "Loyalist" faction, which meaning the first ability is in use. Somewhere down the race's research tree, which is set up to mirror the timeline/history of the Yuregs, it has a branching point, the option to declare the independence of their system and become neutral in the conflict or rebel against the monarchy. Say they decide to rebel, and suddenly their Some Battleships are now offensively oriented, as the second ability is now active and the first is not. Later on in their current research path, the Yureg sub-faction has the option of returning to the monarchy, or one again declare their independence. They decide to declare independence, and now their Some Battleships' capabilities change once more, becoming more fleet-oriented as "Buff Allied Ship" becomes active.

Alternatively, of one wanted to let the Yuregs choose between between the Rebel faction and the Loyalists, they could have a copy Shield Restore which calls upon a different faction, so when the Yuregs get to the first branching point, they could choose to either remain loyalists, which would activate the second Shield Restore or become rebels.

With that aside, the second part on how this works is a researchModifier, SetFaction. This is notable for the single fact that it can be used even if a player is already "in" a faction. For example, a research item can be set up like in this example. One can even be a part of the "Rebel" faction and be changed to the "Loyalist" faction! Alternatively it can be the same value, even if it is technically a "different" faction, as seen here.

This leads into the heart of the topic, the possibilities that this brings, to modders. There are a few ways to use this. The simplest thing to do, is to allow for a race to choose between their two Titans without creating a whole new PlayerRACE file. This is what I have done for SoGE, which can be seen here for reference, where one player wisely chose the Executor SSD over the other option. Another, more complex, way is making chains and paths, which I have to actually make so I can give you a picture example (and the mod itself!), which I will do once I post this and will edit it in later. The chains and paths method is quite notable and useful as it can be used to make certain research techs permanently un-researchable. Edit: What I had in mind, while theoretically possible, does not seem to work in reality. Probably an engine thing. I'm thinking up/attempting another method in the meantime, will take a little while to make it though.

From what I have seen, it is quite evident that this system was developed in great detail before it was ultimately decided that it would not be used. Due this, I must tip my hat to the folks at Ironclad and Stardock and thank them for creating it, and for leaving it in, as it gives us modders many, many research possibilities. This brings me to the limitations of the faction system, one of which, I believe, is one of the factors that lead the developers to switch to the traditional PlayerRACE setup: space. The largest limitation for faction system is that there quite simply is a limited amount of space avaliable for research icons, which can strangle the what one may want to do with this system. For modders this isn't as bad; one can re-purpose unused portions of the Diplomacy and Defense pages, and rework the Fleet Logistics page, for example.

Locked Post 29 Replies +1
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
July 24, 2012 10:58:36 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Posting to keep tabs on this thread.

Reason for Karma (Optional)
Successfully updated karma reason!
July 25, 2012 11:19:08 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Me likes dis. Mayhaps a good modder could make something out of this.

Reason for Karma (Optional)
Successfully updated karma reason!
July 25, 2012 12:12:02 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

There were a lot of things happening in early testing that resulted in additions and deletions of different capabilities.  Some things just had issues working with others and had to be dropped, some were crash prone, etc., etc.

A lot of these latter were actual changes to the engine--which Ironclad has to do.  So Stardock might introduce a new ability or the like but Ironclad had to make engine changes to introduce new features.

At the start, races were selectable up to any point--meaning you could just be "Vasari" or "Advent" or "TEC" until you decided you wanted to be a "Loyalist" or "Rebel".

There was a lot of back and forth about whether it was preferable this way or not but for the most part, factions were not really being brought into play as much for their flavor but just as a way to bring in new tech when needed.

So often testers found themselves playing the vanilla factions throughout the game and only becoming a subfaction towards the end when they could afford the best weapons with the subfaction choice.  because each faction had liabilities as well as assets, players tended to delay picking a side until the very end--if at all.  in fact, if you were the underdog, there was little advantage to be had gambling on a subfaction due to the expense of further developing it.

After some time it was a fair majority in consensus that factions should be set at the start so that they would be fully played and not just used as a gimmicky tactic.

I think the resulting change was an engine change.

If that's the case--unless it was added on top of the other--then it won't be accessible now.

Due to the several different areas that required engine changes to get going properly, there is really not a chance of a rollback as it's the case of change one thing and it changes everything else again.

Your best bet is to go through the saved beta builds and see if you can find one still implementing the feature.  A lot of strings may be left but not have the engine support.  The reverse of these is also possible too though.

Reason for Karma (Optional)
Successfully updated karma reason!
July 25, 2012 12:29:39 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Choosing to be Loyalist or Rebel in-game is still in the code, Sinperium.  ZombiesRus5 has done that for Blood and Chrome.  I haven't tested the Cylons yet in that mod, but his Colonials can choose to go either Loyalist or Rebel as soon as they get a lab up, and each faction has unique boosts and a unique Titan.

Reason for Karma (Optional)
Successfully updated karma reason!
July 25, 2012 12:31:05 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Cool.

I personally didn't feel like much was lost there (though others felt differently).  It does sound great for modding though.

Another change was at one point (briefly) Wail of the Sacrificed affected all enemy planet systems.

Maybe we could have an option to chain self destruct all planets but your HW to get that feature back.

Reason for Karma (Optional)
Successfully updated karma reason!
July 25, 2012 1:11:10 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

I'm doing something similar with Sins of the Fallen. In fact, I had already released a version for B&C that uses SetFaction versus having player entity files for each faction. The idea of making additional branches is also tempting, but there is a downside with making the race relations more complicated to configure.

In that line of thought though I have brainstormed some ideas about branching off the main Loyalist/Rebel research to give a trait selection that is for the most part standardized across the factions.

For example Loyalists humans may take the Diplomat, Isolationist, Megacorp or Marketeer trait

Rebel humans may take the Hardliner, Militant, Syndicate or Criminal trait

 

Diplomat/Alliance/Mainstreaming (flavor text depending on race) - Unlocks all pacts for the faction and increases base relationships.

Isolationist - Your empire is hesitant to become involved in the affairs of others and chooses to close of it's system in an attempt to isolate itself. Your empire is able to deploy an extra starbase in each gravity and ability to defend your system is enhanced.

Megacorp - Your empire understands the importance of a viable economy and how to build it. Trade income is dramatically boosted for your empire

Marketeer - Your empire controls the Black Market making removing any penalties with trading credits, metal and crystal

Hardliner - Your empire believes your way is the only correct way. Faction relations with non-similar species is nearly impossible as a result. Your empire however, is very resolute in beliefs resulting in increased allegiance and tax income in your system. Your empire is also very aggressive in defending it's system resulting in extra damage, armor and defenses.

Militant/Purification/Hunger (flavor text depending on race) - You're empire is focused solely on military expansion and control. Consequently investments in better military technology comes at the expense of a slower building economy. Your ships and structures however are more heavily armored and armed and cheaper to build.

Syndicate - Your empire lives on the edge of the legal and criminal boundary. Consequently your dealings with the black market and pirates are more favorable. You also have pervasive hooks in the market that earn you credits and resources based on the activities of other empires.

Criminal - Your empire has no regard for the laws of others making it difficult for other factions to ally with you though you'll ally with anyone if it suits your purpose. It's difficult to tell the Pirates from your empire especially as you are able to purchase pirate reinforcements whenever they are needed. Stealing income and resources from other empires is a matter of pride for your empire.

Indoctrination/Assimilation (flavor text depending on race) - Your empire is about the conversion or assimilation of other factions to your cause. This may be accomplished through alliances with friendly empires, or through outright conversions of enemies. Empires focused on assimilation will occasionally convert ships or even Planets to their cause during battles. Your desire to assimilate other empires is so powerful, culture is generated directly from your capital ships and titans.

Mobilization - Your empire decides mobility is the best option for survival reducing the need for orbital structures as research and development is moved to your capital ships. Once mobilized your faction is able to research a later ability to Strip planets for income. Mobile factions have less opportunity to build alliances with other factions.

Seed AI/Researcher/Singularity Event - Your empire is extremely gifted or advanced compared to others. Your time and cost to research technology is significantly reduced. 

 

The main purpose of these traits would be to give various buffs to the faction. Once a trait is selected it would of course lock out the others for the duration of the game. Additional higher tier research associated with the trait may also unlock such as Strip to the Core for Mobilization.

 

I'm not really sure yet if I'll actually do this implementation wise but wanted to investigate what might be possible. 

Reason for Karma (Optional)
Successfully updated karma reason!
July 25, 2012 11:15:55 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

I am still interested in approaching the idea of having the three main races and then you can 'rebel' ... or 'choose' either a loyalist or rebel. Haven't put much thought into how to arrange the whole tree and such but it is something I would like to approach at some point.

Reason for Karma (Optional)
Successfully updated karma reason!
July 26, 2012 11:22:01 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

At least the ability to set faction midgame is in.

Reason for Karma (Optional)
Successfully updated karma reason!
August 12, 2012 7:04:45 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

I have noticed that, apparently, the random free techs that the Vicious AI gets can bypass the faction set up. I say this as I've made it so a faction has to choose between their Titan, however, somehow the vicious AI "researched" both of them: this should not be possible. Either SD/IC implemented the random techs without thinking about this, or this is a serious bug. Edit: I have seen this happen with the Cruel AI as well.

Reason for Karma (Optional)
Successfully updated karma reason!
August 12, 2012 11:47:38 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Is there a way to stop the 'random tech research' being done by AI?

Reason for Karma (Optional)
Successfully updated karma reason!
August 12, 2012 11:52:52 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

If you set RequiredFactionNameID in the Titan, shouldn't that limit which Titan a Vicious might build (assuming it randomly selected both).

Reason for Karma (Optional)
Successfully updated karma reason!
August 13, 2012 11:23:46 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting ZombiesRus5,
If you set RequiredFactionNameID in the Titan, shouldn't that limit which Titan a Vicious might build (assuming it randomly selected both).

The problem, for my case anyways, is that Titans are set up to spawn via ability; having both Titans unlocked will destroy the entire setup. As for faction ID; from what I can tell, if you have the Titans at different levels, say Titan X at tech 7 and Titan Y at tech 8, the AI will end up with "researching" Titan Y after Titan X, and thus will assume the faction of Titan Y. I have yet to see the reverse happen, though I have done limited testing thus far.

Quoting boshimi336,
Is there a way to stop the 'random tech research' being done by AI?

None to my knowledge.

Reason for Karma (Optional)
Successfully updated karma reason!
August 13, 2012 12:50:01 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting Lavo_2,
I have noticed that, apparently, the random free techs that the Vicious AI gets can bypass the faction set up. I say this as I've made it so a faction has to choose between their Titan, however, somehow the vicious AI "researched" both of them: this should not be possible. Either SD/IC implemented the random techs without thinking about this, or this is a serious bug. Edit: I have seen this happen with the Cruel AI as well.

The AI doesn't get random free techs at these difficulty levels, they only get instant research times. 

Reason for Karma (Optional)
Successfully updated karma reason!
August 13, 2012 12:57:03 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Thanks for the clarification Yarlen! Though I must ask, if RequiredFactionNameID is no longer supported at all, why does it work for human players and not (certain) AIs?

Reason for Karma (Optional)
Successfully updated karma reason!
August 13, 2012 8:14:11 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

RequiredFactionNameID works it's just deprecated as far as the Rebellion developers are concerned. I'm also not to concerned about the vicious AI as I try to make the AI harder at lower levels. Vicious is just a little to insane for my tastes.

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 14, 2012 12:11:03 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Here's the new Empire management research window I'm working on.

Reason for Karma (Optional)
Successfully updated karma reason!
August 14, 2012 12:25:45 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Not bad Zombie! Any way to set those up in their popper research tier columns or would that not look that great? Maybe stuff Loyalist and Rebel buttons somewhere?

Reason for Karma (Optional)
Successfully updated karma reason!
August 14, 2012 2:00:22 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting boshimi336,
Not bad Zombie! Any way to set those up in their popper research tier columns or would that not look that great? Maybe stuff Loyalist and Rebel buttons somewhere?

I'm not quite sure what you mean by proper research tier.

The way I'm playing around with right now requires you to build atleast 2 labs (of any) to declare yourself a Loyalist or Rebel. This will be required to gain access to your faction specific research, titan and corvette.

The additional upgrades are faction trait paths you can select once you declare loyalist or rebel. Each trait has a set of bonuses and possibly negatives that will affect your faction.

Some of the traits will also unlock further research or abilities locked to that trait, while others will passively improve your faction.

 

Reason for Karma (Optional)
Successfully updated karma reason!
August 14, 2012 5:21:10 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

I have this coded out fully for Advent and will be running some extended AI tests to see what they do. I suspect like most AI research they will barely touch them until late into the game unless otherwise prompted.

Reason for Karma (Optional)
Successfully updated karma reason!
August 14, 2012 9:54:13 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Well, the faction selection works great for unlocking additional paths. Now the only downside is if I wanted to setup faction relations for each possibility I end up with 22 * 22 * [number of factions := 11] 

 

so's... that ain't going to happen.

 

I may forgo faction relations modifiers for the majority and only include some key differences from the main associations (assuming the base modifiers stick when factions change). Just some more playing needed.

Reason for Karma (Optional)
Successfully updated karma reason!
August 14, 2012 9:59:56 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

And he's only 9 karma ahead of me.  Muwahahahaha! 

Reason for Karma (Optional)
Successfully updated karma reason!
August 14, 2012 10:01:57 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting Sinperium,
And he's only 9 karma ahead of me.  Muwahahahaha! 

No surprise, insane amounts of fluff posts in this forum earn more karma than anything else.

Reason for Karma (Optional)
Successfully updated karma reason!
August 14, 2012 10:04:27 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Call me "fluffy", braineater.

Did I mention I found a bug in Eclipse?

Reason for Karma (Optional)
Successfully updated karma reason!
August 15, 2012 7:46:12 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting Sinperium,
Did I mention I found a bug in Eclipse?

Reason for Karma (Optional)
Successfully updated karma reason!
August 15, 2012 8:08:18 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting boshimi336,

Quoting Sinperium, reply 24Did I mention I found a bug in Eclipse?

Fluffy's just trying to   .

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #101114  walnut1   Server Load Time: 00:00:00.0000719   Page Render Time: