The Medieval Economy

I have it mostly worked out already. I need to make it obsolete yields also, that will be great for WH too. I stayed up late last night trying to figure this out so sluggish today:( when I get to work on this again I am going to add one extra control in that once the "Sold on Market" icon appears you just click on it to turn it off.

Was you doing those Bonus Icons? I am close to starting to do some test runs. I'd like to get any emidiate bugs worked out before I post a test version, that way you don't get flustered to early:)
 
Now it works:crazyeye::goodjob: When the city screen is first built it only displays the Yields that the player has knowledge of. When you research a new Yield it rebuilds the Resource Bar. When you open the City Screen, there is your new Yield. The Python already takes into account the number of yields for the size of Icons on the Resource bar so it auto resizes as needed. I had already took out the dynamic two row resource bar that Night had added so I could test using vanilla code and had planned to add it back, but with no more Resources we have now I will leave it like that for the moment; plus I am scared to mess up what I have done :)
I have been thinking of this from time to time without actually doing anything useful about it. Maybe it is a bit late now, but my plan was to make an array of allowed yields. In that array, the index is the onscreen location and the content is the yieldID. It's a fairly clean implementation and it works well with the Domestic Advisor.

As for the multiple rows: It wasn't that dynamic as it can switch the number of rows by changing a hardcoded value. This mean while it was a one line change, it would require a python edit and game restart.

I would love to make something, which assign yields in a more clever way than just yieldID. Say we have ore in the first row. Tools is made from ore, hence those two are linked. Tools will then automatically be put below ore and it would stick there even when new yields are invented. This would be a bit of a pain to set up, which mean I would have a go at auto configuring yield info data at game startup.

Maybe we could use a third row with yields used for (military) professions. CvPlayer is already aware of which yields that would be. I wrote a cache to keep track of that due to planned AI improvements.

There are some stuff, which we still need to figure out like what to do when two yields should be in the same location (build from the same yield) or if a yield requires two different yields to be produced.
 
I have been thinking of this from time to time without actually doing anything useful about it. Maybe it is a bit late now, but my plan was to make an array of allowed yields. In that array, the index is the onscreen location and the content is the yieldID. It's a fairly clean implementation and it works well with the Domestic Advisor.

That is basically what I done except I did it in the Python so it's not saved system wide. In Python they had the index and Yield then same and that caused the issues, so I separated them.

I would love to make something, which assign yields in a more clever way than just yieldID. Say we have ore in the first row. Tools is made from ore, hence those two are linked. Tools will then automatically be put below ore and it would stick there even when new yields are invented. This would be a bit of a pain to set up, which mean I would have a go at auto configuring yield info data at game startup.

Perhaps we could do like you did with buildings and add a iRow and iPlace values to YieldInfos. That way you could set Placement and what Row you want the yield to appear in the XML. You could set like Yields Over/Under each other really easy that way too.

PS disregard the PM as you obviously are aware of this post ;)
 
That is basically what I done except I did it in the Python so it's not saved system wide. In Python they had the index and Yield then same and that caused the issues, so I separated them.
It would be silly not to do this in python. I figure you had an easier time doing this than I did as I had to expose CvPlayer::canUseYield() to python.

Perhaps we could do like you did with buildings and add a iRow and iPlace values to YieldInfos. That way you could set Placement and what Row you want the yield to appear in the XML. You could set like Yields Over/Under each other really easy that way too.
The problem with X,Y placement is that it requires manual setup and isn't changeable at runtime. I would like a system, which requires minimal setup and it should adapt to changing civics. Essentially the rows should be calculated each time the city screen is opened. Since we are doing the calculations based on a specific city with a specific owner, we could adapt to all sorts of stuff at runtime, like buildings or city type.

Sure it would be nice to use the same for all cities, but displaying all yields in col2071 makes the room for each yield kind of small. WH has even more yields. Imagine something like uranium not showing up until a radioactive matter storage facility building has been built. If we have mutual exclusive buildings or a capped number of buildings in each category, we could make it impossible to make all yields appear in a single city. I'm not sure that is a good idea, but at this point I would like the engine to support a setup like that.
 
