[MODCOMP] 1492: Gold Rush

KJ Jansson

Prince
Joined
Oct 7, 2008
Messages
509
1492: Gold Rush


Current version 1.1

Changes in version 1.1

- AI is adapted to the new city warehose capacity,
- the goods that impossible to sell in Europe will be lost the first when the warehouse is full,
- fixed bug with water coloration of standart mapscripts.

Story
On an icy cold morning early in 1848, James Wilson Marshall, a carpenter from New Jersey, picked up a few nuggets of gold from the American River at the site of a sawmill he was building for John Sutter near Coloma. By August, the hills above the river were strewn with wood huts and tents as the first of 4,000 miners lured by the gold discovery scrambled to strike it rich. Prospectors, from the East sailed around Cape Horn. Some hiked across the Isthmus of Panama, and by 1849, about 40,000 came to San Franciso by sea alone. Nearly $2,000,000,000 in gold was taken from the earth before mining became dormant.

About:

I extracted from my "1492: Global Colonization" mod some elements and would like to present them as a separate [MODCOMP].

Why? There are two reasons:

- "1492: Global Colonization" mod is under development and is not ready yet for the publication.

- NeseryozniyVET published his "Amount Resources and New City Capacity" mod this summer. Unfortunately, he only downloadedhis very interesting mod on civfanatics.com and gave no comments or explanations how it works and how correctly to use it. TC01 in the treat "Quantity-based resource system?" tried to ask some details about "Amount Resources and New City Capacity" mod, however without success. Unfortunately, last months I was in a very long trip and have no possibility to read forum's messages. Some days ago I returned home and I decided to fullfil the lack of information.

As result I extracted from "1492: Global Colonization" all elements related to "Amount Resources and New City Capacity" mod, added some required details that are necessary for the explanations. All these elements I combined in a "1492: Gold Rush" minimod that I present as a separate [MODCOMP].

I hope this [MODCOMP] "1492: Gold Rush" will be interesting to both modders and players. This mini-mod is made as simple as possible, thus facilitating its integration into other modes.

All credits to NeseryoznijVET and Aymerick, whose mods I used for the compilation of my [MODCOMP].


The basic idea of a mini-mod:

The resources distribution in the original Civilization IV:Colonization is very strange and too far from the reality. Free available Iron on each hill, serious output from the tiles without real bonuses, etc. etc. Plus absolutely unlimited mineral resources (Iron, Silver) make the game too simple even for children. The players have no motivation to fight for the strategically important resources because such resources are available practically everywhere.

All these disadvantages of the original CivIV:Colonization are fixed in the "1492: Gold Rush" minimod. I especially added to this post some extra comments and screens that simplify understanding of general idea and explain how it was realized.


"1492: Gold Rush" contains the following new elements:

1. New distribution of all resourses (both mineral and vegetatives),
2. Two types of Gold deposits: hard rock gold mining and placer gold fields,
3. Limited and exhausted mineral resources (ore, silver, gold),
4. New logic in the Warehouse capacity calculation.


Details:

1. New distribution of all resourses (both mineral and vegetatives).

To understand what was changed I recommend to start a new game with Earth33.py mapscript and Huge size mapsize, then open the map in WorldBuilder. I give here no screen because everybody can do it very easily.

As you see, each Land tile has not more than three main resources; namely: x Food; y Wood, z Fur. No additional resources on bonus-free tiles. Some tiles in desert have no Food, Wood or Furs at all (x=y=z=0).

All mineral and vegetative bonus resources are concentrated only on the bonus tiles. Find such tiles, establish your cities near such bonus tiles, and you will have a constant and rich flow of these resources in your empire.

All non-mineral (vegetatives) resources are unlimited.

All mineral resources are limited (please, see p.3)

Information for modders:

The xml files located in ..... XML/Terrain/ directory are responsible for such distribution. Everybody can compare in Notepad++ the current and the original distributions.


2. Gold deposits: hard rock gold mining and placer gold field.

I introduced two type of Gold in "1492: Gold Rush" minimod. One of them is a traditional hard-rock gold deposits. The second one is a PLACER GOLD on goldfields located on the rivers (in this minimod Placer Gold appears only near the river).

Historically each discovery of new placer goldfield gives a start to new GOLD RUSH. I recommend to read a very interesting article in Wikipedia. Today one of such stories gives the name to this minimod.

Both types of Gold deposits are introduced as two different bonuses. Thus, here I tested here such combination: one YIELD_GOLD and two bonuses BONUS_GOLD and BONUS_PLACER_GOLD.

Spoiler :

I already used such schemes in "1492: Global Colonization. Resource Pack" for the Ivory


In next version of the "1492: Global Colonization" mod the similar schemes could be used for vegetable


and animal fibers.

