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

AND2 and SVN Bug Reports - A New Dawn 2 ONLY

Discussion in 'Rise of Mankind: A New Dawn' started by 45°38'N-13°47'E, Aug 31, 2012.

  1. 45°38'N-13°47'E

    45°38'N-13°47'E Deity

    Joined:
    Jun 7, 2008
    Messages:
    5,885
    Location:
    Just wonder...
    Unfortunately no, we haven't been able to fix the problem with changing espionage weights. It seems to occur randomly which makes it harder to fix.
     
  2. 45°38'N-13°47'E

    45°38'N-13°47'E Deity

    Joined:
    Jun 7, 2008
    Messages:
    5,885
    Location:
    Just wonder...
    Hey guys, can someone please test this for me on your game? I'm not able to build a submarine unless I have both Oil Products AND Uranium, which is plainly wrong. I don't know how long this problem has been around, and I suppose it happens with other units as well. Thank you.

    Edit: Damn, I think it's always that code for OverrideResourceBuilding. I'm trying to fix it again.
     
    Last edited: Jan 19, 2020
  3. Zeta Nexus

    Zeta Nexus N E X U S

    Joined:
    Jan 23, 2014
    Messages:
    3,479
    Location:
    In a constant brainstorm...
    Something is very wrong with movement limits.
    I started a new game and it worked. After reloading it, ML is gone and I cannot get it back on.
    I tried clearing the cache, deleting the ini files, turning Terrain Damage on and off but I'm clueless (and frustrated).
     
  4. Zeta Nexus

    Zeta Nexus N E X U S

    Joined:
    Jan 23, 2014
    Messages:
    3,479
    Location:
    In a constant brainstorm...
    What I found out so far is, that the game does not save (?) ML into the save file. ML is on according to F8 screen but in reality it isn't. Any idea what can cause it?
    To make things even stranger ML does work on my Win10 tablet (but it's only good to do some modding at work but not for real playing).
    Any ideas? :confused:
     
  5. 45°38'N-13°47'E

    45°38'N-13°47'E Deity

    Joined:
    Jun 7, 2008
    Messages:
    5,885
    Location:
    Just wonder...
    I really have no clue about what's causing that ML problem. I experienced it myself from time to time. And I'm pretty sure ML is being saved, although for some reason sometimes it's not being saved correctly and for a while (don't ask me why), it looks like it's not possible to switch it on again, even in a different game.
     
  6. Zeta Nexus

    Zeta Nexus N E X U S

    Joined:
    Jan 23, 2014
    Messages:
    3,479
    Location:
    In a constant brainstorm...
    Maybe you could ask for help from f1rpo and Nightinggale? They seem to be both talented and helpful.
     
  7. devolution

    devolution Prince

    Joined:
    Oct 7, 2016
    Messages:
    343
    Gender:
    Male
    Location:
    Stavanger, Norway
    I may may partially solved this issue back when I performed a code review of AND2. Will have a look through the diffs and my notes. I fixed at least one assert that was related to this.
     
    Last edited: Jan 23, 2020
    Zeta Nexus likes this.
  8. Zeta Nexus

    Zeta Nexus N E X U S

    Joined:
    Jan 23, 2014
    Messages:
    3,479
    Location:
    In a constant brainstorm...
    ... or Devolution :D
     
    f1rpo likes this.
  9. Zeta Nexus

    Zeta Nexus N E X U S

    Joined:
    Jan 23, 2014
    Messages:
    3,479
    Location:
    In a constant brainstorm...
    BTW, if you are already touching the dll maybe you could merge your port district too? So 45 and Vokarya can add it to the mod the way they want.
     
  10. 45°38'N-13°47'E

    45°38'N-13°47'E Deity

    Joined:
    Jun 7, 2008
    Messages:
    5,885
    Location:
    Just wonder...
    I'll look at devolution fixes probably today or tomorrow, and I'll release a new dll with my own fixes today or tomorrow. Then after some testing I'll release devolution fixes as well.
     
  11. 45°38'N-13°47'E

    45°38'N-13°47'E Deity

    Joined:
    Jun 7, 2008
    Messages:
    5,885
    Location:
    Just wonder...
    I just noticed a glitch with a couple of units; BBM and Plague Bringer have a hidden prerequisite, uranium. They don't require uranium by themselves but since they're considered nukes, you can't build them unless you build First Nuclear Test, which requires uranium. I think we should find a workaround for this, but I'm not sure it's so easy.
     
  12. Inthegrave

    Inthegrave Chieftain

    Joined:
    May 28, 2019
    Messages:
    45
    Gender:
    Male
    It seems starting in the modern era with "No Transhuman Era" enabled causes the game to crash as soon as you end your turn.

    At least on my end this bug happens 100 percent of the time so hopefully it will be easy to reproduce.
     
    Last edited: Feb 1, 2020
  13. devolution

    devolution Prince

    Joined:
    Oct 7, 2016
    Messages:
    343
    Gender:
    Male
    Location:
    Stavanger, Norway
    Confirming, the CTD is caused by attempting to divide by 0 (where's Chuck Norris when you need him :p )

    Steps to reproduce: Just start any custom game in the Transhuman age, then end the first turn.

    CvGame::doTurn()

    iEraCount is 0 since both eEndEra and eStartEra equal 7 (transhuman)

    Code:
     EraTypes eStartEra = getStartEra();
     EraTypes eEndEra = (EraTypes)(isOption(GAMEOPTION_NO_FUTURE) ? GC.getInfoTypeForString("ERA_MODERN") : GC.getNumEraInfos() - 1);
    int iEraCount = eEndEra - eStartEra;
    //Assuming we divide turns evenly per era
    float fExpectedEra = (float)((getElapsedGameTurns() / (float)(iEstimateEndTurn / iEraCount)) + eStartEra);
    
    I suppose the easy fix is to assume that there will always be at least 1 era left, even in a transhuman start.
     
    Last edited: Feb 1, 2020
    Inthegrave likes this.
  14. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    552
    Location:
    Germany
    fExpectedEra is only written to a logfile in doTurn. In other words, the same formula is used elsewhere, namely in CvTeam::getResearchCost,
    Code:
    if (GC.getGameINLINE().isModderGameOption(MODDERGAMEOPTION_REALISTIC_TIMESCALE)) {
        // ...
       float fExpectedEra = (GC.getGameINLINE().getElapsedGameTurns() /
             (fEstimateEndTurn / iEraCount)) + eStartEra;
    I assume that will also crash.
     
    Inthegrave likes this.
  15. 45°38'N-13°47'E

    45°38'N-13°47'E Deity

    Joined:
    Jun 7, 2008
    Messages:
    5,885
    Location:
    Just wonder...
    Never experienced such a crash because I think nobody ever tried the mod that way (it's not designed nor balanced for later starts). I'll fix it in the next update, thanks.
     
    Inthegrave and f1rpo like this.
  16. devolution

    devolution Prince

    Joined:
    Oct 7, 2016
    Messages:
    343
    Gender:
    Male
    Location:
    Stavanger, Norway
    iEraCount is used as a divisor in several places so further adjustments will be necessary
     
    f1rpo and Inthegrave like this.
  17. Inthegrave

    Inthegrave Chieftain

    Joined:
    May 28, 2019
    Messages:
    45
    Gender:
    Male
    Another minor glitch I noticed awhile back is negative Combat Mods don't display right in game with combat odds.
    So a entry like this won't display right:
    Code:
                <UnitCombatMods>
                    <UnitCombatMod>
                        <UnitCombatType>UNITCOMBAT_HELICOPTER</UnitCombatType>
                        <iUnitCombatMod>-250</iUnitCombatMod>
                    </UnitCombatMod>
                </UnitCombatMods>
    
    I noticed this when making grenadiers ineffective against helicopters. In game the defense modifier is displayed in green text saying "+250% vs. Helicopter Units"
    when viewing combat odds, but in reality they are getting a penalty. Not a huge deal since the meter still gives accurate predictions.
     
    Last edited: Feb 2, 2020
  18. Inthegrave

    Inthegrave Chieftain

    Joined:
    May 28, 2019
    Messages:
    45
    Gender:
    Male
    Hope the devs don't mind the double post but I also noticed that "BUILDINGCLASS_CORPORATE_ENCLAVE" is using a nonexistent "economy" AI flavor.
    Should probably be changed to gold.
     
  19. Makaru

    Makaru Chieftain

    Joined:
    Jul 22, 2007
    Messages:
    16
    Location:
    Brisbane, Australia
    Hi Guys,

    I'm not sure if this is the correct place to report this, but i'm hoping somebody can shed some light on this weird behaviour:

    • 1933 Winter: I'm in a war with Shaka where his strength ratio to mine is approx 1.7ish. We end the end turn and the turn takes an exceedingly long time (10-15 mins), during which he manages to sink my transport fleet.
    • 1933 Summer: Following the long end-of-turn from 1933 Winter and sinking of my fleet, Shaka's strength ratio to me is now ~30.0, the "power" graph shows an huge single turn growth for Shaka, and a stack of ~2200 eemy Mech. Inf. has appeared on my front line.

    I've returned to the previous save and used world builder to inspect Shaka's empire, these Mech. Inf. don't existn anywhere and the power graph indicates a gigantic single turn increase in power; its like they are created magically during Shaka's turn. I've observed this earlier in the game where Shaka has had single turn influxes of gold and units. Once he was granted 25000 gold mysteriously in the very early game, and once he was granted a huge influx of units (power ratio went from approx 0.8 to 7.0-8.0 in a single turn). While I found this odd, neither time Shaka was engaged with me in any way so I able mostly ignore it.

    Saves attached; hopefully somebody can explain why this is happening.
     

    Attached Files:

  20. 45°38'N-13°47'E

    45°38'N-13°47'E Deity

    Joined:
    Jun 7, 2008
    Messages:
    5,885
    Location:
    Just wonder...
    Never happened to me before, I'll check the save when I have some time. Which revision are you using?
     

Share This Page