1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Food aid mission does not increase relations

Discussion in 'Bugs and Crashes' started by Tajo, Mar 1, 2019.

  1. Tajo

    Tajo Chieftain

    Joined:
    Jun 26, 2017
    Messages:
    166
    Gender:
    Male
    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.
     
  2. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    24,748
    Gender:
    Male
    Location:
    Las Vegas
  3. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    22,881
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  4. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    24,748
    Gender:
    Male
    Location:
    Las Vegas
    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?
     
  5. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    22,881
    Gender:
    Male
    Location:
    Canberra, Australia
    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?
     
  6. Tajo

    Tajo Chieftain

    Joined:
    Jun 26, 2017
    Messages:
    166
    Gender:
    Male
    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.
     
  7. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    22,881
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  8. Tajo

    Tajo Chieftain

    Joined:
    Jun 26, 2017
    Messages:
    166
    Gender:
    Male
    Nope, nothing.
     
  9. Yudishtira

    Yudishtira Spiritual/Creative

    Joined:
    Nov 2, 2012
    Messages:
    2,152
    Location:
    Brisbane
    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: Mar 5, 2019

Share This Page