Single Player bugs and crashes v37 plus (SVN) - After the 24th of December 2016

@TB: Could you take a look at how the total defense combat odds is calculated for the odds window.
Would you have any idea why I always see these way too large sums that can in no way be the sum of some of those small numbers above it?
Spoiler Combat odds bug. :

@All: Have anyone seen this before, or is it something only I experience?

Yes I have seen this before and may have posted a screenie showing what you are seeing.
 
@TB: Could you take a look at how the total defense combat odds is calculated for the odds window.
Would you have any idea why I always see these way too large sums that can in no way be the sum of some of those small numbers above it?
Spoiler Combat odds bug. :

@All: Have anyone seen this before, or is it something only I experience?
Can you provide a save with instructions on replicating the help hover? I've not seen that before.
 
SVN 9446 repeatable crash-to-desktop.

Trying out the new post-V37 Deity/nightmare option, and came across a repeatable CTD.
Savegame and minidump attached. Since the bug reproduction method is mildly complex, I have decided to start a youtube channel and record the actions that I took to reproduce the crash.

Its my first video so it could be better (For future C2C videos I'll need to work on my diction and I'm not happy about the video quality. Maybe even buy a real mic) but I believe it is adequate:


Also there have been several updates to the SVN since v9446. Updating may help you.
Indeed. While the video was helpful in guiding me to replicate the steps you took, my system processed the turn all the way through to the next turn without error.
 
@TB: Could you take a look at how the total defense combat odds is calculated for the odds window.
Would you have any idea why I always see these way too large sums that can in no way be the sum of some of those small numbers above it?
Spoiler Combat odds bug. :

@All: Have anyone seen this before, or is it something only I experience?


Probably a wrong variable type used somewhere, so floating point becomes interger. Just a wild guess.
 
Last edited:
Indeed. While the video was helpful in guiding me to replicate the steps you took, my system processed the turn all the way through to the next turn without error.

Hi TB, Thanks for looking. I made a fresh download of the latest SVN, deleted my cache and profile, and using the same savegame and same actions, the game still crashed reliably (I checked it multiple times).

So I did some additional investigation, and found out that if I check the option "quick combat (defense)" the crash does NOT occur, but if I leave that option unchecked, the crash WOULD occur.

When I have quick combat (defense) checked, at the moment the crash should occur but doesn't, I get the message that my tracker killed a predatory cave lion while defending. So I speculate that the crash I reported is a graphics bug related to specific combat animations between an attacking predatory cave lion and a defending tracker (predatory cave lion attacking from the north).
 
Last edited:
Can you provide a save with instructions on replicating the help hover? I've not seen that before.
I've almost never seen it being right, unless I try to remember as far back as 1-2 years ago. It is wrong in 95% of all combat odds encountered in the entire game.

The defence modifier works out at just over 100%. So it should be 104.26.

Probably a wrong variable type used somewhere, so floating point becomes interger. Just a wild guess.
Not sure how you got that number, the total defense modifier should have been -35%.
The defenders unmodified strength was 3:strength:, after the total defense modifier was applied it became 2.85:strength:. Another thing that is odd is that -35% should have resulted in 1.95:strength:
I can honestly say that combat odds have begun to confuse me greatly after TB started on the combat mods,
The -10% attack :strength: for the attacker nullifies the +10% strength the attacker has due to the group volume difference, then we are only left with the attackers +35% :strength: vs. animals.
The 50% repel vs animals is not a defense modifier, in the same way that 1-2 first strikes are not considered a defense modifier. The total defense modifier should only show the % that the :strength: of the defender is changed.
 
Last edited:
The attacker has these stats:
+10% :strength:
-10% :strength: when attacking ▬ Imo this should affect the attackers :strength: not the defender as it currently does.
+35% :strength: vs. animals
+5% :strength: vs. Each group volume larger ▬ The bison was two group volume sizes larger than the wanderer, hence a 10% total.

There are many other stats in play, but they shouldn't affect the total defense modifier.
Attacker:
-35% damage
+40% dodge
+5% precision
withdrawal stuff
repel stuff
etc
 
Last edited:
Not sure how you got that number, the total defense modifier should have been -35%.

Neither do I. :blush:

A combination of jotting down the wrong numbers and not reading my own writing. When I did it again I got -38%. But that was using all modifiers.
 
So I did some additional investigation, and found out that if I check the option "quick combat (defense)" the crash does NOT occur, but if I leave that option unchecked, the crash WOULD occur.

