Science from bonus in a building - is it possible?

Chryso

Chieftain
Joined
Nov 18, 2008
Messages
27
I have made a "Ancient Scrolls" bonus, that I wanted to yield a science bonus in my University.

But to my dismay I discovered that it can only yield food, production or gold.

I use these tags:
<BonusYieldModifier>
<BonusType>BONUS_ANCIENT_SCROLLS</BonusType>
...

Is there a way to get a bonus to yield Science? With python scripts? Can I add to the .xml schema? And if so, is it a complicated process?
Has anyone else attempted this?
 
I think you're looking in the wrong spot. I can't access the file at the moment but wasn't there a value called something like <bonuscommerce>

and you could specify how much of gold, science or culture would be given by the building. The second commerce type is science.

Yield modifiers are for adding food, hammers and commerce only I think, like from tile improvements.

In any case, you might have more luck from people with more experience with modding if you ask in the creation and customization forum instead of general discussions. ;)
 
I think you're looking in the wrong spot. I can't access the file at the moment but wasn't there a value called something like <bonuscommerce>

and you could specify how much of gold, science or culture would be given by the building.

You're looking at it from the wrong end. He wants to add Research to the bonus itself, not the building.
 
You're looking at it from the wrong end. He wants to add Research to the bonus itself, not the building.

I can appreciate that but regardless he appears to be looking at the wrong type of bonus. It's not a yield bonus he wants - it's a commerce type bonus, and the second type of comerce to be specific. I think in BtS the four types are gold, then science, then culture, then espionage, but I'm not 100% sure.

The problem is, I'm not sure whether a commerce type bonus can be given to a bonus (if that makes sense). Like I said before though, not really the right forum to be asking in...
 
You're looking at it from the wrong end. He wants to add Research to the bonus itself, not the building.

Exactly. My University already gives a base science of 40%. But if the city has access to the "Ancient Scrolls" bonus, I want it to gain an additional +10%. I have another bonus called "Ancient Artifacts" as well for another +10%.

In other words, I want to relay some of the power of the university over to bonuses from the world. They are both pretty rare, as there will be only about ½ of each for each player (4 of each in the world if there are 8 players), which would be a good reason to go to war. It will be pretty hard to get both for a full bonus.
 
I can appreciate that but regardless he appears to be looking at the wrong type of bonus. It's not a yield bonus he wants - it's a commerce type bonus, and the second type of comerce to be specific. I think in BtS the four types are gold, then science, then culture, then espionage, but I'm not 100% sure.

The problem is, I'm not sure whether a commerce type bonus can be given to a bonus (if that makes sense). Like I said before though, not really the right forum to be asking in...

Ok, I will try the mods forum next time (it looked to me to be for posting mods, not questions about modding). Since I already made a post here, I will see what answers I get before I make an identical post over there :)
 
Exactly. My University already gives a base science of 40%. But if the city has access to the "Ancient Scrolls" bonus, I want it to gain an additional +10%. I have another bonus called "Ancient Artifacts" as well for another +10%.

In other words, I want to relay some of the power of the university over to bonuses from the world. They are both pretty rare, as there will be only about ½ of each for each player (4 of each in the world if there are 8 players), which would be a good reason to go to war. It will be pretty hard to get both for a full bonus.

Ah, sorry but I thought you were looking for something along the lines of +2:science: for each university. What you're trying to do sounds a bit harder. Good luck!:goodjob:
 
Exactly. My University already gives a base science of 40%. But if the city has access to the "Ancient Scrolls" bonus, I want it to gain an additional +10%. I have another bonus called "Ancient Artifacts" as well for another +10%.


If you want to do that, you'll probably have to make a change in the DLL file in order to add the flag. How's your C++?
 
If you want to do that, you'll probably have to make a change in the DLL file in order to add the flag. How's your C++?

My C++ is excellent (programmer with almost 10 years C++ experience). but even then it can be quite an effort to read up on a new system, set up compiler etc... - a bit more of an effort than to change some xml or a .py :)
 
but even then it can be quite an effort to read up on a new system, set up compiler etc... - a bit more of an effort than to change some xml or a .py :)

Well that's what it's going to take if you want to do it. If the flag isn't already present then you have to add it, and the only way AFAIK is through the DLL.
 
My C++ is excellent (programmer with almost 10 years C++ experience). but even then it can be quite an effort to read up on a new system, set up compiler etc... - a bit more of an effort than to change some xml or a .py :)

You should be able to do it fairly easily then. This would be a hard one for me to accomplish, as basically you need to clone an array (or possibly create a new one, I'm not sure if this function exists in the dll).

To get started check out this wiki page on getting started with modding the SDK:
http://modiki.civfanatics.com/index.php/How_to_Install_the_SDK

Once you have the compiler set up, check out this tutorial, specifically the cloning an array section. From there since you're a programmer versed in C++ you should be good to go:

http://forums.civfanatics.com/showthread.php?t=314201
 
You should be able to do it fairly easily then. This would be a hard one for me to accomplish, as basically you need to clone an array (or possibly create a new one, I'm not sure if this function exists in the dll).

To get started check out this wiki page on getting started with modding the SDK:
http://modiki.civfanatics.com/index.php/How_to_Install_the_SDK

Once you have the compiler set up, check out this tutorial, specifically the cloning an array section. From there since you're a programmer versed in C++ you should be good to go:

http://forums.civfanatics.com/showthread.php?t=314201

It is not as easy as just cloning an array. The City class seems to be calling Yield (the one I use as a model), but exactly how it is done is quite an effort to read into, as the system is completely new to me, and there is no documentation whatsoever on how it is structured. And whether I need to involve more classes than building and city is yet in the dark... But Im on it - seems it couldn't be the easy solution this time, hehe.
 
Back
Top Bottom