Custom House mod

fmiracle

Warlord
Joined
Sep 25, 2008
Messages
117
Let's publish my first colonization mod. The one adding the functionality similar to Custom House of original Colonization.

For those who do not know, Custom House is building that allow you:
1. sell goods to Europe automatically without manual loading galleons, that becom quite boring in the middle-last game, espetially if you prefer building huge colonies.
2. and allow you to trade even boycotted goods (in new Colonization, in opposition to old one boycott is absolutely permanent... But I do not like anything too permanent :) ).

Alas, It's really possible to make something like Custom Hose in new Colonize - each building have tag "iOverflowSellPercent" in xml files. This tag allow building to sell goods, that are exceed it's store capacity. Warehouse expansion utilizes this tag. Set it to 100 and buliding will sell exceeds at full cost.

But. There is some troubles with such approach:
1. Goods will be not sold at once - they will 'decay' by few percents each turn.
2. Traded goods to not affect European prices, taxes and do not generate trade Founding Fathers points.
3. Boycotted goods still can'be traded.

So, I decided some changes are needed here. Because I am pretty new in modding, I did not add any new tags to building, but rewrite the processing of existing "iOverflowSellPercent" tag.
So now any building that have this tag will:
1. If stores of ANY yield except food in city exceeds it's maximum capacity the exceed will be sold in Europe for "iOverflowSellPercent" percents of it cost, except taxes.
2. Boycotted goods also be sold, but at half of it's price (i.e. half of "iOverflowSellPercent" percents of it's price in Europe, counting taxes)
3. Traded goods will apply to calculations of prices in Europe, new taxes and generation of trade FF points.
4. All goods except foods can be sold, if it exceed maximum capacity, whatever it was produced in city or imported.
5. I did not test it yet, but it must be also tradeable during WoI (at half price). Still need to think how it's correspond with new Constitution model.

After making this change I removed from warehouseExpansion the ability to sell items to Europe and implement new building Custom House that have "iOverflowSellPercent"=100.

So now, any colony with Custom House will sell any excedes of it's maximum store of goods (300) directly to Europe.

Calculations for example.
1. You have tax 10%, price of cotton is 6, price of tobacco is 6 and tobacco is boycotted.
2. You have 290 cotton in store and 290 tobacco in store.
3. You yield 20 cotton and 20 tobacco. So in store were be 310 of each
4. Custom House will sell 10 cotton and 10 tobacco at the end of turn.
5. You'll recieve 54 gold for cotton (60 - 6gold tax) and 27 for tobacco (60 - 6gold) divide by 2 for boycotted good.

300 tons will always stay in colony and can be used for processing or trading with natives and other players.

As here is no required FF and Custom House is a feature of late-period game I made it costly:
1. 750 hammers and 300 tools.
2. require WarehouseExpansion and Shipyard
I was intended to made it require some level of rebel sentimens but did not catch how to do it yet.

I have no any skills in drawing, design or animation, so I used arts from Warehouse Expansion with no any change.

I am sure it is needed some balancing yet, but let's try it now.

P.S. As far it's my first mod, so if there will be any troubles let me know.
 

Attachments

  • CustomHouse Civ4Col Mod.zip
    2 MB · Views: 1,763
Once you build a Lumbermill you can build the warehouse and the warehouse expansion. The Expanded building automatically sells overflow directly although at half the european rate. Maybe make your mod change this to full rate.
 
Once you build a Lumbermill you can build the warehouse and the warehouse expansion. The Expanded building automatically sells overflow directly although at half the european rate. Maybe make your mod change this to full rate.

Oh,read again what I wrote at the topic. I know my English is bad, but I really tried to explain.

WarehouseExpansion in game as is, even with full-rate prices, have next problems:
1. It sell only decoyed goods (a few percents from exceeds), so, if you generate goods fast enough it's actually amounts can grow.
2. No boycotted goods can be sold.
3. It does not generate FF trade points.
 
Oh. There now is separate forum for ready mod and components... How is it possible to move this thread there?
 
First of all I have to say that this is a great idea. I really miss the custom house.

Will it be possible to turn the sale of a specific good off like in the old game?

I also seem to remember something about the custom house selling down to a fairly low level before stock levels would build up again, which gives you a better cash flow. Are you going to try to implement this feature as well?
 
Will it be possible to turn the sale of a specific good off like in the old game?

I also seem to remember something about the custom house selling down to a fairly low level before stock levels would build up again, which gives you a better cash flow. Are you going to try to implement this feature as well?

I hope to make it possible manually select what goods must be sold and what must not. Also I wish to allow player manually select what minimum level of each goods must be kept intact.

Sadly, it requires many interface changes. And I did not know at all how to change interface in mod at all. And I did not know how to mod's own save data..
When I study it I'll do such changes.

It will be very nice if somebody help me with interface, through. I am very poor in drawings...
 
As a person with no modding experience I'd like to ask: If one wanted to incorporate the Custom House into another mod would it be enough to copy the XML\Buildings folder to that mod?
 
As a person with no modding experience I'd like to ask: If one wanted to incorporate the Custom House into another mod would it be enough to copy the XML\Buildings folder to that mod?

