Announcement

Collapse
No announcement yet.

PBEM Human-Human Diplomacy through SLIC?

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

  • #46
    1) Wich button in CTP2 triggers this code?
    Code:
    Trigger 'PBEM_test' on "ControlPanelWindow.ControlPanel.ShortcutPad.DiplomacyButton" when (1) {
    2) Is the alertbox for the "now is your turn" of the PBEM and HotSeat in the script.slc? I can find it!
    "Kill a man and you are a murder.
    Kill thousands and you are a conquer.
    Kill all and you are a God!"
    -Jean Rostand

    Comment


    • #47
      Bad News. I tested my code with the HotSeat and it failed miserably

      What i tried to do was make send a proposal to a player and the proposal was only appear in the turn of the receiver player. Since i imagined that the player who wasnt playing the turn became an AI during another player turns therefore the anwers were made by the AI.

      Looks like not only the AI responds the proposal but the human cant at all send accept, reject, counter proposals.

      I really dont get why the programmers did that. This seem so be give more work than actually turning the player an AI while he wasnt playing.

      We will need to use messageboxes after all.
      "Kill a man and you are a murder.
      Kill thousands and you are a conquer.
      Kill all and you are a God!"
      -Jean Rostand

      Comment


      • #48
        I have officialy starting a fix for this diploamatic bug. I already stated coding. I have two question now:

        1) Is there any MakeTreaty or whatever function to set a treaty between two players???

        2) If a player open the diplomatic screen (Send Emissary) is there a way to find out to wich player he was going to send the proposal?

        Please, i am sart to feel like i am talking to myself in this thread. So if anyone knows this answer i will appreciate very much the se info.
        "Kill a man and you are a murder.
        Kill thousands and you are a conquer.
        Kill all and you are a God!"
        -Jean Rostand

        Comment


        • #49
          Well Im reading your ideas Pedrunn, unfortunately my slic knowledge is about as useful as a chocolate fireguard Ill test anything you have though.
          Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
          CtP2 AE Wiki & Modding Reference
          One way to compile the CtP2 Source Code.

          Comment


          • #50
            1)no 2) no

            Concrete, Abstract, or Squoingy?
            "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

            Comment


            • #51
              Peter Triggs already told me about it.

              And what about these ones before they became forgoten?

              1) Wich button in CTP2 triggers this code?

              2) Is the alertbox for the "now is your turn" of the PBEM and HotSeat in the script.slc? I can find it!

              Plus:

              3) The events Accept(int_t, int_t ) and Reject(int_t, int_t ). The firs int_t is the one who sent the the proposal that was accept or the one who accepted?

              Report. I already did a fix for the proposal. You can send them and the player will receive them nicely as long as it has only one proposal. The warning of the proposal reponse (accept/reject) is made by messagebox. I am current working with counters and threatens. Although i am having some dificulties coming up with a idea on how to implement the threatens.
              "Kill a man and you are a murder.
              Kill thousands and you are a conquer.
              Kill all and you are a God!"
              -Jean Rostand

              Comment


              • #52
                Pedrunn,
                I really liked your idea of using the regular diplomacy interface to do diplomacy, but I was already afraid it wouldn't work...

                There's no 'MakeTreaty' function but I suspect that we can write SLIC code that will make the AI accept/reject proposals depending on what the results of messagebox-negotiations are. This will need extensive testing though, but it's the least important part of this diplomacy code, the most important part is to make it possible for human players to give each other maps/gold/cities/advances/etc. Although a nice bonus, it's not necesssary to be able to make peacy treaties, cease-fires, etc through the regular diplomacy system, that can be done through the chat box as well...

                Originally posted by Pedrunn
                1) Wich button in CTP2 triggers this code?
                Code:
                Trigger 'PBEM_test' on "ControlPanelWindow.ControlPanel.ShortcutPad.DiplomacyButton" when (1) {
                The diplomacy button in the 'wheel' on the control panel, as I've stated several times in this thread already

                2) Is the alertbox for the "now is your turn" of the PBEM and HotSeat in the script.slc? I can find it!
                No, not AFAIK. It's probably hard-coded.
                Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                Comment


                • #53
                  Crosspost

                  Does this mean you can still get this to work through the regular diplomacy interface? That would be great The reason why I'm not working on this myself is, as I've stated many times before, that I don't have enough time. So I can't promise anything, do keep us up-to-date on your progress (don't hesitate to post any code you write, no matter how buggy!), and I'll see if/how I can help you as much as possible.
                  Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                  Comment


                  • #54
                    Originally posted by Locutus
                    Pedrunn,
                    I really liked your idea of using the regular diplomacy interface to do diplomacy, but I was already afraid it wouldn't work...

                    There's no 'MakeTreaty' function but I suspect that we can write SLIC code that will make the AI accept/reject proposals depending on what the results of messagebox-negotiations are. This will need extensive testing though, but it's the least important part of this diplomacy code, the most important part is to make it possible for human players to give each other maps/gold/cities/advances/etc. Although a nice bonus, it's not necesssary to be able to make peacy treaties, cease-fires, etc through the regular diplomacy system, that can be done through the chat box as well...
                    Dont believe me. Try yourself
                    Attached Files
                    "Kill a man and you are a murder.
                    Kill thousands and you are a conquer.
                    Kill all and you are a God!"
                    -Jean Rostand

                    Comment


                    • #55
                      Pedrunn do you mean these alert boxes in the script.slc?

                      Code:
                      alertBox '104NextHotSeatPlayer' {// String is part of the ctp2.exe twice
                      	Text(ID_NEXT_HOT_SEAT_PLAYER);
                      	BlankScreen(1);
                      	Button(ID_BUTTON_READY) {
                      		BlankScreen(0);
                      		Kill();
                      	}
                      }
                      
                      alertBox '105NextEmailPlayer' {// String is part of the ctp2.exe twice
                      	Text(ID_NEXT_EMAIL_PLAYER);
                      	BlankScreen(1);
                      	Button(ID_BUTTON_OK) {
                      		Kill();
                      		ExitToShell();
                      	}
                      	Button(ID_BUTTON_QUIT_GAME) {
                      		Kill();
                      		ExitToDesktop();
                      	}
                      }
                      And here are the according strings:

                      Code:
                      ### Multiplayer ###
                      ### Hotseat Game Messages ###
                      ### Email Game Messages ###
                      NEXT_HOT_SEAT_PLAYER 			"{player[0].leader_name} of the {player[0].civ_name_plural}, it is now your turn."
                      #NEXT_EMAIL_PLAYER 			"Please mail the saved game on your desktop to {player[0].leader_name} ({string[0].name}) of the {player[0].civ_name_plural}."
                      HOTSEAT_CITY_ATTACKED 			"The {player[0].civ_name_plural} attacked {city[0].name} with a {unit[0].name}."
                      HOTSEAT_ARMY_ATTACKED 			"The {player[0].civ_name_plural} attacked your {unit[1].name} with a {unit[0].name}"
                      Just wonder why NEXT_EMAIL_PLAYER is outcommented.
                      Civ2 military advisor: "No complaints, Sir!"

                      Comment


                      • #56
                        Originally posted by Pedrunn
                        Dont believe me. Try yourself
                        Is it me or does the BeginTurn handler ('SendStoragedProposal') not work? I can't seem to negotiate with anyone, I don't get any replies...
                        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                        Comment


                        • #57
                          Hey i just started coding.

                          You dont get the reply yet. I did not implemented it yet (it will be done through messageboxes). But the proposal is sent to the other player and it will appear in his turn.

                          Start a hotseat game with you and meet two human players (so dont forget to set ia small map game) since you cant use cheat mode in PBEM/HotSeat game.. send a proposal with one of the players and the other player will receive the message in the next turn.
                          "Kill a man and you are a murder.
                          Kill thousands and you are a conquer.
                          Kill all and you are a God!"
                          -Jean Rostand

                          Comment


                          • #58
                            Originally posted by Pedrunn
                            Start a hotseat game with you and meet two human players (so dont forget to set ia small map game) since you cant use cheat mode in PBEM/HotSeat game.. send a proposal with one of the players and the other player will receive the message in the next turn.
                            I tried this, it didn't work.

                            I had 3 humans though, but your code should be able to handle more than just two humans...
                            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                            Comment


                            • #59
                              It supports more than 2.

                              When you send the proposal did it left the diplomatic proposals screen or the proposal was sent and got accepted/reject?
                              "Kill a man and you are a murder.
                              Kill thousands and you are a conquer.
                              Kill all and you are a God!"
                              -Jean Rostand

                              Comment


                              • #60
                                Locutus:

                                Just on triggers, it reminded me of something. When you choose a new government, what's the trigger for the implement gov button? And what args?

                                Comment

                                Working...
                                X