Well, I managed to get a little bit done today. The amount of goods you can sell is displayed next to a Trade Icon and next to the Fealty value at top of City Screen. This naturally changes as you add or subtract Units to the Trader's Stall. Also, there is a new button next to the Lock and Turn on Citizen automation buttons. This button will clear on sold goods in one click. When you double click a Resource it wil be added to the Market and an Icon will appear next to the Resource. If you double click again, or simply click new Sold on Market Icon it will stop selling.

I plan to perhaps edit the first post of this thread detailing all the New Economy features so we can better keep track of what is changed and what is in the plan.
 
One Boring Boar and a Bland Bison.

Editing the first post with what is in and coming is a good idea.

Sorry I didn't reply sooner, not been a day of feeling great for me.

I just had a look, and I think we can keep all the graphics of the trading post for the traders stall it looks good, what I meant before was just changing the name, mostly for conversation purposes :D
 

Attachments

  • Bonus resources.zip
    4.8 KB · Views: 32
One Boring Boar and a Bland Bison.

Editing the first post with what is in and coming is a good idea.

Sorry I didn't reply sooner, not been a day of feeling great for me.

I just had a look, and I think we can keep all the graphics of the trading post for the traders stall it looks good, what I meant before was just changing the name, mostly for conversation purposes :D

I have those in the game, thanks. I may convert them later to match the other Icons though in style. Anyway, I was wanting to add a new Graphic for the Trader's Stall just so it looks different than the Trading Post, that's why I mentioned the new art for it.

So, I've done some testing and tweaking and have a screen shot below. The plotgroup market system is pretty cool, and I am thinking of ways to make it more fun and useful. I am thinking, should we remove the current Trade Fair Screen and just have the PlotGroup Market? Then, The Trade Fair building could actually modify prices. And actually, other buildings and demands could modify prices. Right now the Price is set at a constant 50% of normal price, but we can increase this per YieldType through the above mentioned factors. We would t then have to rely on Foreign Markets and Trade Screen Markets for buying Resources, though, the whole game. Anyway, some things to think on.

 

Attachments

  • PlotGroup Market Help.jpg
    PlotGroup Market Help.jpg
    265.8 KB · Views: 353
The plotgroup values are set in XML and I just wrote something for testing purposes. The "Max Market" is the number of yields, which can be sold each turn. The default 2 is randomly picked and this number can be increased by buildings (not currently enabled by building XML). This is something, which needs balanced numbers at some point.

I wrote about this on the forum when I added the code, but I figure it would be a good idea to repeat here.
 
The plotgroup values are set in XML and I just wrote something for testing purposes. The "Max Market" is the number of yields, which can be sold each turn. The default 2 is randomly picked and this number can be increased by buildings (not currently enabled by building XML). This is something, which needs balanced numbers at some point.

I wrote about this on the forum when I added the code, but I figure it would be a good idea to repeat here.

If you haven't been keeping up with Lib's and I discussion I've added a new system that doesn't use the one you ported from R&R. This new one adds new functionality to the Trading Post buildings in that you can assign workers to that building and peddle your wares to PlotGroup Markets. The "Max Market" in this system is based on the Number of workers in the Trading Post and their Abilities. Prices and amount of Goods sold are currently based on the Type of Cites you have connected to the PlotGroup. Each City connected adds extra amounts sold. Prices are based on the best City price that is connected to the PlotGroup. So, if Wine can be sold to a Foreign village for 8 gold each then the price will be 8 gold. If there is no Foreign villages then the base price will be 50% of normal. We can add new effects to buildings in that they can increase base prices of goods.
 
