A small step for this mod...

1) Is there a way to make an improvment require a bonus to be build?
Code:
<BonusTypeStruct>
					<BonusType>BONUS_TITANIUM_ORE</BonusType>
					<bBonusMakesValid>1</bBonusMakesValid>
Actually I think all you'd need to do is give the improvement no other means of qualifying except for the bBonusMakesValid tag use as shown above.
 
Code:
<BonusTypeStruct>
					<BonusType>BONUS_TITANIUM_ORE</BonusType>
					<bBonusMakesValid>1</bBonusMakesValid>
Actually I think all you'd need to do is give the improvement no other means of qualifying except for the bBonusMakesValid tag use as shown above.

I think that means the bonus must be on the plot, so you will only be able to build the improvement where the bonus is. Which is not what I understood the question to be about;).
 
No you understood me right ;)
But it may actually works... Thinking of it, it probably won't, because otherwise you could have a an oil well on every plot as long as it is connected to your cities.
 
I have discovered that I too need to link the ability to build an improvement to the existence of a manufactured bonus or a promotion.

For me probably the best would be to have a promotion for worker units that is required for the Build rather than for the Improvement but either would do.

More work for long suffering TB.
 
Could do both. Would be good for some stuff either way.

That shouldn't be TOO hard... I suppose the best way to go about it would be to put the prereq on the Build right? Not just the improvement (unless you want the improvement to stop working if the resource access is lost.)
 
I have discovered that I too need to link the ability to build an improvement to the existence of a manufactured bonus or a promotion.

For me probably the best would be to have a promotion for worker units that is required for the Build rather than for the Improvement but either would do.

More work for long suffering TB.

My next commit will include fully functioning new tags.

In BuildInfos
PrereqBonusTypes - works much like prereqs on Routes where adjacent plot must have access to the PrereqBonus to enact this build.

In PromotionInfos
AddsBuildTypes - Enables you to add build capabilities to a unit with promotions.

This is compiling now and will only get a quick crash test. I'll let you work with it to ensure that it all works properly but I'm pretty confident it will. Will commit this later today.
 
Ok I *think* I've done the improvments now. I haven't used your new tags, TB, but I will try it next time when I finetune them.

1) You said you can limit an improvment to be only buildable if a certain improvment is already on the tile, right? Is it handled in the BuildInfos or as a mission?
For example, like if you would only allow workers to build a Town if there is already a Village.

2) Is it possible to have the second improvment be buildable directly if you have a certain tech? Like in the above case, allow a worker to to build a town anywhere after you researched Globalization?

3) I named an Improvment "LUNAR_BASE_IMPROVMENT" to distinguish it from the Building "LUNAR_BASE". Could this potentially cause problems?
 
1) You said you can limit an improvment to be only buildable if a certain improvment is already on the tile, right? Is it handled in the BuildInfos or as a mission?
For example, like if you would only allow workers to build a Town if there is already a Village.
No... I made a tag that enables you to only build an improvement where access to a resource exists, like the way paved roads currently need stone. Other improvements never had this ability to have such a prereq. The prereq was placed on builds.

I CAN do a tag that requires a particular improvement to be present - could get a little tricky since I will need to keep it from validating that after the build so will probably need to put such a tag on build infos.

2) Is it possible to have the second improvment be buildable directly if you have a certain tech? Like in the above case, allow a worker to to build a town anywhere after you researched Globalization?
Not sure if I understand the request here but you can always give improvements a tech prereq. Such a tag as above would allow you to string improvements that would need to be built on top of one another.

3) I named an Improvment "LUNAR_BASE_IMPROVMENT" to distinguish it from the Building "LUNAR_BASE". Could this potentially cause problems?
Probably better that way but IMPROVMENT is misspelled.
 
The next thing I want to do is create missions for my units.
Where do I find the existing missions? I only found "MissionInfos" in the Unit folder, which are not really helpfull.

Also, I want a unit to have a mission that would transform it into another unit. I think the upgrade mechanism would work here, since it doesn't check for building requirements, does it?

And is anyone currently working on the unit and building files? I want to make some adjustments there during the next week.
 
I started to write some stuff in the modders documentation.

I currently have the missions in the same area as the units so there are some in the Entertainer folder, others in the Captives folder and others in the Subdued Animals folder.

The Captives use missions and the upgrade mechanism to convert one unit to another if I remember correctly. The only problem is that the cost is not displayed in the hover over. I could never understand AIAndy or ls?? info about it was correct in the code but not in the XML when every level of the mission/outcome/actionoutcomes has a cost and I was putting the cost in one of them;)
 
Top Bottom