Announcement

Collapse
No announcement yet.

Debug: Science pact

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

  • Debug: Science pact

    Well i put in a few DPRINTF() to figure out what is wrong with the science pact and my early findings are that it seems to work flawlessly allthough it may seem a little unbalanced, but thats another issue entirely

    any comments on what i might be missing would be apreaciated.

    Klaus
    Attached Files

  • #2
    Why a new thread if we already have a thraed about?

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

    Comment


    • #3
      Since I already started to post in this one:

      Player.cpp@1902: Science from pacts is 724 for player 7, who made 67 by himself
      Whoa! That doesn't seem right.

      BTW, has anybody tried playing around with the debug mask (civ3_main.cpp @ ~1767):

      Code:
      c3debug_SetDebugMask( k_DBG_AI | k_DBG_SCHEDULER | k_DBG_GAMESTATE, 1);
      The options are:

      Code:
      #define k_DBG_ALL				0xffffffff
      #define k_DBG_NONE			0x00000000
      #define k_DBG_INFO			0x00000001
      #define k_DBG_AI				0x00000002
      #define k_DBG_NET				0x00000004
      #define k_DBG_GRAPHICS			0x00000008
      #define k_DBG_DATABASE			0x00000010
      #define k_DBG_FILE			0x00000020
      #define k_DBG_GAMESTATE			0x00000040
      #define k_DBG_UI				0x00000080
      #define k_DBG_FIX				0x00000100
      #define k_DBG_SLIC			0x00000200
      #define k_DBG_SCHEDULER			0x00000400
      #define k_DBG_SCHEDULER_DETAIL	0x00000c00  
      #define k_DBG_SCHEDULER_ALL		0x00001c00  
      #define k_DBG_DIPLOMACY			0x00002000
      #define k_DBG_MAPANALYSIS		0x00004000
      You can get it to print out all sorts of stuff by varying these. I've been trying to figure out how the AI tasks it's units and in particular why it won't do cross water invasions.

      Comment


      • #4
        Originally posted by Peter Triggs
        You can get it to print out all sorts of stuff by varying these. I've been trying to figure out how the AI tasks it's units and in particular why it won't do cross water invasions.
        If you want to do cross water invasions then some prerequites must be match.

        1. No enemy should be left on your continent.
        2. You need enough attack units to do it.
        3. You need enough transport capacity.
        4. You need a deployment place on your continent to rally your troops until you have enough there at one place to put them all into ships.
        5. You need a victim, a goal where you could send your invasion force.
        6. Of course every ship should arrive at the same time.
        7. When every ship is at the goal all units should go from board.
        8. Of course the transprters need an escorte.

        Determining that you are alone on a continent is not too difficuilt. Also rallying enough troops is not too difficuilt either. You must only know where the deployment place is, easy if you just have one per continent, more difficuilt if you have more per continent. But then you have to decide who should be the victim. Of course it is good to attack the civ on the neighbor conz´tinent or better island, but if the neighbor is too strong then you should first conquer some lonely islands to extend your empire and grow stronger. Of course don't attack one tile islands if you don't have the necessary units, and in this case not a very huge fleet is needed. So also multiple invasion goals could be possible. Of course make shure that every ship is full.

        The current AI has a problem in path finding if the original indented path is blocked, it just stops there and fortifies its troops. Then it has no idea that it has to ungroup or better to group out the neccessary units if it wants to fill transporters and there is not enough space for the whole stack. Another problem that I see is that the AI just coordinates its units on a very low level, so that it would only fill one transporter and sends it to somewhere and fills the next transporter and sends it to somewhere else. But of course only if there are enough units if there are less units then it doe not fill the transporters, instead of that it uses five unit transporters for only one units.

        Taking in considerartion what you have to do for a serious invasion and what the AI does and even would does by design without bugs, then it is not very surprisingly that you never see a serious invasion.

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

        Comment


        • #5
          Originally posted by Martin Gühmann
          Why a new thread if we already have a thraed about?

          -Martin
          Sorry I didnt know it existed

          This also means that this forum has reached the critical mass where i have to search it before blabbering out my every thought

          The only thing left to do with this issue is a design discussion about the right balance of a science pact.

          I think ill move on to finding out why the mayors dont use entertainers to manage happines.
          The old fix posted by Mr Ogre seems to have vanished in the forum rearangement but it works well. The thing nagging me is that its a workaround to a bug instead of a fix.

          Klaus

          Comment


          • #6
            Originally posted by kaan
            I think ill move on to finding out why the mayors dont use entertainers to manage happines.
            The old fix posted by Mr Ogre seems to have vanished in the forum rearangement but it works well. The thing nagging me is that its a workaround to a bug instead of a fix.
            The mayors use the AI strategies of assigning entertainers, in GoodMod I removed the possibility to use enterteiners for the AIs, because the AI has no idea when it should use entertainers and when not. Either you get a city with to much entertainers or with to few entertainers. In if there are to less entertainers the AI use the sliders anyway. So why wasting the valuable work power of the people if the effect is not controlled. So I came to the conclusion that it is better that the AI don't use entertainers and removed them from the city pop specialist table. Surprisingly even without the entertainers on the table I saw the AI using some entertainers.

            So I mean there is much more then fixing just a bug, probably the whole thing has to be redesigned, to make it work as best as it could be and not only as good as it was intended.

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

            Comment


            • #7
              Peter,

              Settings those debug constants to some values (especially the debug all one) will create absolutely huge logfiles. Some serious patience is required.
              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


              • #8
                Klaus,

                I think ill move on to finding out why the mayors dont use entertainers to manage happines.
                The old fix posted by Mr Ogre seems to have vanished in the forum rearangement but it works well. The thing nagging me is that its a workaround to a bug instead of a fix.
                It was Azmel2 who posted that:

                A friend of mine found a pretty obvious and obnoxious AI bug and I spent the day hunting it down. It turns out that a simple text file change will fix your mayors so they keep your cities happy. To fix the bug, just overwrite the file pop.txt in your ctp2_data/default/gamedata directory with a new pop.txt that has the following first record (before POP_ENTERTAINER) :

                ## Mayors ignore the first pop record, this fixes the problem
                ## with low happiness not being handled correctly by mayors.
                ## (REM031501)

                POP_ZERO_IGNORED {
                EnableAdvance ADVANCE_CLASSICAL_EDUCATION
                Food 0
                }

                Actually, you should probably do this in a scenario and not overwrite the default pop.txt, but do what ever you think is best.

                If you want to try it with a game in progress, the easiest way to get it to re-read the pop values is to quit and reload the game and then to bring up the cheat menu and remove the "drama" advance. Then add the drama advance back in. I tried it using a game I was sent and it immediately brought most of the unhappy mayor controlled cities to a non-rioting level. There are a few cities that are still under the magic 73 happiness, but I think this has to do with the mayor not adequetly adjusting for unhappiness caused by pollution. There's nothing I can do about that from text file changes.

                I haven't played an entire game with this change, but you should notice the AI plays better too since all AI cities are effectively under mayoral control.

                My apologies to the CTP2 community for not finding and fixing this stupid bug before we shipped.

                -- Richard
                Solver,

                You're not kidding. That's why I posted somewhere that Azmel2 must have the patience of a saint.

                Comment


                • #9
                  Thanks peter, that was very usefull to read again

                  Comment


                  • #10
                    Solver,

                    You're not kidding. That's why I posted somewhere that Azmel2 must have the patience of a saint.



                    Indeed. Play a turn in the morning and leave for work, maybe .
                    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

                    Working...
                    X