[MODCOMP] Slavery Market. The Orient. Port-Royal.

KJ Jansson

Prince
Joined
Oct 7, 2008
Messages
509
Slavery Market. The Orient. Port-Royal.
beta 0.1


About:
This mod is mainly based on the "Triangle Trade" mod by Dom Pedro II. I adapted a part of his old mod for Civ4Colonization with 1.01f patch, added two additional screens and made number of required changes and corrections. Later I plan to incorporate this mini-mod into a large "1492: Global Colonization" mod. However, now I am releasing it as a separate [MODCOMP]. This will facilitate its integration in the modes of other authors.


The basic idea of a mini-mod:

In the late 15th century the search of new naval ways to exotic "India" leds to the discovery of the New World. However, the true purpose of the search was just India, or in a more general case "The Orient" that particularly included regions that used to be known as Persia, Mesopotamia, Asia Minor, later South, Southeast or East Asia. By the late 19th century, the term usually referred to China, Japan, Korea and surrounding nations while the British colonists frequently used it when speaking of India.

New European colonies founded in the New World required a large number of cheap workers. Initially the flow of European settlers was very small. To fill this gap could "Slaves", which in large numbers began to import from Africa in the New World.

The development of European colonies in the New World opens the Golden Ages of of piracy in the Caribbean region. Port Royal founded in 1518 provided a safe harbour initially for privateers and subsequently for pirates plying the shipping lanes to and from Spain and Panama. Buccaneers found Port Royal appealing for several reasons. Its proximity to trade routes allowed them easy access to prey, but the most important advantage was the port's proximity to several of the only safe passages or straits giving access to the Spanish Main from the Atlantic.The harbour was large enough to accommodate their ships and provided a place to careen and repair these vessels. It was also ideally situated for launching raids on Spanish settlements. From Port Royal, Henry Morgan attacked Panama, Portobello, and Maracaibo. Roche Brasiliano, John Davis (buccaneer), and Edward Mansveldt (Mansfield) also came to Port Royal.

Unfortunately, all these very important elements are totally absent from the Civ4Colonization. This mini-mod partially compensates for this shortcoming.


"Slavery Market. The Orient. Port-Royal" contains the following elements:

1. Slaves and Slavery Markets

Slave:
- cannot Build Settlement;
- cannot be educated inside the city;
- can be Soldier; (this option is open for Slave unit because now "Slave" has no possibility to escape);
- requires 1 Food per day;
- produces +1 Food, Lumber, Silver, Cotton, Fur, Sugar, Tobacco and Ore comparing to the European colonist;
- produces -1 Cloth, Coats, Rum, Cigars;
- produces -2 Tools and Hammers;
- cannot produce Muskets;
- produces no Bells, Crosses, Education;
- can gain independence, if he will be trained by natives in any specialty in any native village.

Slavery Markets:
Slaves can be bought in Africa, the Orient and Port Royal. Very rare Slaves become available in Europe at very low price.

2. New screens: Africa, the Orient and Port-Royal

Africa is the main and permanent source of slaves for the New World. Some Europeans goods could be sold in Africa with a good profit. You can compare European and African prices and buy some goods in Africa.

The Orient: in current version this is also a source of Slaves. Only few Europeans goods could be sold on the Orient market with a good profit. You can compare prices on European and on the Oriental markets and buy some goods.
Later when new exotic Oriental good (silk, species, tea, porcelain) will be introduced in the "1492: Global Colonization" mod the Orient will be a cheap market, where such goods could be bough at rather low price. Then these Oriental goods could be sold in Europe with a very high profit.

Port-Royal: in current version this is also a source of Slaves, criminals. Taking into account the American origin of tobacco "Tobacco Planter unit" are also available in Port-Royal. Only in this city the player could buy Privateer ship. Some Europeans goods (Rum, Cigars, etc.) could be sold in Port-Royal with a very high profit.
Later Port-Royal will be a source of Pirate Captains and Buccaneers.

3. Loans

Possibility to loan some money at some procent. Very useful feature in the beginning when money are very limited.

4. Sell units in Europe

You can sell for instance your ship in Europe.

5. Slaves and Treasures cannot reveal map.

Both Slaves and Treasures can move only on already discovered territory. Absolutely crazy situations when one treasure can reveal all continent or even to "Speak with Native leader" here are fully excluded.


Download here:

File: Slavery_Market.rar
Size: 10124 KB

Buy option fix: View attachment Buy option fix.rar
Copy three files (CvAfricaScreen.py, CvAsiaScreen.py and CvPortroyalScreen.py) from this archive in ..../Slavery Market/Assests/Python/Screens directory. Older CvAfricaScreen.py, CvAsiaScreen.py and CvPortroyalScreen.py files will be exchanged on three new ones.
Now you could buy goods in Africa/Orient/Port-Royal. My special thanks to Androrc the Orc, who found the solution.

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\Slavery Market.
2. The loading through "Advanced" and "Load a Mod".

This is fully English version. Last official 1.01 patch must be installed to play "Slavery Market. The Orient. Port-Royal" mini-mod.