I only ported the demands from RaR. The rest is custom made for M:C. However since we lacked a clear vision on how it should work at the time and there were at least as many mutually exclusive proposals as people, I ended up making a proposal, which was subject to change. However then nothing happened for quite a while :(

I have been meaning to read up on what you have been talking about, but since I didn't read it from the start, I all of a sudden had an ever increasing novel to read. I still plan to read it eventually as I feel it touches a core aspect of the game and is too important to not pay attention to.
 
Kail has stated the basics, but I shall try to give you a condensed run down, to help you grasp the majority of the concept.

Before:
There was not really much of a way to control or even tell how much stuff was getting sold on the plotgroups and where it was being sold from, and how much it was being sold for. There were the alert messages, but not really anyway to do anything with it, or change what was happening.

After:
Now we have the beginnings of a system that allows the player to take more control of plot group sales or at least to be able to more actively and easily influence it, and also know how to influence it.

They can control or influence 4 main things:
1. Number of Yields Sold e.g. Wine + Wool + Wood
2. Maximum Quantity of yields that can be sold in a turn. e.g. 10, 20 or 30 Wine.
3. Price of goods sold.
4. Which Yields they want to sell in a town.

Ways they can Influence these 4 main factors:
1. Max No. of Yields Sold is currently influenced by two things.
A. Level of Market Building (Stall, Market, Guild Hall) These each give +1 Yield Per worker. and each have an extra worker slot per level.
B. Number of workers and experts working at the Market Building. Normal citizens give +1 yield, and wily traders give +2, so a Guild Hall could sell a maximum of 6 Yields.

2. The Maximum Yield Quantity sold is increased by a number of things.
Number of Workers and Experts working the market building.
The more domestic towns connected to the plot group increases it.
If towns have (Stalls, Markets, Guilds) this increases more.
Connected Monasteries and Castles increase it by a small fixed amount (No market buildings to increase it).
Connected Foreign Cities increase it, and more so if it has a trade post.

My previously suggested quantities:
Spoiler :

I think you should sell 25 units per worker, Wily sells 50.
I think connected trade posts (the ones you put in foreign citys for gold) should increase it by 25
Each connected foreign city without a trade post should increase by 5 (just as a minor help)
Each connected domestic city should increase by 5.
Each connected domestic city with a 'market' building should increase by 10/15/25. (instead of the 5 from above, so it would add 5/10/20).
Monasteries and Castles should add 10 (no 'market' buildings allowed)


3. Price of goods is (I think) affected by 2 things right now, but more will be added (I think).
A. If a market is connected to only domestic sites, then goods are sold at half standard price.
B. If a market is connected to foreign cities, then goods are sold at the best foreign city price.
(I am not certain yet how these foreign city prices are set, I assume it uses the diplomacy code for determining goods values in trades?)

4. You can choose what yield you want a town to sell by clicking it in the yield bar, and you get the symbol appearing that shows it is being sold.

Other Misc. elements being discussed:

1. Monastery/Castle/Town Loops.
Having the three types of town connected together will introduce some kind of special 'bonus'. I am not clear on the details of what exactly this will be or how exactly it will work, but something like a price increase, or a culture or fealty boost to the selling town per sale, I think.

2. Fealty/Culture Boosts Market.
The more Fealty or Culture a City has, it will get a special boost to its trade power, maybe a percentage price increase, or quantity increase or something along those lines. So a highly developed City will be a better trade site than a tiny backwater village.

3. Buildings and Population Type/Quantity boost Sales.
We haven't really discussed this much in detail terms yet, but I think we both agree on the concept that different units and buildings will in some way affect markets. So that improving the quality of your population and buildings, will improve the income of markets.
Perhaps something like specific Units and Buildings improve the price of a specific yield. Peasants improve the rubbish goods, Artisans improve mid level goods, and Lux. Food Units like Nobles improve high end goods.

Merchant Version of Pilgrims:
I also mentioned briefly the idea of having a market building (or dock building) that would attract special 'spawned merchants or vessels' like the pilgrim, perhaps from towns with trade posts. That are attracted to these towns (like pilgrims to shrines) and when they arrive, they leave some gold and spice. (or some similar gain)

Some Randomisation in Prices/Quantities:
This was briefly mentioned by Kail, that as we develop the system, we can add a randomiser to the proceedings, so you won't always sell 10 wine for 10 gold each per turn, but there will be something like a percentage chance for the price/quantity to fluctuate in some way. This chance ca be improved or mitigated by the traders skills(future promotions system) and buildings, pop. types, etc.
I also floated this idea as a price fluctuation concept:
Spoiler :

If you want prices to fluctuate, perhaps we could set a globaldefine for price fluctuation.
Something like:
The price of a good will drop by 1 for every 1000 sold (both the price value 1 and the quantity value 1000 could be set in glaobal defines).
The price of a good will rise by 1 every 100 turns (again both values can be set in globaldefines)

This way if you sell vast quantities of wine every turn, the price will drop faster than it recovers, but if you diversify your economy (sell some ale here and some wine there) you will be more likely to keep the price at a decent value.


Trade Centre:
I also briefly floated the concept of in some way designating a trade centre in your empire, that would give trade benefits, and make it an important target in war, so if you can knock it out, you can really hurt your enemies economy and trade power.

I think that is more or less everything we discussed so far.
Kail can add anything he thinks I've missed or forgotten.

But this should give you a good 90% or more of the outcome of what we have discussed till now.
 
3. Price of goods is (I think) affected by 2 things right now, but more will be added (I think).
A. If a market is connected to only domestic sites, then goods are sold at half standard price.
B. If a market is connected to foreign cities, then goods are sold at the best foreign city price.
(I am not certain yet how these foreign city prices are set, I assume it uses the diplomacy code for determining goods values in trades?)

Nice work Lib, I'll clarity a few things. Plotgroups have a few arrays one holds the IDs of Foreign cities another holds Prices. When a plot joins or leaves a plot group it checks for a Foreign City. It also checks current prices with the new prices at the City. This can be modified/added to and set up to be pretty dynamic. We could perhaps merge this with the demands and other things to adjust prices and amounts so. This could be the beginning of a Simulated Medieval Economy. The Trade Screens would still be viable, just like in those times. Merchants traveled those great distances to get the Goods they couldn't get at home, and thus reap great rewards.
4. You can choose what yield you want a town to sell by clicking it in the yield bar, and you get the symbol appearing that shows it is being sold.

You "double click" to set to sell on the market:)

