1.25 released! (Better late than never)

yeah, i totally get you,
took me 12+ years of modding to move my self to git.
but, its extremely good. think about it for the future. as said im here to support.

took a look now at your code,
you have changed tons of code since the last dll you provided :)
just one small question you changed peace treaty to use and check the trade agreement, what is it purpose?


EDIT:
ok look here for start:
CvPlayerAI::AI_counterPropose
in here there are a bunch of places where the AI adds either gold per turn or lumo amount to balance the deal.
look at line 10865 - there bulk there checks if it should add gold to the deal.

also in the player AI ,
for some of the deals there is a check if it should add gold to the deal :
setTradeItem(&item, TRADE_GOLD

where for example would you like to prevent it?
 
Last edited:
yeah, i totally get you,
took me 12+ years of modding to move my self to git.
but, its extremely good. think about it for the future. as said im here to support.

I'll make it first priority after getting a 1.25.1 release out.

just one small question you changed peace treaty to use and check the trade agreement, what is it purpose?

Whereabouts is this?

EDIT:
ok look here for start:
CvPlayerAI::AI_counterPropose
in here there are a bunch of places where the AI adds either gold per turn or lumo amount to balance the deal.
look at line 10865 - there bulk there checks if it should add gold to the deal.

also in the player AI ,
for some of the deals there is a check if it should add gold to the deal :
setTradeItem(&item, TRADE_GOLD

where for example would you like to prevent it?

It needs to only ever propose lump sums of gold for immediate deals (with no turn timer) and likewise only ever propose gold per turn for annual deals (with a turn timer). When the two types of deal are mixed they can be exploited by cancelling and renegotiating.
 
/************************************************************************************************/
/* START: HR Diplomacy */
/************************************************************************************************/
// This mechanic has been repurposed as a bonus for the length of time with a Trade Agreement
return (std::min(GC.getDefineINT("DIPLOMACY_TRADE_ROUTE_MODIFIER"), GET_TEAM(getTeam()).AI_getTradeAgreementCounter(eTeam)));
//int iPeaceTurns = std::min(GC.getDefineINT("FOREIGN_TRADE_FULL_CREDIT_PEACE_TURNS"), GET_TEAM(getTeam()).AI_getAtPeaceCounter(eTeam));
//if (GC.getGameINLINE().getElapsedGameTurns() <= iPeaceTurns)
//{
// return GC.getDefineINT("FOREIGN_TRADE_MODIFIER");
//}
//return ((GC.getDefineINT("FOREIGN_TRADE_MODIFIER") * iPeaceTurns) / std::max(1, GC.getDefineINT("FOREIGN_TRADE_FULL_CREDIT_PEACE_TURNS")));
/************************************************************************************************/
/* END: HR Diplomacy */
/************************************************************************************************/
this part i meant.

It needs to only ever propose lump sums of gold for immediate deals (with no turn timer) and likewise only ever propose gold per turn for annual deals (with a turn timer). When the two types of deal are mixed they can be exploited by cancelling and renegotiating.
hum,
so , should handle couneter offer i assume?
the exploit is by a human or ai?
we could try so set some check that will not allow to add a gold trade if other trade is already on the table.
could you describe the scenario a bit more?
maybe a screen shot such?
so ill better understand what to prevent .
 
Appreciate the to do List :D
Tyvm
 
Hi... about that indenezian UI
Is this because you have the Hagia Sophia? Or did you obtain the Obelisk some other way?
I build the wonder. The same goes for Oden (Greece). Maybe its a glitch and it shall work for unique buldings maybe it need just add to the tech tree.
Next is probably the old glitch of fortress (1. Cannot move the enginer-worker from fortress into the square that has been mark into cultural territory by that fortress. It wont allow me even if i have there unit. But if i move into regular controlled square then i can enter the square. [The Fortress in save is in bottom of map on tundra - my territory.])
(2. i was unable to upgrade fort into fortress but deceasing into encampment worked)
Save setting (Mega, no city raze, custom game)
Maybe i shall tell that the Ai keep offering me they transport navy (and cannons) for tech... and now i have probably bigger transport navy that the entire navy of the rest of the world together. (At start i need to build transport navy so i buy them generously, but once half of offense armada is on other continent they kinda loosing purpose.) :)
 

Attachments

  • Reply.CivBeyondSwordSave
    2.9 MB · Views: 30
**ignore***

Not ignoring you, just didn't have any free time at all last day or so. On leave from work now though, so should be more responsive over the next 2 weeks. (Other than family commitments)

this part i meant.

Hmm, I remember doing that but I don't remember why now. Possibly something to do with maintaining Mac compatibility, will check over my notes.

hum,
so , should handle couneter offer i assume?
the exploit is by a human or ai?
we could try so set some check that will not allow to add a gold trade if other trade is already on the table.
could you describe the scenario a bit more?
maybe a screen shot such?
so ill better understand what to prevent .

The exploit can be done by humans. Basically, you can negotiate a deal that has a duration that includes a lump sum of gold. Accept the deal, get the gold, then cancel the deal in a turn or two and negotiate it again, potentially for more gold. This never used to be possible because the AI is only supposed to offer gold per turn for such deals, not lump sums. Lump sums are only supposed to be offered for deals without a turn duration.

I'm not sure why this has changed in 1.25. I need to have a look at the original Advanced Diplomacy code and see if this was an intended "feature" or not, or whether I just broke something in the merge. Is the code you've pointed to present in the unmodded DLL?

Hi... about that indenezian UI
I build the wonder. The same goes for Oden (Greece). Maybe its a glitch and it shall work for unique buldings maybe it need just add to the tech tree.

This is due to a limitation of how CIv4 checks for building prerequisites. I thought I'd found a workaround but I guess it doesn't always work. I can probably fix it in the DLL instead.

Next is probably the old glitch of fortress (1. Cannot move the enginer-worker from fortress into the square that has been mark into cultural territory by that fortress. It wont allow me even if i have there unit. But if i move into regular controlled square then i can enter the square. [The Fortress in save is in bottom of map on tundra - my territory.])
(2. i was unable to upgrade fort into fortress but deceasing into encampment worked)
Save setting (Mega, no city raze, custom game)

Someone reported something similar back in the 1.25 beta. Will investigate.
 
Oh god i didnt mean you ignoring me!
Hehe, i just wrote a post about the code ,but i git it wrong so i removed the text abd wrote ignore from the empty post....
Oh my i can imagine what you thought when you wrote the reply....
Sorry, embarrassing misunderstanding for me.

Ok so,
We could just check for timer in the gold parts.
Good chance you miss coded something though.
I will investigate you changes there.
 
Oh god i didnt mean you ignoring me!
Hehe, i just wrote a post about the code ,but i git it wrong so i removed the text abd wrote ignore from the empty post....
Oh my i can imagine what you thought when you wrote the reply....
Sorry, embarrassing misunderstanding for me.

Ok so,
We could just check for timer in the gold parts.
Good chance you miss coded something though.
I will investigate you changes there.

No worries, misunderstanding on my part too and no hard feelings :)
 
