Announcement

Collapse
No announcement yet.

PBEM Human-Human Diplomacy through SLIC?

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

  • #31
    Bump again.

    Any progress?

    Comment


    • #32
      Recently there was some discussion in another thread here. The biggest problem on my behalf is a lack of time. I usually have a few half-an-hours here and there spread over my day but to really accomplish anything with this, it requires my full attention for several hours uninterrupted, something which I can rarely afford to invest
      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

      Comment


      • #33
        4 months... *BUMP*

        Hows this goin? Is anyone still working on this or has done any work on it that was involved in this thread before?

        BTW is anyone interested in starting a PBEM game at all? Even without the human to human diplomacy i think theres still a great game in it... new thread perhaps
        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


        • #34
          Same as before: I've been too busy with various other things to do a lot of work on this mod. It's still on my todo list, but unfortunately that's a very long list...
          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

          Comment


          • #35
            hmm.. mind if I take a look and try it? I enjoy modding a bit. I saw somthing about this earlier. Ive been reading and looking.

            Comment


            • #36
              leftover_crack, Can you slic?

              I have some ideas to fix PBEM through slic using global variables. I can show you some models and from that you finish the code. The problem is that i dont play multiplayer games (my interest is only for the sake of CTP2) and i am too busy with City Expansion and Religion code.

              So do you want my help and hear my ideas to fix diplomacy through PBEM? Or anyone else?
              "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


              • #37
                I doubt this is the most up-to-date version, but Locutus' code is here
                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


                • #38
                  Sure send what you got (my email is on the pbem thread)

                  Oh ya. Definately love to hear your ideas bro. Ive had teh game a year and have been fooling around with varouis tweeks. I do know slick to some degree

                  Comment


                  • #39
                    oops SLC. Couldnt edit.

                    Ok ill shut up now

                    Comment


                    • #40
                      IW and Locutus,

                      This is so not what i had in mind. I will post what i have in mind in a few minutes.
                      "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


                      • #41
                        This is what i have in mind. Of course it needs some polishing to be possible the offers/requests. But basicly this is where aim at.
                        The restriction is that you can only make one diplomatic item per proposal. (eg. cant give city and money at once).
                        One bad part is that diplomacy will take several moths to complete when ithere is counters and threats.

                        Still to this code work we need to know if a player can send a proposal if it isnt its turn.

                        Code:
                        int_t PBEM_CanSendProposal;
                        int_t PBM_Sender[];
                        int_t PBEM_receiver[];
                        int_t PBM_Proposal[];
                        int_t PBEM_HasBeenSent[];
                        
                        int_f StoreProposalType(int_t sender, int_t receiver, int_t ProposalType) {
                        int_t i;
                        int_t sucess;
                        	i = 0;
                        	while(i < PBEM_HasBeenSent.# && sucess == 0){
                        		if(PBEM_HasBeenSent[i] == 1) {
                        			PBM_Sender[i] = sender;			
                        			PBEM_receiver[i] = receiver;
                        			PBM_Proposal[i] = ProposalType;
                        			PBEM_HasBeenSent[i] = 0;
                        		}
                        		i = i + 1;
                        	}
                        	if(sucess == 0) {
                        		i = PBEM_HasBeenSent.#;
                        		PBM_Sender[i] = sender;			
                        		PBEM_receiver[i] = receiver;
                        		PBM_Proposal[i] = ProposalType;
                        		PBEM_HasBeenSent[i] = 0;
                        	}
                        }
                        
                        HandleEvent(NewProposal) 'SaveProposalToPBEM' pre {
                        int_t ProposalType; //initial proposal
                        	if(PBEM_CanSendProposal == 0) {
                        		ProposalType = GetLastNewProposalType(player[0], player[1], 0);	
                        		StoreProposalType(player[0], player[1], ProposalType, 0);
                        		return STOP;
                        	}
                        	else{
                        		PBEM_CanSendProposal = 0;
                        	}
                        }
                        
                        HandleEvent(BeginTurn) 'SendStoragedProposal' post {
                        int_t i;
                        	for(i = 0; i < PBEM_HasBeenSent.#; i = i + 1) {
                        		if(player[0] == PBEM_receiver[i] && PBEM_HasBeenSent[i] == 0) {
                        			PBEM_CanSendProposal = 1;
                        			ConsiderNewProposal(PBM_Sender[i], PBEM_receiver[i], 2000, PBM_Proposal[i],0,ID_NONE,ID_NONE,ID_NONE); 
                        			Event: NewProposal(PBM_Sender[i], PBEM_receiver[i]);
                        			PBEM_HasBeenSent[i] = 1;
                        		}
                        	}
                        }
                        Did not tested too. But any comments?

                        EDIT: Fixed syntax errors
                        EDIT2: a stupid i = 1 + 1; missing was causing loops. Fixed.
                        Last edited by Pedrunn; September 7, 2002, 23:18.
                        "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


                        • #42
                          Since no one tried to test this code from yesterday. I tested myself with the Apolyton Pack.

                          The code worked fine for the first proposal. It did exacly what i meant to do.
                          It stores the data from the proposal in the arrays and when the turns to the player wich the proposal was sent starts it sends a proposal of same type for him. So far too good. But when sending a second proposal the code seems to gt into a loop that i cant figure out where it is. I know it is during the storage but i am really bad to find these loops .
                          I really wanted a slicer to try to play/mod PBEM with me. If i could choose partners i would choose Locutus (who has already tried something in this), Dale or Peter Triggs (the last two have the best diplomacy backgroung of these forums) to work this code out. As i said i dont play multiplayer but i was so happy with the first results of this code that i want to give a shot.

                          But any slic help will be very appreciated.
                          "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


                          • #43
                            I don't have much time right now - will reply in more detail later but Pedrunn, Hotseat and PBEM are pretty much identical, you can play Hotseat games on your own for initial testing (PBEM testing is needed, but only once we have a fully functional (but potentially buggy) beta)
                            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                            Comment


                            • #44
                              The bug was a stupid i = i + 1; missing
                              But this means any slicer even overlooked.

                              Yet, this is some big good news. This code totally passed in the testing now.
                              But it only sends proposals and those with no arguments. Does not sent counters, threats, accepts and rejects. So much still has to be done.

                              I am currently making an update for the city expansion and finishing the religion code. But i think i will have my hands in this code soon. Them we all can play PBEM properly.
                              "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


                              • #45
                                I have seen what events and functions i have. Will be no problem to make proposals, accept and reject t fixes for PBEM. But i think i will have some trouble fixing the counters and threats . Probably i will have to make those through message box . Yet i will take a better look tomorrow. Need to get some sleep
                                "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

                                Working...
                                X