[MODCOMP] Multiple Yields Consumed

Aymerick

Warlord
Joined
Dec 26, 2008
Messages
233
Location
Ville de Québec
MultipleYieldsConsumed_v0.05 BETA

I've made this for Plantation Economy and I've decided to release it as a modcomp since it might be usefull for some of you.

What it does:
Allows multiple yields to be consumed to produce a new one.

For testing purposes I've made the Gunsmith requiering both Tools and Lumber to make Guns.

So far everything works fine, but the AI function who only takes the first YieldsConsumed for now and I haven't tested it for none tradable yields.

Download link here

Aymerick
 
Great! This addition I'm waiting many months. :goodjob:

I just tested your modcomp for Guns production. It works fine. Great job, Aymerick!
 
Hi, Aymerick!

Do you plan to develop the second half of your "MultipleYields" mod, namely MultipleYieldsProduced mod?

Both mods (MultipleYieldsConsumed & MultipleYieldsProduced) would be absolutely great for various production lines.

Just one example. "Sheep" as a BONUS, "Sheep_Farm" as IMPROVEMENT.
Here we can produce:
- Food
- Natural fibers
- Fur.



Varian 1: We have only Natural Fibers from the Sheep Farm. Now we have such possibility.

Variant 2: When we kill our Sheeps we should have all three products: Food + Natural fiber + Fur (or skin). Or two - both Food and Fur. Unfortunately, now such possibility is absent at all.

Here the "MultipleYieldsProduced" mod could be VERY useful.
 
Hey KJ,

I think I can do this fairly easily, for plot working professions at least. Indoor professions would be much more troublesome because of city buildings being linked with SpecialBuldings and all...

Again, I'm not going to set a amount produced different for each yields because those can be set in the terrain or improvement yield increase value. This way you can still balance gameplay from there.

I'll look into that and update with my progress later,

Aymerick
 
Hey KJ,

I think I can do this fairly easily, for plot working professions at least. Indoor professions would be much more troublesome because of city buildings being linked with SpecialBuldings and all...

Again, I'm not going to set a amount produced different for each yields because those can be set in the terrain or improvement yield increase value. This way you can still balance gameplay from there.

I'll look into that and update with my progress later,

Aymerick
Hi, Aymerick!

Plot working (outdoor) professions are much more interesting for me. I am testing now the possibility to move some production buildings on the plots where I could produce what I need.

Thank you very for your time.
 
Hi, Aymerick!

Plot working (outdoor) professions are much more interesting for me. I am testing now the possibility to move some production buildings on the plots where I could produce what I need.

Thank you very for your time.

Alright, I've started this. It might take a little longer than I expected, the getYieldProduced function is called more often than I expected...

About your "moving production buildings on plots", I can't remember where exactly but I'm sure I've seen a mod somewhere that allows up to 3 colonist working on the same plot. You should check around in the forum, it might be useful to you...

Aymerick
 
Alright, I've started this. It might take a little longer than I expected, the getYieldProduced function is called more often than I expected...
You are right. I tried to create a MultipleYieldsProduced mod by myself taking as basis your MultipleYieldsConsumed mod, however getYieldProduced function really was too complex for my very poor "programming knowledge".

Good luck in your work!

About your "moving production buildings on plots", I can't remember where exactly but I'm sure I've seen a mod somewhere that allows up to 3 colonist working on the same plot. You should check around in the forum, it might be useful to you...
Thank you, I will check around in the forum.

However, I'm going to use a little bit different way. As you see each IMPROVEMENT has <ImprovementUpgrade> tag. Thus, we could create the 2-level system on the plot.

For instance for WOOD (or LUMBER) production.
Level 1 improvement: LUMBERMILL (instead LODGE) with productivity 100%.
Level 2 improvement: WINDMILL with additional +100% output.
Names and % could be different, of course.
 
However, I'm going to use a little bit different way. As you see each IMPROVEMENT has <ImprovementUpgrade> tag. Thus, we could create the 2-level system on the plot.

Do you want the improvement to upgrade after some time, like in Civ4 where the COTTAGE upgrades into a HAMLET after a number of turns? Or do you want the pioneers having to build the second improvement over the first one?
 
Do you want the improvement to upgrade after some time, like in Civ4 where the COTTAGE upgrades into a HAMLET after a number of turns? Or do you want the pioneers having to build the second improvement over the first one?
The pioneer will build the second improvement over the first one. I don't like automatic upgrade. Of course, COTTAGE could automatically upgrade to HAMLET (due to city population growth, for instance), but the plot improvement in Civ4Col should be done only through "manual" upgrade.

At the moment I don't know could I realize such upgrade only by XML, or I have to use Python, too.
 