1. Monastery/Castle/Town Loops.
Having the three types of town connected together will introduce some kind of special 'bonus'. I am not clear on the details of what exactly this will be or how exactly it will work, but something like a price increase, or a culture or fealty boost to the selling town per sale, I think.

You can add an effect to Buildings in XML that will check for City Types, if it has at least one of each City selected (only one is counted for each type) connected to it of that type it will gain a bonus set in the XML. So, for a Commerce city, if you have a Military and a Monastery connected you can set a bonus.

2. Fealty/Culture Boosts Market.
The more Fealty or Culture a City has, it will get a special boost to its trade power, maybe a percentage price increase, or quantity increase or something along those lines. So a highly developed City will be a better trade site than a tiny backwater village.

Haven't added this yet but its a decent idea.


Merchant Version of Pilgrims:
I also mentioned briefly the idea of having a market building (or dock building) that would attract special 'spawned merchants or vessels' like the pilgrim, perhaps from towns with trade posts. That are attracted to these towns (like pilgrims to shrines) and when they arrive, they leave some gold and spice. (or some similar gain)

Yeah, this is the makings of a good idea to add more character to the game. After this next release and I deal with some other mods I promised to (TTW) I want to expand on the Event system. I want to make Pilgrims into an XML event instead of hardcoded. The Merchant Ship event above will be added also, perhaps when the ship arrives it offers the player some deal. I also want to create a new Event Screen that can handle better graphics and buttons. Lots of fun stuff there.

Some Randomisation in Prices/Quantities:
This was briefly mentioned by Kail, that as we develop the system, we can add a randomiser to the proceedings, so you won't always sell 10 wine for 10 gold each per turn, but there will be something like a percentage chance for the price/quantity to fluctuate in some way. This chance ca be improved or mitigated by the traders skills(future promotions system) and buildings, pop. types, etc.
I also floated this idea as a price fluctuation concept:

Yeah, this is something to consider as well. Not sure how it would effect the "feel" of the game as most things are a static value or production. We could add a randomness event to Production where certain events can modified increase/decrease production of any Yield. Like Bumper Crops, Famines, or other things.

