Bonus for ALL Resources Mod - Ideas?

AW Arcaeca

Deus Vult
Joined
Mar 10, 2013
Messages
3,019
Location
Operation Padlock ground zero
So an idea we came up with in this thread from the Civ5 General Discussions Forum:

What if every resource - not just marble - produces a unique effect for your civ?

So what we have so far:
:c5food: FOOD:
Bananas -
Cattle -
Deer -
Fish -
Sheep -
Wheat -

:c5production: STRATEGIC:
Aluminum -
Coal -
Horses -
Iron -
Oil -
Uranium -

:c5gold: LUX:
Citrus - Increased range of sea routes?
Cloves -
Copper - +10% production of melee units?
Cotton -
Crab -
Dyes -
Furs -
Gems -
Gold -
Incense - 5% reduction for faith purchases
Ivory -
Jewelry -
Marble - +5% production towards wonders made of marble
Nutmeg -
Pearls -
Pepper -
Porcelain -
Salt - Increased range of sea routes?
Silk - Increased range of land routes
Silver -
Spices -
Sugar - +10% growth rate
Truffles -
Whales -
Wine - +5% GP generation

OTHER:
Stone - +5% production to wonders made of stone

Any other ideas?

I have an idea - what if you could get +15% production to wonders with both marble and stone? Like in civ4, where some wonders are built faster with stone and others built faster with marble. It certainly makes more sense to build Stonehenge faster with stone than with marble, at least to me. :p
 
Iron, maybe, could be used for modern/atomic era wonders, like the Eiffel tower or the pentagon or something.
 
Silk - Increased range of land trade routes
Sugar - +10% growth rates (If I recall growth rates applies to excess food, so I don't think this is too strong)
Wine - 5% great people generation
Incense - 5% reduction in faith purchases
Copper - I would change this to ancient era units, makes more since and 10% production for all including late seems very strong)

