Announcement

Collapse
No announcement yet.

PROJECT: Altered source files

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

  • ctp2_code\gs\gameobj\armydata.cpp
    Prevented a crash when a space plane gets assigned multiple orders.


    This file refuses to compile with the zip file with these changes applied. It doesn't like the declaration of sint32 in c3types.h, and says that max isn't a member of std, even though c3.h looks proper.
    Solver, WePlayCiv Co-Administrator
    Contact: solver-at-weplayciv-dot-com
    I can kill you whenever I please... but not today. - The Cigarette Smoking Man

    Comment


    • Strange. I have tested the debug, release, and final versions, and these all work for me with MSVC 6.0.

      Maybe it will work if you do a full rebuild (Rebuild All instead of Build). There have been a lot of changes in the generated database record files lately. This may sometimes cause these kind of problems with pre-compiler headers.

      The sint32 typedef is so elementary, that it is almost impossible to cause problems, unless we have messed it up with mismatching preprocessor or comment blocks. Are you compiling with any special predefined symbols?

      Comment


      • Nope, I was compiling everything in the usual way. What it didn't like was a cast to sint32 that was used it one place. Anyway, as I've said in another thread, my compiler seems to be odd today, the version I can compile (without your changes) still behaves oddly and gives tons of assertion errors.

        I may do it all freshly tomorrow...
        Solver, WePlayCiv Co-Administrator
        Contact: solver-at-weplayciv-dot-com
        I can kill you whenever I please... but not today. - The Cigarette Smoking Man

        Comment


        • civ3_main.cpp
          g_noAssertDialogs = (NULL != strstr(szCmdLine, "noassertdialogs"));


          Extremely useful to run it with this command argument, saves the hassle with asserts you don't want to see when running the debug version .
          Solver, WePlayCiv Co-Administrator
          Contact: solver-at-weplayciv-dot-com
          I can kill you whenever I please... but not today. - The Cigarette Smoking Man

          Comment


          • Bug fix: prevent crash when loading a saved game.

            ai\diplomacy\diplomat.cpp
            Do not interpret sizes as negative numbers when loading a file.

            Solver: unfortunately, this command line argument also prevents the asserts I want to see . Did rebuilding help? The only other thing I can think of is checking the include file order change.

            [Edit: file link removed. Included in the 2004.12.27 source collection.]
            Last edited by Fromafar; January 4, 2005, 16:39.

            Comment


            • Yep, but with the many annoying assert faults, I find it much easier to just plonk the command in. I typically use output to the debug logfile for checking what I need...

              Was so happy that I got the code to build & compile that I haven't done a rebuild yet with your code. I think I'm going to do that though now...
              Solver, WePlayCiv Co-Administrator
              Contact: solver-at-weplayciv-dot-com
              I can kill you whenever I please... but not today. - The Cigarette Smoking Man

              Comment


              • News: a rebuild all won't work with it either. There are also some errors concerning functions usage of which doesn't match their declarations... I'll just wait for the next ALL zip file with changes to update the codebase.
                Solver, WePlayCiv Co-Administrator
                Contact: solver-at-weplayciv-dot-com
                I can kill you whenever I please... but not today. - The Cigarette Smoking Man

                Comment


                • 2004.10.06
                  Road and food tile improvement AI behaviour update by Martin Gühmann:

                  ..\ctp2_code\gs\gameobj\unitutil.cpp
                  ..\ctp2_code\gs\gameobj\unitutil.h
                  ..\ctp2_code\ai\CityManagement\governor.cpp
                  ..\ctp2_code\ai\CityManagement\governor.h
                  Removed an error the should terraform logic and added an assert when the terrain effect is invalid, just wonder why the could be an invalid terrain effect. And removed the non fully utilization penalty for food improvements of ring one cities.

                  ..\ctp2_code\robot\pathing\CityAstar.cpp
                  Updated road path generation, roads now follow the lowest PW costs instead of the move costs of that terrain. If the given tile has already a road improvement then reduced costs are used in order to make the path follow the already existing road. The roads path can now go trough foreign terrain but the path costs for that are very high so that such paths are only chose if there is no other route.

                  ..\ctp2_code\gs\dbgen\Datum.cpp
                  ..\ctp2_code\gs\newdb\*Record.stamp
                  ..\ctp2_code\gs\newdb\StrategyRecord.h
                  ..\ctp2_code\gs\newdb\StrategyRecord.cpp
                  ..\ctp2_code\gs\newdb\strategy.cdb
                  Updated the database generator and exposed the percent of costs for tiles with roads already there for the road path generation.

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

                  Comment


                  • Army Movement Update 1.3

                    2004.10.7 Army Movement Update 1.3

                    ctp2_code\ai\strategy\agents\CTPAgent.cpp
                    Changed the rounds calculation method (not based on default mouvement cost (100),
                    but based on the minimum cost between start and destination points)

                    ctp2_code\ai\strategy\goals\CTPgoal.cpp
                    Correct minor bugs :
                    - Allow incursion permission to stealth units
                    - Rollback the determination of check_dest (problem with special units that couldn't find their path to goal anymore
                    - Added other conditions to determine the RETREAT goals (and set max of 2 units per city for that goals, hardcoded (to not depend on threat)
                    - Corrected the determination of territory owner (not based on target, but on target's cell)
                    - Forbid to army with settlers to perform ATTACK or SEIGE goals
                    Allow Units that are grouping to both move (if they are far enough)

                    ctp2_code\gs\gameobj\ArmyData.cpp
                    ctp2_code\gs\gameobj\ArmyData.h
                    ctp2_code\gs\newdb\goal.cdb
                    ctp2_code\ai\diplomacy\Diplomat.cpp
                    ctp2_code\robot\pathing\RobotAstar2.cpp
                    Added an isStealth parameter in CharacterizeArmy method (used by STEALTH_EXPLORE goal)


                    ctp2_code\robot\pathing\UnitAstar.cpp
                    Corrected typo error in } that disabled the check danger in update 1.2
                    Improved the CheckForDanger Method to only consider danger if owner is Neutral or less or if it's at war

                    ctp2_data\default\aidata\goals.txt
                    ctp2_data\default\aidata\strategies.txt
                    Added a neversatisied flag in SEIGE Goal to always have an attacking force with 12 units.
                    Added a SPECIAL_RETREAT to retreat the special units too (instead of staying in enemy territory when no goals
                    Added SquadClass:Stealth flag (to permit the stealth units to enter territory even if there is nontreaspassing treaty)
                    + minor values changes.


                    ctp2_data\french\gamedata\Great_Librairy.txt
                    ctp2_data\french\gamedata\info_str.txt
                    Correct some broken links in librairy + Add several translations I made long ago
                    Attached Files

                    Comment


                    • I know this is not really the good forum, but as the subject is mainly interesting those that can code I am still posting it here. Have some coders looked at the way the AI could be taught how to respect the agreements agreed upon like the non-trespassing one?
                      "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

                      Comment



                      • Now I posted my update, I'll look at your savegame. (I din't have time before...).
                        I suspect effectively problems with savegame (I found that all the Enslave_Settler goals became invalid after loading a savegame and other problems...)

                        which version did you use ?

                        Comment


                        • Bug fixes:

                          ai\ctpai.cpp
                          ai\diplomacy\diplomat.cpp
                          Improved cleanup of the data of a dead player, to not keep old strategies hanging around.

                          gfx\spritesys\unitactor.cpp
                          Prevented a crash when a city with walls or a forcefield gets destroyed, probably causing this crash.

                          [Edit: file link removed. Included in the 2004.12.27 source collection.]
                          Last edited by Fromafar; January 4, 2005, 16:40.

                          Comment


                          • Fix to allow more than 44 playable civs:

                            ctp2_code\ui\interface\spnewgametribescreen.cpp
                            Allowed choice of 64 instead of 44 playable civs to be selected.

                            ctp2_data\english\uidata\layouts\spnewgamepopups.l dl
                            ctp2_data\french\uidata\layouts\spnewgamepopups.ld l
                            ctp2_data\german\uidata\layouts\spnewgamepopups.ld l
                            ctp2_data\italian\uidata\layouts\spnewgamepopups.l dl
                            ctp2_data\japanese\uidata\layouts\spnewgamepopups. ldl
                            ctp2_data\spanish\uidata\layouts\spnewgamepopups.l dl

                            Enlarged the civ selection window to make room for the extra slots.

                            ctp2_data\default\gamedata\civilisation.txt
                            ctp2_data\english\gamedata\civ_str.txt

                            Added 18 new civilizations now they can be fully supported:

                            (Australian) Aborigine (own work)
                            Argentinian (own work)
                            Austrian (previously inactive)
                            Babylonian (previously inactive)
                            Bantu (from SAP/MM2)
                            Byzantine (previously inactive)
                            Carthaginian (previously inactive)
                            Celtic (previously inactive)
                            Etruscan (from Cradle)
                            Italian (from SAP/MM2)
                            Harappan (from Cradle)
                            Hittite (from Cradle)
                            Khmer (own work)
                            Malian (own work)
                            Minoan (from Cradle)
                            Shang (from Cradle)
                            Slavic (from SAP/MM2)
                            Swedish (previously inactive)

                            (Choices based on what was at hand and my personal preference; can be changed if needed, I'm not proud )

                            Note: only English city names included, localised strings still needed.

                            Total number of civs in the game is now at its maximum: 62 playable civs + Barbarians.
                            Attached Files
                            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                            Comment


                            • 2004.10.14
                              ..\ctp2_code\ui\interface\controlpanelwindow.cpp
                              Bug fix by Martin Gühmann: Crossed Sword Bug

                              Edit: Removed attachment, an updated version of the included file is available in the next post.

                              -Martin
                              Last edited by Martin Gühmann; October 15, 2004, 13:41.
                              Civ2 military advisor: "No complaints, Sir!"

                              Comment

                              Working...
                              X