• Civ7 is already available! Happy playing :).

Modder's Guide to A New Dawn

How do I disable the forced recalc tied to Caste System civic? It MAY BE responsible for the infinite loops appearing in my mod.

You can not because it's hard coded in the dll IIRC, but I hope to work again on it when I get back home at the end of the month (I'm on holiday in Germany right now).
 
Here's a question I asked in the Quick Modding thread:
I want to change the city screen of AND2 from the first look to something like the second. Namely:
  • Move resources to the right a bit
  • Make the resource list longer
  • Move the specialists to the left
  • Make the specialists list taller (but IIRC that is auto-adjusting)

So can someone help me what are the coordinates I need to edit? I only know that CvMainInterface.py is the file I need to tinker with.

I have figured out how to move specialists around but I am clueless with resizing the resources tab :confused:
Could someone please help?

EDIT: SOLVED
On my own :D
 
Last edited:
I've implemented a few small additions to the AND DLL at the request of @Inthegrave; mostly just some XML tags. Would the AND team mind if I upload the modified source code publicly on GitHub? I'd set it to No License.
 
I've implemented a few small additions to the AND DLL at the request of @Inthegrave; mostly just some XML tags. Would the AND team mind if I upload the modified source code publicly on GitHub? I'd set it to No License.

That's ok with me, I'm interested in seeing which tags you have added, and I suppose @Vokarya might be interested too.
 
That's ok with me, I'm interested in seeing which tags you have added, and I suppose @Vokarya might be interested too.
I can mention the features awhile that are being implemented.

One feature was a list of civics could be given to a leader with a ai weight that can influence how strongly a leader likes or dislikes a civic.
So for example Gandhi could be given a -9000 ai weight penalty with M.A.D. so that he will never choose it. And a Pharaoh could get 9000 in favor of despotism so they always pick it.
Or some leaders can be given a gentle nudge towards specific civics.

Another feature was the addition of leader bigotry, leaders can be assigned a gender and race in xml and can have a negative attitude penalty if they meet another leader of a specific gender or race they hate.

And another change he was going to add is allowing nukes to destroy a city if the population is exactly 1.
 
I would be preferable if you guys moved to git. That way it would be far easier for us to contribute by simply sending pull requests :)

Another feature was the addition of leader bigotry, leaders can be assigned a gender and race in xml and can have a negative attitude penalty if they meet another leader of a specific gender or race they hate.
Sounds a bit like Civ6 leader agendas :crazyeye:
 
Last edited:
I would be preferable if you guys moved to git. That way it would be far easier for us to contribute by simply sending pull requests :)

I remember we discussed it years ago and then rejected the idea, although I don't remember why. Plus, although I currently manage the mod since 7+ years with @Vokarya, the mod belongs to @Afforess and I actually feel like kind of a caretaker. I'll ask him and in any case I would like to hear Vokarya's opinion, since he's the one who's taken care of the mod mostly alone in the last period.
 
Sounds a bit like Civ6 leader agendas :crazyeye:
Yeah sort of. I wanted these features in my game because I like having many leaders and tweaking them to be more historically accurate.
But with having so many leaders I find it harder to differentiate their personalities, so I figured a AI weight Civic system and
bigotry could bring out more individuality. Plus I like making diplomacy harder.
 
That's ok with me, I'm interested in seeing which tags you have added, and I suppose @Vokarya might be interested too.

I'd be curious. I'd also like to know how much of this is extra complexity for the player. That's not something I want too much of. Things that run mostly under-the-hood could be interesting.
 
Yeah sort of. I wanted these features in my game because I like having many leaders and tweaking them to be more historically accurate.
But with having so many leaders I find it harder to differentiate their personalities, so I figured a AI weight Civic system and
bigotry could bring out more individuality. Plus I like making diplomacy harder.

Actually that was already possible by defining new flavours. I did it too though I added only 3 (autocratic, oligarchic and democratic) and assigned them to different civics and leaders.
 
Actually that was already possible by defining new flavours.
Yeah but in my case I would have to make a billion different flavors to achieve what I want and plus @f1rpo told me
negative values don't tend to work well for making leaders hate certain Civics. He said he is making a work around to make that work properly.

I'd be curious. I'd also like to know how much of this is extra complexity for the player.
Well I described the added features in my other post, I'm the one who proposed their inclusion because I wanted them in my game.

But as far as adding extra complexity for the player? I mean it does make diplomacy harder but it doesn't make gameplay much more complex, you just get a diplo penalty
if another leader you meet hates your race or gender.

