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

Advanced Civ

Discussion in 'Civ4 - Modpacks' started by f1rpo, Apr 16, 2017.

  1. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    511
    Location:
    Germany
    I can't reproduce this. Air units ignore building defense. So when an air unit is selected, CvCity::getDefenseModifier computes the modifier without buildings. If that's 0, then no modifier is displayed on the main map. However, as a city takes damage, the defense modifiers with buildings and without should gradually converge; so if it's 0 when an airplane is selected, it should also be 0, or at least very close to 0, when a Catapult is selected.
    :undecide: How so?
    chg is negative and gets added to the defense modifier. So min(0,... should be correct. For collateral damage[edit] Siege units, I've changed the floor function to round (to nearest) a while ago and I forgot to do the same for Air units. My goal is that e.g. a Fighter attack (BombRate 8) on a city with a 60% non-building defense modifier result in a 52% non-building defense modifier. Rounding to nearest seems to accomplish that, whereas rounding down (floor) or up is often off by 1. But that's a small issue and probably not the bug you're looking for.
    When the AI contacts you at the start of a turn? How slow, and which part? The offer/ demand or when negotiating at the trade table? Or the Foreign Advisor screen? (Which tab?)

    --
    In a quick test, I did see it when hovering over my own name on the scoreboard or portrait (screenshot attached) on the Foreign Advisor. Looking at the code, I also don't see why it wouldn't work. It would be easy to tell with a savegame.
    Good catch. I had removed some redundant code that the Advanced Combat Odds (ACO) mod and BtS had in common (or so I thought). ACO shows negative modifiers because that's how the calculation actually works; however, ACO shows those negative modifiers under the defender – showing them under the attacker (Rifleman) is nonsense. Edit:
    Thanks. For a new player you already seem to be quite well familiar with the UI and its little nooks and crannies.
     

    Attached Files:

    Last edited: Oct 14, 2019
  2. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,519
    Location:
    israel
    hey , i see your here,
    before i go to bed,
    right at the turn start, when the ai offers a deal (any).it really gets the game stuck. one time my friend got a wait window(happens when disconnected - normal).
    it appeared in mid tech tech tree period. it really gets stuck, gotta wait it out. maybe it should get some delay ? after turn passes or something?
    we play on the same version you got 103 something, so i have not changed any but the hotfix branch two weeks ago.

    regarding the ignore - see my edits on the prev post.
    after i removed the stuff, its all normal (still dont see the defense icon on the city though, but ill find it. do show it all the time - my preference)

    you can see my code, as usual branch 104--2.41, though, i guess you have enough to do.
     
    Last edited: Oct 14, 2019
  3. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    511
    Location:
    Germany
    I don't recall ever experiencing such a thing. Could be multiplayer-related. Autosaves are created before diplo popups, so the issue might be reproducible by loading an autosave.
    That should be OK. Same city damage formula as in BtS then. For showing "0%" city defense, see if (pHeadSelectedCity.getDefenseDamage() > 0) in CvMainInterface.py.
    Perhaps part of the problem is that I've allowed (human) units to bombard cities whose defense modifier is already 0 – just to prevent the modifier from recovering on the next turn.
     
  4. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,519
    Location:
    israel
    strange,i loaded an advc version and saw the same issue, though, i dont know which advc version is it :)
    i have not seen it in my multiplayer mod though. ill keep an eye out.
    for now, removing the checks that you added works for me.
     
  5. Elkad

    Elkad Emperor

    Joined:
    Mar 26, 2007
    Messages:
    1,005
    Got another one.
    Choose Religions On.
    Bulbed Theology, chose Taoism.
    Got the correct religion, but it gave me a Christian Missionary.
     
  6. Bestban

    Bestban Chieftain

    Joined:
    Oct 13, 2019
    Messages:
    18
    Gender:
    Male
    Confirmed that you are correct. I was wrongly looking at other AIs for my own WW. But why? :mischief: I guess that Civ4 manual was unclear about WW, mine vs others. Learned the correct WW from you. Thanks!

    The Unload All <Shift+U> shortcut does not work ?: Have a Galleon loaded with a unit or more. Highlight the Galleon. Press Shift+U. The units view at the bar is reset, but the unit is still on Galleon. Pressing the Unload All icon for the Galleon by mouse pointer works though.
     
  7. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    511
    Location:
    Germany
    Confirmed. Looks like I've got the religions mixed up in an attempt to simplify the code a bit.
    I've just noticed a K-Mod comment in the code for displaying WW:
    // Show ePlayer's war weariness towards eTargetPlayer.
    // (note: this is the reverse of what was shown in the original code.)
    Sounds like it worked as you had expected in BtS. Also, the K-Mod changelog says:
    "War weariness in the foreign advisor screen will now only be shown if the active player can see the demographics of the target player."​
    I'll add (half) a sentence about that to the K-Mod section of the AdvCiv manual.
    Yikes. I reassigned that shortcut to "unselect all units". For a quick fix, you could set
    keys="Shift Alt U"
    at the end of AdvCiv\Assets\Config\BUG Core.xml.
    (Alt+U, Ctrl+U and Ctrl+Shift+U are already taken by the unit layer and unit debug menu. Known issue: Unselecting doesn't work reliably as automatic unit cycling can get in the way; the keys need to be held down for a split second.)
     
  8. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,519
    Location:
    israel
    thanks for the quick fixes and the bugs detection from both.
     
  9. Bestban

    Bestban Chieftain

    Joined:
    Oct 13, 2019
    Messages:
    18
    Gender:
    Male
    Thanks. I tried "Shift Alt U" at 'Bug Core.XML'. It didn't work; no unload at all. I put "Alt Shift U" instead; it magically enables the old shortcut <Shift-U> back for Unload All :).

    A minor question: Why does upgrading this particular Rifleman below to Infantry result in a lost of 1 XP while the other Riflemen do not? e.g. It becomes 10/17 XP after being upgraded, although losing just 1 XP is insignificant.
    Spoiler :


    Another one: I had logging enabled. It seems every time that someone have a Corporation founded an error message show up below. I don't have a save for this though.
    Spoiler :
     
    Last edited: Oct 24, 2019
  10. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    511
    Location:
    Germany
    I've uploaded another minor release (0.96e) that fixes recently reported bugs and gives Frigate and Privateer +1 move and buffs Machine Gun against Cavalry. (release notes)
    Peculiar. The order doesn't seem to matter on my end, but I don't know how the BUG mod processes those input tags, so I don't want to swear that it can't matter. To be on the safe side, I've put 'Alt' first in v0.96e.
    It should work as in BtS: All XP above 10 (MAX_EXPERIENCE_AFTER_UPGRADE in GlobalDefines.xml) is lost. Exception: Great Warlords don't lose XP. Only the warning should be new.
    A small typo there. I've included the fix in v0.96e. Thanks.
     
  11. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,519
    Location:
    israel
    Great work f1rpo,

    I started to cherry pick the fixes from the master, harder.

    Did you update the branch of the hotfix?

    You 97 looks revolutionary.
     
  12. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    511
    Location:
    Germany
    Thanks. Yes; I did all the cherry-picking in a single commit. The commit message lists all the master-branch commits that I included. You've probably adopted most of those already.
    I think version 0.97 it will be a bit of a dud from a player's perspective. City trades will probably be the only major novelty.
     
  13. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,519
    Location:
    israel
    perhaps,
    but for the average modder, its the discovery of life on mars.

    thanks,
    thank god your are one thorough and clean method programmer.
    off to merge!
     
  14. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,519
    Location:
    israel
    hey man - possible mp bug?

    in multiplayer - diplomacy screen - we cannot see - current deals we have.
     
  15. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    511
    Location:
    Germany
    Looks OK; see attached screenshots. What does it look like on your end? Anything in the PythonErr.log?
     

    Attached Files:

  16. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,519
    Location:
    israel
    ohhh, i see my bad. sorry man.

    anyway, i report that ghandi finally made it. dropped 3 atomics, not on us though :) (still playing the first hotfix version).

    by the way - remember the double pop ups? its still there, but they close them selfs m they are seen briefly.
    its really not an issue.

    theres no wars beyond water boarders much, i saw you mentioned something about it.
     
    Last edited: Oct 24, 2019
  17. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    511
    Location:
    Germany
    Sounds like it's just as in BtS – that is, when playing with Minimized Popups. That's what I wanted to fix by killing redundant popups before the player notices them, – which works well in singleplayer but makes matters much worse in multiplayer.
    Yup, it's still on my agenda. Or perhaps the AI weight adjustments you've made will already help. Should be easy to check through AI Auto Play.
     
  18. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,519
    Location:
    israel
    Well just thought id mention the pop up, its realy fine.

    I dont know how my tweaks will do.
    After ill merge in all the hotfix new things, plus some more from the master, ill go back to the ranged, and after, run a true game ihope.
     
  19. Bestban

    Bestban Chieftain

    Joined:
    Oct 13, 2019
    Messages:
    18
    Gender:
    Male
    Thanks for new update. Not sure if this is new, since I just had my first AdvCiv game completed. An enlarged map by this change for Replay does look very nice :thumbsup:.

    In my last game, I found that AIs cancel resources trade deals very often, to a degree of disrupting game flows. Sometimes in the same turn, two or three AIs showed up at the door for cancelling existing resources deals. This made a feeling that they were all greedily using Excel sheets :scan: against existing deals. Could this behavior be made less frequent and/or more natural? For example, with some probabilities/uncertainties for cancelling resources trades. Thanks.
     
  20. xyx

    xyx Chieftain

    Joined:
    Aug 7, 2013
    Messages:
    20
    I second that, would be nice if playing against the AI would feel less like playing against against a godlike omniscient enemy. Maybe implementing a negligibly threshold might do the trick, say if the re-evaluation of a deal deviates less than 10% from the existing deal, just leave it as is. I realize that this objectively makes the AI worse, but I believe that the player benefit might outweigh this. This also seems psychologically plausible to me. If the difference in evidence towards two choice options is too small, humans tend to stick to the default (I could even dig up some numbers if you like :crazyeye:)

    Another thing that bugs me for a long time: I often use CTRL + H to select wounded units from a stack, which doesn't work when there are air or sea units on the same tile. This is an old bug also happening in vanilla, but maybe you care to fix this anyway?
     
    Last edited: Oct 27, 2019

Share This Page