Food aid mission does not increase relations

Tajo

Warlord
Joined
Jun 26, 2017
Messages
195
Playing as Finland and food aid mission has come twice now in same game from Slovenia. Both times I have chosen the spare no expense-option which should give +3 relationship boost but it is not shown in Slovenia pop up. Food gets removed from my city but relationship stays the same.

Very strange because this mission has worked well before.
 
It may be, but it shouldn't, because changing relationship in Python is not easy.

It is very difficult to give +3 relationship in python. You have to get the current relationship and keep adding 1 until you have a relationship that is three higher. The +1 in function available to Python is not the same as the +1 on the relationship. Not only that but the number that Python has to add depends on what the relationship currently is. Ie the number of points needed to go from level 1 to level 2 is not the same as the number of points needed to go from level 2 to level 3.

How it is currently done in Python is something like (I can't remember the actual call names or code)
currentLevel = getRelations(Player,TargetPlayer)
for ever
changeRelations(Player,TargetPlayer, +1)
newLevel = getRelations(Player,TargetPlayer)
if newLevel == (currentLevel + 3) exit loop
return​

I suspect that it is really a bug in the call to the dll that has always been there. I can't see a need in Python not to add actual levels or parts of levels.
 
It may be, but it shouldn't, because changing relationship in Python is not easy.

It is very difficult to give +3 relationship in python. You have to get the current relationship and keep adding 1 until you have a relationship that is three higher. The +1 in function available to Python is not the same as the +1 on the relationship. Not only that but the number that Python has to add depends on what the relationship currently is. Ie the number of points needed to go from level 1 to level 2 is not the same as the number of points needed to go from level 2 to level 3.

How it is currently done in Python is something like (I can't remember the actual call names or code)
currentLevel = getRelations(Player,TargetPlayer)
for ever
changeRelations(Player,TargetPlayer, +1)
newLevel = getRelations(Player,TargetPlayer)
if newLevel == (currentLevel + 3) exit loop
return​

I suspect that it is really a bug in the call to the dll that has always been there. I can't see a need in Python not to add actual levels or parts of levels.
They said it's been working in the past and I haven't done anything noteworthy with the event system, nor can I say I understand it enough at the moment to easily look into it. It's very difficult to read how events transpire there but I'd probably be a little better at it now than I was last I looked. It was my understanding that most event results and their effects are applied via python but there could be a tag that's in use on that event to instruct +3 diplo boost when the event takes place I guess, or when the particular option is selected. I'd have to see the xml that defines the results of that event in particular. Does anyone know the TYPE name on this event? Or how to look at selections for the event? Or is this a mission and that's somehow different?
 
They said it's been working in the past and I haven't done anything noteworthy with the event system, nor can I say I understand it enough at the moment to easily look into it. It's very difficult to read how events transpire there but I'd probably be a little better at it now than I was last I looked. It was my understanding that most event results and their effects are applied via python but there could be a tag that's in use on that event to instruct +3 diplo boost when the event takes place I guess, or when the particular option is selected. I'd have to see the xml that defines the results of that event in particular. Does anyone know the TYPE name on this event? Or how to look at selections for the event? Or is this a mission and that's somehow different?
I am trying to learn about events also.:D This one is a vanilla one as far as I know. I have had it occur in other mods. I had a quick look but could not identify the event:(

In this case there is an Event Trigger and a bunch of Events which show up as a list to select from. Events that are not possible are there but can't be chosen.

@Tajo, can you give us anything more eg actual text message?
 
There are no error messages or anything, the relationship bonus just doesn't trigger. I'm very puzzled because I have seen this event work properly for countless times.
I meant any text from the event, title or something unique so that I can search the text files and hopefully find out the name of the event. Then I can look into the problem.
 
EVENT_FAMINE_ 1-3 in Civ4EventInfos.xml from line 326 sounds like it, although I can't find the texts anywhere (are they outside the mod?).

ETA: Answered my own question: yes the texts are in vanilla BtS assets.
 
Last edited:
Top Bottom