[Mini MOD _ MOD Comp] Alignment Options

Sto

Should i code today ...
Joined
Dec 15, 2005
Messages
1,144
Location
Marseille (France)
Alignment Options is a mini playable MOD MOD . The Mod choose random leaders in function of the options chosen .

It adds 3 SG Options and 2 MP options (in the SG menu to be available for hotseat games) :

_ Religion war (The players cannot convert any more with a religion which makes change their alignment or research the associated technology. These religions are not spread automatically any more in the cities. Only the elves can convert with the religion Fellowship of the Leaves.)
_ equilibrate the alignments
_ teams have the same alignment

_ equilibrate human alignments
_ all humans get the same alignment

3 new leaders added (random good or neutral, random good or evil, random neutral or evil)


Install Instructions :

_ Download the MOD Comp and unzip it ( for FFH2 0.32l )
_ copy the FFH2 folder and rename it like you want "FFH 2 032 AO" for an example
_ copy the folder "Assets" (located in the unzipped folder) into the new MOD folder ("FFH 2 032 AO"). You should replace some files .
_ Load the mod to play.

Notes :

For both random leader and civ : The function choose the civ first instead of the leader. This result that there is equal chance for all civilizations to appear. With the default process, a civilization with more leaders have more chance to appear.

For the option "unrestricted leaders" : If you let random (any) for both civ and leader, the function choose a matching civ and leader like if the option is OFF. But if only the civ or the leader is random, it's taken at random.

With the default selection and some complicated selection. You can have 2 times the same civ with another one that would fit but not selected. This can't happen with the mini-MOD.

The selection takes in count the civ playable for human players and the civ AIplayable for AI players. The default one don't take that in count (This is not a big problem except if you have customized the civs to keep AIs or Humans non randomly selectable for some civ).

Notes for Modders :

There is a file change log in the folder and the source files if you want to merge it in another MOD MOD .


Tcho !

07/05/2008 : Update for patch 0.32l
 
People have been nearly begging for this for at least a year :) You are awesome Sto :)

(And yes, this is totally going in my sig!)

Thank you :). This is my first creation with the SDK ( i learn C++ ) . And i really wanted to be able to randomize the alignment selection too . This was on the top of my to do list and i'm really happy to have done it .

Tcho !
 
A thought just occured: You said that you hardcoded the leaders and Civs.... So shouldn't you make it disable the option "Unrestricted Leaders?" There may be some nasty consequences of someone trying to use that function with this modcomp.
 
A thought just occured: You said that you hardcoded the leaders and Civs.... So shouldn't you make it disable the option "Unrestricted Leaders?" There may be some nasty consequences of someone trying to use that function with this modcomp.

The option "Unrestricted Leaders" is taken in count in the implementation . Also if you choose a civ but not the leader , this is taken in count in the implementation .I've tried to take care of all possible cases . But i will probably upgrade the function while playing and making some tests ... and learn C++ :D

edit : Also , i don't think that disabling the unrestricted leader will make the initilization of the xml attributes , so the problem is the same .
 
Also if you choose a civ but not the leader , this is taken in count in the implementation .I've tried to take care of all possible cases .

I don't know much about modding, so i don't know how this check is handled, and i've yet to test it, but be careful with the Ljos: their leaders have different alignments! Could cause some nasty hick-ups if you're checking by civ instead of leader.
 
Awesome!!,

I hope Kael will conceder adding this to the official mod.

Thx Sto.

For the moment this is impossible i think because of the number of options . And especially because the MiniMod is not dynamical (i'm working on that) .


I don't know much about modding, so i don't know how this check is handled, and i've yet to test it, but be careful with the Ljos: their leaders have different alignments! Could cause some nasty hick-ups if you're checking by civ instead of leader.

Don't worry I check possible leader alignment of the civ . If for an example you choose to play a random leader in a team with the Ljos ( good or neutral ) and you want that the team get the same alignment . your leader is chosen first ( all humans are chosen first ) , you will have an alignment good or neutral . And then the Ljos will get the matching leader . Let's also suppose a silly case , you have chosen an AI in another team with the good Ljos leader . You will get a neutral leader , the Ljos in your team will get the neutral Ljos leader .

I've not fully tested all possibilities , but the way it is modded makes that it should not create a wrong selection ( instead of trying to get a good selection ) . If the implementation can't achieve to select a leader for a player , it skip and let random for this player . Then go to the next player (and in this case this is probably because there is no possibility for the requirement and the civ random selection will not match with what you asked) .

Tcho !
 
I've removed the hardCode of the leader civs . In fact this was just an error of a variable declaration :rolleyes: . So the dll is compatible with every MOD MOD (if there is no Dll in) , you have just to merge the xml .

Tcho !
 
A new option added i will like to play with the other options : religion war .

The players cannot convert any more with a religion which makes change their alignment or research the associated technology. These religions are not spread automatically any more in the cities. Only the elves can convert with the religion Fellowship of the Leaves.

Tcho ! :)
 
sounds awesome :). But you can still send missionaries out to a civ with a different alignment? Or won't you be able to spread CoE (for example) to a good civ at all. Are just the players blocked from switching, or the AI civs aswell?
 