The pioneer will build the second improvement over the first one. I don't like automatic upgrade. Of course, COTTAGE could automatically upgrade to HAMLET (due to city population growth, for instance), but the plot improvement in Civ4Col should be done only through "manual" upgrade.

At the moment I don't know could I realize such upgrade only by XML, or I have to use Python, too.

The <ImprovementUpgrade> tag won't do that...

Lucky for you I've already ported the "ImprovementRequired" tag from Jeckel's JImprovementLimit, where Improvements can be set to require another
Improvement be in a Tile for it to be built...

Here it is:
 

Attachments

  • JImprovementLimit_Col.zip
    179.8 KB · Views: 214
The <ImprovementUpgrade> tag won't do that...

Lucky for you I've already ported the "ImprovementRequired" tag from Jeckel's JImprovementLimit, where Improvements can be set to require another
Improvement be in a Tile for it to be built...

Here it is:
Thank you very much for your changed source files and for the information. You save me a lot of time.

Jeckel's JImprovementLimit I plan to use for Fort/Castle/Fortress improvements outsideBorder. However, this work for the future. Now I'm working on "Livestock" mini-mod. List of new animals you can see on the screen above. Hunting Lodge for wild boars is ready.
 
Thanks Androrc :)

KJ, I've got a first version working but there are still some things I need to work on...

I've made the Fur Trapper profession producing Fur, Food and Lumber for testing. I'm having problems with the "Chose profession" popup because the rate of those 3 yields varies depending on terrain and features... I'll try adding a function that calculate the best plot for all yields produced instead of each individualy.

Still if you set all the yields produced at the same rate it'll work fine.

Here's the link, let me know what you think...

Aymerick
 
Thanks Androrc :)

KJ, I've got a first version working but there are still some things I need to work on...

I've made the Fur Trapper profession producing Fur, Food and Lumber for testing. I'm having problems with the "Chose profession" popup because the rate of those 3 yields varies depending on terrain and features... I'll try adding a function that calculate the best plot for all yields produced instead of each individualy.

Still if you set all the yields produced at the same rate it'll work fine.

Here's the link, let me know what you think...

Aymerick
Great job! :goodjob:

I tested your last mod with Expert Trapper. I changed nothing in the mod and Expert Trapper has +100% in Fur production (as should be) + additionally collect the same quantity of Food and Wood as available on his working tile. Moreover, Expert Trapper is required Fur on the tile to work according to your mod. Thus, your mod is working exactly as I need.

Thank you very much, Aymerick!
 
Couple screens from the "Livestock" mini-mod.

We send our Fur Trapper on Camel resource tile,



where he produces 100% of Furs (+4) and additionally +2 Food and +2 Natural Fibers.



This is exactly as should be in MultipleYieldsConsumed v0.06.
 
Apparently the CvGlobals.cpp, CvGlobals.h, CyCity.cpp, CyCity.h and CyCityInterface1.cpp included with MultipleYieldsConsumed 0.5 are identical to the original CvGlobals.cpp, CvGlobals.h, CyCity.cpp, CyCity.h and CyCityInterface1.cpp. Should there be changes to them or were they included by accident?

Also, both CvCityAI.cpp and CvPlayerAI.cpp do have changes from the original ones, but they are not commented.
 
Apparently the CvGlobals.cpp and CvGlobals.h included with MultipleYieldsConsumed 0.5 are identical to the original CvGlobals.cpp and CvGlobals.h. Should there be changes to CvGlobals.cpp and CvGlobals.h or were they included by accident?
I recommend to use a new version "MultipleYieldsConsumed 0.6". Link to download in post #13. Here CvGlobals.cpp, CvGlobals.h, CyCity.cpp, CyCity.h and CyCityInterface1.cpp are absent.
 
Apparently the CvGlobals.cpp, CvGlobals.h, CyCity.cpp, CyCity.h and CyCityInterface1.cpp included with MultipleYieldsConsumed 0.5 are identical to the original CvGlobals.cpp, CvGlobals.h, CyCity.cpp, CyCity.h and CyCityInterface1.cpp. Should there be changes to them or were they included by accident?

Also, both CvCityAI.cpp and CvPlayerAI.cpp do have changes from the original ones, but they are not commented.

To answer your question, yes they are needed both CvCityAI.cpp and CvPlayerAI.cpp. I merged this mod with the Inventors mod and you need those two files even though they are not commented.
 
Also, there is a bug that prevents the Professions Pedia screens from showing up correctly. If you open the CvPediaProfession.py and go to line 186.. change it to look like so:

Code:
iYieldConsumed = gc.getProfessionInfo(self.iProfession).getYield[COLOR="Red"]s[/COLOR]Consumed([COLOR="Red"]0[/COLOR])
 
Top Bottom