Announcement

Collapse
No announcement yet.

DESIGN: Wonders

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

  • Ekmek
    replied
    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?

    Leave a comment:


  • Maquiladora
    replied
    If it's not working then just disable it, as long as it doesn't interfere with anything else.

    Leave a comment:


  • Ekmek
    replied
    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.

    Leave a comment:


  • Ekmek
    replied
    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)

    Leave a comment:


  • Maquiladora
    replied
    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?

    Leave a comment:


  • Ekmek
    replied
    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;
    	}

    Leave a comment:


  • Maquiladora
    replied
    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.

    Leave a comment:


  • Ekmek
    replied
    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


    On another note I coded a const.txt option MAX_CITY_WONDERS but have yet to test it

    Leave a comment:


  • Maquiladora
    replied
    Originally posted by cap601

    Sorry, what I should have said is that it reduces the production (and upkeep) costs of ordinary Matter Decompilers (it should probably also act as an ordinary Decompiler in the building city). I'm not sure whether that's actually doable at present.

    Another option would be for it to upgrade the effectiveness of all other Decompilers by a small amount. May also need code work to implement, though.
    If a wonder (or anything really, like Goods - coal increasing power plant production etc) could alter the effects of existing buildings that would be perfect aswell

    Leave a comment:


  • cap601
    replied
    Originally posted by Maquiladora
    It's not very similar to the original wonder though. cutting production is a lot worse than reducing the pollution caused, and I don't know if we can reduce upkeep costs yet, but that would be a good effect to have for another wonder. Ideally the CMD would just be -25% production pollution (or something) to one civ, and you can build Matter Decompilers aswell.
    Sorry, what I should have said is that it reduces the production (and upkeep) costs of ordinary Matter Decompilers (it should probably also act as an ordinary Decompiler in the building city). I'm not sure whether that's actually doable at present.

    Another option would be for it to upgrade the effectiveness of all other Decompilers by a small amount. May also need code work to implement, though.

    Leave a comment:


  • Ekmek
    replied
    I thought this would be a good time to post what the database for wonders looks like. FU - means futureUse (not implemented) though I may have implemented it.

    Any qustions just ask!

    Code:
    #-----------------------------------------------------------------------------
    #
    #  Project      : Call To Power 2
    #  File type    : dbgen input
    #  Description  : Wonder type descriptor
    # 
    # ----------------------------------------------------------------------------
    # 
    #  Disclaimer
    # 
    #  THIS FILE IS NOT GENERATED OR SUPPORTED BY ACTIVISION.
    # 
    #  This material has been developed at apolyton.net by the Apolyton CtP2 
    #  Source Code Project. Contact the authors at [email]ctp2source@apolyton.net[/email].
    # 
    #-----------------------------------------------------------------------------
    # 
    #  Modifications from the original Activision code:
    #
    #  - FU: designates Future Use / To Be Implemented / not coded yet
    #  - Governmenttype //added by E limiting wonders to certain governments
    #  - CultureOnly //added by E -- can only build wonders if civ has certain citystyle
    #  - CityStyleOnly //added by E -- can only build wonders at cities with certain citystyle 
    #  - PrerequisiteBuilding  // Added by E to limit wonders to cities with certain buildings
    #  - EnablesGood //added by E allows a wonder to give a city a good 
    #  - NeedsCityGood - requires a good to build wonder
    #  - NeedsCityGoodAll - requires a 1 or more good to build wonder
    #  - NeedsCityGoodAnyCity - requires any city to have good to build wonder
    #  - EnablesPunativeAirstrikes //added by E(1-14-2006) allows airstrikes without war
    #  - Added OnePerCiv for Small Wonders
    #  - ObsoleteGovernmenttype //added by E obsoletes wonders only if player switches to govt
    #  - Added BuildingEffectEverywhere to better flag than BuildingEverywhere based on code
    #  - ActualBuildingEverywhere was added and implemented a long time ago
    # 
    #-----------------------------------------------------------------------------
    
    WonderMovie : File
    
    Wonder {
    	Int ProductionCost
    	Record Icon DefaultIcon
    	Record WonderMovie Movie
    	StringId Description
    	Record Advance EnableAdvance
    	Record Advance [0..5] ObsoleteAdvance
    	Record Building[] PrerequisiteBuilding		// Added by E to limit wonders to cities with certain buildings
    	Record Government[] GovernmentsModified		// Added by MrBaggins
    	Record CityStyle[] CultureOnly				//added by E -- can only build wonders if civ has certain citystyle
    	Record Government[] GovernmentType			//added by E --- a copy of unit Government type code
    	Record Government[] ObsoleteGovernmentType	//added by E --- switching to this obsoletes your imp
    	Record CityStyle[] CityStyleOnly			//added by E--can only build wonders at cities with certain citystyle 
    	Record Resource[] NeedsCityGood				// must have good in radius of city or buying resource to build 
    	Record Resource[] NeedsCityGoodAll			//a city must have all resource to build wonder
    	Record Resource[] NeedsCityGoodAnyCity		//
        Record Resource[] EnablesGood				//added by E -- having a TI gives a city a good
    	Record TerrainImprovement[] ShowOnMap		//
    	Record TerrainImprovement[] ShowOnMapRadius //
    	Record Civilisation[] CivilisationOnly 
    	Record Feat[] NeedsFeatToBuild				// implemented by E
    	Bit(Record MapIcon)   ShowCityIcon			// Like show on map but put on city?
    
    	Bit(Int) SquaredBorderRadius 				//added by E
    	Bit(Int) IntBorderRadius    				//added by E
    	Bit		 OnePerCiv							//EMOD implement 5-12-2006
    	Bit(Record MapIcon)			IsReligionIcon	// Displays city religion icon - can be used for Holy Cities
    	
    	# Flags
    	Bit(Int) ReduceReadinessCost
    	Bit EmbassiesEverywhere
    	Bit(Int) DecCrimePercent
    	Bit(Int) IncKnowledgePercent
    	Bit(Int) DecEmpireSize
    	Bit(Int) IncHappinessEmpire
    	Bit CloseEmbassies
    	Bit ReformCities
    	Bit FreeSlaves
    	Bit(Int) IncConvertedCitiesFeePercent
    	Bit(Int) GoldPerWaterTradeRoute
    	Bit(Int) GoldPerTelevision
    	Bit GlobalRadar
    	Bit SpiesEverywhere
    	Bit(Int) GoldPerInternationalTradeRoute
    	Bit ProtectFromBiologicalWarfare
    	Bit(Int) PollutersToParks
    	Bit EnableParkRangers
    	Bit(Int) ReduceWorldPollution
    	Bit AllCitizensContent
    	Bit EliminateNukes
    	Bit AllBoatsDeepWater
    	Bit(Int) IncreaseBoatMovement
    	Bit FreeTradeRoutes
    	Bit(Int) DecreaseMaintenance
    	Bit(Int) RandomAdvanceChance
    	Bit(Int) IncreaseHp
    	Bit(Int) MultiplyTradeRoutes
    	Bit ForcefieldEverywhere
    	Bit(Int) IncreaseScientists
    	Bit(Int) OtherCivRandomAdvanceChance
    	Bit(Int) IncreaseProduction
    	Bit(Int) BonusGold
    	Bit CantBuildInSea							// Added by E to restrict some wonders to Land
    	Bit CantBuildOnLand							//  Added by E to restrict some wonders to Sea				
    	Bit CoastalBuilding 						// Added by E to restrict some wonders to the Coast
    	Bit EnablesPunativeAirstrikes				// Added by E Air Bombard without War 
    
    	Bit(Int) IncreaseFoodAllCities
    	Bit(Int) TemporaryFullHappiness
    	Bit RevoltingCitiesJoinPlayer
    	Bit NoPollutionUnhappiness
    	Bit EmbassiesEverywhereEvenAtWar
    	Bit(Int) IncreaseSpecialists
    	Bit(Int) IncreaseCathedrals
    	Bit(Int) IncreaseBrokerages
    	Bit(Int) IncreaseRegard
    	Bit PreventConversion
    	Bit ProtectFromBarbarians
    	Bit StartGaiaController
    	Bit GLHidden
    
    	Struct BuildingFeat {						// From feats implemented by E 2-24-2006
    		Record Building Building
    		Bit(Int) Num
    		Bit(Int) PercentCities
    	}
    
    	Bit(struct BuildingFeat) BuildingFeat		// From feats implemented by E 2-24-2006
    
        Struct BuildingGold {
            	Record Building Building
            	Bit(Int) Gold 
        	}
    
        Bit(struct BuildingGold) BuildingGold
    	Bit(Record Building) BuildingEverywhere
    	Bit(Record Building) ActualBuildingEverywhere
    	Bit(Record Building) BuildingEffectEverywhere  #This would be a better name for BuildingEverywhere
    	Bit(Record Building) ConflictsWithBuilding
    
    	##Bit(Record Building) BuildingAnywhere
    	Record Building[] BuildingAnywhere
    	Bit(Int) GoldPerBuildingAnywhere 
    
    	Bit(Float) PollutionPercent
    	Bit(Float) PollutionAmount
    
    	Record Building[]    ExcludedByBuilding 
    	Record Wonder[]      ExcludedByWonder 
    
    		#Energy Code
    	Bit(Int)   EnergyHunger 
    	Bit(Int)   ProducesEnergy
    	Bit(Int)   EnergyHungerPerPop
    	Bit(Int)   ProducesEnergyPerPop 
    }

    Leave a comment:


  • Maquiladora
    replied
    Globesat may take some work
    I'll leave it with you for now then E. For now I'll double the cost of the wonder.

    Maybe the central matter decompiler could reduce production and/or upkeep costs? That would give the builder the same pollution cutting benefits but make it easier to get them.
    It's not very similar to the original wonder though. cutting production is a lot worse than reducing the pollution caused, and I don't know if we can reduce upkeep costs yet, but that would be a good effect to have for another wonder. Ideally the CMD would just be -25% production pollution (or something) to one civ, and you can build Matter Decompilers aswell.

    Leave a comment:


  • cap601
    replied
    Maybe the central matter decompiler could reduce production and/or upkeep costs? That would give the builder the same pollution cutting benefits but make it easier to get them.

    Leave a comment:


  • Ekmek
    replied
    Globesat may take some work

    Code:
    in player.cpp
    		if(wrec->GetGlobalRadar()) {
    			g_player[wowner]->m_hasGlobalRadar = FALSE;
    			g_theWonderTracker->SetGlobeSatFlags(g_theWonderTracker->GlobeSatFlags() & ~(1 << m_owner));
    			m_vision->ClearUnseen();
    			if(wowner == g_selected_item->GetVisiblePlayer()) {
    				g_director->AddCopyVision();
    			}
    		}
    the wondertracker line is a problem

    Leave a comment:


  • Maquiladora
    replied
    OK to try and wrap up some changes, so we can add it and start testing:

    Overpowered:
    ==============

    Aristotle's Lyceum - doesn't obsolete, +20% science for rest of game.

    Solution - +10% science, obsolete at Classical Education.

    Central Matter Decompiler - "building everywhere" overpowered. Matter Decompilers are already an excellent building (-50% production pollution). They effectively allow you to increase your production with much lower pollution costs, that everyone else is struggling with.

    Solution - any ideas? (that don't involve weakening Matter Decompilers)

    Chichen Itza - doesn't obsolete, -30% crime for rest of game.

    Solution - obsolete at Theology (divine law).

    Field Dynamics Lab - doesn't obsolete, +35% science for rest of game.

    Solution - +10% science. This is still a lot but it's nearer the end of the game.

    Genome Project - doesn't obsolete, +10% prod., +10% health (+1HP) for units.

    Solution - only +10% Health.

    Globe Sat - worldwide radar coverage, speaks for itself...

    Solution - This HAS to be a wonder everyone can build? It's too good for one civ to have alone. Seems like a good solution and keeps the wonder unchanged.

    Gutenberg's Bible - doesn't obsolete, +2 happiness forever, eliminates conversion.

    Solution - only give "Eliminates conversion", still very useful in the right circumstances.

    Zero Crime Bill - doesn't obsolete, -60% crime for rest of game.

    Solution - -30% crime, obsolete at Neural Reprogramming

    Internet - "building everywhere" overpowered. Effectively +20% science (Computer Center) for rest of game.

    Solution - +20% science, obsolete at Space Flight(Orbital Laboratories)?

    Ramayana - +3 happiness for rest of game? yeah that's overpowered alright.

    Solution - +1 happiness, obsolete Age of Reason, needs to obsolete quite early.


    Underpowered:
    ===============

    Pyramids - +100 gold per turn to the civ that builds it. It doesn't obsolete, but that's underpowered still, considering it costs the same as Ramayana. Over 500 turns thats only 50,000 gold.

    Solution - maybe +300 gold? We should keep it similar to the original. Should it obsolete?

    Leave a comment:

Working...
X