Next possible steps in mod development. Need help of modders!

1. Some improvement map generatiors used in the Civ4Colonization.
Sometimes not all new regions (Africa, Orient, Port-Royal) appear on the maps generated by standart A_New_World.py and Caribbean.py. I especially added in the PublicMaps directory Earth32.py, where practically all the time all new regions are available. Please, remember that "Europe" and "The Orient" are available in Northern hemisphere, Africa and Port-Royal in Southern hemisphere.

2. New possible options for Slaves.
At the moment the slaves have three available options:
- can work as Slave units with their +/- productivity (+ in food and raw materials output, - in the final goods production).
- can be educated inside native villages and thus gain his freedom and get new profession.
- can be cheap soldiers.

To my opinion some additional options for Slaves could be added.
For instance:

2.1. The possibility to escape from the city and to start destroy players improvements.
Example:
Spoiler :
Turn 1. The escaped slave left his working place inside city, appears on next to city tile and became enemy for the player.
Turn 2. The player has two possibility: or to send his armed unit (soldier, armed colonist or scout) and to catch the escaped slave with, for instance 50% on success; or let to his slave to run.
If the player don't try to catch his escaped unit, the slave can destroy the improvement on the tile where he is located at the moment. For instance, Farm, Mine, Plantation. etc.
Turn 3. The same options for player and slave. Or to catch slave and return him in his city, or the slave continue his actions. Etc.
Thus, we could create some problems for the player who use slaves. Some military units all the time must be in the city to prevent slave escapes and to catch slaves if they escape anyway. Algoritm of realization could be different, however, I guess the main idea is clear: Slave can escape and start destroy players improvements.
Of course, if "escape" possibility will be realized, the slave unit cannot be used as Soldier in the city.

2.2. The possibility to grant freedom to his slave for money.
The player could have some possibility to grant freedom for his slave despite this is historically incorrect for XVI-XVII centures. Of course, this action must cost some money, however, as bonus the player will have a free colonist plus probably will get for instance 50 or 100 free Bells.

3. New screen for Native (city) trading could be added.
Now we can only buy few goods from natives and sell them also some European goods.

Probably, somebody decide to make Native City screen, where we could exchange European goods on some goods from natives. Not to sell and to get money from local natives (why they have money? from where?), but naturally exchange, for instance: 1 tool = 5 furs or 5 tools =1 fur. This detail would be historically much more correct that the current variant.


Information for modders:

Spoiler :
Modified source codes are collected in CvGameCoreDLL directory and included in the archive.

All changes in source codes are marked with markers.

Markers of Dom Pedro II are

Code:
	/*** TRIANGLETRADE

My markers are

Code:
	/*** KJ ADDON START ***/
and
Code:
	/*** KJ ADDON END ***/
This version needs to be tested for stability and balancing. Everybody are welcome to join and participate in this mini-mod development and improvement.


Credits

My credits to Dom Pedro II for his old, but very interesting "Triangle Trade" mod and to Androrc the Orc, who found how to "Buy" goods in new cities.


Screens.

Main screen and new buttons



Europe



Africa



The Orient



Port-Royal



Game concepts


Africa:

The Orient:

Port-Royal:


Slave and his features



Loans



Idea of intercontinental trading.

 
A very interesting mod-component (looking forward to the first version of your main mod)...

I played around 100 turns with this component. Here is what I experienced (used the Earth 32 Script):

- Setup: I reduced open slots from 32 to 12, but somehow still ended up with multiplied civilizations (e.g. two Huayna Capacs)
- Interested rates for loans do not seem to get calculated correctly. The offer says (always? Or what factors influence the rate?) 4%, but in fact each turn you have an outstanding loan (I tried two times with sums slightly above 500), the debt increases by 1. thats approxametly an interst rate of 0,2% each year. I also wonder what affects your credit line.
- I was able visit Africa and the Orient by Ship. I haven't tried selling manufactured Goods there, but buying Slaves works as intended. Africa sold also IS and PC, Orient Farmers - is that intended?
- I had trouble with Port Royale - I didn't found the map tiles allowing me to get there
(the transfer zones at the eastern map edge don't work as announced - I can go to Europe from each and then from the northern one to Orient and from the southern one to Africa). So I did it the other way round - entered PR via "advisor", bought a Privateer, then tried to leave harbor - that crashed the game.

I have attached a save showing the problem. Just take a loan, go to PR via advisor button, buy Privateer, try to leave... Should be also good to make the interest issue happen...take loan, end turn, watch loan grow by 1.

Balancewise I think Slaves are very powerful, perhaps too powerful - a unit consuming only have the usual food is a tempting thing and as it is currently there seems to be no downside (except the comparative low one-time cost of 150 or 300). You can use them w/o a limit, there is no restricted supply...on the top they are better then normal units in ressource harvesting. I wonder if that bonus is really needed? I would suggest to add also a kind of revolt danger, if you go overboard with them in a colony.
 

Attachments

  • PortRoyalecrash1604.ColonizationSave
    429.2 KB · Views: 356
This is a very good addition to the base Civ4Col game. I'll see if I can come up with a solution to the not being able to buy yields in those screens. There is also a way to limit which yields appear in the screen, if you are interested (so that, for example, you wouldn't be able to buy fur Coats in Africa).

