Announcement

Collapse
No announcement yet.

U of T students looking for help

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

  • U of T students looking for help

    We are a group of Industrial Engineer from U of T working in a project to design interfaces for CTP2. We are not expert programmers and here where we need you help. Our project is limited to develop a new interface that helps the player control happiness easier. Here are our problems:

    1. For primary effects on happiness we found in the Great Library, for example, that Television gives the player +1 happiness, however, we have been searching the source code and that only thing we found was the relationship between Television and Gold.
    -Where in the source code Television relates to happiness.
    -Is there any relationship between gold and happiness?

    After lot of searching we decided to pick another one. So we took Shine, which also gives +1 happiness. After searching the source code, the word Shrine is not even there. How this variable is defined in the code and where is it?

    2. For secondary effects we have a bigger problem. We know certain buildings reduce overcrowding. Overcrowding can decrease or increase happiness. We have been unable to find this relationship in the source code.

    3. Finally the happiness formula. Where are all the points summed? We know that the first city you create (playing in beginner level) starts with 78 happiness points. Where is this number set in the code? How does the game know which happiness level you start at?

    We also understand that we could get the source code with comments. Does somebody have it?

    If somebody is willing to help and spend some time trying to get at least some of these answers will be very helpful.

    Thanks

    Carlos Tamayo

  • #2
    The building use flags/attributes to give there "bonuses" you'll have to search happiness or population. I don't have time to give a path now but check for buildings IIRC
    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

    Comment


    • #3
      look in Buildings.txt in the main game folder and you will see


      IMPROVE_ARENA {
      DefaultIcon ICON_IMPROVE_ARENA
      Description DESCRIPTION_IMPROVE_ARENA
      EnableAdvance ADVANCE_MASONRY
      ProductionCost 675
      Upkeep 2
      HappyInc 2
      }

      they use flags for a happiness increase.
      "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


      • #4
        Call To Power 2\ctp2_data\default\gamedata
        "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
          Most of the answers to your questions at least initially are not in the source code, but rather in the text files which contribute almost all of the game data and variables to the game engine.

          Buildings.txt and DiffDB.txt will probably be the most helpful to start with, and that might help you find the variables in the code.

          The comments were removed before the source code was released, so it's not available anywhere unfortunately.
          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


          • #6
            Originally posted by cajul
            2. For secondary effects we have a bigger problem. We know certain buildings reduce overcrowding. Overcrowding can decrease or increase happiness. We have been unable to find this relationship in the source code.
            Well you find this in the Great Library, but I never notices just an effect, and actual I can't find any happiness-overcrowding-relationship in the source code as well. Therefore I conclude that the entry in the Great Library is wrong. The only effect overcrwoding has is that it reduces city growth.

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

            Comment


            • #7
              -Where in the source code Television relates to happiness.
              -Is there any relationship between gold and happiness?

              After lot of searching we decided to pick another one. So we took Shine, which also gives +1 happiness. After searching the source code, the word Shrine is not even there. How this variable is defined in the code and where is it?
              It starts in BuildingRecord.cpp where it reads the data in from buildings.txt. Then buildingutil_GetHappinessIncrement is used to get the specific happiness increment due to the city's having a television or shrine.

              Check out CityData.cpp and Happy.cpp; it looks complicated.

              Comment


              • #8
                Hey Guys:

                Thank you very much for all your responses. They have been very helpful. We have already sorted out the direct relationships, which is a step forward in our project.

                However, we are still struggling with indirect relationships to happiness. These relationships are: starvation, certain city improvements, like hospital, aqueduct, aqua-filter, body exchange, drug store, and I think more conplicated ones like enemy attacks, crime and pollution.

                Does anybody have an input on these effects? At least a file or something where to star looking for?

                Thanks again.

                Carlos Tamayo

                Comment

                Working...
                X