[SDK/Python] Factions

TRN2

Chieftain
Joined
Jan 24, 2007
Messages
89
Factions V0.01

What is it...

Factions is a mod that so far doesn't do anything in the way of game play.
It does however add the following tags to the XML files listed below...

CIV4LeaderHeadsInfos.xml
<iFaction> - denotes a leader to a faction, such that the leader can be good, nuetral or evil, or alternativly, Clan of Bone, Rogue's Alliance, The Black Guard, etc...
CIV4VictoryInfo.xml
<bFaction> - A togle switch that will allow a faction victory or deny one, as selected in the Custom Game Menu when starting a new game - to enable in this current build it will require additional Python code
GlobalDefines.xml
TOTAL_NUMBER_OF_FACTIONS - a define that allows the modder to select the total number of factions to be used in the mod, todo: remove for a better system of keeping track of factions...

File Attachment is here:Factions V0.01

More to come over the next week or two...

Would love to hear more suggestions as to directions to take this mod, different things that can be done with it, etc...
 
Todo...
*Add Faction Names through a custom XML file called CIV4FactionInfos.xml
*Alter the UI to reflect factions
*Add ArtDefines to represent the Faction with a button, a font icon, and possibly a large picture like a banner or flag.
*Include the Faction Victory in the Python Code
*Create a Diplomacy Matrix to allow Diplomacy modifiers between members of alternate factions, including ones own faction
*Create Modular components so that components can be activated/deactivated via XML and modders preference.

Based upon Kael's Good/Nuetral/Evil Mod in the tutorials section, originally written for Aurelia, much thanks to Dale, and to Impaler (who practically wrote what is here with me).
 
Reserved for additional info
 
Reserved for examples of use
 
I'll download this when it's done (if you intende to finish it) i really can't wait for this... can you give me a hail when the diplomacy effect of this is done?

thanks
thomas
 
Thomas:
I'll download this when it's done (if you intende to finish it) i really can't wait for this... can you give me a hail when the diplomacy effect of this is done?
yeah I'll let you know when I figured this out, the loading of the diplomacy values is looking to be a nasty, I been digging through the code, but I can't find an example as of yet, I am hoping Impaler[WrG] might be able to give me some directions to a few, but until then I just got to sift....
Gaurav:
So what is a faction supposed to do?
A faction represents a team that is hard-coded into the mod, a classic example is from Warcraft RTS, you have the Humans, the Orcs, and the Goblins...
It allows the mod creator to effectivly shaft a civlization or leader into a particular team, but without all the benefical things of being in the hard-coded team of Civ4.
Currently I am working on a brand new set of XML files, which will allow the scenario creator to give a diplomacy value to specific factions, of which a leader is grouped into -It is also possible to have leaders that have their own faction, and are not tied to other factions, ie. a unique faction (or at least this is the plan anyhow)
The best way to describe it is like this, A leader is a member of a civilization, but with this mod, is also a member of a faction, some civilizations are reported to have attributes, but with faction, a karma of sorts enters the mod, it is really in simple terms just an additional modifier to the AI reactions.
But also, I intend to add a few more SDK commands that will allow a victory if a particular faction is defeated, or numerous factions.
it is ideal for games where there is a distinct good vs. evil theme, but can be extended to many other applications.
I did this for a request for someone, and a few other people were interested, so I am going to do my best to develop the idea to its fullest
 
You could set-up the factions to be all 9 classic D&D alignments, and then force each leader to a specific alignment, or even all leaders of a civilization into an alignment (perfer the former personally).
Edit: Forgot to say that this would be in future versions only, in its current state the only thing you could do with this mod so far is detect a universal faction ie. All players are Good, or specifically All players are of same faction!
 
Factions V0.01
GlobalDefines.xml
TOTAL_NUMBER_OF_FACTIONS - a define that allows the modder to select the total number of factions to be used in the mod

Never ever put values into GlobalDefines.xml. Use GlobalDefinesAlt.xml instead.

