Announcement

Collapse
No announcement yet.

PROJECT: Altered source files

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

  • ctp2_code/gs/gameobj/UnitData.cpp
    ctp2_code/gs/newdb/unit.cdb

    - Added CanSettleOn function allowing modders to limit city-building only
    on specific terrain. (thanks to Martin G for help).


    updated to feb 11 version
    Attached Files
    Last edited by Ekmek; February 11, 2005, 14:15.
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

    Comment


    • 2005.02.21
      AI corrections by Martin Gühmann:

      ..\ctp2_code\ai\ctpai.cpp
      - Made the explore resolution a constant and set it to five.
      - Roads are now every second turn computed.
      - Tile improvements are computed every fifth turn.
      - Disabled UnGroupGarrisionUnits and MoveOutofCityTransportUnits methods. At least the latter one must be reconsidered as it seems that the transports are waiting in the city for sleeping units. (One possibility this needs verification)

      ..\ctp2_code\ai\CityManagement\governor.cpp
      - All tile improvements for cities that hasn't grown beyond the first ring get now full utiliziation bonus.
      - Replaced my c-style casts by standart static_cast's.

      ..\ctp2_code\robot\pathing\unitastar.cpp
      - Disabled Calvitix check for danger function, to avoid redicious paths. If a army encounters danger on its path the goal should be reconsidered, e.g. attacking the encountered unit. Or the danger calculation should be more flexible.

      ..\ctp2_code\ai\strategy\squads\squad_Strength.cpp
      - Disabled Calvitix change in the > operator. This change caused the massive slow down on maps with more then one continent and prevented the AI from oversea activity. However nevertheless I feel this operator needs some rework, as neither the original version nor Calvitix version seem to be finished.

      ..\ctp2_code\ai\strategy\goals\ctpgoal.cpp
      - Corrected a part of the Compute_Raw_Priority function, target position recieves now unowned bonus if the owner is now -1 instead of 0 (Barbarian).
      - Removed unnecessary reinitialization for in Compute_Needed_Troop_Flow for trade routes and tileimps.

      ..\ctp2_code\ai\strategy\scheduler\Plan.cpp
      - Cleaned some comments no code changes. I modified this file to figure out the culprit of the slow down problem anyway.

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

      Comment


      • 2005.02.24
        Bug fixes and slic fixes and slic additions compiled by Martin Gühmann:

        ..\ctp2_code\ai\strategy\squads\squad_Strength.cpp
        Replaced Calvitix version of the > operator by a cleaner version, however this version of the > operator is still experimental and therefore it is disabled as well. At least it allows AI sea activity, unfortunately it still slows down the game.

        ..\ctp2_code\gs\gameobj\bldque.cpp
        Fixed the bug that the player doesn't receive a wanring when another player starts to build the first wonder in the database.

        ..\ctp2_code\gs\slic\SlicFunc.h
        ..\ctp2_code\gs\slic\slicfunc.cpp
        ..\ctp2_code\gs\slic\SlicEngine.cpp
        - Added new slic functions:
        - IsOnSameContinent: Checks whether two locations are on the same continent, by Solver.
        - AddSlaves: Adds slaves to a city, this function was suggested by The Big Mc. It is the event based version. The error reported here for instance doesn't seem to be releated to the function itsself. It seems there is a problem in the Governor::AssignSpecialist function a problem. It seems that it ignores the fact that slaves cannot be assigned to other tasks than working in the field. Obviously the problem also occurs if the city has a lot of slaves regardless how they were added.
        - CreateUnit function doesn't crash anymore if the given unit type isn't an invalid unit type.

        ..\ctp2_code\gs\slic\slicif.h
        ..\ctp2_code\gs\slic\slicif.cpp
        ..\ctp2_code\gs\slic\slic.y
        Slic database access is now also possible if the record name was used as well as symbol in the context. That prevented the gain of great leaders in CTC for instance. As decribed here.

        ..\ctp2_code\gs\slic\slic.l
        ..\ctp2_code\gs\slic\sliccmd.y
        ..\ctp2_code\gs\slic\SlicFrame.cpp
        ..\ctp2_code\gs\slic\SlicSegment.cpp
        Addition of power operator: ** This addition is based on files by tombom posted here. The precidence of the operator isn't solved, yet. But it is time to include the files, because slic.y and slicif.cpp also contain changes concerning this subject.

        ..\ctp2_code\gs\slic\y.tab.h
        ..\ctp2_code\gs\slic\y.tab.c
        ..\ctp2_code\gs\slic\sc.tab.h
        ..\ctp2_code\gs\slic\sc.tab.c
        ..\ctp2_code\gs\slic\lex.yy.c
        Automaticly generated files based on the *.y and *.l files above.

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

        Comment


        • 2005.03.02
          AI population assignement improvement and misc. fixes by Martin Gühmann

          ..\ctp2_code\ai\CityManagement\governor.cpp
          - Fixed AssignPopulation function , at least it is now in the state as supposed to be, however this is still far from perfect:
          • - Fixed population assignment if city has slaves.
            - Allow usage of the first record in the pop database
            - Minimum entertainers are now assigend, even if there are otherwise no specialists left to assign.
            - Minimum farmer assignment has to be done, but first necessary tools in CityData have to be created.
            - Optimization for the food, production, happiness, science and gold have to be implemented, again the problem of missing tools.
          ..\ctp2_code\gs\newdb\unit.cdb
          ..\ctp2_code\gs\newdb\UnitRecord.cpp
          ..\ctp2_code\gs\newdb\UnitRecord.h
          ..\ctp2_code\gs\newdb\UnitRecord.stamp
          ..\ctp2_code\gs\gameobj\UnitData.cpp
          Fixed some things here, to make UnitData.cpp compile and make sure that you can settle again. Replaced this additional unit flag in unit.cdb by GoldHunger to match the other hunger flags, and made this flag optional. And added the other files created from unit.cdb, so that you are ready to compile them.

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

          Comment


          • Martin, did my flag disable settling or something? Also as a reminder a new playest version (not needed for awhile I think) should have the date on start up updated and have the AI unit goals not showing during play other than that I noticed the new AI is pretty good.
            Formerly known as "E" on Apolyton

            See me at Civfanatics.com

            Comment


            • Originally posted by E
              Martin, did my flag disable settling or something?
              Not the flag, but you forgot to undo something I told you to undo and I overlooked it in the end. But maybe I should post the final code in the according thread.

              Originally posted by E
              (not needed for awhile I think)
              I disagree.

              Originally posted by E
              Also as a reminder a new playest version should have the date on start up updated
              Maybe you should read this thread. After reading you will know that Fromafar implemented a solution, at least for Windows builds.

              Originally posted by E
              and have the AI unit goals not showing during play
              If John compiles it then it isn't in.

              Originally posted by E
              other than that I noticed the new AI is pretty good.
              Are you sure? I noticed that it doesn't build special units, the version out has severe problems with AI naval activity, on the wrong map it's slow without any benefit. Conquests seems also be very slow, it could settle more agressively. There is a crash if you move the cursor on cities that you lost to the enemy, and you don't see the city sprite of such cities.

              Some of these problems are fixed, but other remain, and should be fixed before a new playtest.

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

              Comment


              • Bug fixes and MP improvements:

                Prevented crashes:
                ui\aui_common\aui_image.cpp
                ui\aui_common\aui_imagebase.cpp
                ui\aui_common\aui_progressbar.cpp
                gs\gameobj\strengths.cpp

                Relaxed Assert, so it does not trigger in a valid situation:
                utility\newturncount.cpp

                Removed usage of the funny header file "common.h" to prevent compilation problems:
                robot\pathing\a_star_heuristic_cost.h
                robot\pathing\a_star_heuristic_cost.cpp

                Updated Anet game number (Activision patch reimplementation):
                net\io\net_anet.h
                net\io\net_thread.h

                Include the finish production handling in the MP turn start:
                net\general\net_info.cpp

                Disable autosave for MP client:
                gs\gameobj\playerevent.cpp

                Repaired memory leaks, prevented crash, added feat tracking at the start of a (resumed) game:
                net\general\network.cpp
                net\general\net_feat.h
                net\general\net_feat.cpp
                Note: these are updated versions of the ones in the DEBUG: MP feat tracking thread. Lots of unknows are still in.

                2005.03.03.incr.backlog.zip

                Comment


                • 2005.03.05
                  Vision update and miscellaneous corrections by Martin Gühmann

                  ..\ctp2_code\gs\gameobj\bldque.cpp
                  Fixed a bug that leaded to a crash in the first not reported wonder bug fix.

                  ..\ctp2_code\gs\gameobj\UnitData.cpp
                  When a city is conquered the city is no more removed from the map and inserted into the map again. That saves some time. The removement of the vision of the old owner is postponed until the city data changed hand, so that the old owner get a last look on "his" city, and everything on the map like city and surrounding terrain is shown with the new owner. If you loose a city you should know who was it. And you should also know which land the attacker has stolen.

                  ..\ctp2_code\tiledmap.cpp
                  ..\ctp2_code\tiledraw.cpp
                  ..\ctp2_code\ui\aui_ctp2\radarmap.cpp
                  If you own a tile it is displayed on the map as yours even if you didn't visit that tile recently. If fog of war is of or god mode is on the borders of civs with that you have no contact are displayed.

                  ..\ctp2_code\gs\world\UnseenCell.cpp
                  The city owner is now taken from the city's CityData instead from the unit itsself. This allows the correct display of an owner if you loose a city.

                  ..\ctp2_code\ui\aui_ctp2\InfoBar.cpp
                  If you move the cursor over a city without actor in the UnseenCell, the game doesn't crash anymore. The missing actor problem was caused by how the owner change was handled during city capture. This problem is now fixed at the root, but old savegames might contain this problem. Another problem with destroyed civilsations and there cities was also fixed.

                  ..\ctp2_data\default\aidata\advancelists.txt
                  ..\ctp2_data\default\aidata\buildlistsequences.txt
                  ..\ctp2_data\default\aidata\strategies.txt
                  ..\ctp2_data\default\aidata\unitbuildlist.txt
                  Replaced BuildListSequenceElement by those of GoodMod that are based themselfes of those from MedPack.
                  Replaced build lists sequences by those of GoodMod: The Capitalization and Infrastructure elements are removed from the sequences.
                  Replaced the advance lists and unit build lists by those of GoodMod. IIRC there are based on those of MyMod or ApolytonPack.
                  These changes improve the AI.

                  ..\ctp2_data\french\gamedata\ldl_str.txt
                  City Manager is now translated. This is the file by Tamerlin from 2005.02.07.

                  ..\ctp2_data\italian\gamedata\info_str.txt
                  ..\ctp2_data\german\gamedata\info_str.txt
                  Some minor alterations like correction a grammatical case in the German version of the wonder almost complete message.

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

                  Comment


                  • sekel recently suggested that we should have a button on the scenario editor to enable showing the AI army text. Well, until someone manages to squeeze a button on to that window, here's another way.

                    To show the AI army text, open the chat screen (type " ' ", apostrophe), type "/debugai", and press "enter". If the text is being shown and you want to turn it off, do exactly the same thing.

                    To show the map cell text (if you're interested in seeing the AI settling map), open the chat screen, type "/debugcells", and press "enter". Again, repeating the procedure toggles the cell text off.

                    Finally, press "enter" to close the chat screen.

                    BTW, Martin's recent SLIC fixes have unblocked the Poly code for me. More to follow.
                    Attached Files

                    Comment


                    • Some diplomatic agreements have limited duration. (This is good for the AI: it means that when the agreement expires the AI can re-consider it's options.)

                      ..\ctp2_code\ai\diplomacy\diplomat.cpp

                      ..\ctp2_data\default\gamedata\script.slc

                      ..\ctp2_data\english\gamedata\dip2_str.txt

                      ..\ctp2_data\english\gamedata\cut_str.txt

                      Sorry about the lack of paths in the zip. I've forgotten how to get non-full paths (like the above) in there.
                      Attached Files

                      Comment


                      • ctp2_code\ai\citymanagement\governor.cpp
                        Fixed a crash (for the debug version)

                        2005.03.22.incr.servertest.zip

                        Note: This file has been committed to Kaan's SVN server. When you have access to the server, you do not have to download this file.

                        Comment


                        • I think at least some of the following changes were already posted here but didn't make it into version control, but anway, I've just submitted:

                          Revision 293
                          Changed paths:
                          M /trunk/ctp2_code/ctp/civctp.dsp
                          M /trunk/ctp2_code/mapgen/geometric.dsp
                          M /trunk/ctp2_code/ui/ldl

                          civctp.dsp
                          - Added net_feat.{h,cpp} to project to fix linking errors

                          geometric.dsp
                          - Added os\include to include directories for Win32 Final

                          ui/ldl
                          - Set properties to ignore ldl.output
                          Last edited by J Bytheway; March 23, 2005, 21:40.

                          Comment


                          • Today I played with the docs:

                            Revision 294
                            Changed paths:
                            M /trunk/ctp2_code/doc/dev
                            M /trunk/ctp2_code/doc/dev/Makefile
                            M /trunk/ctp2_code/doc/dev/ctp2_dev.tex
                            M /trunk/ctp2_code/doc/dev/include
                            M /trunk/ctp2_code/doc/dev/include/a_deadcode.tex
                            M /trunk/ctp2_code/doc/dev/include/a_defines.tex
                            M /trunk/ctp2_code/doc/dev/include/a_dspconfig.tex
                            M /trunk/ctp2_code/doc/dev/include/a_faq_licence.tex
                            M /trunk/ctp2_code/doc/dev/include/a_faq_project.tex
                            M /trunk/ctp2_code/doc/dev/include/eula.tex
                            M /trunk/ctp2_code/doc/dev/include/make_win32.tex
                            M /trunk/ctp2_code/doc/dev/include/setup_win32.tex

                            Developer documentation
                            - Added appropriate svn:ignore properties
                            - Fixed spelling errors / typos
                            - Fixed many underfull hboxes
                            - Tidied the preamble

                            Comment


                            • Ctp2_code\gs\gameobj\player.cpp
                              Ctp2_code\gs\gameobj\CityData.cpp
                              Ctp2_code\gs\gameobj\unitData.cpp
                              Ctp2_code\gs\gameobj\wonderutil.cpp

                              Added CultureOnly and CityStyleOnly flags and GovernmentType (copied from units). Limits who can build what civ by checking citystyle either fo the civ itself (CultureOnly) or of the city(CityStyleOnly). GovernmentType checks government type.

                              Ctp2_code\gs\gameobj\TerrainUtil.cpp
                              Added CultureOnly and GovernmentType (copied from units) as well as IsRestrictedToGood (limits terrimp to only a tile with a good).


                              Ctp2_code/gs/newdb/building.cdb
                              Ctp2_code/gs/newdb/government.cdb
                              Ctp2_code/gs/newdb/terimprove.cdb
                              Ctp2_code/gs/newdb/unit.cdb
                              Ctp2_code/gs/newdb/wonder.cdb
                              Ctp2_code/gs/newdb/advance.cdb

                              Added CultureOnly, CityStyleOnly, GovernmentType, and IsRestictedToGood flags as well as a bunch of flags to be developed in the future.
                              Attached Files
                              Formerly known as "E" on Apolyton

                              See me at Civfanatics.com

                              Comment


                              • Revisions 295 - 298 by tombom

                                Revision 295
                                M /trunk/ctp2_code/gs/slic/SlicFrame.cpp
                                M /trunk/ctp2_code/gs/slic/SlicSegment.cpp
                                M /trunk/ctp2_code/gs/slic/slic.y
                                M /trunk/ctp2_code/gs/slic/slicif.h
                                M /trunk/ctp2_code/gs/slic/slicif.cpp
                                Added '&' operator

                                Revision 296
                                M /trunk/ctp2_code/gs/slic/SlicFrame.cpp
                                M /trunk/ctp2_code/gs/slic/slic.y
                                M /trunk/ctp2_code/gs/slic/slicif.h
                                Added '&' operator bugfixes - previous code was untested. Note that this is implemented simply using the C++ '&' operator.

                                Revision 297
                                M /trunk/ctp2_code/ai/diplomacy/counterrespnseevent.cpp
                                No message. But from the source file:
                                // - AI now considers more before stopping pirating

                                Revision 298
                                M /trunk/ctp2_code/gs/slic/slic.y
                                Hopefully allow type declaration and setting at same time


                                OK, let's see how the resporitory works for me, obviously I conquered the umlaut problem as well :

                                Revision 299
                                M /trunk/ctp2_data/XXXXXX/gamedata/info_str.txt
                                M /trunk/ctp2_data/XXXXXX/gamedata/cut_str.txt
                                M /trunk/ctp2_data/english/gamedata/dip2_str.txt
                                A /trunk/ctp2_data/spanish/gamedata/cut_str.txt

                                Where XXXXXX stands for english, french, german, italian or spanish.

                                Moved TREATY_TO_EXPIRE from dip2_str.txt to info_str.txt were it was in CTP1. This holds for the English version of these files. For the other languages it was moved directly from cut_str.txt to info_str.txt.

                                The other diplomatic messeages in cut_str.txt were moved and updated to CTP2 format as well for future reimplementation.

                                The Spanish cut_str.txt was taken from one of the others probably they are identiacal anyway. However the rest of the Spanish string files are still missing.

                                Translations are missing as well for the French, Italian, Spanish and Japanese version. Since these strings are from CTP1 it shouldn't be such a big deal to get translations of those. Except for the Japanese version. Except of two files all the files are missing.

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

                                Comment

                                Working...
                                X