Announcement

Collapse
No announcement yet.

PROJECT: Altered source files

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

  • 2004.04.21
    ..\ctp2_data\gs\gameobj\CityData.h
    ..\ctp2_data\gs\gameobj\CityData.cpp
    ..\ctp2_data\ai\CityManagement\Governor.cpp

    AI improvement by Fromafar: Make the governor take the CTP2 style partial worker utilisation into account when placing tile improvements around a city.


    2004.04.22
    ..\ctp2_data\gs\slic\SlicFrame.cpp
    ..\ctp2_data\gs\gameobj\UnitData.cpp
    Bug fixes by Fromafar:

    SlicFrame.cpp: Changed reporting of modulo 0 errors to match division by 0 error reporting.
    UnitData.cpp: (Activision 1.1 patch reimplementation) Corrected active defense movement type check.


    2004.04.27
    ..\ctp2_code\gs\gameobj\gaiacontroller.cpp

    Bug Fix by Martin Gühmann: Neutral pillage tile improvement bug, the game doesn't crash anymore when a tile improvement is pillaged that noone owns.


    2004.04.30
    ..\ctp2_code\gs\slic\SlicFrame.cpp
    ..\ctp2_code\gs\slic\slicif.cpp

    Games that uses slic database access can now be reloaded without the need to /reloadslic to prevent a crash, unfortunatly this applies only to games that are saved with this version of the slic database access, games saved with Activision's patch v.1.1 and with slic code that uses database access may not be continued without a /reloadslic.


    2004.04.30
    ..\ctp2_code\ctp\civapp.cpp

    Bug fix by Martin Gühmann: A memory leak that occured in the Great Libary when a saved game was loaded, only regular saves with the ranking and world map *.rim, not the quicksave.


    2004.05.08
    ..\ctp2_code\ui\interface\GreatLibrary.cpp
    ..\ctp2_code\gs\database\ProfileDB.cpp
    ..\ctp2_code\gs\database\ProfileDB.h
    ..\ctp2_code\ctp\civapp.cpp

    User profile option and repaired memory leaks by Fromafar.

    Repaired more memory leaks that were caused by reloading the great library data.

    Added a "ColorSet" option to userprofile.txt, to make variation between the colors##.txt files easier.

    Note: Some previous changes by Martin Gühmann in civapp.cpp were undone. Those are no longer needed now that the great library memory leaks have been repaired at the root.


    2004.05.09
    ..\ctp2_code\gs\newdb\terrimprove.cdb
    ..\ctp2_code\gs\world\cell.cpp

    Bug fix by Fromafar: tile improvements without Freight cost modification no longer have 0 Freight cost for the trade route computation. This should prevent funny paths from being computed.


    2004.05.15
    ..\ctp2_code\gs\newdb\CTPDatabase.cpp
    ..\ctp2_code\gs\newdb\CTPDatabase.h
    Bug fixes
    Repaired memory leaks and cleaned up the government modification code somewhat.

    2004.05.09
    ..\ctp2_code\ui\interface\sci_advancescreen.cpp
    Activision patch 1.1 reimplementation by Fromafar: Start the "change research" screen with the current research selected.


    2004.05.16
    ..\ctp2_code\gs\gamedata\ArmyData.cpp

    Activision patch 1.1 reimplementation by Fromafar: Corrected a check that prevented sueing of franchises.


    2004.05.18
    ..\ctp2_code\gs\gameobj\GameSettings.cpp

    Activision patch 1.1 reimplementation by Fromafar: Use the difficulty and barbarian risk level as selected by the user when starting a new (scenario) game.


    2004.05.22
    ..\ctp2_code\gs\gameobj\CityEvent.cpp
    ..\ctp2_data\default\gamedata\script.slc
    ..\ctp2_data\XXXXXX\gamedata\info_str.txt

    Where XXXXXX is english, german and french, the needed strings for the English and German version are added to the according info_str.txt, there are also strings added to the French version of the info_str.txt unfortunatly in English in the lack of a French translation. The Italian, Japanese and Spanish version of the info_str.txt are missing. And therefore even English text for these versions of CTP2 are missing.

    CTP1 reimplementation by Martin Gühmann: During conquest there is now a chanche of 0.5 accoriding to our const.txt that the attacker takes an advance, given the victim has any advances that the attacker does not have. Both the attacker and the victim get a message about the stolen advance.


    2004.05.23
    ..\ctp2_code\gs\dbgen\RecordDescription.cpp
    ..\ctp2_code\gs\newdb\*Record.cpp
    ..\ctp2_code\gs\newdb\*Record.h
    ..\ctp2_code\gs\newdb\*Record.stamp

    The * stands as usual for very combination of letters, meaning every in that directory with Record in its name is included so that no one has to build a debug version before the release version.

    The pupose of this is to stop .NET to complain about the fact that all these Init functions in these files don't have a reurn type, the return type void was added to that function. Odd that dbgen did not generated all of the new Record files, well some hand editing solved that problem.


    2004.05.24
    ..\ctp2_code\gs\gameobj\PlayerEvent.cpp

    Bug fix by Fromafar: Corrected the index of the 'cause' argument in the GrantAdvanceEvent handler.


    2004.05.24
    ..\ctp2_code\gs\slic\SlicFunc.cpp

    Bug fixes by Fromafar:
    Added input checks and an optional 'cause' argument to the GrantAdvance SLIC handler.
    Added reading of the 'army' argument of the ArmyIsValid SLIC handler, instead of returning 0 always - even when the army would have been valid.


    2004.05.24
    ..\ctp2_code\gs\slic\SlicStack.cpp

    Bug fix by Fromafar: Prevented crashes that may occur when SLIC argument values are invalid.


    2004.05.27
    ..\ctp2_code\gs\slic\SlicBuiltIn.cpp
    Modifications by Fromafar: AddMember changed to AddAccessor for g.last_player, g.max_player, g.num_of_players, and player[].government. This file is part of the 2004.05.19 playtest release, and has not been changed.


    2004.05.27
    ..\ctp2_code\gs\slic\SlicStruct.h
    ..\ctp2_code\gs\slic\SlicStruct.cpp
    Implementation of accessor functionality by Fromafar. These files have been modified to correct problems with the player[].government access as reported by BureauBert.


    2004.05.31
    ..\ctp2_code\ui\interface\diplomacywindow.cpp
    ..\ctp2_code\ui\interface\intelligencewindow.cpp

    Activision patch reimplementation by Fromafar: Keep the embargo and declare war buttons enabled when the user cancels the action.


    2004.05.31
    ..\ctp2_code\gs\slic\SlicFunc.cpp
    Bug fix by Fromafar: Corrected the ArmyIsValid function once more.


    2004.06.01
    ..\ctp2_data\default\uidata\credits.txt

    The credits from June the first, by Locutus.


    ..\ctp2_data\gfx\spritesys\BattleViewActor.cpp
    ..\ctp2_data\gfx\spritesys\TradeActor.cpp
    ..\ctp2_data\gfx\spritesys\UnitActor.cpp

    Prevented some possible crashes by Fromafar. He is not sure that these are really useful. He got one of these - after clicking away a GC000.spr not found in asset tree message - when loading a CTC save file with the original game setup selected in the ModManager.


    ..\ctp2_data\gs\gameobj\CityEvent.cpp

    Prevented a possible crash by Fromafar. Untested, but might solve the Solaris project bug.


    ..\ctp2_data\ui\interface\wondermoviewindow.cpp

    Repaired a memory leak with the wonder movie pop-up window by Fromfar.


    2004.06.04
    ..\ctp2_code\gs\gameobj\Score.cpp
    ..\ctp2_data\XXXXXX\gamedata\exp_str.txt

    Where XXXXXX is english, german, spanish, italian and french. The Japanese version of the exp_str.txt i had not changed but needs a change probably also.

    Bug fix by Lui2: City sizes for the score calculation are now in the current setup can now be reached.

    New limits for score calculation are:
    300.000 to 30.000
    1.000.000 to 100.000
    5.000.000 to 500.000

    All numbers represent number of city inhabitants.


    2004.06.05
    ..\ctp2_code\ui\aui_common\tech_wllist.h

    Fix by Martin Gühmann to make sure that tech_wllist.h copiles on copilers which do not support implecit typenames.


    Here is the latest source file pack:

    [EDIT]Link removed see my next big post in this thread.[/EDIT]

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

    Comment


    • Originally posted by Martin Gühmann New limits for score calculation are:
      300.000 to 30.000
      1.000.000 to 100.000
      5.000.000 to 500.000
      Here is the text a little bit misleading. These values are not the new ranges, they are the original values and the changed to values.

      The original value of 300.000 was set to 30.000 ,
      the 1.000.000 to 100.000
      the 5.000.000 to 500.000.

      Easier said, all values were diveded by 10. As it seems, it was originally intended in this way (for the unmodded version).
      Last edited by Lui2; June 5, 2004, 18:18.
      Ludwig

      Comment


      • StartingAge and EndingAge

        The selection boxes for StartingAge and EndingAge in the multiplayer setup window have missing and empty entries.

        This is caused by non corresponding entries in the ns_strings.ldl and ldl_str.txt files.

        These are the lines in the ldl_str.txt files.
        #Age Names#
        AGE_NAME_ANCIENT "Ancient"
        #AGE_NAME_CLASS "Classic"
        #AGE_NAME_MEDIEVAL "Midieval"
        AGE_NAME_RENAISS "Renaissance"
        #AGE_NAME_INDUST "Industrial"
        AGE_NAME_MODERN "Modern"
        #AGE_NAME_COMPUTER "Computer"
        AGE_NAME_GENETIC "Genetic"
        AGE_NAME_DIAMOND "Diamond"
        #AGE_NAME_FUTURE "The Future"

        And these are the lines in the ns_strings.ldl files.
        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"
        }


        I changed now all the ns_strings.ldl files to this values.
        startagestrings {
        string string0 "AGE_NAME_ANCIENT"
        # string string# "AGE_NAME_CLASS"
        # string string# "AGE_NAME_MEDIEVAL"
        string string1 "AGE_NAME_RENAISS"
        # string string# "AGE_NAME_INDUST"
        string string2 "AGE_NAME_MODERN"
        # string string# "AGE_NAME_COMPUTER"
        string string3 "AGE_NAME_GENETIC"
        string string4 "AGE_NAME_DIAMOND"
        # string string# "AGE_NAME_FUTURE"
        }

        2004.06.05
        ..\ctp2_data\XXXXXX\uidata\layouts\ns_strings.ldl


        Where XXXXXX is english, german, spanish, italian, japanese and french.

        As it seems to me, that these values for the additional ages come from a mod version of the game, it would be probably best to remove them completely in both files.
        Attached Files
        Ludwig

        Comment


        • Originally posted by Martin Gühmann


          Well the limits you think, are these really the proper limits? I guess every modmaker has his own ideas about proper limits, therefore it would be better to expose these limits to DiffDB.txt, yes for each level of difficuilty a set of limits. However until someone implements this in a more modder friendly way Your solution is ok.
          Well... I don't think this is OK, at least I don't think it is OK to the point of including these changes into the next Playtest build. Though Lui2 idea is certainly good, I don't think that it should be hardcoded into the original game. IMO, this kind of changes have their place in the Creation section of the CtP2 forum rather than in the SourceCode part. At least not before they have been discussed and approved in the thread...

          Of course if these changes are correcting a bug I agree that they should be included into the Playtest build. If not...
          "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

          Comment


          • Originally posted by Tamerlin
            I don't think that it should be hardcoded into the original game.
            It already was hardcoded in the original game. Only with unrealistic values. Because these values are obvious only inadvertently multiplied by 10, I corrected this.

            IMO, its a good idea to externalize theses ranges to the DiffDB like Martin already suggested and also it's worth a discussion to change them to totaly different numbers.

            But it seems to me a bad solution, to let the values any time longer on there original, mostly useless values. Every time I look to the original score screen, it makes me a bit angry, how could it happen, that activision could not fix this obvious problem immediately. And it's a real pleasure now, to look at the score window! :-)
            Ludwig

            Comment


            • Originally posted by Lui2


              It already was hardcoded in the original game. Only with unrealistic values. Because these values are obvious only inadvertently multiplied by 10, I corrected this.
              Are you sure about it? Though your intentions are good perhaps does it boil down to preferences. OK, I am playing the role of the devil's advocate in this case, though you are certainly right my only concern is about the fact that it opens the door to personal preferences included into the SourceCode without any previous discussion.

              But it seems to me a bad solution, to let the values any time longer on there original, mostly useless values. Every time I look to the original score screen, it makes me a bit angry, how could it happen, that activision could not fix this obvious problem immediately. And it's a real pleasure now, to look at the score window! :-)
              I must admit I don't pay much attention to the end score as I always look for the Science Victory. Reaching this goal is in itself my definition of victory in a CtP2 game.
              "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

              Comment


              • Originally posted by Lui2
                The original value of 300.000 was set to 30.000 ,
                the 1.000.000 to 100.000
                the 5.000.000 to 500.000.
                Tamerlin, Martin and Lui2 have all raised good points here with respect to these values.

                Currently, you get score points based on these values. For each city with
                pop <300,000 ≡ 30 gets 10 points
                pop <1,000,000 ≡ 100 gets 25 points
                pop <5,000,000 ≡ 500 gets 50 points
                pop >5,000,000 ≡ 500 gets 100 points

                The points awarded are externalised in the DiffDB.txt file
                Code:
                CITIES0TO30_FACTOR		10.0
                CITIES30TO100_FACTOR		25.0
                CITIES100TO500_FACTOR		50.0
                CITIES500PLUS_FACTOR		100.0
                The suggestion to externalise the limit values is a good one, and they should probably go in DiffDB.txt

                Cities can only grow to size 60 in the un-modded game, based on the limits in citysize#.txt files
                Code:
                CITYSIZE_SIX {
                		Population	 60
                		SquaredRadius	 20
                		IntRadius	 4
                		MaxWorkers	 60
                		GrowthRate	 75
                		MinGrowthRate	 20000
                		MaxSurplusFood	 2000
                		BaseOvercrowding 4
                		BaseMaxPop	 18
                		VisionRadius	 4.472
                }
                and the
                Code:
                RaiseOvercrowdingLevel #
                RaiseMaxPopulation #
                modifiers of all buildings in buildings.txt

                Based on a max city size of 60 I think the numbers Lui2 choose are logical.

                I have made a mod where the max city size is around 120 and it would be good to be able to change the three limits correspondingly.
                ·Circuit·Boi·wannabe·
                "Evil reptilian kitten-eater from another planet."
                Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                Comment


                • Re: StartingAge and EndingAge

                  Originally posted by Lui2
                  As it seems to me, that these values for the additional ages come from a mod version of the game, it would be probably best to remove them completely in both files.
                  Yes they come from a mod but as I like to see CityMod2 sometimes in it shouldn't be removed altogether at least not without moving it to a better place. If I can add ages then no refferences to ages should be placed into an *.ldl file. The strings should go into gl_str.txt and their names should correspondent to the ages names. However AGE_ONE, AGE_TWO etc. are not good internal names for ages.

                  Originally posted by Tamerlin
                  Are you sure about it? Though your intentions are good perhaps does it boil down to preferences. OK, I am playing the role of the devil's advocate in this case, though you are certainly right my only concern is about the fact that it opens the door to personal preferences included into the SourceCode without any previous discussion.
                  What persional prefferences? Well the orignal values are probably persional prefferences, too. But they are totally unrealistic, deviding them by ten is definatly a good idea until we will have exposed them to the DiffDB.txt.

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

                  Comment


                  • Activision patch reimplementation?

                    gs\fileio\GameFile.cpp: use 6 (was 5) characters of the leader name when generating a scenario autosave directory name.

                    [Edit: link removed. Included in the 2004.08.01 source collection.]
                    Last edited by Fromafar; August 3, 2004, 16:55.

                    Comment


                    • Standardization of city selection and focus

                      2004.06.10
                      ..\ctp2_code\ui\aui_ctp2\SelItem.cpp
                      ..\ctp2_code\ui\interface\CityControlPanel.cpp
                      ..\ctp2_code\ui\interface\Citywindow.cpp
                      ..\ctp2_code\ui\interface\EditQueue.cpp


                      Standardization of the behaviour for selecting and focus on a city.

                      Added the missing focus behaviour when selecting a city for the following cases:

                      1) CityControlPanel: next & prev button and the dropdown selection
                      2) CityWindow: dropdown selection
                      3) BuildManager: next & prev button and the dropdown selection

                      Also took care, that the user option "focus on the active unit or city" works as expected.

                      The focus handling from the national manager, to select and focus a city with a double mouse click, was not changed. Because considering here, the user option not to focus, makes no sense.
                      Attached Files
                      Last edited by Lui2; June 9, 2004, 21:12.
                      Ludwig

                      Comment


                      • Is path finding for units and trade routes calculated by the same code? If not, the improvements Fromafar made to the unit path finding algorithm should be added to the trade route code as well.
                        ·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 Flinx
                          Is path finding for units and trade routes calculated by the same code? If not, the improvements Fromafar made to the unit path finding algorithm should be added to the trade route code as well.
                          Well both path finding classes are derived from the same base so maybe it is the same code, but actual in comparision to unit path finding it is not such a big deal.

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

                          Comment


                          • Bug fix: prevent incorrect city production when pressing F3 after end of turn. Reported by Lui2 for MP. Only tested for SP, where it was reproducible as well.

                            ui\interface\interfaceevent.cpp
                            ui\interface\screenutils.cpp

                            OT: Yes, the pathfinding uses the same base code for the computation of trade and unit paths.

                            [Edit: file link removed. Included in the 2004.08.01 source collection.]
                            Last edited by Fromafar; August 3, 2004, 16:56.

                            Comment


                            • Trade Route Pathfinding

                              Originally posted by Martin Gühmann
                              Well both path finding classes are derived from the same base so maybe it is the same code, but actual in comparision to unit path finding it is not such a big deal. -Martin
                              I brought it up because as I was testing various freight values, I noticed trade routes would cross tiles with higher freight cost when it should have crossed the next tile over with a lower freight cost. I no longer notice units talking strange paths, but the trade routes were clearly non-optimal.
                              Last edited by Flinx; June 10, 2004, 15:56.
                              ·Circuit·Boi·wannabe·
                              "Evil reptilian kitten-eater from another planet."
                              Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

                              Comment


                              • Possible Activision patch reimplementation:
                                Use the same code - round by adding 0.5 before converting from double to int - for all science percentage display occurrences.

                                ctp\ctp2_utils\c3math.h
                                gs\gameobj\GSLogs.cpp
                                ui\interface\CauseAndEffectTab.cpp
                                ui\interface\DomesticControlPanel.cpp
                                ui\interface\knowledgewin.cpp
                                ui\interface\sciencewin.cpp

                                [Edit: link removed. Included in the 2004.08.01 source collection.]
                                Last edited by Fromafar; August 3, 2004, 16:56.

                                Comment

                                Working...
                                X