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

Single Player bugs and crashes v39 download - After July 20th, 2019

Discussion in 'Bugs and Crashes' started by Thunderbrd, Jul 21, 2019.

  1. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    Please report all single player bugs and crashes from the v39 download here.

    SVN users please use the other thread. This will make it easier for all when trying to find solutions.

    However, you will likely need to update to the latest SVN version (at least up until we break compatibility) to get a chance to verify that the bug is still in place, and to be able to easily get an update that fixes the bug afterward, so you may want to first get the latest SVN version if you can before reporting a stock v38 bug.

    To assist us in fixing the problem please include the version of C2C you are playing.

    If the bug involved a repeatable "Crash to Desktop" (CTD) or similar please include
    • a save and description of how to reproduce the crash
    • a screenshot if one applies to show the issue
    • if your mods folder is not Caveman2Cosmos please state what it is when posting a save to help the modders and save them time when trying to identify the problem.
    • the MiniDump.dmp file. It is found in your Beyond the Sword folder that contains the Mods file containing Caveman2Cosmos. IE the folder that contains the BeyondTheSword.exe file.
    If the bug includes error messages then the Python.Err file in the logs folder would be useful also. It can be found in the same location as the the Saves folder containing your save games.

    A screen shot.

    Basically as much information as you can that will help us find the problem[/INDENT]

    If you saw the AI doing something stupid/unoptimal/otherwise bad make sure your BBAI logging is set to 3 in the BUG options. Then, post a savegame exhibiting the behavior as well as the BBAI log, found in the Documents/My Games/Beyond the Sword/Logs folder.

    How to turn on logging.

    In the Civ 4 INI file, located in Documents/My Games/Beyond the Sword, there are some logging options. Make sure they look like this.
    Code:
    ; Enable the logging system
    LoggingEnabled = 1
    
    ; Enable synchronization logging
    SynchLog = 1
    
    ; Overwrite old network and message logs
    OverwriteLogs = 1
    
    ; Enable rand event logging
    RandLog = 0
    
    ; Enable message logging
    MessageLog = 1
    Note: You only need to have RandLogs on if you are playing Multiplayer, otherwise just leave that off (thx Cyrusfan)


    How to turn on the AI logging.

    The AI logging is turned on in the BUG options screens. It is the BBAI log mentioned on the Logs page. It writes to the same folder as the other logs creating a BBAI.log file there.

    Known issues
    If you are playing on Windows 7 and get a crash, play in Win XP compatibility mode and you might get past the crash.

    There are still some possibilities for crashes in the unit combat animations. Try turning on the fast combat options in the main Civ IV options panel and see if the turn gets past that point if you have crash troubles and you're allowing combat animations to show. We THINK that these have largely been cleared up but there's still some potential for it I think. Some air unit animations are still disabled as a result of known crash bugs there.

    We have some known spots where we have some pointer problems that can cause crashes. Those are getting as fixed as we can get them before we break compatibility so we'll have to really make the compatibility breaking updates very apparent when we hit that point soon.
     
    Last edited: Jul 21, 2019
  2. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
  3. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,013
    Gender:
    Male
    Location:
    Western IL. cornfields
    Should this be v39 download?
     
  4. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    Corrected.

    Y'all should be modders. You have a good eye for details ;)
     
    KaTiON_PT, raxo2222 and Toffer90 like this.
  5. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,946
    Gender:
    Male
    Location:
    Germany
    This is still a terrible hack what if a unit has 4 moves.
    With 1/4 the move cost that unit get's 4 moves instead of 2 from a double moves promotion.


    At least to me this seems incorrect.
     
  6. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    That's pretty close to what it would've been moving through forests on a double move with 4 moves in Vanilla isn't it? The behavior works more as it did there, meanwhile, hills still add some to slow the total moves down some, as does the underlying terrain if it is more or less rough (which vanilla never did account for). And an attack always costs a full point minimum.

    As for say, through reefs, with the reefs and coral now adding up to a total of 7 and 6 respectively, that 1/4 isn't going to get them much farther and it certainly isn't going to get them farther than the normal movement those ships have through normal coast, since overall it's still more costly per move (1.75 and 1.5 rather than 1 or less in total move cost). We may feel that some features on land don't cost quite enough at the moment but so far it's not too bad it seems in play from what I'm experiencing.

    The reason the unit isn't usually getting 4 moves instead of 2 from a double moves promotion is because the terrain is counted in the total cost WITH the feature. Even a flat land smooth terrain with a forest is at least a cost of 3. Yes, that can mean more than double the total movement but it gets much more costly than that in many cases. I mean if we need to rename the tags, that's fine by me but this is much closer to the vanilla intent in the additive terrain+feature movement cost formula.

    The alternative method to all of this, which would also kinda be incorrect, would be to have the unit ignore the terrain's portion of the plot's movement cost entirely if they have double move through the feature that's on it, then also halve the feature's cost. The reason I find this somewhat incorrect as an approach, even though it would present the same end effect as what happens in vanilla, is that you'd have no ability to consider the variation in the difficulties of the underlying terrain cost itself. So instead of doing that, we just ALSO halve the cost of the terrain by applying the halving twice to the overall movement cost of the plot. Once for the feature and once for the terrain under it.

    We have to do this as a manipulator to the plot cost because we aren't going to want to assume that every space of the unit's movement is moving through applicable terrains/features.
     
    Last edited: Jul 22, 2019
  7. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,946
    Gender:
    Male
    Location:
    Germany
    It's even more wrong as it looked at first or i'am missing something!
    For a unit with 4:move:
    In vanilla a plot with Grassland as terrain and Forrest as feature costs 2:move:. Feature double move would be calculated 2:move:/2=0.5:move: that means a unit gets double moves.
    In C2C a plot with Grassland as terrain and Forrest as feature costs also costs 2:move:. Feature double move 2:move:/4=0.5:move: that means the unit gets eight moves.
    Even if the Forrest would be changed to 2:move: it would be 3:move:/4=0.75:move: that means the unit gets six moves.

    I feel :crazyeye: so i think i'am going to play something simple like CivVI for a while.
     
    Last edited: Jul 23, 2019
  8. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    It would actually cost something like 1.8 after a modifier step that would reduce it slightly so that 1 space move units would get an extra move through the plot.
    Thus you'd have 1.8 / 2 = .9, leaving .1 at the end of a 1 space move unit to then enable them to move again. If you had 2 movement, you'd basically get a total of 3 movement through 2 forest plots and then an extra. .9+.9 = 1,8 and .2 remaining for the third space of movement.

    Yes, this current layout really does mean twice as much movement as the unit has IF you are moving through valid features/terrain for each space of your move (double move). I'd be willing to increase forests to 2 (old growth to 3) and jungles to 3.

    If you are suggesting that what double move should mean is that if the first plot is a valid plot of that type then the unit should just get an extra move point, then we could always make it simply mean that and do a quick 'after the first move' check to give another movement point if they moved onto the qualifying plot. Should probably rename it at that point but it would maybe be sufficient for all.
     
  9. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,946
    Gender:
    Male
    Location:
    Germany
    For a unit with 1:move: it would be 1:move:/2=0,5:move: in Vanilla.
     
  10. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    Well... hmm... going to the original code:
    Code:
        bool bHasTerrainCost = (iRegularCost > 1);
    
        iRegularCost = std::min(iRegularCost, pUnit->baseMoves());
    
        iRegularCost *= GC.getMOVE_DENOMINATOR();
    
        if (bHasTerrainCost)
        {
            if (((getFeatureType() == NO_FEATURE) ? pUnit->isTerrainDoubleMove(getTerrainType()) : pUnit->isFeatureDoubleMove(getFeatureType())) ||
                (isHills() && pUnit->isHillsDoubleMove()))
            {
                iRegularCost /= 2;
            }
        }
    From original Vanilla code.
    The move denominator was actually 60. I dunno... trying to look at it now, I'm finding it really super confusing how they managed to make this work.

    Hills without forests would be 2 cost and with them would be 3 and either way you'd get to move an extra past such a plot if you had forest OR hills double movement on a one space unit. Doublemovement was rare to be added to a unit with more than 1 movement.
    Spoiler :
    Code:
    int CvPlot::movementCost(const CvUnit* pUnit, const CvPlot* pFromPlot) const
    {
        int iRegularCost;
        int iRouteCost;
        int iRouteFlatCost;
    
        FAssertMsg(getTerrainType() != NO_TERRAIN, "TerrainType is not assigned a valid value");
    
        if (pUnit->flatMovementCost() || (pUnit->getDomainType() == DOMAIN_AIR))
        {
            return GC.getMOVE_DENOMINATOR();
        }
    
        if (pUnit->isHuman())
        {
            if (!isRevealed(pUnit->getTeam(), false))
            {
                return pUnit->maxMoves();
            }
        }
    
        if (!pFromPlot->isValidDomainForLocation(*pUnit))
        {
            return pUnit->maxMoves();
        }
    
        if (!isValidDomainForAction(*pUnit))
        {
            return GC.getMOVE_DENOMINATOR();
        }
    
        FAssert(pUnit->getDomainType() != DOMAIN_IMMOBILE);
    
        if (pUnit->ignoreTerrainCost())
        {
            iRegularCost = 1; 
        }
        else
        {
            iRegularCost = ((getFeatureType() == NO_FEATURE) ? GC.getTerrainInfo(getTerrainType()).getMovementCost() : GC.getFeatureInfo(getFeatureType()).getMovementCost());
    
            if (isHills())
            {
                iRegularCost += GC.getHILLS_EXTRA_MOVEMENT();
            }
    
            if (iRegularCost > 0)
            {
                iRegularCost = std::max(1, (iRegularCost - pUnit->getExtraMoveDiscount()));
            }
        }
    
        bool bHasTerrainCost = (iRegularCost > 1);
    
        iRegularCost = std::min(iRegularCost, pUnit->baseMoves());
    
        iRegularCost *= GC.getMOVE_DENOMINATOR();
    
        if (bHasTerrainCost)
        {
            if (((getFeatureType() == NO_FEATURE) ? pUnit->isTerrainDoubleMove(getTerrainType()) : pUnit->isFeatureDoubleMove(getFeatureType())) ||
                (isHills() && pUnit->isHillsDoubleMove()))
            {
                iRegularCost /= 2;
            }
        }
    
        if (pFromPlot->isValidRoute(pUnit) && isValidRoute(pUnit) && ((GET_TEAM(pUnit->getTeam()).isBridgeBuilding() || !(pFromPlot->isRiverCrossing(directionXY(pFromPlot, this))))))
        {
            iRouteCost = std::max((GC.getRouteInfo(pFromPlot->getRouteType()).getMovementCost() + GET_TEAM(pUnit->getTeam()).getRouteChange(pFromPlot->getRouteType())),
                               (GC.getRouteInfo(getRouteType()).getMovementCost() + GET_TEAM(pUnit->getTeam()).getRouteChange(getRouteType())));
            iRouteFlatCost = std::max((GC.getRouteInfo(pFromPlot->getRouteType()).getFlatMovementCost() * pUnit->baseMoves()),
                                   (GC.getRouteInfo(getRouteType()).getFlatMovementCost() * pUnit->baseMoves()));
        }
        else
        {
            iRouteCost = MAX_INT;
            iRouteFlatCost = MAX_INT;
        }
    
        return std::max(1, std::min(iRegularCost, std::min(iRouteCost, iRouteFlatCost)));
    }
     
    Last edited: Jul 22, 2019
  11. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,946
    Gender:
    Male
    Location:
    Germany
    That must be another game you are talking about or maybe i have the wrong game installed.

    Either way i need something simpler otherwise i'am going crazy.
     
  12. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,631
    Location:
    Norway
    And this is why I in MToS don't allow any units to get the double move stat, no promotions give it. I simply don't like the effect of that unit stat.
     
  13. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,511
    Gender:
    Male
    Location:
    Canberra, Australia
    The extra move promotion is very broken in C2C.
     
  14. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,013
    Gender:
    Male
    Location:
    Western IL. cornfields
    One man's confusion ie loss is another man's gain. I don't fret over things like this. I take what the unit and promotion gives me.

    All these mechanics are supposed to have been tested and found to be true. If they are not then that is on the one who made the rules. And upon that person's due diligence to see that it works as intended. Just sayin', that's how I see it.
     
  15. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    The tags are doing exactly what they are supposed to be doing, doubling the end result movement of units that are moving directly through the territories that have the features and terrains they have double movement through.

    The problem, so far as I can tell, is that we all seem to maybe(?) disagree as to what double movement is intended to mean. Obviously, it can mean different things to different folks. So when Alberts2 says
    For a unit with 4 base movement points, that's correct. It should move twice its normal movement by the time it is complete with its turn as long as it is moving through the easiest form of its double move featured plots with each step. Thus, double move.

    Now, if we think we need to nerf that ability and make it something other than it was originally meant to be, then we can have that discussion. But in the original CivIV, regardless of how its super weird math ended up at, if you had a 1 move unit, like a Warrior, and you had Forest Double Movement, you would be able to move an extra space beyond that forest if a forested plot was the first plot you moved into. What would happen with 4 movement units was a little more complicated... It wouldn't end up with 8 spaces moved through forest but it was pretty close.

    To replicate it closer, we CAN enhance the movement cost of a forest still (making it 2) without losing the doubled movement on a 1 mv pt unit, but then that's what a jungle has now for that reason. Any higher and you end up negating the doublemovement as the total of the plot becomes 4 (/4 still = a full 1 which eats up the full movement point of the unit.)

    What we have works BUT the original design for vanilla was somewhat restrictive and tended to not go on units that wouldn't move more than 2 spaces, which was then usually trumped by the effectiveness of the roads at the time. Mounted usually didn't have access because it came on a defensive promotion which as no-defensive bonus units they would not be able to take the 2 promos that gave the effect. Thus only slower units usually ended up with it and it was overridden by the effectiveness of roads later.

    For us, we're using it for naval units to give wooden ships a predilection for coastal movement and on more advanced ships improved ocean travel but worse coast travel. We're also currently using it on exploration boats to give double move through reefs and coral now, which is what allowed me to make the double terrain movement not count ENOUGH on wooden ships that it would keep them from being stopped by reefs and coral otherwise.

    Thus, @Dancing Hoskuld , all this is largely under fierce scrutiny right now because I fixed your problem with reefs and coral where no amount of extra movement cost on those features could keep wooden ships from sailing through. So you'll have to explain what you mean by it's broken in more detail. The additional movement point is what it is and that's a totally different part of the equation for movement.
     
    Last edited: Jul 22, 2019
  16. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,511
    Gender:
    Male
    Location:
    Canberra, Australia
    I had a hunter with movement 2 able to move 8 plots when they had double movement if forest. They also attacked at least twice for a total of 10! It could be some thing like the different terrain features that count as forest is what is causing the problem since there was bamboo and ancient forest as well as normal forest involved.

    PS yes the ship movement is working as expected (so far).
     
  17. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,013
    Gender:
    Male
    Location:
    Western IL. cornfields
    How does a regular Hunter attack twice? Only a Great Hunter can attack twice.
     
  18. KaTiON_PT

    KaTiON_PT Emperor

    Joined:
    Jan 2, 2010
    Messages:
    1,090
    Location:
    Portugal
    Only if he has the promotion Hunter Tactics level 4.
     
  19. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,264
    Gender:
    Male
    Location:
    Las Vegas
    I think I might know what the issue is there but just to be sure, do you have the save and can you point out the unit? I'm wondering about conflicts with effects that give double feature move on a unit that ignores terrain costs. As Joseph points out, the unit would have to have a tag that makes him capable of attacking multiple times, and there really should be a minimum of 1 cost for an attack - but all this does need further reviewing. The concern I do have regarding double movement is that it may be cumulative with effects that it shouldn't be cumulative with. It's really supposed to be an either this OR route total if better, OR ignoring terrain cost. Some of that part may yet still need to be restored.
     
  20. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,013
    Gender:
    Male
    Location:
    Western IL. cornfields
    That should take awhile to get. And not be that common a thing.
     

Share This Page