Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Call To Power II > CtP2-Source Code Project > U of T students looking for help
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
CivGroups
CTP2 Source Code Project (59): Not a Member - Join

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
cajul is offline cajul
Settler

Jan 2005
time: 05:29
  Old Post 04-02-2005 21:11
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
U of T students looking for help Increase Your PM Length

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

E is offline E
King
July 24,2005 Ctp2 Tiles in sig!
May 1999
time: 21:29
  Old Post 04-02-2005 22:26 Visit E's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Browse Apolyton AD-FREE

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

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:29
  Old Post 04-02-2005 22:27 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

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.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:29
  Old Post 04-02-2005 22:29 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Browse Apolyton AD-FREE

Call To Power 2\ctp2_data\default\gamedata

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:29
  Old Post 04-02-2005 22:33 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

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.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:29
Post  Old Post 05-02-2005 04:01 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Call to Power 2

quote:
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

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:29
  Old Post 07-02-2005 22:06
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

quote:

-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.

cajul is offline cajul
Settler

Jan 2005
time: 05:29
  Old Post 07-02-2005 23:06
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

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

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:29.
Apolyton Time is 00:29.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0332 seconds (87.51% PHP - 12.49% MySQL) with 36 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net