In common - no it will be not enough. I was forced to rebuild cvGameCore.dll to make it functional.
So, if your another mod:
1. does not use it's own cvGameCore.dll
2. does not overlap with XML files in my CustomHouse mod (there is not only XML\Buildings, but also XML\Text - civilopedia and messages)
then you can incorporate it with just copy. But I suspect you will have at least some overlappings, if your mod is something more then few changes in GlobalDefines.xml.

If you have only overlapping XML files you can merge them with tool like WinMerge of DiffMerge - it's pretty easy.

If your mod have it's own gamecore.dll (Assets/cvGameCore.dll) then you need to merge it's sources (in C++) with my ones and rebuild it...
 
The import/export functions of a town might give you an interface workaround. Logically it would make sense for the same goods to be shipped out of the custom house as would normally be exported by the automated trade routes system.

Also I have question... the Origins mod is unable to alter the building .xml successfully. I've tried merging the mods but I wind up running into this same problem. The custom house does not show up, nor do my changes to the warehouse expansion.. but they are in the file. How is it that the Custom House mod can alter this .xml but not the Origins mod? How do I make this work?
 
The import/export functions of a town might give you an interface workaround. Logically it would make sense for the same goods to be shipped out of the custom house as would normally be exported by the automated trade routes system.

I had though about import/export intergration. While this solution is not fully perfect (it's possible you need export tools of guns to other cities, not Europe), I suppose to implement it when will have free time.

Also I have question... the Origins mod is unable to alter the building .xml successfully. I've tried merging the mods but I wind up running into this same problem. The custom house does not show up, nor do my changes to the warehouse expansion.. but they are in the file. How is it that the Custom House mod can alter this .xml but not the Origins mod? How do I make this work?

You need to merge all files:
1. Assets\XML\Buildings\CIV4BuildingInfos.xml
2. Assets\XML\Buildings\CIV4BuildingClassInfos.xml
3. Assets\XML\Text\CIV4GameText_Colonization_Pedia.xml
4. Assets\XML\Text\CIV4GameText_Colonization_Objects.xml

AND you need to have my GameCore.dll (or merge sources with your one).
 
Hi fmiracle!

I'm new here and I have search for a mod with the classic Custom House and find yours (soon a year old thread and mod).
I have the patch 1.01 installed and when I start your mod I get several XML load error, for ex... failed loading XML file [path]/CIV4HandicapInfo.xml (some value is invalid).
Is it possible that it depends with the patch or something else? Other (newer) mod's works excellent.
 
Hi fmiracle!

I'm new here and I have search for a mod with the classic Custom House and find yours (soon a year old thread and mod).
I have the patch 1.01 installed and when I start your mod I get several XML load error, for ex... failed loading XML file [path]/CIV4HandicapInfo.xml (some value is invalid).
Is it possible that it depends with the patch or something else? Other (newer) mod's works excellent.

Mods from before the patch rarely will work after the patch, sorry.
 
Another thing that would be nice is if you could pay back taxes on boycotted goods like in COL1.

As far as the custom house, perhaps boycotted goods need to have their prices set on a percent of what the other european players buy/sell those goods for...
 
The custom house was a nice feature of the original game, although it required having Peter Stuyvesant in Continental Congress. The founding fathers dynamics have changed, which makes the current game more exciting imo. But this feature also removes what was, in COL1, a nice logical progression away from micro-management, which became a godsend as your new nation grew in size.

The problem with the current game is that once your goods are boycotted then that's it: your warehouse expansion is useless and your boycotted goods will be lost each turn. This is a stupid move because, along with the unbelievably overpowered build-up of the King's forces, it means he truly does have you by the balls in every single way. This imbalance removes a big slice of what made the original game fun. Having to manually load all boycotted goods and trying to sell them to natives is unbelievably boring; the custom house removed most of this repetitive manual trading stuff from the mid-late game, allowing you to focus on the fun elements like building up huge colonies and armies! Having to micro manage 30 colonies when there's so much else going on is a major turnoff.

For these reasons, I've decided to try to have a go at making a post-patch mod for this essential building. I have no idea whether or not it will work out but there's only one way to find out!
 
I've been thinking about this a bit myself.

The CH should sell around the boycotts since the goods are sold in the New World anyway. There is no telling where in the Old World they will end up.

There should be no taxes either again since they are not being sold in the Old World.

Control of what is being sold and how much of it is being sold would be nice but it is not critical. If everything over 300 is being sold that would be manageable I think.

The spoilage over 300 is an issue. Stuff shouldn't spoil before it is sold off.

The price is a big issue though. I know it is one that is easily changed in the XML, but a good case exists for the 50% of the price in Europe argument. Typical middleman markup on goods is about 100%, sometimes more. The merchant who buys from the CH and then takes it to Europe (or where ever) to sell it has to buy a ship, hire a crew, buy provisions etc.

So a price of somewhere around 50% seem reasonable and fair. Even if it isn't what the CH did in the old game. When I first saw the CH in the AOD and AoFD mods I immediately changed the price to 100%. After thinking about it for a while though, I concluded that 50% - 60% is more reasonable. At 60% you could forget about the spoilage problem since you would be getting the same income (or a little more) than you would if you had 50% and no spoilage. (That's just a rough guess).
 
I updated fmiracle CustomHouse to work on version 101, build 1.0.0.1 of Steam (probably works on standalone version), well, now it loads, not tested if it works right =)
 

Attachments

  • CustomHouse.zip
    2 MB · Views: 732
Top Bottom