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

Operands in leader name affect Glance screen display

Discussion in 'Civ4 - Bug Reports' started by OTAKUjbski, Apr 5, 2008.

  1. OTAKUjbski

    OTAKUjbski TK421

    Joined:
    Mar 4, 2007
    Messages:
    1,511
    Location:
    not at my post
    This bug is purely cosmetic. It doesn't appear to affect the gameplay at all.

    It is only present in BtS 3.13 if using any of the various unofficial mods or patches which re-enables the Glance screen. In < 3.13, this bug is present.

    --------

    If an addition or subtraction operand ("+" or "-") is part of the Leader name, it will be applied to the values in the Glance screen for the AI civs' attitude towards the player.

    (NOTE: "/" is an invalid Leader Name character. "*" does not appear to have any affect.)

    For example:

    If the Leader Name is "asdf1234":



    If the Leader Name is "asdf-1234":



    If the Leader Name is "asdf+1234":

     
  2. Jerrymander

    Jerrymander Epistemologist

    Joined:
    Mar 21, 2007
    Messages:
    2,624
    Location:
    Hallways of Always
    That is hilarious. :D
     
  3. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
    I think ( based on the screens ) that the glance assumes the part of the name after the + or the - is a diplo modifier ( 5 - 1234 = - 1229 and 5 + 1234 = 1239 ). Funny but , thank god ,is just a interface issue ( imagine that you could add diplo by the name :devil: )
     
  4. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    Yeah, the problem here is with the Attitude functions, or more specifically, the fact that the numerical ones aren't exposed to Python. So the only way for a Python function to grab the numerical attitude value is to get the full attitude string (the whole "+1 We value blah, blah", etc), take all the +/- values, and add them up. But part of that attitude string is the player's name, so of course if it contains any +/- symbols followed by numbers, it'll parse those out and assume they are part of the calculation.

    The simplest fix to this is to expose the actual numerical attitude function to Python, call that directly, and skip that annoying parsing.

    Bh
     
  5. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    The full attitude string should also contain newlines I think, it could also not start counting until after the first new line to work around this.

    Edit:
    I've fixed this for my mod by removing references to leader names before parsing. In the calculateRelations function, add:

    Code:
    szAttitude = szAttitude.replace(gc.getPlayer(nPlayer).getName(),"")
    szAttitude = szAttitude.replace(gc.getPlayer(nTarget).getName(),"")
    
    Pretty funny bug though.
     

Share This Page