Such combinations of different resources under one YIELD permit geographically correctly present distribution of similar-type resources. From one side Elephants, Camels or Cotton could not appear near the Arctic circle (it's very easy to correct through <iMinLatitude>0</iMinLatitude> and <iMaxLatitude>40</iMaxLatitude> tags in CIV4BonusInfos.xml), from another side the cities located in colder regions all the time will have access to more typical for these regions fiber materials (Flax or Sheep) or Ivory (Walrus).

Hard-rock gold appears on hills and the Gold mine increase the output from the Gold_bonus tile.
Placer gold appears only near the river.

Historically the panning techniques was used for the placer gold extraction.
Gold panning is mostly a manual technique of sorting gold. Wide, shallow pans are filled with sand and gravel that may contain gold. The pan is submerged in water and shaken, sorting the gold from the gravel and other material. As gold is much denser than rock, it quickly settles to the bottom of the pan. The panning material is usually removed from stream beds, often at the inside turn in the stream, or resting on the bedrock bed of the stream, where the density of gold allows it to concentrate. This type of gold found in streams or dry streams are called placer deposits.

Gold panning is the easiest technique for searching for gold, but is not commercially viable for extracting gold from large deposits, except where labor costs are very low and/or gold traces are very substantial. It is often marketed as a tourist attraction on former goldfields. Before production methods can be used, a new source must be identified. Panning is a good way to identify placer gold deposits so that they may be evaluated for commercial viability.

This technique is shown on "Panning Gold, California, 1849" by William McIlvaine (1813-1867) used as a title screen of this post.

I closed the possibility to construct Gold mine on Placer gold bonus tile. Each unit of any profession has equal output (or an equal chance to find gold). The professional Gold miner as more experiented unit has a little bit higher chance (higher output if Gold miner is working on Placer Gold bonus tile).

Information for modders:

Spoiler :
Gold as a new YIELD

Changed files are:
CvCityAI.cpp
CvEnums.h
CvPlayerAI.cpp
CyEnumsInterface.cpp

All places in the soure files are marked as

//MORE_YIELD_TYPES 05/05/09 Aymerick

All additions are similar to the "PlantationEconomy 0.09" mod by Aymerick.

RiverSide as a place where Placer Gold deposites could be found

Changed files are:
CvInfos.cpp
CvInfos.h
CvPlot.cpp
CyInfoInterface2.cpp
All places in the source files are marked as
// KJ: Placer Gold start
and
// KJ: Placer Gold end

I added a new tag in the CIV4BonusInfos.xml file
Code:
			<bRiverSide>1</bRiverSide>
This tag has 1 only for PLACER_GOLD bonus.


3. Limited and exhausted mineral resources (ore, silver, gold).

This is the most important part of the "1492: Gold Rush" minimod, therefore the main part of screens in this post is related to extracted mineral resources. Please, open the screens and follow my comments.

"1492: Gold Rush" minimod has two type of Gold deposits. A hard-rock gold deposit is shown of this screen.



Please, note. Turn 1. Underlined in red on the left "Gold (69)" means that Gold deposit on this tile has 69 units of Gold.

Second type of Gold is a Placer Gold deposit



Here we have only 41 units of Gold. Both deposits are marked as "Exhaustible bonus resource" (Underlined in red on the left)

Let's go on the City screen.



Send our Colonist to extract Gold from "Placer Gold deposit". His output is 1 Gold/turn.

Stop all our units and press 20 times the next turn button. Next stop: Turn 20.



Let's go to the map and check the situation with our Placer Gold deposit. According to the screen "Remaining placer gold = 22". We had 41 Gold on turn 1, thus 41 - 22 = 19. Our colonist should extract 19 gold during 20 - 1 = 19 turns. Let's check the city screen.



Ok, nothing lost! We can continue.....

Next stop on Turn 41.



Our colonist collected practically all gold from the placer gold field that now has only 1 Gold.

Next turn 42.



Red alarm message "Bonus return is exhausted. Placer Gold". The "Placer Gold" icon disappears from the map. Previously bonus tile has only wood and furs.

Let's open city screen.



Turn 42. We have 41 Gold in our city. As you remember the Placer Gold deposit had 41 gold on turn 1. All gold is collected. Now the colonist can work on this tile only as Lumberjack or Fur Trapper.

As you remember, we have a second gold deposit near our city. To speed up the process let's construct Gold mine on Gold-bonus tile and make a number of turns. We stop on turn 78 because now our Gold deposit has only 1 Gold (Underlined in red on the left)



Next turn, and the second Gold deposit is exhausted



Similar red alarm message, Gold icon also disappears from the map.

Now all available gold near our city is collected. Let's check the city.



We had 69 Gold in hard rock deposit and 41 Gold on Placer goldfield on Turn 1. 69 + 41 = 110. We have exactly 110 Gold! Nothing was lost or stolen! Great!

Interesting observations during testing:

Natives extract the limited resources (Gold, Silver, etc.) if the such bonus resources are located within the native city border. Native unit must work on this bonus tile to extract a resource. Very possible situation when such resource will be fully exhausted, If it is located too long inside the native city and the natives collect it. During testing I observed how placer gold bonus was fully exhausted by natives. Additionally I found the natives sell only a part of such resource. Where the rest? It's a good question. I don't know. You can ask a local leader by himself/herself.

Information for modders:

Spoiler :
Exhaustible bonus resources
Changed files are:
CvGameTextMgr.cpp
CvInfos.cpp
CvInfos.h
CvPlot.cpp
CvPlot.h
CyInfoInterface2.cpp
CyPlot.cpp
CyPlot.h
CyPlotInterface1.cpp

All places in the source files are marked as
// VET AmountResourses

Couple of new tags are added in the CIV4BonusInfos.xml file
Code:
			<iMinAmount>10</iMinAmount>
			<iMaxAmount>15</iMaxAmount>
Such tags are added for all mineral resources in the mod (Iron, Silver, Gold). I used such combinations of Min/Max:
Code:
		Iron		100/200
		Silver 		50/80
		Gold 		20/30
		Placer Gold	10/15
Everybody can adjust in Notepad++ these values as he/she want. Mineral resources could be made unlimited in quantity if these two tags will be removed from the corresponding section of CIV4BonusInfos.xml file.

Now all mineral resources in "1492: Global Colonization" mod - Clay, Ore (not Iron!!!), Coal, Saltpeter, Sulfur, Silver, Gold, Gems - now are limited and can be exhausted. Stone is only one exception.

4. New logic in the Warehouse capacity calculation.

"Amount Resources and New City Capacity" mod made by NeseryozniyVET has also one additional very interesting feature, namely a new logic in the Warehouse capacity calculation.

Original CivIV:Colonization we had a limit on the amount of EACH type of material, stored in a city warehouse. This created an absurd situation when a warehouse full of just one good (Tobacco, Cotton, etc). Now this moment is corrected.

Please, reopen the last image and read a green-color text.



City warehouse has 72 Wood + 110 Gold + 31 Furs = 213 units (in summary). Exactly such quantity we can see on the top of the city screen.

213 - is a current warehouse status
900 - is a maximal warehouse capacity

Food (78) as usually is exluded from the callulations.

Thus, now we can store in warehouse much more goods of the SAME type.

Information for modders:
Spoiler :


NB: Many changes in source codes in version 1.1, please check SDK in last version

All places in the source file are marked as
//VET NewCapacity
Check file GlobalDefinesAlt.xml (here you can ON/OFF this feature):

Code:
	<Define><!-- VET NewCapacity. Default: 0 -->
		<DefineName>NEW_CAPACITY</DefineName><!-- CvCity.cpp -->
		<iDefineIntVal>1</iDefineIntVal>
	</Define>

and GlobalDefines.xml (here you can adjust the warehouse capacity)

Code:
	<Define>
		<DefineName>CITY_YIELD_CAPACITY</DefineName>
		<iDefineIntVal>300</iDefineIntVal>
	</Define>

Download: here

Size: 3.3 Mb

Installation:

1. Unpack in \Mods directory.

Sample:
Spoiler :
C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization IV Colonization\Mods.
If Mods directory is absent, please, create it.
Correct location is here: C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization IV Colonization\Mods\1492 Gold Rush.

2. The loading through "Advanced" and "Load a Mod".

This is fully English version. Last official 1.01 patch must be installed to play "1492: Gold Rush".

I strictly recommend to use Earth33.py mapscript and Huge size mapsize when you play the "1492: Gold Rush" mod. Only few resourses could appear on maps of smaller size. Please, restart the game if some resources will absent.

Known bug: I have a very strange bug with water color on some mapscripts. Such bug is absent on Earth33.py mapscript. It's the reason why I recommend to use exactly Earth33.py mapscript. - FIXED in version 1.1

Final information for modders:

Source codes are included in the archive.

The modified source codes are collected in SDK directory.

All changes in the source codes are marked with markers. I used original markers of Aymerick, NeseryoznijVET and KJ Jansson.

All credits to NeseryoznijVET and Aymerick, whose mods I used for the compilation of my [MODCOMP].
 
Thx KJ, sounds awesome!!
Will try it out soon :goodjob:
 
1492: Gold Rush 1.1

Changes in version 1.1

- AI is adapted to the new city warehose capacity,
- the goods that impossible to sell in Europe will be lost the first when the warehouse is full,
- fixed bug with water coloration on standart mapscripts.
All credits to NeseryoznijVET and Aymerick, whose mods I used for the compilation of my [MODCOMP].
 
Top Bottom