Most of the complexity is from the modders point of view as time would have to be taken to define genders and civics leaders either love or hate in the XML.

So added complexity for the player is pretty minimal but I kinda doubt the AND team will want to put bigotry in anyways. But in the case anyone wants these features the code will be made available for all to use
however they want.
 
Yeah but in my case I would have to make a billion different flavors to achieve what I want and plus @f1rpo told me
negative values don't tend to work well for making leaders hate certain Civics. He said he is making a work around to make that work properly.
Looks like I took the quicker but harder way :lol:
But as far as adding extra complexity for the player? I mean it does make diplomacy harder but it doesn't make gameplay much more complex, you just get a diplo penalty
if another leader you meet hates your race or gender.
IMHO diplomacy already tends to be... errr... "not the brightest part of the mod". :mischief:

Well, I'm thinking about a diplo bonus between leaders of the same culture group (orientals, middle-east, greco-roman, etc) but I really don't know if introducing a "sympathy" mechanism would be good or bad. Interresing never the less.
 
Looks like I took the quicker but harder way :lol:
Well it's completely fine for a little more individuality between leaders. It's just in my case I want to get very specific with civics with what I know about a leader historically.

But for those who don't like tweaking leaders all the time, your method is completely serviceable for a bit of increased individuality.

IMHO diplomacy already tends to be... errr... "not the brightest part of the mod". :mischief:
Haha, well to be fair in both AND and vanilla, diplomacy is pretty easy. Leaders don't declare war often and the penalties for things like spies being caught
or razing a city I find to not be enough. Heck even with the "Aggressive AI" mode I find that even legendary conquerors like Alexander the Great don't take the opportunity to declare war enough when they have the upper hand.

Well, I'm thinking about a diplo bonus between leaders of the same culture group (orientals, middle-east, greco-roman, etc) but I really don't know if introducing a "sympathy" mechanism would be good or bad. Interresing never the less.

That is really interesting, I'll have to consider maybe adding that to my game in the future.
 
A little more brainstorming on the possibilities:

What could genders be used for?
We could apply a general rule where every female leader enjoys a +1 diplomatic bonus from all male leaders (natural attraction) but also suffer a -1 penalty from all other female leaders (common rivalry). Male leaders would be neutral towards each other.
While it sounds fun at first, in reality it is just adding random bonus/penalty.

Something else?
If the gender tag is not just a 2 digit boolean than we could define personality traits based on actually the traits:
Charismatic: +1 bonus from everyone
Deceiver: -1 penalty from everyone
Protective: -1 penalty toward Aggressive and Imperialistic leader, and vice versa
Philosophical: +1 bonus toward Philosophical leaders
Humanitarian: +1 bonus toward everyone

But these are just random thoughts I wrote down mainly because I had time for in not because I really think it would really worth doing :crazyeye: Just brainstorming.
 
What could genders be used for?

The way it works in our mod is sort of like this in the leaderheads:
Code:
<LeaderGender>GENDER_MALE</LeaderGender>
<iOppositeGenderAttitudeChange>-1</iOppositeGenderAttitudeChange>

So every leader gets an assigned gender and some leaders can be made sexist. I give sexism to leaders who historically have been shown to be that way (I Won't name any names here in this thread for fear of starting controversy).

We could apply a general rule where every female leader enjoys a +1 diplomatic bonus from all male leaders
I think a implementation like that would be too general and plus when you look at history you will find a lot of male leaders wouldn't respect a woman in power.

not because I really think it would really worth doing
Yeah, I primarily wanted the gender mod made for myself, because I like the authenticity. I wouldn't think anyone on the AND team would actually want this feature in the mod.
It's just something that appeals to me because I like harder diplomacy and I want my Civ 4 to embrace even the worst parts of history.

But in the case any modders would want a feature like this, the features would be released for anybody who wants them.
 
Here's the link to the Git repo: https://github.com/f1rpo/RoM-AND/
Since it's under my user name, I've just called it RoM-AND. Should be clear enough that it's not the RoM-AND; the description also says so.
Thanks 45°38'N-13°47'E, Vokarya. If you want me to take the code down at a later time or set it to private, just let me know. I've mostly set it up to share my changes with Inthegrave. Of course, if someone else wants to adopt something, it's all the better. For my own mod, there are a few small useful byproducts like having found a bug in K-Mod's ROUND_DIVIDE function (which wasn't in AND before I added it, so no worries), but the new tags aren't for me. I did consider for a moment whether I should discourage just a few leader/ civic combinations like Lincoln/ Slavery, but I think that's something players would want to be aware of, and then I see it like Vokarya:
I'd be curious. I'd also like to know how much of this is extra complexity for the player. That's not something I want too much of. Things that run mostly under-the-hood could be interesting.