sounds awesome :). But you can still send missionaries out to a civ with a different alignment? Or won't you be able to spread CoE (for example) to a good civ at all. Are just the players blocked from switching, or the AI civs aswell?

Yes you can still send missionaries to an ally with an alignment that cannot adopt anymore this religion ( with this option ON ). But this religion will just stop spreading in this civ but not in yours .
For an example you have RoK , the RoK religion will still spread in the (good , neutral) cities but not in the evil ones . You can send disciple to spread the religion . But the player will not be able to adopt the RoK religion . the evil civ can't research anymore the RoK tech . I've not seen how CoE is spread with the last version (i've played only two guick games) , but if this like 0.30 , CoE will not spread to good civ and if none of your units can spread it , a good civ will not be able to have CoE (except by conquering a CoE city ). This effect is applied to all civilization (AI and Human) .

But this option is made to force civs ( a little ) to group by alignments and increase the war games . I will not try this option with some starting teams that have different alignments , however the players can still group with others ( that will just be less frequent between civ with different alignment)

We will do our first game tonight , so i will be able to tell more about the consequences in a few days .

Really nice. A wish came true, without conflicting with my own lazyness.

Thank you , we plan to do our first MP game tonight , with two allied evil human against 3 ai teams of 2 good players with religion war ... should be challenging .

Tcho !

Edit : i wil concentrate now in the map script , and try to add an option that makes group the civs by alignment ( however impossible to add as a game option ). This should be nice with this option .
 
Some MP tests have been done ... NP

About the religious war option . We have played 12h , MP game human team (got the svartalfar and my friend the calabim ) , we settle at the opposite of a big pangaea with 3 teams of 2 good leaders . After 200 turns , half of the AI run ROK and the others the order . We were attacked 3 times ... now every AI have entered the over council . Our defenses are ready :) waiting for the hordes .

Edit : each AI teams have open borders obviously . They spread each religion in all the cities (RoK , FoL and order . Empyrean begin to be spread ...)
 
I like the Religion War option!

Though... could you make it so that a civ can change religions as part of a peace settlement? So a civ won't change from Good to Evil, say, on it's own, but it can if forced?
 
I like the Religion War option!

Though... could you make it so that a civ can change religions as part of a peace settlement? So a civ won't change from Good to Evil, say, on it's own, but it can if forced?

You mean for vassal , or by diplomacy ? I will try to check that , but this seems not so easy to do at the first look .

Tcho !
 
You mean for vassal , or by diplomacy ? I will try to check that , but this seems not so easy to do at the first look .

Certainly by vassal. And by diplomacy, but you could probably only get enough err... "leverage" at the end of a war.

Thanks for checking! I was thinking it sounded difficult.

But hmm... if you use the leaderheads file to give leaders high (50+?) negative modifiers for religions that are of other alignments, then just making switching possible again might work.

The other changes you made will keep a religion from spreading inappropriately. It'd take some effort with Disciple units, and probably diplomatic efforts to get an open border. So you should rarely see a civ change to a non-alignment religion because it wants to. (And never without effort on someone's part.) But, if it's possible, a civ might switch if it's that or lose several more cities in a war.

"Convert or die!" Heh heh heh. :)
 
Thanks for checking! I was thinking it sounded difficult.

Yes , for me it sounds difficult for the moment :) . The option result in 3 peaces of code in the SDK that say "no , you can't" if the option is ON .

But hmm... if you use the leaderheads file to give leaders high (50+?) negative modifiers for religions that are of other alignments, then just making switching possible again might work.

The other changes you made will keep a religion from spreading inappropriately. It'd take some effort with Disciple units, and probably diplomatic efforts to get an open border. So you should rarely see a civ change to a non-alignment religion because it wants to. (And never without effort on someone's part.) But, if it's possible, a civ might switch if it's that or lose several more cities in a war.

I can't do that by xml , simply because this not becomes an option anymore . But i will take your advises and learn how diplomacy work in the SDK . I will try to intercept the religion AI modifier and make some tests to change the function by modifying these values when the option is ON . But this will take some times , i think . I'm on another mod for the moment ... and not ready to learn how diplomacy works :crazyeye:.

I will begin to test a game with your XML changes ,to check if this is enough .

Tcho !

Edit :
For vassals , this should not be too hard to do , just check if the civ that have the vassal has a state religion and allow in this case the civ to convert , research the religion .
With the recent SG game i've done , i've noticed also that i need to change to AI modifiers toward alignments . Because if you become too powerfull , or take a little advantage , lots of AI wants to makes open borders with you (regardless of your alignment) .
 
Super! Thanks for telling me about it. I'm glad that vassals should be do-able. And I'm really looking forward to trying your mod even without any further changes. Anything else is just gravy. Well, _more_ gravy. :)

I suspect I'm going to be breaking my "only play FFH2 multiplayer" rule pretty soon... (Silly LAN partners with their "papers" and their "jobs". They've got no sense of proportion - We haven't tried a single .31 game yet! ;))
 
Top Bottom