Matze
 
Is it possible to have multiple factions for one civ? Like Good/Lawful or Evil/Chaotic?

Presumably if you have a civ with more than one leader, there's the potential for more than one faction, which if combined with jdog's Revolution mod makes for an interesting possibility where a revolution might bring a new leader to power with a different factional alignment and thereby shift the international power politics.
 
I've been working with TRN2 on this mod and he's catching on quite fast too, I defiantly think he intends to finish the project. He's currently working on adding the Faction file and a new InfoClass to read it (a very advanced moding task by the way). I cant give an ETA as I don't know his schedual. From what I can see hes going for a boolean Leader x Faction matrix which will allow mult-faction membership for a leader. At some point it might be nice to implement mutually exclusive faction groupings equivalent to Civic categories. A leader could only have membership in one faction which is in such a group. Not all factions would have to belong these groupings though, the player could still use unrestricted factions if they chose. Dont expect this in the next version (or the one after) its a far future idea.

And despite my help TRN2 is writing all the code, he just runs it by me and I give him pointers on how the guts of Civ4 functions.
 
I've been working with TRN2 on this mod and he's catching on quite fast too
naw, shucks, ty
I defiantly think he intends to finish the project
that is the plan, the plan also follows to make it more and more functional as I think of (or am spoon fead) ideas.
don't know his schedual
I'll be working on it nearly every night till the bulk of it is done and it is useable.
which if combined with jdog's Revolution mod makes for an interesting possibility where a revolution might bring a new leader to power with a different factional alignment and thereby shift the international power politics
I will download the Revolution mod later tonight, pull it apart, and see what I can do to make them fit together.
Before I started this mod I had only written about 30 lines of C++, so it might still be a while before I truely get the grasp of the language, I am however much more fluent in C#, which is giving me somewhat of a kickstart into it.
If I had no programming knowledge at all I would never have started with what is still an ambitious task for my current skills level...
Never ever put values into GlobalDefines.xml. Use GlobalDefinesAlt.xml instead.
Noted, it had only been a temporary measure, but I'll keep it in mind in future.
I am hoping to have the basic CIV4FactionInfos.XML up and running in the next 24 hours, I have it written atm, but with technical hitches, I need to figure out someway of debuging what I already have, and I looked through the threads in the tuts section not long ago, and think I have found what I needed, then I will start making the Diplomacy modifiers xml file, which is another vault up the modding side of things :(
EDIT: I couldn't find jdog's Revolution mod, went through the modcomponents section twice, and did a search with the search function, could you maybe give me a link to it pls ;)
2nd Edit: **DELAY** I am buisy this weekend - doubt I will have time to look at this till monday/tuesday -see yall then
 
Just Wondering....

Could (in theory), the different factions, instead of going down the D&D 9 alignment route, could they be tied to Religions?

For example. One of the Civ4 religions is Christianity. Could Christianity be diveded into factions?

Eastern Orthodox
Catholic
Protestant (Lutherian, Baptist, Episcopal,...etc...)

Islam could have Shiite and Suni factions, etc...
 
Just Wondering....

Could (in theory), the different factions, instead of going down the D&D 9 alignment route, could they be tied to Religions?

For example. One of the Civ4 religions is Christianity. Could Christianity be diveded into factions?

Eastern Orthodox
Catholic
Protestant (Lutherian, Baptist, Episcopal,...etc...)

Islam could have Shiite and Suni factions, etc...

The short answer is yes but not with this modcomp. This modcomp effectively creates a supergroup, a level above the separate civilizations that binds different civs together... basically a scaled down version of Teams.

However, religious sects would be a subgroup that subdivides an existing game concept, in this case Religion.
 
The download is not available anymore.

I was interested to see if there is way just to add factions as well to for each religion. For example if you add Protestantism and Catholicism they are both in the Christian faction.

Basically using this for a layer above the layer of the religions now.
 
Top Bottom