Possibility on re-adding Pact of Secrecy?

crawf0rd

The One and Only
Joined
Jan 30, 2012
Messages
483
I found a few mysterious lines of text in the DiscussionDialog.lua file regarding the Pact of Secrecy. Upon de-commenting those lines, I was able to get this far:



But even after the AI's met other leaders the button stayed grayed out. Attached are the original discussiondialog file from G&K, the G&K one I modified, and the one from back when Pact of Secrecies still existed. Is anyone else interested in cracking this code?
The question is if they deleted PoS assets from the DLL. Then this has no hope of working till the fall patch. The reason I am optimistic is that they commented out from the LUA file rather than deleting.
 

Attachments

  • Civ5Mod2.zip
    21 KB · Views: 31
There are various criteria before that button will enable (both players have to have met the 3rd party, not already friendly with 3rd party, etc)

But when they are all met you will get the following error

Code:
Runtime Error: [string "Assets\DLC\Expansion\UI\InGame\LeaderHead\D..."]:1149: 
attempt to call method 'IsWorkingAgainstPlayerAccepted' (a nil value)

which looks like the code in the DLL has either been removed (or also commented out)
 
Once the DLL is released, it should be pretty easy to add functionality for the Pact of Secrecy, but a better concern would be whether or not it adds to the gameplay experience. It would be neat if you could discover pacts of secrecy with intrigue and then inform others.
 
For me some elements of the diplomacy system, both the old one (with pacts of secrecy and cooperation), and the new one (with declarations of friendship and denunciations) make little sense, they are just some options that basically do nothing. Even if you're officially friends with other civs, they can be plotting against you. So I think these things should be removed, and only things that have an actual gameplay effects, like open borders and research agreements (but I think RAs are waay too cheap as it is now, in the Community Call to Power project they have more sensible prices) should be kept in the game, possibly with some new options, like economical and cultural agreements, or a general cooperation agreement which brings bonuses to gold, research, culture etc. that slowly grow over time (so breaking it is costly). I'd prefer the latter, with multiple levels of relationships, and limited "diplomatic resources", so you can't be friends with everyone. Perhaps someone will make such system in the DLL...

In the current version of the game, I don't "feel" which civs really like me, and which don't, they are all my rivals that change their opinion about me quite often. I really miss an opportunity to create a long lasting and solid alliance with another civ.
 
Well that's too bad. Looks like we will have to wait! Thanks for clarifying whoward. I tried removing the "IsWorkingAgainstPlayerAccepted", and got it to let me press the button, but the game just crashed.
 
I found the correct files in the DLL (CvDiplomacyAI.h and .cpp), and you are right, it is all commented out. removing the //s is my first dll mod, and I don't know how to compile it. Help would be greatly appreciated.
 
Alright, got the compiling, didn't work. It tells me that some "identifiers" are missing or something. I must've missed something, but I'm not sure. If any dll-masters are out there reading this, I would appreciate your help greatly.
 
Alright, got the compiling, didn't work. It tells me that some "identifiers" are missing or something. I must've missed something, but I'm not sure. If any dll-masters are out there reading this, I would appreciate your help greatly.

When compiling, do you get any errors or warnings? Look through them for anything strange, post it up here.
 
Yes, there were errors related to the things I uncommented. ">.\CvDiplomacyAI.cpp(11201) : error C3861: 'DoWorkAgainstSomeoneStatement': identifier not found." Is the error
 
Yes, there were errors related to the things I uncommented. Something along the lines of, "DoWorkAgainstSomeone is not an Identifier in CvDiplomacy.cpp". It wouldn't compile.

Did you forget to uncomment the appropriate function declarations in CvDiplomacyAI.h (line 571)?

Code:
//void DoWorkAgainstSomeoneStatement(PlayerTypes ePlayer, DiploStatementTypes &eStatement, int &iData1);
//void DoEndWorkAgainstSomeoneStatement(PlayerTypes ePlayer, DiploStatementTypes &eStatement, int &iData1);
 
Did you forget to uncomment the appropriate function declarations in CvDiplomacyAI.h (line 571)?

Code:
//void DoWorkAgainstSomeoneStatement(PlayerTypes ePlayer, DiploStatementTypes &eStatement, int &iData1);
//void DoEndWorkAgainstSomeoneStatement(PlayerTypes ePlayer, DiploStatementTypes &eStatement, int &iData1);

I did a search of the entire solution and removed the comments for them. Maybe I missed a few.

Edit: Ah yes, I missed something. Let me compile again.
 
Looking into this a little further, it looks like there is quite a bit of supporting code - it's not one or two functions, it's more like a dozen or so.

If you search the entire project (Ctrl+Shift+F) for "workagainst" and "workingagainst" you'll get quite a few results. My guess is you'd have to uncomment all of them to get it stabilized, at which point it would most likely compile (or be very close to compiling). Then it's a matter of figuring out what was wrong with it from a gameplay perspective that they decided to take it out - my gut says the AI wasn't smart enough to use it effectively.
 
I think it may just be obsolete compared to the "new" diplomacy system. Remember that when they pulled it out, it was as part of a pretty robust post-launch shift from the 'old' diplomacy to the new one, and it was replaced by the 'denounce' mechanic.
 
Thank you. I found a few more results with "Workingagainst" rather than "workagainst". It wouldn't compile, with these errors:
Code:
1>CvDiplomacyAI.obj : error LNK2001: unresolved external symbol "public: void __thiscall CvDiplomacyAI::DoEndWorkAgainstSomeoneStatement(enum PlayerTypes,enum DiploStatementTypes &,int &)" (?DoEndWorkAgainstSomeoneStatement@CvDiplomacyAI@@QAEXW4PlayerTypes@@AAW4DiploStatementTypes@@AAH@Z)
1>CvDiplomacyAI.obj : error LNK2001: unresolved external symbol "public: void __thiscall CvDiplomacyAI::DoWorkAgainstSomeoneStatement(enum PlayerTypes,enum DiploStatementTypes &,int &)" (?DoWorkAgainstSomeoneStatement@CvDiplomacyAI@@QAEXW4PlayerTypes@@AAW4DiploStatementTypes@@AAH@Z)

Edit: I commented out all the problem spots and the compilation succeeded. Lets test!
Edit 2: Same problem as seen at the beginning of the thread *sigh*. I'll post the applicable files if anyone wants to test this further.
 

Attachments

  • Files.zip
    141.4 KB · Views: 28
Top Bottom