PDA

View Full Version : Food buildings



alpaca
01-15-2008, 22:59
This is mostly an excerpt from a post about a system for handling population growht a bit more interestingly that I derived from an idea of the EB team. They gave me their ok to put it into the mod, but I nevertheless decided to present the system to them beforehand. I didn't go into too great detail about it, but the basic layout is mostly there and implemented. Since my computer broke a while ago, I can't finish it right now, but this will probably the first thing I do when I'm back on track (unfortunately, this will also be after my exams so probably not before the middle or end of February):

Ok, first of all I decided that I wanted a bit control about how large a settlement can grow at all because I don't like totally unhistorical huge cities in areas that wouldn't actually be able to support them. Therefore I implemented a growth_level tree, ranging from 0 (tiny) to 5 (moloch).

It is important to know that in II, I'm implementing the city/castle split as a urban or rural focus for a province. Urban provinces will be focused on the city while rural ones will focus on the countryside.
For the food system, this means that urban settlements will capitalize on your import idea while rural provinces will get more food production and export capabilities. Consider the tech tree below:

https://img183.imageshack.us/img183/8863/foodstuffae3.png (https://imageshack.us)


First a legend: Blue text means rural, green means urban (black is both); the small roman numbers are the required growth level for the building; a stroke-through line means an upgrade in the same building, a dashed line means an "and" requirement while a dotted line means an "or" requirement.

The general system works (for those who are familiar with it) like my authority feature: The player will have a "national food pool" which is increased by export buildings and decreased by import buildings. If the food pool is negative, I will trigger a starvation event for the whole nation until the player destroys some import buildings or creates more export buildings. A second option which I didn't yet experiment on is the chance to establish trade deals to import food from other factions (e.g. in II the Venetians would probably rely pretty heavily on import from Canossa or the Ottonians), I'm not yet sure how to handle it but I'll probably trigger some event on good faction relations.

Ere I forget it, the player will be able to see his food pool on his accountant (for more info read the II previews).

Hross af Guttenburg
01-21-2008, 07:11
Excellent work. As always...

We are looking at a similar situation, urban versus provincial, for DOTS. Although our tree isn't as complex as yours. I think this is a great idea. But how do you think the AI will work it? Or are you going to make a separate and simpler system for the AI?

bovi
01-21-2008, 09:00
I believe the AI will happily drive itself to starvation, as it doesn't have the concept of food surplus. But it could be an increased complexity to have the player's international import be dependant on foreign trade partners' food surplus.

alpaca
01-21-2008, 18:46
Yeah I'll have to see how it works with the AI. It'll probably get another system in the end, or at least won't get the starvation events (this will also help the AI a bit over the player).
It will still be affected by the growth penalties though.

SigniferOne
01-28-2008, 21:33
Good job Alpaca. This reminded me to do something similar for Paeninsula Italica, wherein I want the food-situation to be better represented by a good variety of granaries, mills, farms, etc. Especially for mods about Italy, exciting and in-depth farming buildings are important.

I don't know if I'll make the system as complicated as yours in regards to scripted famines; we'll see if time will allow. The distinction between urban and rural settlement does sound nice, though, I have to say.

alpaca
01-28-2008, 22:20
The scripted famines aren't very complicated right now. I just set an event counter that is checked by building bonuses which leads to unrest and population shrinking. It's a pretty simple but effective way to keep the player on their toes (and I like having events pop up from time to time, it shows the player that he interacts with the world in non-trivial ways).

SigniferOne
01-29-2008, 08:30
But of course a counter must be kept for each settlement... I'm trying to simplify, and avoid that if I can at all.

alpaca
01-29-2008, 12:20
No, there's exactly one counter for the whole game. It is simply modified by actions like creating, destroying, conquering or losing buildings.

SigniferOne
01-29-2008, 17:28
Whoa hmmm... something like a 'famine' counter? So If there's tons of granary buildings, the counter is lowered, but if for some reason it reaches a high enough value, do famine-related nasty effects on the map? Also, the script doesn't have to check each turn, only on buildings being built/destroyed? I somewhat dislike every-turn checks, because they again make things unsimple and add to the bloatiness of the game.

alpaca
02-01-2008, 00:23
Well the granary buildings right now don't decrease your starvation problems, I'll maybe add that in the future but I think the system is complex enough right now.

You basically got it right I think, the script only checks a counter each turn but not the buildings present in settlements, they are only checked on conquest, being built and so on (in short: whenever the number of import/export buildings can change in your settlement). If you're interested more deeply in the script you might want to consider checking out the current version from our SVN server.

