Announcement

Collapse
No announcement yet.

DESIGN: Wonders

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

  • #31
    Originally posted by E

    On another note I coded a const.txt option MAX_CITY_WONDERS but have yet to test it
    Excellent, let us know how you get on.

    BTW whats AllCitizensContent, does it work? Sounds like how Shakespeare's Theatre made all citizens in the city content in civ2.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

    Comment


    • #32
      yeah the code looks like it does that

      Code:
      void Happy::CalcHappiness(CityData &cd, bool projectedOnly, 
                                sint32 &delta_martial_law, 
                                bool isFirstPass)
      {
      	
      	Player *p = g_player[cd.m_owner]; 
      
      	CountAffectivePop(cd);
      
      	
      	m_happiness  = CalcBase(p);
      	m_happiness += p->CityHappinessIncrease();
      	m_happiness += cd.StyleHappinessIncr();
      	m_happiness += cd.GoodHappinessIncr();		//EMOD 4-27-2006 to allow for luxury goods
      	m_happiness += cd.SectarianHappiness();		//EMOD 5-26-2006 affects of religious and ethnic violence
      	m_happiness += cd.TileImpHappinessIncr();	//EMOD 8-29-2006 tileimps can give happiness
      
      	if(cd.m_owner == PLAYER_INDEX_VANDALS) {
      		return;
      	}
      
      	
      	
      
      	CalcTimedChanges(cd, p, projectedOnly, isFirstPass);
      
      	if(m_fullHappinessTurns > 0) {
      		m_happiness = 100;
      		if(isFirstPass)
      			m_fullHappinessTurns--;
      		m_tracker->SetHappiness(HAPPY_REASON_WONDER_TURNS_REMAINING, m_fullHappinessTurns);
      		return;
      	}
      
      	if(wonderutil_GetAllCitizensContent(p->m_builtWonders)) {
      		
      		return;
      	}
      
      	if(buildingutil_GetNoUnhappyPeople(cd.GetEffectiveBuildings())) {
      		
      		return;
      	}
      	m_happiness += CalcSize(cd, p);
      	if(isFirstPass) {
      		m_happiness += CalcTooManyCities(p);
      	} else {
      		m_happiness += m_too_many_cities;
      	}
      
      	if(isFirstPass) {
      		m_happiness += CalcConquestDistress(cd, p);
      	} else {
      		m_happiness += m_conquest_distress;
      	}
      
      
      	if(isFirstPass) {		
      		m_happiness += CalcDistanceFromCapitol(cd, p);
      	} else {
      		m_happiness += m_empire_dist;
      	}
      Formerly known as "E" on Apolyton

      See me at Civfanatics.com

      Comment


      • #33
        Originally posted by E
        you mean a modifier that would tac on an additional percent?

        i'll have to think on that i think the code would a little difficult because it takes from the building_util file into citydata processproduction method. the modifier doesn't allow for another plus based solely on the building type (just all buildings based on if they have a production boost)

        I may have to think about it
        London Exchange already uses something similar, increasing Brokerages by 50%. Might be something useful there.

        On another note I coded a const.txt option MAX_CITY_WONDERS but have yet to test it
        Did you test this E?
        Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
        CtP2 AE Wiki & Modding Reference
        One way to compile the CtP2 Source Code.

        Comment


        • #34
          Originally posted by Maquiladora


          London Exchange already uses something similar, increasing Brokerages by 50%. Might be something useful there.
          IIRC the code looks for IsBrokerage not just a building name, adds a little more complexity


          Did you test max city wonders E?
          still not yet. I'll check itout with Martin's r730. It should work though, its just a comparison code. The change would be to the const.txt to implement it. (if it works I'm thinking of adding it to citysize.txt as well so we can adjust max buildings based on the size of the city and maybe a wonderflag or advance flag that can increase the number)
          Formerly known as "E" on Apolyton

          See me at Civfanatics.com

          Comment


          • #35
            i tried my code and its not working. its causinga long runtime delay which i think means the m_builtwonders isnt intiatilized.

            i can outcomment it and release another build or you can wait until we figure out why citydata.cpp inititalization of variables is so messed up.
            Formerly known as "E" on Apolyton

            See me at Civfanatics.com

            Comment


            • #36
              If it's not working then just disable it, as long as it doesn't interfere with anything else.
              Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
              CtP2 AE Wiki & Modding Reference
              One way to compile the CtP2 Source Code.

              Comment


              • #37
                I have just added a ProhibitSlavers flag, basicaly i cut the FreeSlaves code in half. Building a wonder with freeslaves will do a one time free slaves.

                prohibitslavers prevents any slavers being built

                so for emancipation to work as it did originally it will need the ProhibitSlavers flag

                this means we can now having slaving fascists

                EDIT:
                I think there may be a way to add a wonder that decreases the citylimit threshold and its coefficient. would that be worthwhile? something for an early empire builder?
                Formerly known as "E" on Apolyton

                See me at Civfanatics.com

                Comment


                • #38
                  Originally posted by E

                  EDIT:
                  I think there may be a way to add a wonder that decreases the citylimit threshold and its coefficient. would that be worthwhile? something for an early empire builder?
                  This could be a great idea E, adds a very unique element to the game.

                  What if the wonder required say 5 courthouses to be built first, then allowed the "High Court" national wonder (every civ can have one) to be built, that increases the city limit by 10.

                  Of course getting the AI to do everything right in the vanilla setup first is more important, but I like these ideas.
                  Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                  CtP2 AE Wiki & Modding Reference
                  One way to compile the CtP2 Source Code.

                  Comment


                  • #39
                    How does GoldPerBuildingAnywhere work? It says here:

                    "Wonder gives gold per specified building multiplied by population."

                    I tried:

                    GoldPerBuildingAnywhere IMPROVE_SHRINE_EGYPT

                    for testing the religion stuff, but it said it required an integer. If I put an integer, what building is it multiplying the population by?
                    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                    CtP2 AE Wiki & Modding Reference
                    One way to compile the CtP2 Source Code.

                    Comment


                    • #40
                      How about a wonder that gives you a free unit every x turn, like in civ3?
                      "

                      Comment


                      • #41
                        Originally posted by EPW View Post
                        How about a wonder that gives you a free unit every x turn, like in civ3?
                        What wonder was that?

                        And what unit would it give?
                        Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                        CtP2 AE Wiki & Modding Reference
                        One way to compile the CtP2 Source Code.

                        Comment


                        • #42
                          I don't remember.

                          How about this hypothetical wonder gives a unique unit, like the elephant warrior?
                          "

                          Comment


                          • #43
                            Originally posted by EPW View Post
                            I don't remember.

                            How about this hypothetical wonder gives a unique unit, like the elephant warrior?


                            I don't like it, but it might be useful for some mod.

                            Can you think of any wonder effects that can't be done with slic? Those would be most useful.

                            Something like reduced unit upgrade costs would be nice. Free upgrades can be done in slic, although it's pretty long.
                            Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                            CtP2 AE Wiki & Modding Reference
                            One way to compile the CtP2 Source Code.

                            Comment


                            • #44
                              rrr

                              Um, how about one that increases terrain values or improvement values? One that makes better farms for instance, or (even) better good bounuses?
                              "

                              Comment


                              • #45
                                Yeah one like the Colossus from civ2 would be useful, to add food/production/commerce on every tile a city is working.

                                Some simple slic functions for just increasing resources in a city would be useful too.
                                Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                                CtP2 AE Wiki & Modding Reference
                                One way to compile the CtP2 Source Code.

                                Comment

                                Working...
                                X