Announcement

Collapse
No announcement yet.

PROJECT: Playtest

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Nice one
    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


    • Originally posted by Fromafar
      Confirmation of the current max of 28 civs (27 + 1 barbarian).

      A save game contains a block of agreement data with size 39 (= number of possible agreements) * number of civs * number of civs. During save and restore, the size is handled as a signed 16 bit integer. This will make the size for 29 civs or more wrap around to a negative number, lose all data upon saving, and cause a crash upon reloading.
      ...but there are only 39 {= number of possible agreements} * number of civs * (number of civs - 1) {= number of civs you can have an agreement with} / 2

      agreements are not all automatically reciprocal....
      I'll shut up now.
      ·Circuit·Boi·wannabe·
      "Evil reptilian kitten-eater from another planet."
      Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

      Comment


      • Originally posted by Fromafar
        Confirmation of the current max of 28 civs (27 + 1 barbarian).

        A save game contains a block of agreement data with size 39 (= number of possible agreements) * number of civs * number of civs. During save and restore, the size is handled as a signed 16 bit integer. This will make the size for 29 civs or more wrap around to a negative number, lose all data upon saving, and cause a crash upon reloading.
        This means changing it from singed int 16 to unsigned int 16 would solve the problem, but it would still bind us to the limit of the possible treaties.

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

        Comment


        • I have changed it to unsigned, so we will be safe until someone wants to have more than 40 civilisations.

          Comment


          • Edit: DP
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • Originally posted by Martin Gühmann


              This means changing it from singed int 16 to unsigned int 16 would solve the problem, but it would still bind us to the limit of the possible treaties.

              -Martin
              I don't think I've ever had more than 10 treaties with another civ, so 39 is a pretty safe number if you ask me (Remember, it's 39 for every possible combo)

              have changed it to unsigned, so we will be safe until someone wants to have more than 40 civilisations.
              So is there anything else that could stop us from having more than 32 civs per game? Not that 32 isn't plenty, but if we could actually make that 40
              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

              Comment


              • Originally posted by Locutus
                I don't think I've ever had more than 10 treaties with another civ, so 39 is a pretty safe number if you ask me (Remember, it's 39 for every possible combo)
                You have for each possible treaty a Martrix between the players for one agreement you have for 29 players a matrix of 29*29 entries, just to say that every player has an aggreement with another player, for each of these 39 agreements you have such a matrix. Each matrix a matrix of boolians wheather player X has an agreement with player Y. For 29 players you have with 39 agreements 32799 possibilties too much for an signed 16 bit integer 2 to the power of 15 = 32768.

                With 32 players and 39 proposals we have 32*32*29 = 39936 possible combinations.

                Without rasing the maximum number of players we can have 2^16/32^2 = 65536/1024 = 64 types of proposals in one game, doesn't matter how much you can have effectivly at the same time with another civ, that it is like with the wonder and building limits.

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

                Comment


                • What are the 39 possible agreements?
                  ·Circuit·Boi·wannabe·
                  "Evil reptilian kitten-eater from another planet."
                  Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                  Comment


                  • ....So I save my game, go do family stuff, come back quickly read the forum, load my save, CtD!!!!!!!

                    ...and this time crash.txt is empty
                    Attached Files
                    ·Circuit·Boi·wannabe·
                    "Evil reptilian kitten-eater from another planet."
                    Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                    Comment


                    • The Proposals:

                      enum PROPOSAL_TYPE {
                      PROPOSAL_NONE,

                      PROPOSAL_OFFER_GIVE_CITY,
                      PROPOSAL_REQUEST_GIVE_CITY,

                      PROPOSAL_OFFER_WITHDRAW_TROOPS,
                      PROPOSAL_REQUEST_WITHDRAW_TROOPS,

                      PROPOSAL_OFFER_STOP_PIRACY,
                      PROPOSAL_REQUEST_STOP_PIRACY,

                      PROPOSAL_OFFER_BREAK_AGREEMENT,
                      PROPOSAL_REQUEST_BREAK_AGREEMENT,

                      PROPOSAL_OFFER_STOP_RESEARCH,
                      PROPOSAL_REQUEST_STOP_RESEARCH,

                      PROPOSAL_OFFER_REDUCE_NUCLEAR_WEAPONS,
                      PROPOSAL_REQUEST_REDUCE_NUCLEAR_WEAPONS,

                      PROPOSAL_OFFER_REDUCE_BIO_WEAPONS,
                      PROPOSAL_REQUEST_REDUCE_BIO_WEAPONS,

                      PROPOSAL_OFFER_REDUCE_NANO_WEAPONS,
                      PROPOSAL_REQUEST_REDUCE_NANO_WEAPONS,

                      PROPOSAL_OFFER_GIVE_ADVANCE,
                      PROPOSAL_REQUEST_GIVE_ADVANCE,

                      PROPOSAL_OFFER_GIVE_GOLD,
                      PROPOSAL_REQUEST_GIVE_GOLD,

                      PROPOSAL_OFFER_REDUCE_POLLUTION,
                      PROPOSAL_REQUEST_REDUCE_POLLUTION,

                      PROPOSAL_OFFER_MAP,
                      PROPOSAL_REQUEST_MAP,

                      PROPOSAL_OFFER_HONOR_MILITARY_AGREEMENT,
                      PROPOSAL_REQUEST_HONOR_MILITARY_AGREEMENT,

                      PROPOSAL_OFFER_HONOR_POLLUTION_AGREEMENT,
                      PROPOSAL_REQUEST_HONOR_POLLUTION_AGREEMENT,

                      PROPOSAL_OFFER_END_EMBARGO,
                      PROPOSAL_REQUEST_END_EMBARGO,


                      PROPOSAL_TREATY_DECLARE_WAR,
                      PROPOSAL_TREATY_CEASEFIRE,
                      PROPOSAL_TREATY_PEACE,
                      PROPOSAL_TREATY_TRADE_PACT,
                      PROPOSAL_TREATY_RESEARCH_PACT,
                      PROPOSAL_TREATY_MILITARY_PACT,
                      PROPOSAL_TREATY_POLLUTION_PACT,
                      PROPOSAL_TREATY_ALLIANCE,
                      PROPOSAL_MAX
                      };

                      Comment


                      • Originally posted by Flinx
                        ....So I save my game, go do family stuff, come back quickly read the forum, load my save, CtD!!!!!!!
                        The cause of the save file corruption has been corrected in the source code. Unfortunately, this will not enable you to proceed with the current save file. Even worse, going back to the 250 AD save will not do you much good either. This file has been corrupted in the same way. It just doesn't show yet .

                        Comment


                        • Originally posted by Locutus
                          So is there anything else that could stop us from having more than 32 civs per game?
                          Unfortunately, yes. We will have to replace some bit masks - implemented as (unsigned) 32 bits integers - to go beyond 32 civs.

                          Comment


                          • Is there a regular shceduled time for new builds to come out or?
                            Allways vote banana, its high in potassium!

                            Comment


                            • Originally posted by Fromafar
                              Unfortunately, this will not enable you to proceed with the current save file. Even worse, going back to the 250 AD save will not do you much good either. This file has been corrupted in the same way. It just doesn't show yet .
                              I suspected this.
                              The cause of the save file corruption has been corrected in the source code.
                              ...and there was much rejoicing
                              ·Circuit·Boi·wannabe·
                              "Evil reptilian kitten-eater from another planet."
                              Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                              Comment


                              • Oh Fromafar, since you had some success improving pathfinding, maybe you look into this issue:

                                You can gain +1 ship movement points by feat or wonder (in my save I actually have both so +2 ) but you need to move every ship one turn at a time to get the extra movement points. Sending a ship on a multi-turn movement path gives you the extra movement in the current turn but you will notice the [2], [3] etc. boxes are located at the base movement point locations, and the ship will stop at these points each turn even though it has not used all of the available movement points.

                                It appears that beyond the current turn the base movement of the unit is being used (ignoring movement bonuses) when calculating the path and then the original path is followed until an enemy is encountered or the end of the path is reached.

                                On land too this seems to be the case, as paths will deviate to take into account ZOC and 12 unit max limits but even though the obstruction is gone when the unit gets to that location, the deviation is still taken.

                                A multi-turn path should be viewed as a ‘go to’ command and the optimal path should be re-evaluated each turn. Also implement a delay if the obstruction is one of your units so that it can move out of the way first (if it is moving) i.e. let the tank on the road ahead move forward before you go off road to get around it!
                                ·Circuit·Boi·wannabe·
                                "Evil reptilian kitten-eater from another planet."
                                Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                                Comment

                                Working...
                                X