Besides, random starvations aren't implemented yet, but I'm planning to add them to the "induced" starvations that are directly caused by the player.

Vazul's Ghost
02-08-2008, 15:24
I wish i knew how to skin or something so I could help you out with eye candy to attract more people to this mod. The fact is that the majority of people are lured into support of mods by shiny armour, and the great work youre doing here is only brought to public attention with it... maybe i'll learn... nah i'm not smart enough.:clown: Good Luck!

alpaca
02-11-2008, 10:59
I wish i knew how to skin or something so I could help you out with eye candy to attract more people to this mod. The fact is that the majority of people are lured into support of mods by shiny armour, and the great work youre doing here is only brought to public attention with it... maybe i'll learn... nah i'm not smart enough.:clown: Good Luck!
Actually those people are not the kind of person I aim the mod to cater for. I suit the features primarily to my taste (and that of Solo when he's around) so anybody who's mostly interested in seeing new soldier skins would be a bit disappointed anyways because the mod will have a pretty steep learning curve.
If I had more time to devote to this project so that I would actually make decent progress instead of some new stuff every few weeks I think there'd be more people supporting it, too.

SigniferOne
02-11-2008, 23:41
Alpaca don't worry, I keep up and already adopted a modified version of the food idea for my mod. It will live on, even if just for ancient Italy. :laugh4:

Vazul's Ghost
02-14-2008, 12:15
Actually those people are not the kind of person I aim the mod to cater for. I suit the features primarily to my taste (and that of Solo when he's around) so anybody who's mostly interested in seeing new soldier skins would be a bit disappointed anyways because the mod will have a pretty steep learning curve.
If I had more time to devote to this project so that I would actually make decent progress instead of some new stuff every few weeks I think there'd be more people supporting it, too.

Sorry I didn't mean to offend or disencourage, this is great work and i would like nothing more then to see it finished, it just annoys me that it isn't getting the recognition it deserves. But thats what is great about modding, it isn't about popularity or money or anything like that, and II is a perfect example of that. Once again, sorry, and dont let any of my foolish words disrupt your work or your work drive.

alpaca
02-14-2008, 13:35
Sorry I didn't mean to offend or disencourage, this is great work and i would like nothing more then to see it finished, it just annoys me that it isn't getting the recognition it deserves. But thats what is great about modding, it isn't about popularity or money or anything like that, and II is a perfect example of that. Once again, sorry, and dont let any of my foolish words disrupt your work or your work drive.
Oh, in fact you made a valid point - it was a problem for me for quite a while and it's one of the reasons why a lot of mod projects don't see the daylight. After all, everybody enjoys recognition of his work (even if they primarily do it for their personal enjoyment) and I'm no exception in that - however after really thinking it through, I decided to work on this project as I see fit.

I don't intend to meet any deadlines, I don't bow to an (often purely hypothetical) majority in points I care for and I don't dumb down the mod because of fear a feature might be too complicated to use (I do think about it though, and usually come up with a form of cost-benefit-analysis).
That said, this modus operandi potentially deters other modders from joining the project exactly because it can take a while until they see their stuff in the game if they don't want to implement it by themselves since I'm a lazy fart and work only on what captivates me at the moment.

Besides, I didn't mean to attack you in any way and you didn't offend me, either. I enjoy any input or discussion which (even if nothing else comes out of it which is probably not the case here) at least shows to outsiders that this mod isn't dead yet ~;)

Vazul's Ghost
02-21-2008, 09:01
Well I'm glad i didn't offend you, and once again this is great work. Hope one day you get the wider ecognition for it:2thumbsup:

Ignoramus
02-25-2008, 12:18
Anything I can do to help? This mod is too good to allow it to die an inglorious slow death.

alpaca
02-25-2008, 18:31
Well of course, there's lots of things you could do. For example, we're still missing campaign map resources (and a proper concept for them, we had in mind to give trade hubs like venice extra resources like silk to make them really juicy), traits&ancillaries (again, I had some basic concept in mind but it isn't all that fleshed out - and of course implementing it takes a lot of time), a proper campaign AI that suits our map with its partly huge regions and most of the tech tree. There's a lot of other things that are still lacking but these four are probably the main bumps to get over. I wouldn't mind sharing some of the work at all, so if you're heart really is in it you'd definitely be welcome - I can't promise that I'm a very good chief though, because I'm not :laugh4: