HOW TO force AI build new buildings

It lays all open in the SDK ... :D

Here is the list. There are many Units slipped in in between.
If a building does not fit into one of those BUILDINGFOCUSESSES it is considerd at the very end of the line. Thats why some custom buildings are built very seldom by the AI.

<condition>: <BuildingType>, <maxNumberofTurns>
No culture: BUILDINGFOCUS_CULTURE, 30
Danger: BUILDINGFOCUS_DEFENSE, 20
Production>=4: BUILDINGFOCUS_PRODUCTION, 30
No War:
Maintenance>8: BUILDINGFOCUS_MAINTENANCE, 40
Angry People: BUILDINGFOCUS_HAPPY, 40
Unhealthiness: BUILDINGFOCUS_HEALTHY, 40
Surplus Food<2: BUILDINGFOCUS_FOOD, 60
Maintenance>6: BUILDINGFOCUS_MAINTENANCE, 60
OwnCultur <50%: BUILDINGFOCUS_CULTURE, 60
CanNotAssignSpecialits: BUILDINGFOCUS_SPECIALIST, 60
NoGold and Gold>12: BUILDINGFOCUS_GOLD, 40
Research>12: BUILDINGFOCUS_RESEARCH, 40
BaiscProduction>4: BUILDINGFOCUS_PRODUCTION, 80
GoodProductionCity: BUILDINGFOCUS_EXPERIENCE, 40
Any Building
 
MaxRiga said:
military flavour 25

wow that seems high! :D

I only used 10 and the AIs built my buildings fast enough for me...

however I dont know about later buildings (that are required to train certain troops....) so i'll keep that in mind....

I hopefully will be able to report more when I playtest it this weekend :)


MaxRiga said:
i also believe that every civilization needs it's own buildings, so, actually i think it's pretty hard to force all civilizations build same stuff. from another way all civs are trying to build wonders as fast as possible ...


that really sux! :sad:
 
Max,

Ive been playing around with some numbers and I want to share my results..




NeverMind said:
Well, I suppose it could be done in XML (CIV4BuildingInfos).

1) iAIWeight - to make this building more important for AI players...

this kinda works because I wanted more military preferences so I added

<iAIWeight>50</iAIWeight> to barracks

and all AI civs built that first!


However:


Chalid said:
That does not work as it might seem Nevermind. The flavours and AI weight come only into play if the AI has decided which kind of building it wants to generate.


this is also true because another building I put:

<iAIWeight>300</iAIWeight>

yet only 2 of the 7 started building that prior other buildings... :sad:


however I did notice that they build more military units too!

I also noted other buildings that I added weight to... had similar effects...where certain AIs would not build it 2nd... but build it maybe 3rd or forth as to building it much later

so weight does affect AI (even just a little)

NOTE: The buildings also had a higher flavor than normal
(Trying to cover all bases :lol: )

(you can add weight to Military Units also)

I ranged my numbers to put the importance of certain buildings
(for instance buildings that are required to make certain units)

I am still in the preliminary stages of testing...

but I though you'd like to know :goodjob:

hope this helps ;)
 
MaxRiga said:
oh, this really helps! please, keep updating about ur testing!
ps
<iAIWeight>300</iAIWeight>
may be it works the same for units too !?


yeah... Im gonna have to test it...
but it may be in a bit because I need to make changes in my mod....and I am getting lazy...:mischief:

I added more weight and flavor to all of my buildings that I require to make certain units..

to reinforce that I also added more weight to the units that require buildings so this way I can (hopefully...in theory anyway) put more importance to the buildings and units for the AI civs...

I still have to test it...

but when I do I'll keep you updated...

(Sorry in advance if I dont update till next week... :rolleyes: I have some other stuff I want to do...)
 
Back
Top Bottom