Windmill and cattle fixes in Module system

正在查看此主题的用户

Woreczko

Recruit
Hi!
I would like to fix these 2 things via the python files,
1. Improving the growth of cattle in the villages
2. Fixing Windmill to give 5% prosperity growth each week.

I know, that this fixes are available in the form of text files but, having modified this and that..... I need them in python. I`m a rather noobish python modder, mind you.

Thanks :smile:
 
Welcome to the modding forums.

If you've downloaded the module system, and compiled it once to see how it works (make sure you've set the target to your own module name), etc.

Then for the windmill - you want to look at either adding a new trigger to module_simple_triggers.py, or extending the one that handles schools to also generate the extra prosperity for the village.  The Native code for village schoolhouse is bunged - it doesn't check if a school house even exists, and only runs monthly.  In my mod (and others I've seen), folks increase that happen weekly, and then also check for the mill (fish_pond), and apply a prosperity bonus based on that.

For the cattle growth - I'm a bit confused as to how to make it work properly.

Currently, there is a setup / world-creation script that sets each village as having between 7 and 32 cattle each, but within a few days they tend to drop to around zero.  My understanding is that there is a trigger that fires every day or two that updates how many of each item each village and town has.  And that its this trigger that would need to be altered to generate more cattle (the cattle are just a virtual thing - they don't really increase or decreased based on much of anything (maybe looting has a direct effect) - but mostly they just are recomputed every so often, and that's how many they have when you go look).  I've tried changing the setup script to generate many more of them, and increase what seems to be the governing % that they'll have said item, but they still drop to abysmal levels shortly.

There are perhaps other modders who can answer this question with more light than I...
 
check the tutorial in my signature at the bottom, might be a good start if you are new to the module system.

As to the cattle, I think it's random.  If you want to fix it (I will be doing that for my mod as well) you will need to clean out all the stuff they may do with them, then create your own system.  Might be a good idea to do it on paper first and work out the ideas.  Once you start to balance systems that have may random influences (such as raids, people buying out your stock, consumption, etc) it gets kind of hairy...
 
Thanks guys!
I`ve already put together a small mod which changes troop and weapons stats and added 2 new units to vanilla. However working with scripts is still ahead of me :smile: I`ll try to understand, how school and cattle scripts work... Tips are appreciated :smile:
 
后退
顶部 底部