Extra Victory Conditions

Joined
May 4, 2010
Messages
346
This mod adds two extra victory conditions to the game: Religious Victory and Economic Victory. Details on victory conditions for each victory type are as follows:

Religious Victory
  • Spread your Religion: Have 70% of the cities on the map following your faith
  • Increase your Followers: Convince a certain amount of global population to adopt your religion (population target varies by map size)
  • Proselytize the Heathens: Spread your religion to competing Holy Cities, and have all of them following your faith simultaneously

Economic Victory
  • Amass Wealth: Accumulate over 20,000 Gold (scales with difficulty)
  • Increase your Income: Maintain 400 GPT for at least 10 consecutive turns leading up to the end of the game (scales with difficulty)
  • Corner the Market: Obtain at least one of every luxury resource present on the map

Compatibility: For BNW only. This mod should work with any mod that does not modify the victory progress or end-game screens.

Screenshots
Spoiler :





Thanks to averysillyman for making professional-looking victory icons to improve the aesthetic of my mod

Download Link

Steam Download Link

NOTE FOR THOSE USING AN ADVANCED SETUP MOD:
This mod, as-is, is not compatible with mods that change the advanced setup screen (since this mod overwrites files for said screen to make the new victories selectable). If you would like to play this mod with a mod that edits the advanced setup screen, download the file attached to this post and put it in this mod's folder [default Windows path: Documents/My Games/Sid Meier's Civilization 5/MODS/Extra Victory Conditions (v 1)] to overwrite the default modinfo file. This should prevent any conflicts by disabling the selection functions for the new victories (they will both be on).
 

Attachments

  • Edited modinfo file for EVC.zip
    1.8 KB · Views: 934
Can civs that did not found a Religion accomplish the Religious Victory?

EDIT: I see not. Nevermind. It makes sense, but is something I'll have to keep in mind for compatibility with my own mods.

Great work! This was desperately missing from the game and community.

If one is using custom luxuries, such as from Barathor's More Luxuries, they do not fit after the second row. You can sort of see them in the Details panel, so it's not a major issue, but would help with polish if there was something you could do about that.
 
If one is using custom luxuries, such as from Barathor's More Luxuries, they do not fit after the second row. You can sort of see them in the Details panel, so it's not a major issue, but would help with polish if there was something you could do about that.

Out of curiosity, do you know how many luxuries that mod allows to be on a map at once? If it is less than 48 I see no problem with accommodating it by simply enlarging the screen dimensions a bit. I'd like to keep this mod as compatible with other mods as possible, so if you see any more issues like this please continue to bring them to my attention.
 
Very well mod, really well-done.

Dat Religion and Commerce are bugged me a lot since....

But since everyone played Barathor's More Luxuries mod... it seems you need to sort out something. I will wait until you are done.

Very well mod, i will try to play Religion Civ NAO !!!
 
Out of curiosity, do you know how many luxuries that mod allows to be on a map at once? If it is less than 48 I see no problem with accommodating it by simply enlarging the screen dimensions a bit.

Make a LuxBar instance that'll hold 12 lux icons, then create a LuxStack to hold as many LuxBars as needed. You can then resize the LuxStack and the whole layout will shuffle down to accommodate it
 
You should definitely disable your print statements. Makes it a nightmare to traverse the Database log for any true errors.

Good point, I forgot about those. I've re-uploaded the mod with most of the print statements commented out (I left one in because it reveals some behind the scenes data that I might need to know if people get errors), so it should be much easier to read the logs now. I also re-sized the victory progress scroll screens to allow room for a third row of luxuries, so hopefully that will accommodate the extra luxuries mod.

Make a LuxBar instance that'll hold 12 lux icons, then create a LuxStack to hold as many LuxBars as needed. You can then resize the LuxStack and the whole layout will shuffle down to accommodate it

Thanks for the advice; your tutorials on UI were very helpful when I was trying to figure out what exactly was going on in the Firaxis UI files so that I could mod them. My files are probably a bit of a mess, since I built them on an ad hoc basis with a lot of trial and error, so I don't know if I'll be able to implement as clean of a solution as you suggest. It never hurts to try, though (especially when backups are made first!).
 
A very minor aesthetic detail, but in the victory screen, it seems like the normal victory conditions (as shown by cultural victory) have some blank space added in top of bottom, so the frame is somewhat separated from the edge of the victory icon. This is not the case with your new conditions (particularly the religious victory seems very "squeezed in" between the horizontal lines). Obviously not a major issue, but something you could consider tweaking to make it look even better.
 
This looks excellent - I've been watching the development thread before. Going to try it out soon. I'm regularly using a ton of mods, including Tomatekh's Historical Religions and denominations, Barathor's More Luxuries and a couple new civilisations that add their own unique resources, so I should be able to comment on compatibility as well.
 
I have always wanted something along the lines of a religious victory to make it possible to have spreading religion as my main focus so this mod seems great! But I tried this out just now and in my first game I got to play 11 turns and then an AI won by religious victory - no religions had been founded even! I'm really curious how that could have happened... I do have tons of other mods active aswell though but as far as I know none of them has anything to do with victory or end-game screens.