IIRC, this was not part of the Adv Diplo mod itself ( the lump sum gold hack). When I was working with Dac on his TTT series for scenarios, we discussed using that modcomp to incorporate in future updates of TTT when creating scenarios. Additionally, I think Platy came up with an awesome python fix in order to use the modcomp more efficiently for future works.
Lol, I'll take a look at some of my scenarios and see what tweaks I used when creating the scenarios. It may be just a line break on the merge for your update. Heh, I haven't done any modding in years, but this has definitely got me curious... Not that I like your mod at all :D
I'm not sure why this has changed in 1.25. I need to have a look at the original Advanced Diplomacy code and see if this was an intended "feature" or not, or whether I just broke something in the merge. Is the code you've pointed to present in the unmodded DLL?
 
IIRC, this was not part of the Adv Diplo mod itself ( the lump sum gold hack). When I was working with Dac on his TTT series for scenarios, we discussed using that modcomp to incorporate in future updates of TTT when creating scenarios.

Looking back over my notes and comparing the source files it looks like the problem has likely arisen when I tried to merge AD into Kmod. AD modifies CvPlayerAI::AI_counterPropose straight out of BTS, but Kmod almost completely rewrites this function, so it was never a case of a simple merge. Pretty sure I had to ask for some outside help with it because I was (and still am) well out of my depth with this part of the AI code.

