Afforess
The White Wizard
But +2 trade routes seems a bit much. With too many +trade routes, one might even hit the maximum (in the GlobalDefines, it is 12)...
Right, that presents a real problem.
*Grabs XML and changes it to 20*

But +2 trade routes seems a bit much. With too many +trade routes, one might even hit the maximum (in the GlobalDefines, it is 12)...
Right, that presents a real problem.
*Grabs XML and changes it to 20*
Ok, I think I detect sarcasm there, but since this is the Internet and we lack the wonderful communication device known as "tone of voice", I could be wrong. (I suppose italics are a sort of tone-of-voice device for text, but it is still rather ambiguous compared to face-to-face auditory input.)
if the max trade route XML had not been changed, the problem would have indeed existed.
True, but of all the problem's I've encountered in modding, this falls right in between batch-renaming files and creating new folders; difficulty-wise.
The discussion of llamas has reminded me of The Llama Song...
I am not familiar with the history of Sports however that's what wikipedia is for. So here are some ideas for a "Sports Mod" if you would like to attempt such a mod.
Classical Era
Combat Sports (Req Athletics)
- Gladiator School (Req Combat Sports, Arena)
- Wrestling School (Req Combat Sports, Arena)
Medieval Era
Martial Arts (Req Combat Sports, Feudalism, Buddhism)
- Aikido Dojo (Req Martial Arts)
- Judo Dojo (Req Martial Arts)
- Jujutsu Dojo (Req Martial Arts)
- Kendo Dojo (Req Martial Arts)
- Sumo Wrestling Arena (Req Martial Arts)
Tournaments (Req Combat Spots, Chivalry)
- Jousting Arena (Req Tournaments)
Renaissance Era
Dueling (Req Tournaments, Leadership)
- Fencing Academy (Req Dueling)
Team Sports (Req Tournaments, Humanism)
- Cricket Field (Req Team Sports)
- Rugby Field (Req Team Sports)
- Polo Field (Req Team Sports)
Industrial Era
Lawn Sports (Req Team Sports, Agricultural Engineering)
- Basketball Court (Req Lawn Sports)
- Croquet (Req Lawn Sports)
- Football Field (Req Lawn Sports)
- Golf Course (Req Lawn Sports)
- Hockey Rink (Req Lawn Sports, Refrigeration)
- Softball Field (Req Lawn Sports)
- Soccer Field (Req Lawn Sports)
- Tennis Courts (Req Lawn Sports)
Modern Era
Extreme Sports (Req Modern Sports, Globalization)
- X-Games (Req Extreme Sports)
Modern Sports (Req Lawn Sports, Mass Media)
- Major League Stadium (Req Minor League Stadium)
- Minor League Stadium (Req Modern Sports)
- Modern Olympic Games (Req Modern Sports, Dueling, Martial Arts) [World Wonder]
Motor Sports (Req Modern Sports, Motorized Transportation)
- Racetrack (Req Motor Sports)
Robotic Sports (Req Modern Sports, Robotics)
- Battlebot Arena (Req Robotic Sports)
-----
Phew! Ok that was hard and I am sure I missed a lot of sports. But i think this gives a good start. Other sports that i was not sure where they fit in were; Swimming, Diving, Surfing, Rowing, Track & Field, Volleyball, Ping Pong, Bowling, etc.
The Olympics were from the classical era Greece, besides, many arenas were/are prepared for a variety of different games, not just a single arena for only one purpose. However I have a different idea for the Olympics the Olympic Stadium can be a world wonder until a later tech (maybe mass media) then it will become obsolete however it will be handled like the 'world circus' that Afforess has goin on in his mods. only +5for the city(over crowded) and +5
for the extra revenue.
Not bad, but why does the Llama and Alpaca farm get +2 trade routes?
Also, some changes I would like to see is restricting some of these to specific latitudes. There is XML to restrict building between Latitude X* and Latitude Y*, and some, like the Reindeer could use it. (No Jungle Reindeer).
*Where X and Y are two integers, between 0 and 90. Don't worry, they apply to both sides of the equator. So putting a restriction of 60-90 would limit buildings to be built above the 60'N and below 60'S line (60's is polar region).
Also, could you add obsolete techs? That makes my life easier.
1. Because its +1 for llama and +1 for alpaca. The farm produces both species.
2. Hmm. That's a good idea. But what about alpine reindeer that live high up in the snowy mountains that just happen to be on the equator like Mount Kilimanjaro?
3. I would say for camels to be limited to the equator but there are Bacterium Camels that live in the cold tundra of the Gobi Desert. So climate would not apply to them.
4. I am not sure what would be obsolete for animals. I mean people still breed dogs and cats and horses. I would expect people would still be breeding them in the future.
Ok here i a list of the obsolete techs. Cloning Seems to fit most of them except a select few.
Falcony - Telegraph
Donkey Farm - Cloning
Camel Farm - Cloning
Llama and Alpaca Farm - Cloning
Yak Farm - Cloning
Reindeer Farm - Cloning
Oxen Farm - Cloning
Goat Farm - Cloning
Cat Breeder - Cloning
Chicken Coop - Cloning
Homing Pigeon Coop - Telegraph
Parrot Aviary - Cloning
Turkey Farm - Cloning
Duck and Goose Farm - Cloning
Rabbit Hutch - Cloning
Rodent Breeder - Cloning
Guinea Pig Farm - Cloning
Koi Pond - Cloning
Bear Trainer - Motion Pictures
Snake Charmer - Motion Pictures
Dog Breeder - Cloning
Ok some additional Animal Stuff ...
Pet Shop
Cost: 500
Happiness: +1
Culture: +1
Commerce: +1
Requires: Biology
Obsolete: Cloning
Special Abilities
- +1
with Fish Resource.
- Upgrades to Clone Pet Store.
----
Cloned Pet Store
Cost: 1000
Happiness: +2
Culture: +2
Commerce: +2
Requires: Cloning Laboratory
Special Abilities
- +1
with Fish Resource.
- Upgrades Pet Shop.
----
Monkey Breeder
Cost: 500
Happiness: +1
Culture: +1
Commerce: +1
Requires: Animal Husbandry, Music
Obsolete: Cloning
Special Abilities
- +5%
with Hinduism (Monkey God)
- +5%
with Biology (Organ Grinder Monkey, Circus Monkey and Zoo Monkey)
- +5%
with Medicine (Assistant Monkey)
- +5%
to Laboratory (Lab Monkey)
- +5% Production Speed for Apollo Program (Space Monkey)
----
Also the dog should probably add.
- +5%
with Medicine (Seeing Eye Dog / Assistant Dog)
And Rodent Breeder ...
- +5%
with Hinduism (Rat God)
I've got the tech's 100% done, but I need the building's a little more detailed. An obsolete tech and the building's effect would be nice. Also, I was thinking that some of the stadiums should give a nice big +bonus but cost
since sports costs the economy money.
Ok happiness for money sounds like a good balance.
Ok for the obsolete sports list.
Gladiator School - Realism
Wrestling School - Realism
Aikido Dojo - Modern Sports
Judo Dojo - Modern Sports
Jujutsu Dojo - Modern Sports
Kendo Dojo - Modern Sports
Sumo Wrestling Arena - Modern Sports
Jousting Arena - Vertical Flight
Fencing Academy - Modern Sports
Cricket Field - Space Colonies
Rugby Field - Space Colonies
Polo Field - Space Colonies
Basketball Court - Space Colonies
Croquet - Space Colonies
Football Field - Space Colonies
Golf Course - Space Colonies
Hockey Rink - Space Colonies
Softball Field - Space Colonies
Soccer Field - Space Colonies
Tennis Courts - Space Colonies
X-Games - Space Colonies
Major League Stadium - Space Colonies
Minor League Stadium - Space Colonies
Racetrack - Space Colonies
Battlebot Arena - NEVER
Note that the more familiar sports are obsoleted by Space Colonies because of the Zero G Arena building that's already in the game. I also think there should be ...
- Spaceship Racing (Req Motor Sports, Orbital Flight)
This would never become obsolete and would be a good replacement for the racetrack.
Filling Factory (Explosives)
- Grenader
- Modern Grenader
- Machine Gun
Recruitment Center (Military Tradition)
- Infantry
- Guerrilla
- Marine
- Flamethrower
Dry Dock (Steel)
- Modern Workboat
- Iron Clad
- Early Destroyer
- Pre-Dreadnought
- Tropedoboat
- Battlecruser
- Dreadnought
- Transport
- Submarine
- Offshore Platform
- Destroyer
- Cruiser
- Heavy Cruiser
- Modern Destroyer
- Battleship
Factory (Assembly Line)
- Motorcycle
- Freight
- Jeep
- Armored Car
- Early Tank
- Anti-Air Halftrack
- BTR80
- UN APC
- Light Tank
- Tank
- Heavy Tank
Airport (Flight)
- Airship
- Early Fighter
Military Airbase (Aviation)
- Fighter
- IL2
I can't give a % Health with a tech (How do you give a percent Health anyways. Percent of what, base health?), but I can give whole numbers of health at a tech. (So +1with Medicine)
Otherwise, looks fine.
Edit:
I would rename the Clone Pet shop to "RePet"
Seems good. I would name the new tech Interstellar Racing, but that's just me.
"RePet"? Ha! That's funny.
I like that name better! Also we should have some sort of sports for like boats and airplanes. I am just not sure what to call them yet or if they should have like "Boat Sports" or "Water Sports" any ideas?
Now, I'm working on these, but I'm stuck here. Filling Factory doesn't work, and Garrison doesn't seem right. Also, is Recruitment Center a new building? And, I think that the units under Filling Factory should go to the Recruitment center too.
Also, I'm thinking that the DryDock and Factory give too many units. I support the creation of a "Manufacturing Plant" or "Heavy Factory." Also, some sort of Seabase or Sea Unit factory (for lack of a better name) is needed.
One last thing. I'm extremely backlogged on requests here. It may take me a while to get to them.
Then the AI logic is suspect. I don't know much about this. Why don't you report your findings to the Better AI forum? The fixes will trickle down from their eventually.
Because RoM is the only mod which diverges from the resource is either health or luxury or strategic. That is what the AI knows and uses to decide what it will pay for stuff. So in RoM incense is strategic but not needed for units or buildings therefore it has no value. Whereas in other mods it is a luxury so has value.
But lets face it the Civ trade system just does not work with RoM and would require a complete rewrite to fix![]()
int CvPlayerAI::AI_bonusVal(BonusTypes eBonus, int iChange) const
{
int iValue = 0;
int iBonusCount = getNumAvailableBonuses(eBonus);
if ((iChange == 0) || ((iChange == 1) && (iBonusCount == 0)) || ((iChange == -1) && (iBonusCount == 1)))
{
//This is assuming the none-to-one or one-to-none case.
iValue += AI_baseBonusVal(eBonus);
iValue += AI_corporationBonusVal(eBonus);
}
else
{
//This is basically the marginal value of an additional instance of a bonus.
iValue += AI_baseBonusVal(eBonus) / 5;
iValue += AI_corporationBonusVal(eBonus);
}
return iValue;
}
//Value sans corporation
int CvPlayerAI::AI_baseBonusVal(BonusTypes eBonus) const
{
PROFILE_FUNC();
//recalculate if not defined
if(m_aiBonusValue[eBonus] == -1)
{
PROFILE("CvPlayerAI::AI_baseBonusVal::recalculate");
UnitTypes eLoopUnit;
BuildingTypes eLoopBuilding;
int iDiff;
int iValue = 0;
int iTempValue;
int iI, iJ;
if (!GET_TEAM(getTeam()).isBonusObsolete(eBonus))
{
iValue += (GC.getBonusInfo(eBonus).getHappiness() * 100);
iValue += (GC.getBonusInfo(eBonus).getHealth() * 100);
CvTeam& kTeam = GET_TEAM(getTeam());
CvCity* pCapital = getCapitalCity();
int iCityCount = getNumCities();
int iCoastalCityCount = countNumCoastalCities();
// find the first coastal city
CvCity* pCoastalCity = NULL;
CvCity* pUnconnectedCoastalCity = NULL;
if (iCoastalCityCount > 0)
{
int iLoop;
for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
{
if (pLoopCity->isCoastal(GC.getMIN_WATER_SIZE_FOR_OCEAN()))
{
if (pLoopCity->isConnectedToCapital(getID()))
{
pCoastalCity = pLoopCity;
break;
}
else if (pUnconnectedCoastalCity == NULL)
{
pUnconnectedCoastalCity = pLoopCity;
}
}
}
}
if (pCoastalCity == NULL && pUnconnectedCoastalCity != NULL)
{
pCoastalCity = pUnconnectedCoastalCity;
}
for (iI = 0; iI < GC.getNumUnitClassInfos(); iI++)
{
eLoopUnit = ((UnitTypes)(GC.getCivilizationInfo(getCivilizationType()).getCivilizationUnits(iI)));
if (eLoopUnit != NO_UNIT)
{
CvUnitInfo& kLoopUnit = GC.getUnitInfo(eLoopUnit);
iTempValue = 0;
if (kLoopUnit.getPrereqAndBonus() == eBonus)
{
iTempValue += 50;
}
for (iJ = 0; iJ < GC.getNUM_UNIT_PREREQ_OR_BONUSES(); iJ++)
{
if (kLoopUnit.getPrereqOrBonuses(iJ) == eBonus)
{
iTempValue += 40;
}
}
iTempValue += kLoopUnit.getBonusProductionModifier(eBonus) / 10;
if (iTempValue > 0)
{
bool bIsWater = (kLoopUnit.getDomainType() == DOMAIN_SEA);
// if non-limited water unit, weight by coastal cities
if (bIsWater && !isLimitedUnitClass((UnitClassTypes)(kLoopUnit.getUnitClassType())))
{
iTempValue *= std::min(iCoastalCityCount * 2, iCityCount); // double coastal cities, cap at total cities
iTempValue /= std::max(1, iCityCount);
}
if (canTrain(eLoopUnit))
{
// is it a water unit and no coastal cities or our coastal city cannot build because its obsolete
if ((bIsWater && (pCoastalCity == NULL || (pCoastalCity->allUpgradesAvailable(eLoopUnit) != NO_UNIT))) ||
// or our capital cannot build because its obsolete (we can already build all its upgrades)
(pCapital != NULL && pCapital->allUpgradesAvailable(eLoopUnit) != NO_UNIT))
{
// its worthless
iTempValue = 2;
}
// otherwise, value units we could build if we had this bonus double
else
{
iTempValue *= 2;
}
}
if (kLoopUnit.getPrereqAndTech() != NO_TECH)
{
iDiff = abs(GC.getTechInfo((TechTypes)(kLoopUnit.getPrereqAndTech())).getEra() - getCurrentEra());
if (iDiff == 0)
{
iTempValue *= 3;
iTempValue /= 2;
}
else
{
iTempValue /= iDiff;
}
}
iValue += iTempValue;
}
}
}
for (iI = 0; iI < GC.getNumBuildingClassInfos(); iI++)
{
eLoopBuilding = ((BuildingTypes)(GC.getCivilizationInfo(getCivilizationType()).getCivilizationBuildings(iI)));
if (eLoopBuilding != NO_BUILDING)
{
CvBuildingInfo& kLoopBuilding = GC.getBuildingInfo(eLoopBuilding);
iTempValue = 0;
if (kLoopBuilding.getPrereqAndBonus() == eBonus)
{
iTempValue += 30;
}
for (iJ = 0; iJ < GC.getNUM_BUILDING_PREREQ_OR_BONUSES(); iJ++)
{
if (kLoopBuilding.getPrereqOrBonuses(iJ) == eBonus)
{
iTempValue += 20;
}
}
iTempValue += kLoopBuilding.getBonusProductionModifier(eBonus) / 10;
if (kLoopBuilding.getPowerBonus() == eBonus)
{
iTempValue += 60;
}
for (iJ = 0; iJ < NUM_YIELD_TYPES; iJ++)
{
iTempValue += kLoopBuilding.getBonusYieldModifier(eBonus, iJ) / 2;
if (kLoopBuilding.getPowerBonus() == eBonus)
{
iTempValue += kLoopBuilding.getPowerYieldModifier(iJ);
}
}
{
// determine whether we have the tech for this building
bool bHasTechForBuilding = true;
if (!(kTeam.isHasTech((TechTypes)(kLoopBuilding.getPrereqAndTech()))))
{
bHasTechForBuilding = false;
}
for (int iPrereqIndex = 0; bHasTechForBuilding && iPrereqIndex < GC.getNUM_BUILDING_AND_TECH_PREREQS(); iPrereqIndex++)
{
if (kLoopBuilding.getPrereqAndTechs(iPrereqIndex) != NO_TECH)
{
if (!(kTeam.isHasTech((TechTypes)(kLoopBuilding.getPrereqAndTechs(iPrereqIndex)))))
{
bHasTechForBuilding = false;
}
}
}
bool bIsStateReligion = (((ReligionTypes) kLoopBuilding.getStateReligion()) != NO_RELIGION);
//check if function call is cached
bool bCanConstruct = canConstruct(eLoopBuilding, false, /*bTestVisible*/ true, /*bIgnoreCost*/ true);
// bCanNeverBuild when true is accurate, it may be false in some cases where we will never be able to build
bool bCanNeverBuild = (bHasTechForBuilding && !bCanConstruct && !bIsStateReligion);
// if we can never build this, it is worthless
if (bCanNeverBuild)
{
iTempValue = 0;
}
// double value if we can build it right now
else if (bCanConstruct)
{
iTempValue *= 2;
}
// if non-limited water building, weight by coastal cities
if (kLoopBuilding.isWater() && !isLimitedWonderClass((BuildingClassTypes)(kLoopBuilding.getBuildingClassType())))
{
iTempValue *= iCoastalCityCount;
iTempValue /= std::max(1, iCityCount/2);
}
if (kLoopBuilding.getPrereqAndTech() != NO_TECH)
{
iDiff = abs(GC.getTechInfo((TechTypes)(kLoopBuilding.getPrereqAndTech())).getEra() - getCurrentEra());
if (iDiff == 0)
{
iTempValue *= 3;
iTempValue /= 2;
}
else
{
iTempValue /= iDiff;
}
}
iValue += iTempValue;
}
}
}
for (iI = 0; iI < GC.getNumProjectInfos(); iI++)
{
ProjectTypes eProject = (ProjectTypes) iI;
CvProjectInfo& kLoopProject = GC.getProjectInfo(eProject);
iTempValue = 0;
iTempValue += kLoopProject.getBonusProductionModifier(eBonus) / 10;
if (iTempValue > 0)
{
bool bMaxedOut = (GC.getGameINLINE().isProjectMaxedOut(eProject) || kTeam.isProjectMaxedOut(eProject));
if (bMaxedOut)
{
// project worthless
iTempValue = 0;
}
else if (canCreate(eProject))
{
iTempValue *= 2;
}
if (kLoopProject.getTechPrereq() != NO_TECH)
{
iDiff = abs(GC.getTechInfo((TechTypes)(kLoopProject.getTechPrereq())).getEra() - getCurrentEra());
if (iDiff == 0)
{
iTempValue *= 3;
iTempValue /= 2;
}
else
{
iTempValue /= iDiff;
}
}
iValue += iTempValue;
}
}
RouteTypes eBestRoute = getBestRoute();
for (iI = 0; iI < GC.getNumBuildInfos(); iI++)
{
RouteTypes eRoute = (RouteTypes)(GC.getBuildInfo((BuildTypes)iI).getRoute());
if (eRoute != NO_ROUTE)
{
iTempValue = 0;
if (GC.getRouteInfo(eRoute).getPrereqBonus() == eBonus)
{
iTempValue += 80;
}
for (iJ = 0; iJ < GC.getNUM_ROUTE_PREREQ_OR_BONUSES(); iJ++)
{
if (GC.getRouteInfo(eRoute).getPrereqOrBonus(iJ) == eBonus)
{
iTempValue += 40;
}
}
if ((eBestRoute != NO_ROUTE) && (GC.getRouteInfo(getBestRoute()).getValue() <= GC.getRouteInfo(eRoute).getValue()))
{
iValue += iTempValue;
}
else
{
iValue += iTempValue / 2;
}
}
}
// int iCorporationValue = AI_corporationBonusVal(eBonus);
// iValue += iCorporationValue;
//
// if (iCorporationValue <= 0 && getNumAvailableBonuses(eBonus) > 0)
// {
// iValue /= 3;
// }
iValue /= 10;
}
//clamp value non-negative
m_aiBonusValue[eBonus] = std::max(0, iValue);
}
return m_aiBonusValue[eBonus];
}