Announcement

Collapse
No announcement yet.

PBEM Human-Human Diplomacy through SLIC?

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

  • #61
    Originally posted by Dale
    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?
    Not hard to find. Just have to look for the correct button.
    arguments? We wish.

    I cant get counter proposals to work but i do beileve it is possible. And i am pretty much sure that we cant make threats. I did get the send proposal to work amazingly well.
    Despite of Locutus try it doe work amazingly in my games.

    leftover_crack, Maquiladora you guy said you wanted to help?
    or anyoneelse?
    Can you copy the file i attached and move to the ctp2 main directory\ctp2_data\default\gamedata\
    and copy in the script.slc the line
    Code:
    #include "PBEMFix.slc"
    and test it through hot seat?
    "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


    • #62
      I gave up of last code. I couldnt get further from sending proposals

      I started a code using messageboxes.

      Locutus, I have seen you code and i got tell you that i got at most really confused with the level of you work. As you know the first time i sit in front of a PC to write any code was a couple of months ago. And when i looked the way you deal with arrays i got really scared. Although the biggest barrier is the understand of a code based on messagebox which your never know the paths a simple next button can send you unless you are the creator. But i understood the overall of you mod wich made me start my new code.
      Now that i have finished my code i can understand much more of what was in yours (except those arrays ).
      One of the things i am proud of how i used the CTP2 diplomatic screen to send proposals wich really is a big step from you click unit/city and button trigger.
      but i have got to admit your code in gameplay has a really neat appearence while mine looks like some frankstein and has some dificulties to interact with the player. So i will probably use some of your interface in my coding.
      I want to know your thoughts on giving/requesting advances too.
      Not to mention the multiple proposals diplomacy.

      I have finished the most difficult part. Wich is the sending-receiving-counter-threaten-accept-reject forth and back game with the messagebox.

      It is more than 3:00 AM here and i have spend way too much time working on this. So i will post here what i have.

      -How does it work?
      The diplomacy starts with the regular diplomacy screen. As usual you send the emissary, then choose your tone, and get to the choosing proposal part. This is where the turn over starts! The regular diplomatic proposals are still there. But when you click on them a message pop up asking wich proposal do you want to send. If you are in the request tab the spinner for the request will appear, If you are in the offer tab the spinner for offers will be there and if you are in the treaties tab the spinner for the treaties will appear. then You select the proposal you want you want and send athe proposal as you would send in a normal game: In the proposal button. The diplomatic screen closes and a message is sent telling that your meesage was successfully sent.
      The other player will receive a alertbox with the proposal you sent in the beggining of his turn. The alertbox will contain the accept, reject and counter button.
      --->Counter: If he counters a message pop up telling him wich type of proposal he can choose to counter: buttons treaty, offer, request. Plus the buutton to accept and reject (he may change his mind ). If he chooses one of the proposals the list of proposals will appear show up. There is an unfinished part here, he cant send the proposal. if he chooses one the message gets killed and nothing happens I will get back here later.
      --->Reject: If the player rejects in the turn of the player that started the diplomatic a message will pop up in the beginning of the turn. Telling him that his proposal was reject and asking him if he wants to threaten or not. There are two types of threats declare war and embargo. Destroy city is not here because there is no way a player can choose a city to do so. But the i will kill you threat will be added later. Unfortunetly theres is something wrong here and i am really to tired to look for bugs today. The message is not send to the player that should be threatened. I will look this later.
      --> Accept: It does nothing since i havent implemented the make proposal effect. The function to do this is the but it is totally blank.

      Comments:
      - Dont send proposal to AI players. This will probably cause game freeze (The AI will get the message but cant respond). I know how to fix this dont worry.
      -The AI dont send proposals too. I will implement in such a way that there will be no difference between human-human AI-Human, Human-AI diplomacy!!!
      - There are 7 request and 7 offers. for both: give city, withdraw, give gold, give army, give map, declare war, end war. And the same 7 treaties of the regular game. One good part is that we can add as many proposal as we want to.
      - Again! The prposal effects are not implemented!!! But i know how to implement them all.
      - There is a cool gold spinner in the request/offer gold proposal
      -Dont send more than one proposal to an human player. Otherwise they may get mixed up. I already have an idea on how to fix this.
      - I also have some ideas to make many changes in the UI so that my code works the best it can.
      - do not replace any of your files with the ones in this zip. The content is to be added in the files with its names
      -Dont mind the content of the messagebox. unworkin string variables, lack of good info, bad content. As i said it is just to show you guys what i have done

      Here is the code

      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


      • #63
        Originally posted by Dale
        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?
        Good point It needs testing but I'm fairly certain it's 'DomesticDialog.TabGroup.Tab2.TabPanel.EnactGovern ment'. Arguments? What Pedrunn said...

        I haven't had a chance to try your code out yet, but it sounds very impressive I'll try ASAP and let you know what I think of it...
        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

        Comment


        • #64
          When someone starts coding he really want to see his code work.

          I had some bad moments coding this one. So i will give up of this code

          Sorry for all the MP community. But i said before that i dont even play MP i just accepted to do this code for the challenge and to help CTP2 in a big issue. I lost this challenge.

          But i went half way through making specially two things:

          1) The sending-receiving-reponding-countering-threatening connection of messages.
          2) The use of the Send Proposal (NewProposal(int_t, int_t) event) in the diplomatic screen to start diplomacy rather than Locutus menu wich among other things quite annoying. Sorry Locutus but it is.

          I hope the next adventurer for this fix really should look at and understand this code first before heading to work and if possible contact me. is that i am lonely in this code. I do want to make this code but i just cant. The more errors i get more i think it is my coding lack of ability that is on the way. I know how to implement stuff but thing dont work for a while

          The problem I have come to is:

          Proposals seems to have a thought on their own. They only show up from time to time. eg. I send a proposal in one turn it works real nice. In the next it wont. I said in the other post that there was problem with the sending threaten message but i do believe there isnt. The proble was this one i just told you happeninig with that proposal.
          I think the problem is in the sending of saved proposals (BeginTurn event handler) that are in arrays and the use of its saved variable. But there is a smaller chance that it could be in the saving of proposal in global arrays but i just cant find this error.

          Until the end of the month i plan to make the make proposal effects. I know all the ones i have in my code are possible even the treaties. Until them i am back to SP modding.

          Here is the same code but much better organized and with some more comments.
          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


          • #65
            Come on people! Work those code-typing fingers! Please! I want to play hotseat effectively but cannot do all this codey nonsense. So I am at your feet praying for you great gods of Civ to bless me with an oracle of multiplayness.

            Comment


            • #66
              From my experience with multiplayer games if your only playing with one other human you wont do much exchanging of maps/techs/gold with another human anyway. Of course thats not good, but its better than nothing, if you dont want to play online that is.

              You should be thankful hotseat even works at all, pbem doesnt even end turn
              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


              • #67
                Can you not just save the hotseat game after every turn and email it manually?
                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


                • #68
                  No, you cant do anything while the pop-up is on the screen, and of course clicking to get rid of the pop-up will show the next players map. BUT if each player had a dummy civ and allowed the other player to see it, but NEVER build a city with a dummy civs settler, that would work, would it not?
                  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


                  • #69
                    So player A controls civ 1 and 2(dummy civ), and player B controls civ 3 and 4(dummy civ).

                    Player A plays his turn with civ 1, ends turn, saves with civ 2, emails save to player B, player B plays turn with civ 3 ends turn, saves with civ 4, emails save to player A.

                    Am i missing something or would that not work?
                    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


                    • #70
                      That'd work fine I think.
                      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


                      • #71
                        Can you go up to >8 players in Hotseat?

                        Comment


                        • #72
                          The only problem is when one of the humans 'meets' his dummy settler. Then they might be able to see something 'classified'. I expect some SLIC could render the settler blind somehow, but it wont be pretty.
                          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


                          • #73
                            eep
                            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


                            • #74
                              A barb might kill the dummy settler too throughout the game time. With only a vision range of 1 and no chance of exchanging maps though, it would be that classified until really late in the game.

                              I just tested it too, and it works perfectly with saving and restoring with a maximum of 8 players(4 dummies).
                              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


                              • #75
                                On an Earth map, you could probably just move the dummy settler to the arctic and I doubt it would ever see anything important.

                                OTOH, You can get at the screen blanking functions in SLIC, so all you have to do is blank the screen at the start of every dummy players turn, and then unblank it at the end.

                                Comment

                                Working...
                                X