Actually that was already possible by defining new flavours. I did it too though I added only 3 (autocratic, oligarchic and democratic) and assigned them to different civics and leaders.
Despite copying parts of the flavor code for the AI weight tag and using the Chronicles assets for testing, it didn't even occur to me to use the flavors instead. Could be useful for nudging AI leaders even without new flavor types.
[...]@f1rpo told me
negative values don't tend to work well for making leaders hate certain Civics. He said he is making a work around to make that work properly.
A negative multiplier at the end of the computation will flip the sign. Probably not a problem. It might be a problem when all available civics have negative values on the bottom line, so better to avoid doing that.
Looking at the flavor AI code:
Spoiler :
Code:
if (!GC.getGameINLINE().isOption(GAMEOPTION_AGGRESSIVE_AI)) {
for (iI = 0; iI < GC.getNumFlavorTypes(); iI++) {
    iValue += AI_getFlavorValue((FlavorTypes)iI) *
            GC.getCivicInfo(eCivic).getFlavorValue((FlavorTypes)iI); } }
I guess that's how flavor always works. Doesn't scale with the game progress though. I imagine that's what Afforess meant by "disabled favorite civic selection, logic is insane, makes AI choose non-optimal civics." (comment in CvPlayer::AI_civicValue) in reference to
Code:
/*iValue *= 5; iValue /= 4;
iValue += 6 * getNumCities() + 20;*/
I mean, a personal preference leading to non-optimal civics – duh. But a flat +20 could potentially lead to really bad choices in the early game. For the weight adjustment, I've tried to keep it simple:
Code:
iValue += iAIWeight / 10;
if (iValue > 0)
    iValue = (iValue * (100 + iAIWeight)) / 100;
As for the prejudices, we've tentatively dialed down first-impression attitude, so, in a way, one arbitrary immutable diplo modifier is replaced with another. And I do like Inthegrave's explanation text: "You're inferior to me." ... Somehow nonplussing. (That said, peace weight and warmonger respect arguably do serve a balance purpose by pitting warlike leaders against the Mansa Musas that would otherwise run away with the game economically.)
 
May I ask the devs of AND what version of AND includes these flavors is the GlobalTypes.XML?:
Code:
<FlavorType>FLAVOR_AUTOCRACY</FlavorType>
<FlavorType>FLAVOR_OLIGARCHY</FlavorType>
<FlavorType>FLAVOR_DEMOCRACY</FlavorType>

I ask because I have recently been making use of a CvGameCoreDLL.dll for a newer version of AND then I currently have. A few days ago I downloaded what I assumed was the new version of AND
to replace the older AND files with the newer ones but when comparing the GlobalTypes.XML from the version I downloaded with the one my teammate made in the githud download (the post above mine)
I noticed that the AND update didn't include the above flavors in the GlobalTypes.XML, this is a discrepancy.

This must mean I have been trying to update to the wrong version, he is using some version I can't seem to find. Can anyone link me to the one that does include those flavors?
 
Last edited:
May I ask the devs of AND what version of AND includes these flavors is the GlobalTypes.XML?:
Code:
<FlavorType>FLAVOR_AUTOCRACY</FlavorType>
<FlavorType>FLAVOR_OLIGARCHY</FlavorType>
<FlavorType>FLAVOR_DEMOCRACY</FlavorType>

I ask because I have recently been making use of a CvGameCoreDLL.dll for a newer version of AND then I currently have. A few days ago I downloaded what I assumed was the new version of AND
to replace the older AND files with the newer ones but when comparing the GlobalTypes.XML from the version I downloaded with the one my teammate made in the githud download (the post above mine)
I noticed that the AND update didn't include the above flavors in the GlobalTypes.XML, this is a discrepancy.

This must mean I have been trying to update to the wrong version, he is using some version I can't seem to find. Can anyone link me to the one that does include those flavors?

GlobalTypes.xml hasn't been changed in 5 years, it's the same since revision 748 (july 2014) and we're currently on revision 1086. Also I don't see those kind of FlavorTypes in our GlobalTypes.XML so yours is coming from somewhere else, definitely not AND's.
 
GlobalTypes.xml hasn't been changed in 5 years
Thanks, I will just have to wait till my teammate responds so I can understand where the changes come from.

Do you know what file tells the AND launcher what version it is? Does the DLL store the revision number or some ini file?
 
Top Bottom