Announcement

Collapse
No announcement yet.

IMPROVED version of DIPLOMOD

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    I'am not sure abaout regerd scale in yours rtf file.
    For exaple in IMP. DIPLOMOD v1.15 I set regerd betwwen AIs after a war on 250 & their Foreign screen give them content or Smiley face,
    but in yours file it is a Cold War.

    Comment


    • #47
      From the Alexander The Great scenario.slc:

      PHP Code:
      // Make the Persians and Independents REALLY hate you
      if(IsPlayerAlive(4)) {// if Persians aren't dead
      LogRegardEvent(41, -99990ID_AG_REGARD_EVENT_NEG9999);
      }
      if(
      IsPlayerAlive(8)) {// if Independents aren't dead
      LogRegardEvent(81, -99990ID_AG_REGARD_EVENT_NEG9999);

      The regard here for you is really lowered for you. From here possible values could be -9999 to 9999. But from the WW2 scenario it is OK to use -1000 to make the enemy really hate you.

      Another way to realize a science pact would be a technology transfer pact. The content would be: Each civ get the advances of the other civ and the way around. If one civ discovers an advance the other civ will get this advance also. This would make human and AI equal in a science pacts.

      -Martin
      Civ2 military advisor: "No complaints, Sir!"

      Comment


      • #48
        The info about the regard and trust scales is from an answer that Azmel2 gave to a question from Locutus in the Conversations with Richard Myers (Azmel) thread. The only thing I can think of is that when you use the CancelAgreement function to end the war, it triggers some regard event that ups the regard between the two civs a bit more. How about temporarily putting some messages into your code to try to monitor this:

        Code:
        int_t my_regard01;//now globals
        int_t my_regard10;
        
        	//////////////////////////////////////////////////
        		//War Over script for DiploMOD
        		int_t my_warturn;
        		int_t my_rnd;
        			
        		my_regard01 = GetEffectiveRegard(player[0], player[1]);
        		my_regard10 = GetEffectiveRegard(player[1], player[0]);
                                        message(1,'PreEffectiveRegard');//new monitoring message
        		if(!IsHumanPlayer(player[1])) {
        			my_warturn = TurnsAtWar(player[0], player[1]);
        			my_rnd = random(100);
        			if((my_warturn > 10) && (my_warturn <= 20)) {
        				if (my_rnd >= 1 && my_rnd <= 2) {	//2% chance
        				CancelAgreement(player[0], player[1], 31);
        				LogRegardEvent(player[0], player[1], 250 - my_regard01, 0, ID_REGARD_EVENT_POSITIVE_SENDER_DIPLOMACY_RESULT, 0);
        				LogRegardEvent(player[1], player[0], 250 - my_regard10, 0, ID_REGARD_EVENT_POSITIVE_RECEIVER_DIPLOMACY_RESULT, 0);
                                                                         my_regard01 = GetEffectiveRegard(player[0], player[1]);
        			                  my_regard10 = GetEffectiveRegard(player[1], player[0]);
        						Message (1, '401WarOver');
        					}
        				}
        				if((my_warturn > 20) && (my_warturn <= 30)) {
        					if (my_rnd >= 1 && my_rnd <= 4) {	//4% chance
        						CancelAgreement(player[0], player[1], 31);
        						LogRegardEvent(player[0], player[1], 250 - my_regard01, 0, ID_REGARD_EVENT_POSITIVE_SENDER_DIPLOMACY_RESULT, 0);
        						LogRegardEvent(player[1], player[0], 250 - my_regard10, 0, ID_REGARD_EVENT_POSITIVE_RECEIVER_DIPLOMACY_RESULT, 0);
                                            my_regard01 = GetEffectiveRegard(player[0], player[1]);
        			                  my_regard10 = GetEffectiveRegard(player[1], player[0]);
        						Message (1, '401WarOver');
        					}
        				}
        				if((my_warturn > 30) && (my_warturn <= 40)) {
        					if (my_rnd >= 1 && my_rnd <= 6) {	//6% chance
        						CancelAgreement(player[0], player[1], 31);
        						LogRegardEvent(player[0], player[1], 250 - my_regard01, 0, ID_REGARD_EVENT_POSITIVE_SENDER_DIPLOMACY_RESULT, 0);
        						LogRegardEvent(player[1], player[0], 250 - my_regard10, 0, ID_REGARD_EVENT_POSITIVE_RECEIVER_DIPLOMACY_RESULT, 0);
                                            my_regard01 = GetEffectiveRegard(player[0], player[1]);
        		                        my_regard10 = GetEffectiveRegard(player[1], player[0]);
        						Message (1, '401WarOver');
        					}
        				}
        				if((my_warturn > 40) && (my_warturn <= 50)) {
        					if (my_rnd >= 1 && my_rnd <= 8) {	//8% chance
        						CancelAgreement(player[0], player[1], 31);
        						LogRegardEvent(player[0], player[1], 250 - my_regard01, 0, ID_REGARD_EVENT_POSITIVE_SENDER_DIPLOMACY_RESULT, 0);
        						LogRegardEvent(player[1], player[0], 250 - my_regard10, 0, ID_REGARD_EVENT_POSITIVE_RECEIVER_DIPLOMACY_RESULT, 0);
                                            my_regard01 = GetEffectiveRegard(player[0], player[1]);
        			                  my_regard10 = GetEffectiveRegard(player[1], player[0]);
        						Message (1, '401WarOver');
        					}
        				}
        				if(my_warturn > 50) {
        					if (my_rnd >= 1 && my_rnd <= 10) {	//10% chance
        						CancelAgreement(player[0], player[1], 31);
        						LogRegardEvent(player[0], player[1], 250 - my_regard01, 0, ID_REGARD_EVENT_POSITIVE_SENDER_DIPLOMACY_RESULT, 0);
        						LogRegardEvent(player[1], player[0], 250 - my_regard10, 0, ID_REGARD_EVENT_POSITIVE_RECEIVER_DIPLOMACY_RESULT, 0);
                                            my_regard01 = GetEffectiveRegard(player[0], player[1]                                        
                                            my_regard10 = GetEffectiveRegard(player[1], player[0]);
        						Message (1, '401WarOver');
        					}
        				}
        			}
        	//////////////////////////////////////////////////
        
        messagebox 'PreEffectiveRegard' {
        show();
        Text (ID_PreEffectiveRegardM) ;
        //PreEffectiveRegardM "Pre  my_regard01={my_regard01}, my_regard10={my_regard10}"
        }
        and likewise put "my_regard01={my_regard01}, my_regard10={my_regard10}" into 401WarOver.

        Comment


        • #49
          Wow...

          This is really great stuff, I never thought there'd be a day where AI-AI diplomacy was possible in CTP2, and I haven't check out the forums here to much in the past couple months, so imagine my surprise when I find this. I hope this continues to yield breakthrus in what was thought possible of Ctp2

          Comment


          • #50
            One question player1: Did you added Peter Triggs AI-AI diplomacy handler. So far I examined your diplomod.slc but I wasn't able to find it there.

            -Martin
            Civ2 military advisor: "No complaints, Sir!"

            Comment


            • #51
              No, I didn't since as I figured, it isn't finished.

              Of course if you want, you can add it yourself.

              I have retired from CTP2 moding community anyway.

              P.S. Of course, when it becomes finished, some of the lines from IMPROVED Dioplmod v1.15 should be deleted, since they where temporary solution for the problem (like War Over script, etc...)

              Comment


              • #52
                Now I tried to make Diplomod more MP compartible therefore I used your version of Diplomod player1.

                I replaced the entries that are depending on g.player == 1 by something like IsHumanPlayer(g.player). But as I tested my version of Diplomod, CTP2 crashed, just two turns after I reloaded slic. Therefore I tried it without reloading slic and I was able to finish the crucial turn, without a crash. I tried the same thing with player1's unmodified version, but the same thing happend. Therefore I disabled the war over script and the result was that CTP2 didn't crash.

                Here is my Version of Diplomod with the better MP support. So far it looks that no one had any problems with the war over script, therefore it is enabled in the attached file.

                -Martin
                Attached Files
                Civ2 military advisor: "No complaints, Sir!"

                Comment


                • #53
                  Martin, I haven't gone away, honest. It's just that the flame wars over in the Civ3 forums have been so distracting.

                  I came to the conclusion that the best way to proceed would be to start from scratch with Diplmod. There's a lot of things you just can't do, even though you should be able to do them. But I think I've made quite a lot of progress and will post a report soon.

                  Comment


                  • #54
                    Nice work Martin.
                    Now somebody can play MP or Hotseat.
                    Since I won't give more updates, I think you shold call it IMPROVED DIPLOMOD v1.2

                    Comment


                    • #55
                      Hmm, I haven't noticed.
                      You have already named it v1.2

                      Comment


                      • #56
                        Now, lets make it official:
                        IMPROVED DIPLOMOD v1.2 by player1 & Martin Guhmann
                        -has better MP support
                        Attached Files

                        Comment


                        • #57
                          So would this Dipmod be good in something like Craddle?

                          Comment


                          • #58
                            Yes, it would.
                            Althought maybe some small modifications are needed (not sure about it, you should ask hexagonian about instructions)

                            It works well in Aoplyton pack.
                            And in MedMod (some small chages needed, like replacing Diplomats with Nobles)

                            Try and see.

                            Main improvement over basic Diplomod (v3.6 used in Apolyton & MedMod, v3.5 used in Cradle) is WarOver script.
                            Which is temporary solution to ever lasting AI wars, unit Petter Triggis finaly makes Diplo-AI complete.

                            I have retired ftom CTP2-moding community so this SLIC is left to you people to MOD it, and to suit it to your needs.

                            I think it is already part of GoodMod (Apolyton compatibile) by Martin.

                            Comment


                            • #59
                              Not tested, but I took a look at the file, updated the enable advance for diplomatic interaction (In Cradle it's Dynasty)

                              Located at my site...
                              The Land of Hexagonia
                              in the SLIC options section.
                              Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
                              ...aisdhieort...dticcok...

                              Comment


                              • #60
                                Nice!

                                Now, we have a Cradle version of Improved Diplomod.

                                Comment

                                Working...
                                X