[XML] Realistic Diplomacy

OK thanks.
What is MEMORY_ACCEPTED_JOIN_WAR in the leaderheadinfos.xml?
I've never recieved any diplo bonus from accepting to join an AI in a war request...
 
OK thanks.
What is MEMORY_ACCEPTED_JOIN_WAR in the leaderheadinfos.xml?
I've never recieved any diplo bonus from accepting to join an AI in a war request...

Sure you have. The "Mutual struggle" bonus from the AI when you've joined a war with them.
 
I see. I thought it was referring to when an AI asks you to join a war and you say yes. The mutual military struggle diplo is applied even when the Ai doesn't ask for help and you just declare war of your own will.
 
Hi Afforess, thanks for your help. I've made all steps, except the compiling which is something I dont know how to do it at all. I've been trying to read some tutorials, but there is no real civ 4 BTS 3.19 compiling tutorial for Visual Studio 2005, so I decided to take this one: http://forums.civfanatics.com/showthread.php?t=166933
Everything up to step 7 works just fine for me, but at step 8 I`m stuck, because the Build Options button is greyed out and I cant choose any options there. Maybe I need to make a new project at first, but I dont know which project type to choose.
 
I believe it should be a makefile project. If you continue to have issues, open a thread up in the SDK/Python forum, as the people there are very very helpful.
 
One of the memory decay types is MEMORY_RECEIVED_TECH_FROM_ANY

Is this referring to the "You have traded with our worst enemies" diplo penalty?
 
One of the memory decay types is MEMORY_RECEIVED_TECH_FROM_ANY

Is this referring to the "You have traded with our worst enemies" diplo penalty?

I think so. Most of those Firaxis already defined, and they didn't always pick the most logical names.
 
While waiting for next update of RoM few days ago, I came across the code fr your modcomp here in HitM :D. I wanted to install your modcomp but Grave already beat me to it.

Why I'm posting this? Perhaps I'm bored?

Actually, I perceive you as a good Internet pal and I thought it may brighten your day a bit ot think that not only RoM is using your modcomp :D.
 
While waiting for next update of RoM few days ago, I came across the code fr your modcomp here in HitM :D. I wanted to install your modcomp but Grave already beat me to it.

Really? He didn't credit me. :(
Actually, I perceive you as a good Internet pal and I thought it may brighten your day a bit ot think that not only RoM is using your modcomp :D.

Thanks.
 
Afforess, do you know where these memory decay things are handled in the DLL? In other words, I want to see the calculation that uses the number.

I noticed you said the numbers refer loosely to how long it will take for the number to decay, but where can I check this myself or is it hidden in the engine?
 
Afforess, do you know where these memory decay things are handled in the DLL? In other words, I want to see the calculation that uses the number.

I noticed you said the numbers refer loosely to how long it will take for the number to decay, but where can I check this myself or is it hidden in the engine?

Yes, I did find it, when I was searching. I broke down the odds for players on my modmod's. (See first spoiler, for RD.)

But if you want the actual function it's in CvPlayerAI. I have some thoughts towards add some functionality to it... but haven't changed it yet.

Here's the function:

Code:
for (iI = 0; iI < MAX_PLAYERS; iI++)
    {
        if (GET_PLAYER((PlayerTypes)iI).isAlive())
        {
            for (iJ = 0; iJ < NUM_MEMORY_TYPES; iJ++)
            {
                if (AI_getMemoryCount(((PlayerTypes)iI), ((MemoryTypes)iJ)) > 0)
                {
                    if (GC.getLeaderHeadInfo(getPersonalityType()).getMemoryDecayRand(iJ) > 0)
                    {
                        if (GC.getGameINLINE().getSorenRandNum(GC.getLeaderHeadInfo(getPersonalityType()).getMemoryDecayRand(iJ), "Memory Decay") == 0)
                        {
                            AI_changeMemoryCount(((PlayerTypes)iI), ((MemoryTypes)iJ), -1);
                        }
                    }
                }
            }
        }
    }
 
I provided the two source files I changed. My changes are commented "Afforess" and "Realistic Diplomacy." Sorry if the other comments in their confuse you, the files are from RevDCM's sources.
View attachment 223752

[snip]

There is no download for this ModComp, as it isn't for playing. It is for merging.
I do have a working example made, but it requires the latest RevDCM or Rise of Mankind. (That's who I originally made it for).

Here is an example. It was made for WoC, and is split up by leader.
View attachment 227325

So the code for this is already in RevDCM ? The first link / attachment is no longer working, as that was the source code I am not entirely sure ;)
 
So the code for this is already in RevDCM ? The first link / attachment is no longer working, as that was the source code I am not entirely sure ;)

No. However, I found that this modcomp doesn't actually require any SDK changes for it to work, just XML.
 
Updated the OP. Realistic Diplomacy doesn't need SDK changes, it's purely XML.
 
If I want to add these new XML tags in CIV4LeaderHeadInfos for RevDCM is that the only XML file I need to change or is it some other XML file I need to edit also? Like CivilizationsSchema?

edit: Yeah I forgot to say this is awesome. Exactly what I was looking for to enjoy Civ IV more! Thanks! Hope I can get it to work now with RevDCM :)
 
Hey Afforess, nice work here!

I have a few questions:
Checked your leaders' xml files, why are the <AndDependencyTypes> needed?
I didn't use those previously in WoC format...

Isn't there entries for the MEMORY_HIRED_TRADE_EMBARGO and MEMORY_LIBERATED_CITIES too?
It seems from the <MemoryAtttitudePercents> that those are also defined in the sdk

And something a little unrelated? Do you know what the <ContactDelays> good for?
I'm guessing how many turns have to pass between 2 of the same <ContactType> demands/offers, but not totally sure on this...
 
Back
Top Bottom