Ok so,
We could just check for timer in the gold parts.
Good chance you miss coded something though.
I will investigate you changes there.

I'm happy for you to make any changes necessary to try fix this problem, especially in CvPlayerAI::AI_counterPropose. It's definitely beyond my skill. In the absence of faulty code, some sort of check for whether a deal has a duration would seem to make sense.

Xyth,
do you perhaps have a save game that i can check the effect you wish to cancel?
also the game version to work on - 1.25 released version right?

Yes, 1.25 released version. I don't have such a saved game atm but I'll see if I can set one up. Should be able to replicate the issue in most mid-game saves.
 
Looking back over my notes and comparing the source files it looks like the problem has likely arisen when I tried to merge AD into Kmod. AD modifies CvPlayerAI::AI_counterPropose straight out of BTS, but Kmod almost completely rewrites this function, so it was never a case of a simple merge. Pretty sure I had to ask for some outside help with it because I was (and still am) well out of my depth with this part of the AI code.
Ok, that makes sense.
Unfortunately, I won't be able to assist with this, as I know absolutely nothing about Kmod. Well, to be honest, I haven't actually modded anything beyond minor stuff in years. My apologies for that. I thought I might be able to offer a bit of insight :(
I do hope you'll be able to figure things out, as your mod is one of the top 3 I continuously play with. Good luck :)
 
Looking back over my notes and comparing the source files it looks like the problem has likely arisen when I tried to merge AD into Kmod. AD modifies CvPlayerAI::AI_counterPropose straight out of BTS, but Kmod almost completely rewrites this function, so it was never a case of a simple merge. Pretty sure I had to ask for some outside help with it because I was (and still am) well out of my depth with this part of the AI code.
Ineed,
when i coded the merge in the past days to advanced civ, i basically didnt do a merge, i rewrote the code to be adjustable to advanced civ mod based on kmod.
i took onlt free trade agreement, but the code basis was open borders from the base code im using.
so, simple merge can cause issues as some code isnt needed.
i saw that both you and AD have 1 unused function (signfreetradeagreemen) and also duplicate cache fields in team.cpp which exists also om teamai.cpp.
which i got rid off....
you can take a look at my git if you wanna dive in.

anyhow,
ill be free to work on the issue soon ,
someone beat you to my help time -> nexus from chronicles of mankind, which i offered to assist as well with a small issue :)
ill finish soon there i hope.
 
Excuse me, where can I get the new era music except for 6 soundtrack files? It's really great. If it's all Ian's, then he's somewhat obscure. Also thanks for your own continuous great work.

They're not available anywhere else as far as I know. Ian composed/arranged them specifically for HR, for which I am immeasurably grateful. See /History Rewritten/Music.txt for his notes about each piece if you're interested.
 
This is a beatifully melancholic piece I was looking for if anyone was wondering as well. Great job integrating buried treasures like this and many thanks to Ian for pointing out they should be reused.
 

Attachments

  • ConquestsJapanese1.zip
    2.6 MB · Views: 34
Just trying the mod out for the first time and liking it. However it runs really slow on my computer. On a huge map with 25 civs and at like 20 turns its taking 2 min. Didn't notice this so early with mods like RFC and C2C, just wondering if its a known thing.
 
Just trying the mod Jut for the first time and liking it. However it runs really slow on my computer. On a huge map with 25 civs and at like 20 turns its taking 2 min. Didn't notice this so early with mods like RFC and C2C, just wondering if its a known thing.
if you talking about the duration of rounds:
As far as i know one thing can be a huge amount of computation, from early stage made by huge amount of barbarians roaming around. (It will fade away.) Lately all the stuff around. (I saw problems with 40+ number of civs, crampled on small area.)
Second can be your computer setting like antivirus or "Safe power mode." But others like will tell you better. Just make test with "high power usage" setting or check if you antivirus is on game mode or optimized.
 
Top Bottom