Announcement

Collapse
No announcement yet.

PROJECT: Altered source files

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

  • Re: <B>Source Modifications to improve AI army movement (specially Grouping)</B>

    Originally posted by calvitix
    Attachment: 2004.08.30.incr.armymovement_beta1.zip
    Originally posted by Martin Gühmann
    Attachment: 2004.08.15.exposedstrategies.incr.zip
    ·Circuit·Boi·wannabe·
    "Evil reptilian kitten-eater from another planet."
    Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

    Comment


    • 2004.09.02
      ..\ctp2_code\ctp\civapp.cpp
      ..\ctp2_code\ui\interface\StatusBar.cpp
      ..\ctp2_code\ui\interface\StatusBar.h

      Memory fix of StatusBar trial two by Martin Gühmann: m_text of StatusBar is now cleaned up from civapp.cpp.

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

      Comment


      • 2004.09.04
        ..\ctp2_code\ai\diplomacy\sstateevent.cpp

        Backwards compartibilty restoration by Martin Gühmann: If the new structs are missing from personalities.txt the old strategies and priorities are taken as default values. The following startegies data must be defined in block if block member is missing default values are also used for the other members as well:

        DefenceNoneStrategy
        DefenceVeryLowStrategy
        DefenceLowStrategy
        DefenceMediumStrategy
        DefenceHighStrategy
        DefenceVeryHighStrategy

        The same is true for the following nuclear strategies:

        MinimumNukesStrategy
        LowNukesStrategy
        AverageNukesStrategy
        MaximumNukesStrategy

        If the following nuclear strike strategy data are present then the according nuclear strike strategy is used if it is not present no nuclear strike strategy is used:

        NuclearStrikeStrategy

        If the two many cities strategy data are not present, no strategy is loaded to reduce settling and conquering activity. In that case the no revolution strategy isn't loaded, either. Even if it is present. If the no revolution strategy data are missing, then no no revolution startegy is loaded if the according civ is over the city limit and owns the wonder that makes this civ to get revolting cities.

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

        Comment


        • Mostly bug fixes

          Prevented crashes with invalid units:
          gs\gameobj\army.cpp
          gs\gameobj\army.h
          gs\gameobj\unit.cpp
          gs\gameobj\unit.h
          gs\world\cell.cpp
          gs\world\cellunitlist.cpp
          gs\world\cellunitlist.h

          Prevented crashes when starting a new game from the menu:
          gs\database\strdb.cpp

          Restore original game file compatibility + added crash prevention on unexpected file input:
          gs\newdb\citystyle.cdb
          ui\interface\scenarioeditor.cpp
          ui\interface\dipwizard.cpp

          Relaxed some asserts to make mods less tedious to debug:
          ai\mapanalysis\mapanalysis.cpp
          gs\slic\SlicSymbol.cpp

          Corrected delete type:
          ui\netshell\ns_window.cpp

          [Edit: file link removed. Included in the 2004.09.13 source collection.]
          Last edited by Fromafar; September 15, 2004, 17:19.

          Comment


          • 2004.09.04
            ..\ctp2_code\ui\aui_common\aui_control.cpp
            ..\ctp2_code\ui\aui_ctp2\linegraph.cpp
            ..\ctp2_code\ui\netshell\netfunc.cpp
            ..\ctp2_code\ui\netshell\ns_customlistbox.cpp

            Resolved forgotten .Net compartibility issures by Martin Gühmann.

            aui_control.cpp: Standardized forgotten max calls.
            linegraph.cpp: Fixed ambigious calls of std::max.
            netfunc.cpp and ns_customlistbox.cpp replaced typed T in specialized member template function by the type used in the template specialization.

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

            Comment


            • fixe previous post (by Martin)

              std::max only partially fixed with VC6 in

              F:\ctp2source\ctp2_code\ui\aui_ctp2\linegraph.cpp

              F:\ctp2source\ctp2_code\ui\aui_ctp2\linegraph.cpp( 293) : error C2782: 'const T &__cdecl std::max(const T &,const T &)' : Vorlagenparameter 'T' ist mehrdeutig
              koennte 'int' sein
              oder 'long'


              added cast to second patameter too.

              Comment


              • Bug fix: prevented crashes and memory leak when starting a new game.

                gs\database\strdb.h
                gs\database\strdb.cpp
                Redesigned to make the memory handling less error prone.

                No functional change:

                ui\netshell\ns_customlistbox.cpp
                Removed improper preprocessor directives. These were marking my cut-and-paste errors as original Activision code.

                [Edit: file link removed. Included in the 2004.09.13 source collection.]
                Last edited by Fromafar; September 15, 2004, 17:20.

                Comment


                • 2004.09.08
                  ..\ctp2_code\ui\aui_ctp2\linegraph.cpp

                  Improved .NET vs. VC6 compatibility by Martin Gühmann, replaced casts to long by long numeric literals.

                  ..\ctp2_data\default\gamedata\Const.txt
                  ..\ctp2_data\default\gamedata\terrain.txt
                  ..\ctp2_data\default\gamedata\tileimp.txt

                  Set MAX_MATCH_LIST_CYCLES to 6 to accelerate the game.
                  Devieded CARAVAN_COEF so that it is now 0.004.
                  Used Flink's tileimp.txt and terrain.txt as base for better Freight values and multiplyed all the Freight values in both files by ten, so that the devisin by ten of the CARAVAN_COEF is canceled. In addition the Freight values for rivers are identical to those of roads, so that it is not more likely that a trade route follows a river than a road.

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

                  Comment


                  • Miscellaneous corrections:

                    ui\aui_common\aui_stringtable.cpp
                    Memory leaks repaired.

                    ui\interface\agesscreen.cpp
                    gfx\spritesys\unitactor.cpp
                    Restored backwards compatibility.

                    gfx\spritesys\spritegrouplist.cpp
                    gfx\spritesys\spritegrouplist.h
                    gfx\spritesys\spritelist.cpp
                    gfx\spritesys\spritelist.h
                    Sprite limit set to 255, and deactivated some unused code.

                    [Edit: file link removed. Included in the 2004.09.13 source collection.]
                    Last edited by Fromafar; September 15, 2004, 17:20.

                    Comment


                    • Originally posted by Fromafar
                      ui\interface\agesscreen.cpp
                      ...
                      Restored backwards compatibility.
                      You are sure about that one. In fact if no according string is defined in gl_str.txt or somewhere else. If there is no according string defined the game uses the internal name of the record, for instance in the case of the first record of in AgeDB it is AGE_ONE. But actual I prefer this over the not having an entry at all like it is for half of the ages in ApolytonPack.

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

                      Comment


                      • ArmyMovement Beta Update 1.1

                        ctp2_code\ai\strategy\goals\CTPgoal.cpp
                        ctp2_code\ai\strategy\goals\CTPgoal.h
                        ctp2_code\ai\strategy\goals\goal.h
                        ctp2_code\ai\strategy\goals\goal.cpp
                        Added bonus to define in 'goals.txt' : for wounded units (IswoundedBonus), Goals in territory (Home, Enemy or neutral), Is Tile visible,...
                        Added respect of non-trespassing Treaty (Goals have in that case BAD_UTILITY)
                        Another minor changes (Debug log,...)


                        ctp2_code\ai\strategy\scheduler\plan.cpp
                        ctp2_code\ai\strategy\scheduler\scheduler.cpp
                        Rollbacked 'NO_GOAL' armytext
                        Add NoRollback Condition for goals that can't be reevaluated (like seige for exemple). Without that flag,
                        Goals affectation are reevaluated every turn.


                        ctp2_code\ai\ctpai.cpp
                        ctp2_code\ai\ctpai.h
                        An Explore goal every 4 tiles is a good compromise. Add an STEALTH_EXPLORE only for special units to explore deeply in enemy territory.
                        Added UngroupGarrison method to Ungroup Seige force after taking city (otherwhile the whole army is blocked as garrison.


                        ctp2_code\ai\mapanalysis\mapanalysis.cpp
                        ctp2_code\ai\mapanalysis\boundingrect.cpp
                        Corrected the determination of Empire Center


                        ctp2_code\ai\citymanagement\governor.cpp
                        Add roads around cities


                        ctp2_code\gs\gameobj\Army.h
                        ctp2_code\gs\gameobj\Army.cpp
                        ctp2_code\gs\gameobj\ArmyData.h
                        ctp2_code\gs\gameobj\ArmyData.cpp
                        Added a Iswounded method

                        ctp2_code\gs\newdb\goals.cdb
                        Added the bonuses defineds if 'goals.txt'

                        ctp2_code\robot\pathing\*aStar.cpp
                        Added a 'avoidList' parameter in Find_path to specify tile that can't be used for path.
                        Added methods to check if there is enough room for army along path, check danger along path,
                        Added method to build roads around 'dead' tiles
                        ...

                        ctp2_data\default\aidata\goals.txt
                        ctp2_data\default\aidata\strategies.txt
                        Added new bonuses, new Goal (GOAL_STEALTH_EXPLORE)
                        changed ratio forces a bit
                        Attached Files

                        Comment


                        • Bug fixes:

                          ui\interface\agesscreen.cp
                          ui\netshell\allinonewindow.cpp
                          ui\netshell\lobbywindow.cpp
                          Repaired memory leaks, and improved the compatibility handling of age names.

                          Thanks Martin, for pointing out the unintuitive way of producing results by GetNameText.

                          [Edit: file link removed. Included in the 2004.09.13 source collection.]
                          Last edited by Fromafar; September 15, 2004, 17:21.

                          Comment


                          • I wouldn't still call it backward compartibilty. For instance here is a screenshot from ApolytonPack. And the strings are at the right ages just because my ns_strings.ldl looks like this:

                            Code:
                            	startagestrings {
                            		string	string0	"AGE_NAME_ANCIENT"
                            		string	string1	"AGE_NAME_CLASS"
                            		string	string2	"AGE_NAME_MEDIEVAL"
                            		string	string3	"AGE_NAME_RENAISS"
                            		string	string4	"AGE_NAME_INDUST"
                            		string	string5	"AGE_NAME_MODERN"
                            		string	string6	"AGE_NAME_COMPUTER"
                            		string	string7	"AGE_NAME_GENETIC"
                            		string	string8	"AGE_NAME_DIAMOND"
                            		string	string9	"AGE_NAME_FUTURE"
                            	}
                            Instead of:

                            Code:
                            	startagestrings {
                            		string	string0	"AGE_NAME_ANCIENT"
                            		string	string1	"AGE_NAME_RENAISS"
                            		string	string2	"AGE_NAME_MODERN"
                            		string	string3	"AGE_NAME_GENETIC"
                            		string	string4	"AGE_NAME_DIAMOND"
                            	}
                            And in this case the first five ages would have these names and the rest the names from the database, and in this case Industrial Age is not eqoal Diamond Age.

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

                            Comment


                            • Forgot the image:
                              Attached Files
                              Civ2 military advisor: "No complaints, Sir!"

                              Comment


                              • Yeah, that does not look good. Do you have the corresponding AGE_NAME_MEDIEVAL etc. strings enabled in ldl_str.txt? Checking the Apolyton pack makes me wonder if this could have worked for the original game at all. The ages.txt has 10 ages, but I can't find an updated ns_strings.ldl and ldl_str.txt with matching names. So I guess you would have been able to select only ages 1-5, using the original names (so selecting Renaissance would have given you AGE_TWO - being the Classical age in the mod) .

                                ui\interface\agesscreen.cpp

                                Design change:
                                1. Use the AGE_ONE etc. texts from gl_str.txt when available (Martin's change).
                                2. Use the ns_strings.ldl startagestrings when the AGE_ONE etc. texts are not available and the number of ages is equal to the number of startagestrings.
                                3. Just display "AGE_ONE", etc. in all other cases.

                                So, for compatibility, you have to use the ns_strings.ldl with the original 5 age names.

                                [Edit: file link removed. Included in the 2004.09.13 source collection.]
                                Last edited by Fromafar; September 15, 2004, 17:22.

                                Comment

                                Working...
                                X