Announcement

Collapse
No announcement yet.

DOCUMENT: Miscellaneous source findings and thoughts

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

  • DOCUMENT: Miscellaneous source findings and thoughts

    It seems to me that this information has been pretty scattered thus far, so time to put it together.

    It has been discovered that there's an easter egg in the game which acts if you enter "pacman" in the Chat window. - The Big Mc

    The game has a boolean g_e3Demo variable that is set to false. If true, then some parts of the interface are skipped, so that the game starts/quits without main menu, which is more of a demo mode indeed. - Dale and Solver

    The sprite limit of 200 is defined as a global constant. - Immortal Wombat.

    The AI won't move around its own 12-stacks because the pathfinder considers those squares to be passable, and the units keep trying to enter the square occupied by 12-stack, and fail. - Dale.

    From the CtP1 space layer, the wormhole code is still in. That includes stuff for moving the wormhole each turn, for instance. - Solver
    Solver, WePlayCiv Co-Administrator
    Contact: solver-at-weplayciv-dot-com
    I can kill you whenever I please... but not today. - The Cigarette Smoking Man

  • #2
    Re: Miscellaneous source findings and thoughts

    Originally posted by Solver
    It has been discovered that there's an easter egg in the game which acts if you enter "pacman" in the Chat window. - The Big Mc
    This was known previously, but it has no effect as far as anyone can make out.
    Concrete, Abstract, or Squoingy?
    "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

    Comment


    • #3
      As seen from the code, it creates a unit. Might be just that it doesn't get on the map .
      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


      • #4
        if(!Flag(k_UDF_PACMAN)) {
        m_movement_points -= cost;
        m_movement_points = max(m_movement_points, 0.0f);
        ClearFlag(k_UDF_FIRST_MOVE);
        }
        "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
        The BIG MC making ctp2 a much unsafer place.
        Visit the big mc’s website

        Comment


        • #5
          Originally posted by Solver
          As seen from the code, it creates a unit. Might be just that it doesn't get on the map .
          Probably needs a specific sprite a well? One that's missing like the War Walker beta.

          Comment


          • #6
            If I get it correctly, it creates a unit of type which is the second-from-end in the unit database.
            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


            • #7
              Re: Miscellaneous source findings and thoughts

              Originally posted by Solver
              The AI won't move around its own 12-stacks because the pathfinder considers those squares to be passable, and the units keep trying to enter the square occupied by 12-stack, and fail. - Dale.
              Actually, the function returns: ASTAR_BLOCKED so it's viewing it as unpassable, but then the Astar function doesn't look for another path when returned ASTAR_BLOCKED it just closes that node.

              What we need to do it specific a different return like: ASTAR_OCCUPIED and when that's returned to the Astar function, make it keep the node open but try other directions from there.

              Comment


              • #8
                You forgot the GetNearestWater function, Solver.

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

                Comment


                • #9
                  Solver, you have a PM
                  Sorry!

                  @Everyone, good luck with the project!
                  The Party seeks power entirely for its own sake. We are not interested in the good of others; we are interested solely in power. Not wealth or luxury or long life or happiness: only power, pure power.

                  Join Eventis, the land of spam and unspeakable horrors!

                  Comment


                  • #10
                    Just stepping back for a second. All this time waiting for the source code -- and we use it just so we can play Pacman!!!

                    Comment


                    • #11
                      And here is a thread that describes the fix of the GLHidden flag for goods does not work bug.

                      I also found something else that could be interesting in the Rankingtab.cpp there is a function called GetTurnStrength, I tracked it down to the Strength.cpp and found these possible arguments for this function:

                      STRENGTH_CAT_KNOWLEDGE:
                      STRENGTH_CAT_MILITARY:
                      STRENGTH_CAT_POLLUTION:
                      STRENGTH_CAT_TRADE:
                      STRENGTH_CAT_GOLD:
                      STRENGTH_CAT_POPULATION:
                      STRENGTH_CAT_CITIES:
                      STRENGTH_CAT_GEOGRAPHICAL:
                      STRENGTH_CAT_SPACE:
                      STRENGTH_CAT_UNDERSEA:
                      STRENGTH_CAT_UNITS:
                      STRENGTH_CAT_BUILDINGS:
                      STRENGTH_CAT_WONDERS:
                      STRENGTH_CAT_PRODUCTION:

                      So what do want to see on the powergraph in addition.

                      I would like to see a pollution graph, maybe also an additional wonder graph, maybe also a geographical graph, maybe they could be displayed only if you have an embassy with the corresponding player.

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

                      Comment


                      • #12
                        If I get it correctly, it creates a unit of type which is the second-from-end in the unit database.

                        if i remeber right isen that the war walker
                        "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
                        The BIG MC making ctp2 a much unsafer place.
                        Visit the big mc’s website

                        Comment


                        • #13
                          while(y < 0) {
                          y += g_mp_size.y;
                          x = (x + g_mp_size.x - (((g_mp_size.y / 2) % g_mp_size.x) - 1)) % g_mp_size.x;
                          }

                          I found this at the end of Mappoint.cpp in
                          function Norm2Iso -----> void MapPoint::Norm2Iso(const MapPointData &pos)

                          interesting coding.. probably to do with the isolinear diagonal map tile drawing. Looks pretty mad, it assumes y is 0 I think, otherwise it seems to be wasting time increasing y until it reaches 0 in g mp increments.

                          Just something that caught my eye.. this coder on that file seems to use whiles like If statements, whereas I rarely do.

                          Comment


                          • #14
                            Originally posted by Admiral PJ
                            while(y < 0) {
                            y += g_mp_size.y;
                            x = (x + g_mp_size.x - (((g_mp_size.y / 2) % g_mp_size.x) - 1)) % g_mp_size.x;
                            }
                            AAHHHHHHHHH THE HORROR!!!!!!!!!!!!!!!!!

                            It's for doing vertical wrap around. The math is very, very tricky for any map whose vertical size is not a multiple of it's horizontal size.

                            If you don't have vertical wrap turned on, you should ever hit that loop. It's only a loop, I think, in case something wraps a really long way. Normally it would only go through that once.
                            Joe Rumsey - CTP Programmer

                            Comment


                            • #15
                              Mr Ogre,
                              Completely off-topic, but I sent you a PM.
                              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                              Comment

                              Working...