Oh, and you should probably have the text lines say just Economic and Religious, rather than Economic Victory and Religious Victory because the message I got when the AI won was "Kamehameha has won the game through a Religious Victory Victory!"
 
This us a great idea. Problem.I had was JFDs Stephen of Hungry endes up winning a religious victory in about 5mins????

Sent from my GT-I9300 using Tapatalk
 
A very minor aesthetic detail, but in the victory screen, it seems like the normal victory conditions (as shown by cultural victory) have some blank space added in top of bottom, so the frame is somewhat separated from the edge of the victory icon. This is not the case with your new conditions (particularly the religious victory seems very "squeezed in" between the horizontal lines). Obviously not a major issue, but something you could consider tweaking to make it look even better.

The culture and domination victories do have a lot of space, but that's because I expanded those entries. The reason for this is because in un-modded civ those victory conditions have lists of symbols that are nestled within scrollable lists, but I needed all of the victory conditions to be nestled within a scrollable list and it didn't really work out to have scroll-lists within scroll-lists (the scroll-bars looked/worked bad). Thus, I expanded the sections to make the little scroll bars unnecessary. It does make Religious Victory look a little odd, though, sitting between two very large sections. I think I will expand it to make things look a little better.

This looks excellent - I've been watching the development thread before. Going to try it out soon. I'm regularly using a ton of mods, including Tomatekh's Historical Religions and denominations, Barathor's More Luxuries and a couple new civilisations that add their own unique resources, so I should be able to comment on compatibility as well.

Any comments will be appreciated. :)

I have always wanted something along the lines of a religious victory to make it possible to have spreading religion as my main focus so this mod seems great! But I tried this out just now and in my first game I got to play 11 turns and then an AI won by religious victory - no religions had been founded even! I'm really curious how that could have happened... I do have tons of other mods active aswell though but as far as I know none of them has anything to do with victory or end-game screens.

Oh, and you should probably have the text lines say just Economic and Religious, rather than Economic Victory and Religious Victory because the message I got when the AI won was "Kamehameha has won the game through a Religious Victory Victory!"

The text thing is an oversight. Thanks for bringing it to my attention; I'll fix it in the next release. As for the error with the victory triggering way too soon, I have no idea what could be causing that. The variables I compare to determine if victory should be triggered are fairly uniquely named, so I can't imagine all five of them would overlap with variables created by other mods at the same time. Further, the test for religious victory is nestled within an if statement that tests for if the civ in question has founded a religion, so I have no idea how it is triggering when no one has founded a religion at all. If you don't mind, could you give me a list of all of the mods you are using that affect religion in some way? Perhaps I could look at them and find what is causing problems.

This us a great idea. Problem.I had was JFDs Stephen of Hungry endes up winning a religious victory in about 5mins????

Sent from my GT-I9300 using Tapatalk

Are you using any other mods that affect religion? Also, what version of Civ5 are you playing your mods on (G&K or BNW and version #)? Hopefully with this information I will be able to figure out a solution.
 
Mods I have affecting religions are mainly Tomatekh's Historical Religion mod (with Christian and Islamic denominations addons) and whoward's Religion - Fixed Prophets. Other than these I also have some civs with religious aspects but it's midnight now so I'll have a look in the morning. :) I'm playing on BNW, probably the latest version (can't check right now) because I haven't stopped Steam from updating in any way.
 
As for the error with the victory triggering way too soon, I have no idea what could be causing that. The variables I compare to determine if victory should be triggered are fairly uniquely named, so I can't imagine all five of them would overlap with variables created by other mods at the same time. Further, the test for religious victory is nestled within an if statement that tests for if the civ in question has founded a religion, so I have no idea how it is triggering when no one has founded a religion at all. If you don't mind, could you give me a list of all of the mods you are using that affect religion in some way? Perhaps I could look at them and find what is causing problems.

Are you using any other mods that affect religion? Also, what version of Civ5 are you playing your mods on (G&K or BNW and version #)? Hopefully with this information I will be able to figure out a solution.

Check to see if Player:HasCreatedReligion is true with only a pantheon belief maybe? Because I know from my own personal mods that a lot of the religion lua commands do weird things with pantheon beliefs.

Also, your for loops for checking through the players in the game are really weird. Instead of doing:

Code:
for iPlayerLoop = 0, GameDefines.MAX_CIV_PLAYERS-1, 1 do
	local pPlayer = Players[iPlayerLoop];

It would probably be better to use:

Code:
for id, pPlayer in pairs(Players) do

I'm not 100% sure, but I think that MAX_CIV_PLAYERS is always just 63, so you're checking through a bunch of player IDs that don't have in game civs associated with them.
 
The culture and domination victories do have a lot of space, but that's because I expanded those entries. The reason for this is because in un-modded civ those victory conditions have lists of symbols that are nestled within scrollable lists, but I needed all of the victory conditions to be nestled within a scrollable list and it didn't really work out to have scroll-lists within scroll-lists (the scroll-bars looked/worked bad). Thus, I expanded the sections to make the little scroll bars unnecessary. It does make Religious Victory look a little odd, though, sitting between two very large sections. I think I will expand it to make things look a little better.



Any comments will be appreciated. :)