A very interesting mod-component (looking forward to the first version of your main mod)...

I played around 100 turns with this component. Here is what I experienced (used the Earth 32 Script):

- Setup: I reduced open slots from 32 to 12, but somehow still ended up with multiplied civilizations (e.g. two Huayna Capacs)
- Interested rates for loans do not seem to get calculated correctly. The offer says (always? Or what factors influence the rate?) 4%, but in fact each turn you have an outstanding loan (I tried two times with sums slightly above 500), the debt increases by 1. thats approxametly an interst rate of 0,2% each year. I also wonder what affects your credit line.
- I was able visit Africa and the Orient by Ship. I haven't tried selling manufactured Goods there, but buying Slaves works as intended. Africa sold also IS and PC, Orient Farmers - is that intended?
- I had trouble with Port Royale - I didn't found the map tiles allowing me to get there
(the transfer zones at the eastern map edge don't work as announced - I can go to Europe from each and then from the northern one to Orient and from the southern one to Africa). So I did it the other way round - entered PR via "advisor", bought a Privateer, then tried to leave harbor - that crashed the game.

I have attached a save showing the problem. Just take a loan, go to PR via advisor button, buy Privateer, try to leave... Should be also good to make the interest issue happen...take loan, end turn, watch loan grow by 1.

Balancewise I think Slaves are very powerful, perhaps too powerful - a unit consuming only have the usual food is a tempting thing and as it is currently there seems to be no downside (except the comparative low one-time cost of 150 or 300). You can use them w/o a limit, there is no restricted supply...on the top they are better then normal units in ressource harvesting. I wonder if that bonus is really needed? I would suggest to add also a kind of revolt danger, if you go overboard with them in a colony.

IMO if they are overpowered it would be better to make them consume 2 food, but not remove their bonus to resource harvesting. That is because them, as humans, should need the same food amount to survive as other colonists, and slaves historically were more productive than free farmers.
 
IMO if they are overpowered it would be better to make them consume 2 food, but not remove their bonus to resource harvesting. That is because them, as humans, should need the same food amount to survive as other colonists, and slaves historically were more productive than free farmers.

I understand what you mean, but then they would be very similar to converted natives. You could also perhaps solve the problem by modifying the complete food consumption model - define 2 food per turn as the barely minimum. All other units except slaves would consume more then that miminum - either all 3 or certain ones even 4 (academic specialists). That would create some difference between the units (and I think it wouldn't be so inaccurate in terms of of real history), but because of the higher nmumbers, the differences wouldn't be so be big (3:2 is 50% more, 2:1 100%). Of course that would require reworking tile yields as well - but I think it could be worth the trouble. Civilization Mods like DyP/RaR (Civ3) or RoM (Civ4) have this as a key feature and I think it contributes alot to their success.
 
I have found a solution for the not being able to buy yields in the screens. In CvAfricaScreen.py, change this:
Code:
		for iYield in YieldList:
			kYield = gc.getYieldInfo(iYield)
			#iSellPrice = playerEurope.getYieldSellPrice(iYield)
			#iBuyPrice = playerEurope.getYieldBuyPrice(iYield)
			iSellPrice = gc.getHandicapInfo(player.getHandicapType()).getAfricaYieldTradePrice(iYield)
			#iBuyPrice = (gc.getHandicapInfo(player.getHandicapType()).getAfricaYieldTradePrice(iYield)) * 2

			screen.addDDSGFC(self.getNextWidgetName(), ArtFileMgr.getInterfaceArtInfo("INTERFACE_EUROPE_BOX_PRICE").getPath(), xLocation - BoxSize, self.Y_RATES, BoxSize, BoxSize, WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT, iYield, -1 )
			screen.addDragableButton(self.getNextWidgetName(), gc.getYieldInfo(iYield).getIcon(), "", xLocation - BoxSize + (BoxSize / 8), self.Y_RATES + (BoxSize / 3), BoxSize * 3 / 4, BoxSize * 3 / 4, WidgetTypes.WIDGET_GENERAL, iYield, -1, ButtonStyles.BUTTON_STYLE_IMAGE )
			#szPrices = u"<font=4>%d/%d</font>" % (iSellPrice, iBuyPrice)
			szPrices = u"<font=4>%d</font>" %(iSellPrice)
			if not player.isYieldAfricaTradable(iYield):
				szPrices = u"<color=255,0,0>" + szPrices + u"</color>"
			screen.setLabel(self.getNextWidgetName(), "Background", szPrices, CvUtil.FONT_CENTER_JUSTIFY, xLocation - (BoxSize / 2), self.Y_RATES, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT, iYield, -1)

			xLocation += BoxSize

To this:
Code:
		for iYield in YieldList:
			kYield = gc.getYieldInfo(iYield)
			#iSellPrice = playerEurope.getYieldSellPrice(iYield)
			#iBuyPrice = playerEurope.getYieldBuyPrice(iYield)
			iSellPrice = gc.getHandicapInfo(player.getHandicapType()).getAfricaYieldTradePrice(iYield)
			iBuyPrice = (gc.getHandicapInfo(player.getHandicapType()).getAfricaYieldTradePrice(iYield)) * 2

			screen.addDDSGFC(self.getNextWidgetName(), ArtFileMgr.getInterfaceArtInfo("INTERFACE_EUROPE_BOX_PRICE").getPath(), xLocation - BoxSize, self.Y_RATES, BoxSize, BoxSize, WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT, iYield, -1 )
			screen.addDragableButton(self.getNextWidgetName(), gc.getYieldInfo(iYield).getIcon(), "", xLocation - BoxSize + (BoxSize / 8), self.Y_RATES + (BoxSize / 3), BoxSize * 3 / 4, BoxSize * 3 / 4, WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT, iYield, -1, ButtonStyles.BUTTON_STYLE_IMAGE )
			szPrices = u"<font=4>%d/%d</font>" % (iSellPrice, iBuyPrice)
			if not player.isYieldAfricaTradable(iYield):
				szPrices = u"<color=255,0,0>" + szPrices + u"</color>"
			screen.setLabel(self.getNextWidgetName(), "Background", szPrices, CvUtil.FONT_CENTER_JUSTIFY, xLocation - (BoxSize / 2), self.Y_RATES, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT, iYield, -1)

			xLocation += BoxSize

Then just repeat the process, doing the same changes I did, but for the other screens.

I understand what you mean, but then they would be very similar to converted natives. You could also perhaps solve the problem by modifying the complete food consumption model - define 2 food per turn as the barely minimum. All other units except slaves would consume more then that miminum - either all 3 or certain ones even 4 (academic specialists). That would create some difference between the units (and I think it wouldn't be so inaccurate in terms of of real history), but because of the higher nmumbers, the differences wouldn't be so be big (3:2 is 50% more, 2:1 100%). Of course that would require reworking tile yields as well - but I think it could be worth the trouble. Civilization Mods like DyP/RaR (Civ3) or RoM (Civ4) have this as a key feature and I think it contributes alot to their success.

I agree that there should be a difference in resource consumption between regular units and slaves. Given the many luxury good yields in Civ4Col, I think it would be even better if they, instead of food, were consumed by specialists in such a system. One idea is to implement a system kind of like in Imperialism 2: if the highly educated worker doesn't receive one luxury commodity in a given turn, he doesn't produce anything that turn.
 
I agree that there should be a difference in resource consumption between regular units and slaves. Given the many luxury good yields in Civ4Col, I think it would be even better if they, instead of food, were consumed by specialists in such a system. One idea is to implement a system kind of like in Imperialism 2: if the highly educated worker doesn't receive one luxury commodity in a given turn, he doesn't produce anything that turn.

Indeed, that's even better then using food consumption as difference. I always liked that part of Imperialism 2 especially :goodjob:
 
A very interesting mod-component (looking forward to the first version of your main mod)...

I played around 100 turns with this component. Here is what I experienced (used the Earth 32 Script):
Thank you for your comments.

- Interested rates for loans do not seem to get calculated correctly. The offer says (always? Or what factors influence the rate?) 4%, but in fact each turn you have an outstanding loan (I tried two times with sums slightly above 500), the debt increases by 1. thats approxametly an interst rate of 0,2% each year. I also wonder what affects your credit line.

I will check loan rates. Usually I have no problems with them. All data about loan are in the end of the GlobalDefines.xml file.

- I was able visit Africa and the Orient by Ship. I haven't tried selling manufactured Goods there, but buying Slaves works as intended. Africa sold also IS and PC, Orient Farmers - is that intended?

On the Orient you really can buy Professional Farmer. I especially added here the second unit just to show that for each new screen you can choose your special collection of units. I need this feature for the future where on the Orient I will have Silk and I could buy Silk Weaver only on the oriental market. The similar for Cacao Farmer in PR or Coffee Planter in Africa.

- I had trouble with Port Royale - I didn't found the map tiles allowing me to get there
(the transfer zones at the eastern map edge don't work as announced - I can go to Europe from each and then from the northern one to Orient and from the southern one to Africa). So I did it the other way round - entered PR via "advisor", bought a Privateer, then tried to leave harbor - that crashed the game.

I have attached a save showing the problem. Just take a loan, go to PR via advisor button, buy Privateer, try to leave... Should be also good to make the interest issue happen...take loan, end turn, watch loan grow by 1.

I could find all new regions on the save game you sent me. Just open map in WorldBuilder and inserted few ships on some different sea tiles in North and South hemispheres. Europe and The Orient must be on North, Africa and PR on South hemisphere.

I started the game from your save file without problems. I took loan (2843 + 565), go in PR and bought Privateer (-3000, remaining summa 408, and + 565 debt. Here everything OK). I can leave PR without problems, too. However, here I found one real error. Return time for your Privateer is 1032 turns!!! Why??? I have to check where is error....

Balancewise I think Slaves are very powerful, perhaps too powerful - a unit consuming only have the usual food is a tempting thing and as it is currently there seems to be no downside (except the comparative low one-time cost of 150 or 300). You can use them w/o a limit, there is no restricted supply...on the top they are better then normal units in ressource harvesting. I wonder if that bonus is really needed? I would suggest to add also a kind of revolt danger, if you go overboard with them in a colony.

Please, give your critical remarks about balance. Everything here is very easy to correct. Just edit some numbers in CIV4UnitInfos.xml in UNIT_SLAVE section.

This is a very good addition to the base Civ4Col game. I'll see if I can come up with a solution to the not being able to buy yields in those screens.

It would be absolutely GREAT ADDITION! I already explained on the last screenshot how this addition could be used in the future.

There is also a way to limit which yields appear in the screen, if you are interested (so that, for example, you wouldn't be able to buy fur Coats in Africa).

All yields will be visible on the screen. However, you can exclude some goods from the list price in CIV4HandicapInfo.xml. In such case these goods remained on the screen with red color ZERO prices. I prefer to leave all as is now and to sell Coats in Africa at very low (symbolic) price that to have red zeros. You can just remove Coat from African prices and see result.
 
I have found a solution for the not being able to buy yields in the screens. In CvAfricaScreen.py, change this:
Code:
		for iYield in YieldList:
			kYield = gc.getYieldInfo(iYield)
			#iSellPrice = playerEurope.getYieldSellPrice(iYield)
			#iBuyPrice = playerEurope.getYieldBuyPrice(iYield)
			iSellPrice = gc.getHandicapInfo(player.getHandicapType()).getAfricaYieldTradePrice(iYield)
			#iBuyPrice = (gc.getHandicapInfo(player.getHandicapType()).getAfricaYieldTradePrice(iYield)) * 2

			screen.addDDSGFC(self.getNextWidgetName(), ArtFileMgr.getInterfaceArtInfo("INTERFACE_EUROPE_BOX_PRICE").getPath(), xLocation - BoxSize, self.Y_RATES, BoxSize, BoxSize, WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT, iYield, -1 )
			screen.addDragableButton(self.getNextWidgetName(), gc.getYieldInfo(iYield).getIcon(), "", xLocation - BoxSize + (BoxSize / 8), self.Y_RATES + (BoxSize / 3), BoxSize * 3 / 4, BoxSize * 3 / 4, WidgetTypes.WIDGET_GENERAL, iYield, -1, ButtonStyles.BUTTON_STYLE_IMAGE )
			#szPrices = u"<font=4>%d/%d</font>" % (iSellPrice, iBuyPrice)
			szPrices = u"<font=4>%d</font>" %(iSellPrice)
			if not player.isYieldAfricaTradable(iYield):
				szPrices = u"<color=255,0,0>" + szPrices + u"</color>"
			screen.setLabel(self.getNextWidgetName(), "Background", szPrices, CvUtil.FONT_CENTER_JUSTIFY, xLocation - (BoxSize / 2), self.Y_RATES, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT, iYield, -1)

			xLocation += BoxSize

To this:
Code:
		for iYield in YieldList:
			kYield = gc.getYieldInfo(iYield)
			#iSellPrice = playerEurope.getYieldSellPrice(iYield)
			#iBuyPrice = playerEurope.getYieldBuyPrice(iYield)
			iSellPrice = gc.getHandicapInfo(player.getHandicapType()).getAfricaYieldTradePrice(iYield)
			iBuyPrice = (gc.getHandicapInfo(player.getHandicapType()).getAfricaYieldTradePrice(iYield)) * 2

			screen.addDDSGFC(self.getNextWidgetName(), ArtFileMgr.getInterfaceArtInfo("INTERFACE_EUROPE_BOX_PRICE").getPath(), xLocation - BoxSize, self.Y_RATES, BoxSize, BoxSize, WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT, iYield, -1 )
			screen.addDragableButton(self.getNextWidgetName(), gc.getYieldInfo(iYield).getIcon(), "", xLocation - BoxSize + (BoxSize / 8), self.Y_RATES + (BoxSize / 3), BoxSize * 3 / 4, BoxSize * 3 / 4, WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT, iYield, -1, ButtonStyles.BUTTON_STYLE_IMAGE )
			szPrices = u"<font=4>%d/%d</font>" % (iSellPrice, iBuyPrice)
			if not player.isYieldAfricaTradable(iYield):
				szPrices = u"<color=255,0,0>" + szPrices + u"</color>"
			screen.setLabel(self.getNextWidgetName(), "Background", szPrices, CvUtil.FONT_CENTER_JUSTIFY, xLocation - (BoxSize / 2), self.Y_RATES, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT, iYield, -1)

			xLocation += BoxSize

Then just repeat the process, doing the same changes I did, but for the other screens.
Unfortunately, you are wrong. Please, send your ship in Africa, add some money in your cash through WorldBuilder and try to buy something on African market. Impossible!

The codes you found is my attempt to add Buy option. I added these lines in CvAfricaScreen.py and multiply Buy prices 2. I check the possibility to use the same AfricaYieldTradePrice description for both sell and buy prices and to create difference between them only on CvAfricaScreen.py. As result here appears (* 2) value.

The problem is in the source codes where absent mechanism to Buy and to Load yield goods on the ship in Africa/Asia/Portroyal (I used these terms in source codes). I tried to create such mechanism as analog of "Sell" mechanics of Dom Pedro II, however without success. The solution should be very simple because Dom Pedro II made very simple mechanics to Sell goods in Africa. His solution is much easier than in European prices. But.....
 
Unfortunately, you are wrong. Please, send your ship in Africa, add some money in your cash through WorldBuilder and try to buy something on African market. Impossible!

I did, and it apparently worked :confused:

The codes you found is my attempt to add Buy option. I added these lines in CvAfricaScreen.py and multiply Buy prices 2. I check the possibility to use the same AfricaYieldTradePrice description for both sell and buy prices and to create difference between them only on CvAfricaScreen.py. As result here appears (* 2) value.

The problem is in the source codes where absent mechanism to Buy and to Load yield goods on the ship in Africa/Asia/Portroyal (I used these terms in source codes). I tried to create such mechanism as analog of "Sell" mechanics of Dom Pedro II, however without success. The solution should be very simple because Dom Pedro II made very simple mechanics to Sell goods in Africa. His solution is much easier than in European prices. But.....

I didn't just re-enable your attempt, I also changed this line:

Code:
			screen.addDragableButton(self.getNextWidgetName(), gc.getYieldInfo(iYield).getIcon(), "", xLocation - BoxSize + (BoxSize / 8), self.Y_RATES + (BoxSize / 3), BoxSize * 3 / 4, BoxSize * 3 / 4, WidgetTypes.WIDGET_GENERAL, iYield, -1, ButtonStyles.BUTTON_STYLE_IMAGE )

to:

Code:
			screen.addDragableButton(self.getNextWidgetName(), gc.getYieldInfo(iYield).getIcon(), "", xLocation - BoxSize + (BoxSize / 8), self.Y_RATES + (BoxSize / 3), BoxSize * 3 / 4, BoxSize * 3 / 4, [COLOR="Lime"]WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT[/COLOR], iYield, -1, ButtonStyles.BUTTON_STYLE_IMAGE )
 
I did, and it apparently worked :confused:



I didn't just re-enable your attempt, I also changed this line:

Code:
			screen.addDragableButton(self.getNextWidgetName(), gc.getYieldInfo(iYield).getIcon(), "", xLocation - BoxSize + (BoxSize / 8), self.Y_RATES + (BoxSize / 3), BoxSize * 3 / 4, BoxSize * 3 / 4, WidgetTypes.WIDGET_GENERAL, iYield, -1, ButtonStyles.BUTTON_STYLE_IMAGE )

to:

Code:
			screen.addDragableButton(self.getNextWidgetName(), gc.getYieldInfo(iYield).getIcon(), "", xLocation - BoxSize + (BoxSize / 8), self.Y_RATES + (BoxSize / 3), BoxSize * 3 / 4, BoxSize * 3 / 4, [COLOR="Lime"]WidgetTypes.WIDGET_MOVE_CARGO_TO_TRANSPORT[/COLOR], iYield, -1, ButtonStyles.BUTTON_STYLE_IMAGE )
Great! Worked! :goodjob: :goodjob::goodjob:

I'm idiot! :blush: I had only 1000 and this money was not enough to buy even cheapest wood (4x300=1200)

THANK YOU VERY MUCH, Androrc the Orc!!!!

I will fix now other screens and see result.

Conclusion: Buy option is working in all new cities. Buy option fix is added in the post #1
 
All data about loan are in the end of the GlobalDefines.xml file.

I had a look at the global defines here, but I wasn't able to understand all of the tags (which I would be highly interested in, as it is planned to introduce a loan feature in the German TAC Mod as well and your implementation seems to have everything):


<DefineName>MAX_INTEREST_RATE_INCREASE</DefineName>
<iDefineIntVal>10</iDefineIntVal>

Does it mean that the absolute maximum for the interest rate is 10 or does has it to do with how the interest changes?


<DefineName>MAX_LOAN_AMOUNT</DefineName>
<iDefineIntVal>2000</iDefineIntVal>

Probably the total maximum loan you can actively take?


<DefineName>LOAN_TIMER</DefineName>
<iDefineIntVal>5</iDefineIntVal>

Increase of max possible loan per turn?


<DefineName>MAX_GAME_PERCENT_FOR_LOAN</DefineName>
<iDefineIntVal>75</iDefineIntVal>

?


<DefineName>MAX_DEBT_FOR_LOAN</DefineName>
<iDefineIntVal>5000</iDefineIntVal>

Is it the maximum debt you can acculmulate without losing the game or suffering something else negative?


<DefineName>BASE_LOAN_AMOUNT</DefineName>
<iDefineIntVal>500</iDefineIntVal>

Must be the initial loan amount you can get at turn 0.


<DefineName>DEBT_GOLD_RATIO_FACTOR</DefineName>
<iDefineIntVal>10</iDefineIntVal>

?


<DefineName>LOAN_ASSETS_DIVISOR</DefineName>
<iDefineIntVal>500</iDefineIntVal>

?


<DefineName>BASE_INTEREST_RATE_INCREASE</DefineName>
<iDefineIntVal>5</iDefineIntVal>

? How does it relate to MAX_INTEREST_RATE_INCREASE?


<DefineName>SCORE_DEBT_DIVISOR</DefineName>
<iDefineIntVal>75</iDefineIntVal>

Something related to score?


Thanks in advance :)
 
I had a look at the global defines here, but I wasn't able to understand all of the tags (which I would be highly interested in, as it is planned to introduce a loan feature in the German TAC Mod as well and your implementation seems to have everything):

Some months ago when I included all these features from "Triangle Trade" mod in one of my "Model" mods, I checked each of these parameters. Now it's quite difficult to answer what means each of them. Now as far as I remember:

Code:
<DefineName>MAX_DEBT_FOR_LOAN</DefineName>
<iDefineIntVal>5000</iDefineIntVal>
This is a max loan that you can take in summary.

Code:
<DefineName>MAX_LOAN_AMOUNT</DefineName>
<iDefineIntVal>2000</iDefineIntVal>
Max loan you can take per 1 time.

Code:
<DefineName>BASE_LOAN_AMOUNT</DefineName>
<iDefineIntVal>500</iDefineIntVal>
This is a base or usual loan (just a part of MAX LOAN) you can take each time. On turn 0 you can take 500+5 (5 from where?) = 505.

Code:
<DefineName>LOAN_TIMER</DefineName>
<iDefineIntVal>5</iDefineIntVal>
This parameter means how often you can take loan. Not each turn, but 1 time in 5 turns.

Please, remember about max possible loan. Let's calculate one example:

If MAX_DEBT_FOR_LOAN = 5000 and BASE_LOAN_AMOUNT = 500 and LOAN_TIMER = 5 it means 5000/500 * 5 = 50 turns.

That is theoretically during about 50 turns you can take loans. One after another.

However, practically as I remember each time when you sell your goods in Europe or on new markets, you pay your debt at first, and only some remaining money go to you as a cash. But I personally never wait during even 10-15 turns to sell something. I sell my goods earlier and thus repay my debt. I cannot image that somebody could play a real game during about 50 turns and sell nothing.

Frankly speaking, maximum I take one-two loans in the beginning to buy Scout and then I have no more needs in loans at all. Probably in future I will introduce in my mod "Bank" or something similar and the possibility to take some loan/or credit from my main player at some % (something similar I had in Patrizier II). But not now...
 
Thanks KJ for your work on this. Somethinglike this is what I was wanting to add to my Privateers mod as well. I played for a few minutes and noticed a couple improvements that could be added at some point and some suggestions.

1. The Europe, Port Royal, etc, screens could have a tab that lets you jump to the Next "Port" screen much like you can tab to the next City while in the City Management screen. This would greatly lower the number of clicks required to check all your Units that are in port.

2. Automated commands for Sailing to the different Ports can be added. It may be fun to add a feature where the Player must first "discover" the routes to the verious ports and then the Automated Command appears. This command would send your unit to the nearest Ocean square to set sail on the High Seas, that way you don't need manually command your unit to sail to a tile with the route.

3. Maybe the "Port" screen buttons could all be grouped together starting at the top right corner running down the screen and then just leave all the other commands where they are. Thats just one suggestion I thought about.

I could do the coding for the Automated Commands when ever I get caught up on my other projects. Anyway, looking forward to this being developed further.
 
Somethinglike this is what I was wanting to add to my Privateers mod as well.
Yes, it would be absolutely great to combine two mods in one. Really, two types of "Slaves" are known and now both are available as two separated [MODCOMP]. These modes show two variants of "Slavery".

One of them are "Slaves" transported from mainly Africa in New World as a cheap labor force. Exactly as presented here. Such slaves have no professions at all and for them there is only one way to get freedom. To pass education in native village and to get some profession. Probably education time must be twice or even more extended. I proposed in post#1 to find how to grant freedom to such slaves, but I guess this is not necessary to do. If we decided to follow to the historical thruth, nobody who imported slaves from Africa granted them freedom after their arriving in New World. Thus, I guess we could close the question about freedom for such type slaves. However, the possibility to escape would be very interesting to add.

The second variant of "Slaves" are the captured by pirates Europeans colonists travelling in New World. They are presented in your Privateers mod. Some of these "Slaves" or maybe better "Captures Europeans" had the profession, thus they were already educated. Thus when you grant freedom to such "slaves" you pay money but you receive very professional worker.

There is also third type of "Slaves" that are captured in the battle, however, they could be included in one of two first types.

If both modes would be combined in one common, the "Slavery" would present in the game with documental accuraty.

1. The Europe, Port Royal, etc, screens could have a tab that lets you jump to the Next "Port" screen much like you can tab to the next City while in the City Management screen. This would greatly lower the number of clicks required to check all your Units that are in port.
I guess this switch could be done in Python. I will search in the codes where and how it was realized.

Please, remember the "Cross" system is absent in Africa/Orient/PR. You can only visit these cities and buy some units. The units here cannot be generated through crosses!

2. Automated commands for Sailing to the different Ports can be added. It may be fun to add a feature where the Player must first "discover" the routes to the verious ports and then the Automated Command appears. This command would send your unit to the nearest Ocean square to set sail on the High Seas, that way you don't need manually command your unit to sail to a tile with the route.

I could do the coding for the Automated Commands when ever I get caught up on my other projects. Anyway, looking forward to this being developed further.
I LOVE this idea! It would be really great.

However that is more interesting and important: to add this feature here or to combine both slavery-having mods in the big one and add such feature in this new mod?

3. Maybe the "Port" screen buttons could all be grouped together starting at the top right corner running down the screen and then just leave all the other commands where they are. Thats just one suggestion I thought about.
I also had the idea to group them together. I prepared even the World.dds button (you can find it in Top_button directory). But then I compared how many times I click a new city (Africa/Orient/PR) button and for instance Revolutionary/Foreigh/Military Adviser. Ratio was something 100:1-2. As result Revolutionary/Foreigh/Military Adviser buttons disappeared from the screen.
 
Yes, it would be absolutely great to combine two mods in one. Really, two types of "Slaves" are known and now both are available as two separated [MODCOMP]. These modes show two variants of "Slavery".

One of them are "Slaves" transported from mainly Africa in New World as a cheap labor force. Exactly as presented here. Such slaves have no professions at all and for them there is only one way to get freedom. To pass education in native village and to get some profession. Probably education time must be twice or even more extended. I proposed in post#1 to find how to grant freedom to such slaves, but I guess this is not necessary to do. If we decided to follow to the historical thruth, nobody who imported slaves from Africa granted them freedom after their arriving in New World. Thus, I guess we could close the question about freedom for such type slaves. However, the possibility to escape would be very interesting to add.

The second variant of "Slaves" are the captured by pirates Europeans colonists travelling in New World. They are presented in your Privateers mod. Some of these "Slaves" or maybe better "Captures Europeans" had the profession, thus they were already educated. Thus when you grant freedom to such "slaves" you pay money but you receive very professional worker.

There is also third type of "Slaves" that are captured in the battle, however, they could be included in one of two first types.

If both modes would be combined in one common, the "Slavery" would present in the game with documental accuraty.

I was wanting to seperate out the Slavery part of the Privateers mod but just haven't had the chance yet to do that. When I get the chance and have it working as a seperate mod then maybe we can combine the two into a "complete" slavery mod :)
 
good mod, i like multiple europes bu some map scripts only generate travel zones for europe and orient without africa and port royal - i like it overall, and i wish it were combined with some of the modcomps like invntor
 
good mod, i like multiple europes bu some map scripts only generate travel zones for europe and orient without africa and port royal - i like it overall, and i wish it were combined with some of the modcomps like invntor

I made this mod to work on real Earth map through scenario, where all "travel" zones (Europe, Africa, Orient, Port-Royale) are strictly determined. You can see this post. Here I explained how to travel from Europe in New World and back.

In this [MODCOMP] I used only Earth32.py script to generate very draft Earth map and I could see all travel zones in WorldBuilder. Sometimes they were very small (1-3 tiles in size). I especially excluded other scripts from this [MODCOMP].

"Slavery Market. The Orient. Port-Royal" will be included in my main mod "1492: Global Colonization". However, earlier some elements from this [MODCOMP] will be implemented in "Religion and Revolution" mod.

You and everybody are free to combine this [MODCOMP] with any mods you like.
 
keep your eyes on 2071 mod, a nice work of deep space tiles is in the works and why does this matter to your mod? imagine a big world - like Rhyes, where most boats use europe zones to navigate continents because ocean and deep ocean are different. then some boats (king boats from europe for instance) would be able to travel across the mighty ocean without europe zones. seems dynamic and if incorporated in such a way could be beneficial.

also, asking permission to use any components required of a mod project i am starting. for now, i dont have enough knowledge to know what i would want to use or how to implement it but i hope to figure it out.
 
and your europe idea is a little different than mine, think like an a RPG game on the world map, you enter a town and a new zone is loaded.

So, you enter europe zone and sail. then you re-appear on a new "map zone" with an artificial europe built, one capital city for each european major power where they would launch their REF from.

this opens the possibility of taking revolution a step further - sack the capital and become a king in europe. there would be no settling in my europe - and there would be only pre-built cities and improvements. using this, each capital would generate it's own resources as a legitimate city. each europe city would have a few resources it produced in abundance and a few it had none of and needed.

this would also allow the economy to be rethought but i wont go into any of that now.

simply that europe, instead of taking your ship to a trade gump - takes your ship to a preconstructed map of europe where you can visit foreign capitals to trade as well as your own.
 
Top Bottom