I don't know any of Civ4's/FFH2mods' various codes at all (only worked with Python a tiny bit), but in general the concepts of coding and coding/logic is this:
-----------------
@ The Crying Man
there's also giving a 'priority/weight rating' indicator/flag too, for an example:
do I save the hot girl or the ugly girl?
lower the value, the higher the priority
higher the value, the lower the priority
hot_girl.priority = 1
ugly_girl.priority = 2
if (hot_girl.priority <= ugly_girl.priority) {
-> hot_girl.save_her!
} else {
-> ugly_girl.save_her!
}
// you save the 'hot_girl'
VS
hot_girl.priority = 2
ugly_girl.priority = 1
if (hot_girl.priority <= ugly_girl.priority) {
-> hot_girl.save_her!
} else {
-> ugly_girl.save_her!
}
// you save the 'ugly_girl'
VS
hot_girl.priority = 1
ugly_girl.priority = 1
if (hot_girl.priority <= ugly_girl.priority) {
-> hot_girl.save_her!
} else {
-> ugly_girl.save_her!
}
// you save the 'hot_girl'
----------------------------------
or you could have the opposite too:
lower the value, lower the priority
higher the value, higher the priority
hot_girl.priority = 2
ugly_girl.priority = 1
if (hot_girl.priority >= ugly_girl.priority) {
-> hot_girl.save_her!
} else {
-> ugly_girl.save_her!
}
// you save the 'hot_girl'
VS
hot_girl.priority = 1
ugly_girl.priority = 2
if (hot_girl.priority >= ugly_girl.priority) {
-> hot_girl.save_her!
} else {
-> ugly_girl.save_her!
}
// you save the 'ugly_girl'
VS
hot_girl.priority = 1
ugly_girl.priority = 1
if (hot_girl.priority >= ugly_girl.priority) {
-> hot_girl.save_her!
} else {
-> ugly_girl.save_her!
}
// you save the 'hot_girl'
--------------------------------
@ Mouthwash:
maybe try changing the <iAIWeight> to 1 or 0 (or maybe even: -1), as maybe lower values have the greater priority, whereas your high value of 500 might have a lesser priority