Trade Centre:
I also briefly floated the concept of in some way designating a trade centre in your empire, that would give trade benefits, and make it an important target in war, so if you can knock it out, you can really hurt your enemies economy and trade power.

This could be centered around the Trade Fair in some fashion.
 
On market display at the top of the screen, could it be changed so that Max Market = the number of goods you can sell, and then add Max Yields to say how many yield types you can sell. At the moment I cannot tell what my market quantity is..

I see you fixed the 'first to research gets' problem. Nice one!

Do the effects of mints stack? so for each 1 you get an extra 0.5%? If so I need to get building them! :D

Also I am wondering if foreign trade posts should be better? Because now they absorb your unit, I don't feel enough motivation to plant them. I am wondering if they should produce something like 10 gold per turn, this means they would become profitable in 10 turns and they would equate to about the same as too dignataries in a court.
 
On market display at the top of the screen, could it be changed so that Max Market = the number of goods you can sell, and then add Max Yields to say how many yield types you can sell. At the moment I cannot tell what my market quantity is..

It actually already does, if you have cheats enabled and hold shift it will display that info. I'll make it visible always next update.

Do the effects of mints stack? so for each 1 you get an extra 0.5%? If so I need to get building them! :D

Yes, I do believe they stack.

Also I am wondering if foreign trade posts should be better? Because now they absorb your unit, I don't feel enough motivation to plant them. I am wondering if they should produce something like 10 gold per turn, this means they would become profitable in 10 turns and they would equate to about the same as too dignataries in a court.

Well, Missionaries have always absorbed your Unit, but they did give you one back eventually, so there should be some extra benefit to provide that "motivation" at the start. I always wait until I get Free Market so I don't lose the Unit permanently. So, yeah, we can brain storm some ideas here. Not sure if 10 gold per turn would be worth a Unit? Whats a Unit worth is the question? Early on they are cheap as you gain them quickly through migration. But they grow in worth exponentially. Maybe we can think of some other unique benefit to make it worth while, but not to powerful a benefit as with Free Market you get them back in 5 turns.

Speaking of "court" now that we have Peddler's Stall making gold I want to change the Courts to have another effect. I am thinking of introducing a new YIELD_LAW that has an effect on your Empire. I have mentioned this in some thread somewhere in more detail, will have to find it.
 
My thinking with the gold per turn, is in conjunction with the future of adding upkeep to certain things, in particular troops.

My current theory is that upkeep does not have to be large to be important.

Although it is easy to get a large chunk of gold, it is also easy to spend that large chunk of gold, and it will be several turns until you can get more (I am thinking primarily taking products to trade screens.)

Now upkeep would be taken every turn, so you have to be careful to keep some of your 'chunk in the bank' otherwise bad things will happen.

Now we have a lot of things that provide small amounts of gold every turn. Courts, domestic market, trade posts (if they were added), mint/bank income, etc.

These provide you with gold in a way that could be considered more valuable than a chunk, because you get it every turn and it can thus provide you with the 'administrative safety net' you need to make sure that your armies and infrastructure is properly maintained.

So we could have values something like this:

1 standard unit would cost 2,3 or 6 gold per turn.

These values would equate to 3, 2 or 1 units from a fully staffed court, and double if staffed by dignitaries. If we went with 6 gold, that would mean you would need a fully staffed court to maintain a permanent fully functioning garrison in a town.

An 'Honoured' Unit could cost double or more, as they are the nobility and expect a better level of supply.

So if a trade post would also add these constant funds, that would allow you to maintain a larger garrison. (Depending on the cost of troops, we could increase the income by a multiple of it, like 12 or 18 gold if cost 6.)

An armed peasant would cost nothing, because they are just well.. guys with pitch forks.