I don't know about doing something for everyone of them, maybe just the ones that don't already have a building or belief that strengthens them. For example Salt is already really strong (as a tile, and with "Earth mother." Even though the idea of increasing sea trade routes is very inspired, making salt stronger is likely not a good idea. I would focus on the ones that don't see much use and improvements to them only add gold.

If you are looking for help on this mod I would be willing to chip in, I'm coming to an end on my first mod project and am looking for something to work on. Have you looked into how to mod this?
 
Silk - Increased range of land trade routes
Sugar - +10% growth rates (If I recall growth rates applies to excess food, so I don't think this is too strong)
Wine - 5% great people generation
Incense - 5% reduction in faith purchases
Copper - I would change this to ancient era units, makes more since and 10% production for all including late seems very strong)

I don't know about doing something for everyone of them, maybe just the ones that don't already have a building or belief that strengthens them. For example Salt is already really strong (as a tile, and with "Earth mother." Even though the idea of increasing sea trade routes is very inspired, making salt stronger is likely not a good idea. I would focus on the ones that don't see much use and improvements to them only add gold.

If you are looking for help on this mod I would be willing to chip in, I'm coming to an end on my first mod project and am looking for something to work on. Have you looked into how to mod this?

modern ammo uses copper still
 
modern ammo uses copper still
Maybe +5%/10% combat to gunpowder units then?

Should nutmeg, cloves and pepper even get a bonus, since they're already unique to a civ?
 
Gold - x% or flat increase in incoming/outcoming Trade routes.

Ivory - +10% combat for pre-Industry land units. I don't know if ivory can be used as a weapon, don't know its maleability and resistance, though.

Spices - +1Food for land tiles already producing food. (it was used to remove the bad taste of food in near-spoil state)

Oil - +10% production to Atomic and later Wonders (something related to plastics, maybe?)
Oil - Increase movement in roads/railroads (Asphalt)

Cotton - +1 some yield for fishing boats (due to better fish nets)

Whales - +15% Production towards Armor units (kerosene)

Crab - -10% Growth Rate... ok, that was a bad joke. :(
 
Stone: 5% :c5production: Production towards Ancient-Medieval Buildings.
Well, what I was thinking was something like stone gives a bonus towards the pyramids, Stonehenge, Angkor wat... pretty much all the wonders actually made of stone, not marble. Then marble could give a bonus towards wonders like the temple of artemis, Parthenon, great library, etc.

Or, say we did stone gives 5% towards ancient/medieval wonders. So does marble then give a bonus (should probably also be toned down to 5%) toward classical/renaissance wonders?

And maybe copper can give a bonus towards the colossus and statue of liberty, as well as wonders with lots of wiring, like the great firewall and the hubble telescope and such.

Oh, and one more thing - I'm assuming these bonuses will be empire-wide, yes? No?
 
Well, what I was thinking was something like stone gives a bonus towards the pyramids, Stonehenge, Angkor wat... pretty much all the wonders actually made of stone, not marble. Then marble could give a bonus towards wonders like the temple of artemis, Parthenon, great library, etc.

Or, say we did stone gives 5% towards ancient/medieval wonders. So does marble then give a bonus (should probably also be toned down to 5%) toward classical/renaissance wonders?

And maybe copper can give a bonus towards the colossus and statue of liberty, as well as wonders with lots of wiring, like the great firewall and the hubble telescope and such.

Oh, and one more thing - I'm assuming these bonuses will be empire-wide, yes? No?
yeah, that might be a better Idea. :)
 
Gold - x% or flat increase in incoming/outcoming Trade routes.

Ivory - +10% combat for pre-Industry land units. I don't know if ivory can be used as a weapon, don't know its maleability and resistance, though.

Spices - +1Food for land tiles already producing food. (it was used to remove the bad taste of food in near-spoil state)

Oil - +10% production to Atomic and later Wonders (something related to plastics, maybe?)
Oil - Increase movement in roads/railroads (Asphalt)

Cotton - +1 some yield for fishing boats (due to better fish nets)

Whales - +15% Production towards Armor units (kerosene)

Crab - -10% Growth Rate... ok, that was a bad joke. :(
I like the idea of extracting kerosene from whales, but I think the time that armor units become available, oil is as well for the most part, making kerosene "obsolete".

Cotton, maybe It can be used for some kind of tundra/ice bonus (heavier clothing)? Or maybe fur can do that.

And if it makes you feel any better, I honestly didn't get the joke about crabs. ;)
 
So there doesn't seem to be any lua function remotely like Player.HasResource that I can find... so either we might have to do some C++ programming, or use invisible dummy buildings - which will probably only work if buildings requiring resources are not tied to only strategic resources.
 
So there doesn't seem to be any lua function remotely like Player.HasResource that I can find... so either we might have to do some C++ programming, or use invisible dummy buildings - which will probably only work if buildings requiring resources are not tied to only strategic resources.
that's the reason why i just want to help with this MOD. :)
 
Actually, it turns out that we can (at least for the most part) use XML, I'm pretty sure.

So we can do dummy buildings, with a <Building_ResourceQuantityRequirements> entry to make sure a resource is required, then a <Building_ResourceQuantity> entry to give the resource back, so there's no change in quantity. With the buildings then, we can add stuff like growth rates and GP generation.

Other effects will definitely require lua, but not all.

Maybe something like this (didn't check all the column names yet):
Code:
<GameData>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_DUMMY_WINE</Type>
			<DefaultBuilding>BUILDING_DUMMY_WINE</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_DUMMY_WINE</Description>
		</Row>
	</BuildingClasses>-<Buildings>
		<Row>
			<Type>BUILDING_DUMMY_WINE</Type>
			<BuildingClass>BUILDINGCLASS_DUMMY_WINE</BuildingClass>
			<Cost>-1</Cost>
			<Help>TXT_KEY_BUILDING_DUMMY_WINE_HELP</Help>
			<Description>TXT_KEY_BUILDING_DUMMY_WINE</Description>
			<Civilopedia>TXT_KEY_BUILDING_DUMMY_WINE_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_DUMMY_WINE_STRATEGY</Strategy>
			<ArtDefineTag/>
			<GreatPersonModifier>5</GreatPersonModifier>
			<GreatWorkSlots>-1</GreatWorkSlots>
			<MinAreaSize>-1</MinAreaSize>
			<ConquestProb>100</ConquestProb>
			<HurryCostModifier>15</HurryCostModifier>
			<IconAtlas>RESOURCE_DUMMY_ATLAS</IconAtlas>
			<PortraitIndex>0</PortraitIndex>
		</Row>
	</Buildings>-<Building_ResourceQuantityRequirements>
		<Row>
			<BuildingType>BUILDING_DUMMY_WINE</BuildingType>
			<ResourceType>RESOURCE_WINE</ResourceType>
			<Cost>1</Cost>
		</Row>
	</Building_ResourceQuantityRequirements>-<Building_ResourceQuantity>
		<Row>
			<BuildingType>BUILDING_DUMMY_WINE</BuildingType>
			<ResourceType>RESOURCE_WINE</ResourceType>
			<Quantity>1</Quantity>
		</Row>
	</Building_ResourceQuantity>
</GameData>
We'll probably have to add an entry for all the dummy buildings in <Civilization_FreeBuildingClasses> for all the civilizations though...
 
You can use Lua to check if a player has a resource, with Player.GenNumResourceTotal()
int Player:GetNumResourceTotal(ResourceType resource, bool includeImport)

I checked it already with this code:
Code:
	pPlayer = Players[0]
	amtWine = pPlayer:GetNumResourceTotal(26, false)
	print("amtWine", amtWine)

The resource type is an ID, you can get them all from the link on that page.

Like I said in my last post if you would like help with this mod I would be willing to work on it with you, I'm looking for something new to do.
 
Of course, you're completely welcome to help with this mod. But I think we'll still need a few more ideas for resource bonuses.
So if we're using lua this code should work then?
Code:
function WineBonus(playerID)
	local pPlayer = Players[playerID]
	local amtWine = pPlayer:GetNumResourceTotal(26, false)
	if (amtWine >= 1) then
	for pCity in pPlayer:GetCities() do
		pCity:SetNumRealBuilding(GameInfoTypes.BUILDING_DUMMY_WINE, 1)
	else
		pCity:SetNumRealBuilding(GameInfoTypes.BUILDING_DUMMY_WINE, 0)
	end
GameEvents.DoTurn.Add(WineBonus)
Alternatively, can't we use GameInfoTypes.RESOURCE_WINE instead of resource #26?
 
Yes, you can use GameInfoTypes.RESOURCE_WINE instead of the number 26 (It's better code too!). And that code looks good as long as the building is correct (you can remove the resource requirement now), you are missing a couple "end"s though.
 
So maybe then we can do something like this for stone (coding includes my list of wonders I think should get the stone production bonus; also, I'll probably have to double check the wonders' actual names)
Code:
function StoneBonus(playerID)
	local pPlayer = Players[playerID]
	local pCity = pPlayer:GetCities()
	local amtStone = pPlayer:GetNumResourceTotal(GameInfoTypes.RESOURCE_STONE, false)
	if (amtStone >= 1) and
	if pCity:IsProductionBuilding(GameInfoTypes.BUILDING_ANGKOR_WAT)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_BOROBUDUR)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_BRANDENBURG_GATE)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_CHICHEN_ITZA)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_GREAT_LIBRARY)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_GREAT_MOSQUE_DJENNE)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_GREAT_WALL)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_HANGING_GARDENS)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_MACHU_PICCHU)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_NEUSCHWANSTEIN)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_PETRA)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_PYRAMIDS)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_RED_FORT)
	or pCity:IsProductionBuilding(GameInfoTypes.BUILDING_STONEHENGE)
	then
		pCity:SetNumRealBuilding(GameInfoTypes.BUILDING_DUMMY_STONE, 1)
	else
		pCity:SetNumRealBuilding(GameInfoTypes.BUILDING_DUMMY_STONE, 0)
	end
GameEvents.DoTurn.Add(StoneBonus)
Not sure how well that will work, but we need some way to differentiate the bonus for stone and marble.
 
Back
Top Bottom