The text thing is an oversight. Thanks for bringing it to my attention; I'll fix it in the next release. As for the error with the victory triggering way too soon, I have no idea what could be causing that. The variables I compare to determine if victory should be triggered are fairly uniquely named, so I can't imagine all five of them would overlap with variables created by other mods at the same time. Further, the test for religious victory is nestled within an if statement that tests for if the civ in question has founded a religion, so I have no idea how it is triggering when no one has founded a religion at all. If you don't mind, could you give me a list of all of the mods you are using that affect religion in some way? Perhaps I could look at them and find what is causing problems.



Are you using any other mods that affect religion? Also, what version of Civ5 are you playing your mods on (G&K or BNW and version #)? Hopefully with this information I will be able to figure out a solution.
using historic religions, whowards parthenons enchanced and barathors more parthenons. other than new civs its just eui, csd, cdm and a bunch of whowards mods. BNW and up to date.

Sent from my GT-I9300 using Tapatalk
 
Check to see if Player:HasCreatedReligion is true with only a pantheon belief maybe? Because I know from my own personal mods that a lot of the religion lua commands do weird things with pantheon beliefs.

Also, your for loops for checking through the players in the game are really weird. Instead of doing:

Code:
for iPlayerLoop = 0, GameDefines.MAX_CIV_PLAYERS-1, 1 do
	local pPlayer = Players[iPlayerLoop];

It would probably be better to use:

Code:
for id, pPlayer in pairs(Players) do

I'm not 100% sure, but I think that MAX_CIV_PLAYERS is always just 63, so you're checking through a bunch of player IDs that don't have in game civs associated with them.

Or switch it to "MAX_MAJOR_CIVS," so you're not looping through players that inherently can't found religions.
 
Do the AIs actually pursue these vicories? Because if they do, that would be an interesting game.
 
@Gurra09, @Chrisbburn
Thanks for the information. I'll take a look at those mods when I have the time and see what might be causing the problems.

Check to see if Player:HasCreatedReligion is true with only a pantheon belief maybe? Because I know from my own personal mods that a lot of the religion lua commands do weird things with pantheon beliefs.

I think that the HasCreatedReligion function only triggers when actual religions have been founded, not just pantheons. For the Victory Screen UI I have it set to display the religious symbol for the religion of every civ for which Player:HasCreatedReligion is true (among other conditions) and it has never produced anything related to pantheons.

Also, your for loops for checking through the players in the game are really weird. Instead of doing:

Code:
for iPlayerLoop = 0, GameDefines.MAX_CIV_PLAYERS-1, 1 do
	local pPlayer = Players[iPlayerLoop];

It would probably be better to use:

Code:
for id, pPlayer in pairs(Players) do

Your suggestion is a lot cleaner, but I'm going to stick with the weird way of doing things...because I got that code from Firaxis files. :crazyeye: It seems that this is the way they most often loop through civs in their code, so I'm just going to keep aping them in case there's an actual reason for this clunky method.

I'm not 100% sure, but I think that MAX_CIV_PLAYERS is always just 63, so you're checking through a bunch of player IDs that don't have in game civs associated with them.

Or switch it to "MAX_MAJOR_CIVS," so you're not looping through players that inherently can't found religions.

I'm going to switch to MAX_MAJOR_CIVS. I don't know why I didn't have it that way to begin with, especially since I used MAX_MAJOR_CIVS elsewhere in my mod.

10k is way too easy to get should make it 100k :p

After more testing, I'm currently thinking of changing the Gold requirement to 20k and the GPT requirement to 300.

Do the AIs actually pursue these vicories? Because if they do, that would be an interesting game.

No, they don't. This mod is mainly to provide an extra challenge to the human player. Coding AI seems quite difficult, and it's not something I'm up for doing. The regular AI will still put up a challenge when playing this, as they will try to block you from getting religious victory (they like to spread their own, after all, and dislike you when you spread to their territory) and accumulating all of the resources will require delicate diplomacy (or wads of cash that could've been going towards the other victory goals). I doubt you will every see the AI stumble upon either of these victories (although it is not impossible, especially if one gets a runaway religion going), but I don't think this is too much of a negative. After all, how many times have you ever seen an AI win by domination victory?
 
in case there's an actual reason for this clunky method.

It's more efficient - both pairs() and ipairs() are very inefficient (although you'll only notice a difference if you're within an event that calls many times, or you're writing loops within loops) - there are several threads about Lua optimisation/efficiency in the SDK sub-forum.

The other advantage is that you can stop the looping early, eg by using MAX_MAJOR_CIVS as suggested by JFD. Both pairs(Players) and ipairs(Players) will loop all 64 player slots - even those where the player was never alive, and also the barbarians (player 63)
 
Top Bottom