The two 'bad thing' ideas I have for units would be.
1. An 'Under Supplied' Promotion (Demotion) that adds(subtracts) -50% strength and lasts for 10 turns. (this could be applied to every unit in your army) [The exact negative and time span can be whatever]
2. X units that cannot be paid for are downgraded to armed peasants and lose all of their extra equipment. (Non-'Honoured' units first.) (I think this one presents more problems and has less logic, as equipment wouldn't simply evaporate)

A similiar effect can be added to any building that carries an upkeep, like high end production buildings etc. so if you miss your payment, all upkeep buildings become -50% Production for 10 turns.

The upkeep amounts don't have to be really high, like I said just 1-10 gold for different value things would be enough. This means if you don't have enough 'per turn income' and you overspend on construction, professionals and resources, you will be hit by a bad penalty, even if you fix it the next turn.

This then makes these small per turn amounts of gold really important, to ensure your empire stays at full strength.
It is less about keeping loads of savings in your bank to pay for massive upkeep every turn, and more about good, balanced administration of your empire, ensuring you have plenty of per turn income, to pay for your per turn costs. Adding new administration, taxation and local economy for every new unit or major industry you use.

This would also add the concept of a 'War Chest' to the game, where if you want to hire lots of troops for an invasion, you are going to need to store up plenty of gold, because if you run out half way through the war, your troops and economy will collapse.
 
Woar!! I just got my biggest vassal ever, size 6!! :D Best I have had before was 3...

I have managed to get about 4 or 5 vassals this game! Now I just need to get recruiting tax collectors!

And I am about to start mega trading on the Spice Route/Silk Road! I am gonna get so rich!!

As well as my first mint and a current bank balance of 10000! which will be another 50 gold per turn! :D

Kaching!!!
 
One thing I have noticed, is that tools are not really worth making anymore, they are one of the cheapest things you can by on trade screen, and with the scarcity of ore now, it really isn't worth wasting on tools.

I am finding myself coming to a point where it really isn't worth the effort to prospect and find ore, cause even when I do it runs out pretty fast..

I may as well just import weapons and tools..

Plate armour may make it worth it again.. but again I could probably jsut import the ore for the headache it is..
 
Well, the limited resources is untested, so the question is does it add to the strategic depth of the game or as you say, just become a headache? Or what can be done to make it more balanced and fun? I need to attempt a play through to the end myself and see how it goes, after I fix the hides/lux bug.
 
Yeah I think the concept of prospecting and limited resource might be too much when connected to ore..

For example I set up my first 'mining' town, and had I think 5 or 6 hills. I only got 1 source of ore, and it didn't seem to last very long, especially when trying to make tools and weapons, then I just had 2 or 3 expert miners doing nothing..

eventually I set up another ore town with again 4-6 hills and again only 1 source.. now I did only get to the first level prospect, and I should of had more workers employed prospecting and such probably, but it just got to the point where I could not be bothered prospecting for no results, and even when I got something it would never seem to last that long..

So I just kept having ore miners with no where to go. When already having a lot of towns and struggle to get them boosting fealty.
(Do we no longer have a newspaper style building that boost fealty? even with two pros I am struggling to get anything above 20% Fealty in my biggest town..)
I did not want to keep founding towns in the hopes of finding ore that doesn't give me much return..

Especially when I could just focus on making money and buy the weapons and tools and even plate armour from the Fair, that I need.

I am wondering if we could make it that hills produce say 1 ore, prospecting can increase that to greater levels, and maybe 'depleted' resources still produce 1 of whatever.

The hide/lux is not so big of a deal, because if you have unused trees you can get more by shuffling people around.

Ore is much harder, because unless you have an iron bonus (which seems rare and mostly in the 'silk road band' in the ice) which is how I got by most of the time, it just becomes a really time consuming, worker consuming (as in jobs they can do), but ultimately unrewarding (because it runs out so fast) undertaking.

Maybe it could be that prospecting will always improve Ore by 1 for each prospect level, but may give you one of the bonuses instead.
This way prospecting is never a wasted task, as you will gain a little something, and also has the potential to gain you a lot more.

(or maybe the possibilities of bonuses could be exclusive to the pro prospector, or perhaps just greatly increased, or has access to the bonus substance like copper, etc. as we talked before.)

For me this time, I just got bored.. prospect, fail, prospect, fail. ooh bonus yes! depleted... prospect, fail, prospect, fail...

The 'wins' felt short lived and the fails outweighed them.
 
Top Bottom