Will the AI build other stuff, rather than waiting for the medium, large and huge castle in the new patch? The AI can never afford to buy these, unless they get help, so has this been changed?
Well,Problem is that the "if" part can't be there for AI. At least not without Johan-work.
Already works at more or less efficency, I've seen muslims with their uberdemesnes rampantly building those at several occassions.if(out of demesne limit)Royal Post
Louis XVII said:AI doesn't seem to save a penny. even the King of Germany is penniless most times.
Agreed. But can it be done without precious Johan-time?Riddermark said:the ai needs to leanr not to build in time of Ilnesses etc
Good point, now that should be possible, if there is a trigger to check if a building is under progress. If no such trigger is present, we can't do jack.binTravkin said:Doubt.
Unless there is a way to cancel a building by event scripting.
Then one oculd make an event which checks if AI province has ilness and cancel the building.
province_event = { #I am an AI province that could use some help from a freebie improvement event to give me a huge castle
ID = xxxxx
picture = "event_default"
trigger = {
condition = { type = year value = 1250 } #eariest can happen in 1275
condition = { type = AI } #only AI gets this event
condition = { type = not value = { type = has_improvement value = { type = huge_castle value = yes } } } #don't try to give a second one ;)
condition = { type = not value = { type = atwar } } #cannot be at war
condition = { type = has_advance value = { type = huge_castle value = yes } } #has necessary tech in province
#maybe other limiting conditions? probably prevent event from placing improvment on terrain that it isn't allowed to be built on, for example
}
mean_tiome_to_happen = {
months = 9600 #very unlikely to happen spontaneously
modifier = {
condition = { type = has_improvement value = { type = large_castle vlue = yes } }
factor = 0.25 #far more likely if has prerequisite stucture
}
# maybe add some other improvement modifiers to make more likely if has tile factory, war academy, etc.
#make it more likely to happen later in game (note that these are cumulative modifiers)
modifier = {
condition = { type = year value = 1300 }
factor = 0.9
}
modifier = {
condition = { type = year value = 1325}
factor = 0.9
}
modifier = {
condition = { type = year value = 1350 }
factor = 0.9
}
modifier = {
condition = { type = year value = 1375 }
factor = 0.9
}
modifier = {
condition = { type = year value = 1400 }
factor = 0.9
}
modifier = {
condition = { type = year value = 1425 }
factor = 0.9
}
#ruler stats to have impact...
modifier = {
condition = { type = owner
condition = { type = county }
}
factor = 3 #counts aren't nearly as likely to be building huge castles
}
modifier = {
condition = { type = owner
condition = { type = duchy }
}
factor = 1.5 #dukes are more likely to be building huge castles
}
modifier = {
condition = { type = ruler_stewardship value = 10 }
factor = 0.9
}
#...etc to increase chance with high stewardship and decrease for crap stewardships...possibly also modifiers for marshal and traits....
#province effects should hamper/aid building
modifier = {
condition = { type = has_province_effect value = { type = struggling value = yes } }
factor = 5
}
modifier = {
condition = { type = has_province_effect value = { type = poor value = yes } }
factor = 2
}
modifier = {
condition = { type = has_province_effect value = { type = prosperous value = yes } }
factor = 0.75
}
modifier = {
condition = { type = has_province_effect value = { type = rich value = yes } }
factor = 0.5
}
modifier = {
condition = { type = has_province_effect value = { type = struggling value = yes } }
factor = 5
}
modifier = {
condition = { type = has_province_effect value = { type = looted value = yes } }
factor = 10
}
modifier = {
condition = { type = has_province_effect value = { type = bubonic_plague value = yes } }
factor = 50
}
modifier = {
condition = { type = has_province_effect value = { type = pneumonic_plague value = yes } }
factor = 50
}
modifier = {
condition = { type = has_province_effect value = { type = malaria value = yes } }
factor = 10
}
modifier = {
condition = { type = has_province_effect value = { type = dysentery value = yes } }
factor = 10
}
modifier = {
condition = { type = has_province_effect value = { type = small_pox value = yes } }
factor = 10
}
modifier = {
condition = { type = has_province_effect value = { type = typhoid_fever value = yes } }
factor = 10
}
modifier = {
condition = { type = has_province_effect value = { type = revolt value = yes } }
factor = 50
}
modifier = {
condition = { type = capital value = yes }
factor = 0.5
}
#possibly add modifier if in certain areas and/or provinces that traditionally had this improvement
modifier = {
condition = { type = province value = 496 } #Byzantion
factor = 0.5
}
#etc...
#other stuff...?
}
action_a = { #wOOt!
effect = { type = add_improvement value = huge_castle }
effect = { type = ruler_prestige value = 100 }
}
}