When I have quick combat (defense) checked, at the moment the crash should occur but doesn't, I get the message that my tracker killed a predatory cave lion while defending. So I speculate that the crash I reported is a graphics bug related to specific combat animations between an attacking predatory cave lion and a defending tracker (predatory cave lion attacking from the north).
Ah... I suspected this was the issue. This is a common and known problem and so far no solution has been found so basically C2C is strongly suggested to be played on the quick combat options (and that's a first check to make to see if you can get past any crash.)

I've almost never seen it being right, unless I try to remember as far back as 1-2 years ago. It is wrong in 95% of all combat odds encountered in the entire game.
Well the odds of survival is what counts anyhow. You're just referring to the total combat modifier. It is strange that's at all off and it does warrant looking at the code. The problem with the combat help hover is that it's one of the longest functions in the code... very confusing at this point. Very easy to get lost in. Where EXACTLY that number is coming from or what it is referring to I'm not sure yet.

-10% :strength: when attacking ▬ Imo this should affect the attackers :strength: not the defender as it currently does.
This is tough because the underlying engine totals all modifiers up only on the defender. It stores a number of them and reports them to the exe and you cannot add to that list of stored variables. MOST of the combat help data derives itself from these side storage variables and everything non-vanilla is compiled otherwise and it's very difficult keeping them all organized correctly.

I'm not yet sure if the final is just a display problem or deeper but I'm almost 100% confident it would just be a display issue because a negative number like that would likely crash the system otherwise.
 
How is that CTD i had doing?? Also how do i raise the amount of these guys (pic) in the PreH Era only?? that was i can get my units promoted/upgraded faster . .
 

Attachments

  • Neat.JPG
    Neat.JPG
    318.7 KB · Views: 46
How is that CTD i had doing?? Also how do i raise the amount of these guys (pic) in the PreH Era only?? that was i can get my units promoted/upgraded faster . .
It actually is still something I'm trying to figure out. (the crash that is)

As for increasing the spawn frequency of neanders, it can be done in the spawn xml by lowering the base values they are given or in a global for the neanderthal spawn rate or by selecting raging barbs.
 
Ah... I suspected this was the issue. This is a common and known problem and so far no solution has been found so basically C2C is strongly suggested to be played on the quick combat options (and that's a first check to make to see if you can get past any crash.)

Is it possible to turn off combat animations for specific units? I don't see cave lions all that often. If cave lions are indeed problematic, turning off its combat animation would be a small sacrifice.
 
This is tough because the underlying engine totals all modifiers up only on the defender. It stores a number of them and reports them to the exe and you cannot add to that list of stored variables. MOST of the combat help data derives itself from these side storage variables and everything non-vanilla is compiled otherwise and it's very difficult keeping them all organized correctly.
Hmm, this promotion tag always count for the attacker </iCombatPercent>, but I guess that happens entirely in the exe too...
 
Is it possible to turn off combat animations for specific units? I don't see cave lions all that often. If cave lions are indeed problematic, turning off its combat animation would be a small sacrifice.
It's not just cave lions. It's randomly just about anything.

Hmm, this promotion tag always count for the attacker </iCombatPercent>, but I guess that happens entirely in the exe too...
I'd have to show you in code what I mean. It's not that the EXE is causing problems except to make it so that it's hard to follow suit with the original way in which modifiers were added. It doesn't keep us from adding more, just from using the same data transfer channels, which can confuse and frustrate the situation when modding it. Very hard to explain (and hard to work with!)
 
How is that CTD i had doing?? Also how do i raise the amount of these guys (pic) in the PreH Era only?? that was i can get my units promoted/upgraded faster . .

Basically have Neanderthal cities On and have Peace Among NPCs On. This way the Barbs and Neanders don't fight each other or the Predators or Beastly animals either. They will all come looking for you.
 
REpeatable CTD, after clicking next turn, mini and save in zip . . . .
Took a bit deeper analysis than usual to figure out how to resolve this properly but done and done. We're back to having a crash free mod aside from the graphics thing and anything that has yet to be reported.
 
OK, something has happened to the units INgame??? some u can see but 90% of them u cant???
This... just happens sometimes. There's already some efforts in the code to repair it when it takes place. But it's kinda funny because it causes the unit to run across the map from who knows where to the spot where they are supposed to be. AKA, wait and they tend to end up showing up.
 
@TB: Could you take a look at how the total defense combat odds is calculated for the odds window.
Would you have any idea why I always see these way too large sums that can in no way be the sum of some of those small numbers above it?
Spoiler Combat odds bug. :

@All: Have anyone seen this before, or is it something only I experience?
Ok, I figured out why I've never seen this. This is a line coming from an odds panel BUG option. I've never had it on so I've never seen it and didn't even know it was there.

There is obviously some mathematicaly reviewing that needs to be done for some of the combat help hover stuff but this is truly confusing. This is the code for that display:
Code:
                       if (iView & getBugOptionINT("ACO__ShowTotalDefenseModifier", 2, "ACO_SHOW_TOTAL_DEFENSE_MODIFIER"))
                       {
                           //szString.append(L' ');//XXX
                           if (pDefender->maxCombatStr(pPlot,pAttacker)>pDefender->baseCombatStr()*100) // modifier is positive
                           {
                               szTempBuffer.Format(SETCOLR L"%d%%" ENDCOLR,
                                                   TEXT_COLOR("COLOR_NEGATIVE_TEXT"),(((pDefender->maxCombatStr(pPlot,pAttacker)))/pDefender->baseCombatStr())-100);
                           }
                           else   // modifier is negative
                           {
                               szTempBuffer.Format(SETCOLR L"%d%%" ENDCOLR,
                                                   TEXT_COLOR("COLOR_POSITIVE_TEXT"),(100-((pDefender->baseCombatStr()*10000)/(pDefender->maxCombatStr(pPlot,pAttacker)))));
                           }

                           szString.append(gDLL->getText("TXT_ACO_TotalDefenseModifier"));
                           szString.append(szTempBuffer.GetCString());
                       }
I'm not sure if I've adjusted it or not but I'll have to go back to some pre-combat mod initial implementation code and see if it's been adjusted since then. As it stands, I'm not sure how the amount they are trying to total up is going to be the total defense modifier anyhow. The intent itself is a little mysterious.
 
Back
Top Bottom