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

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.
Further analysis and repair on these matters today.
Some conclusions:
1) The above formula had a severe error in it. (100-((pDefender->baseCombatStr()*10000)/(pDefender->maxCombatStr(pPlot,pAttacker))) The 10000 was up by 2 digits. I can see why i adjusted it when I looked at the core coding:
Code:
    if (iModifier > 0)
   {
       iCombat = (iBaseCombatStr * (iModifier + 100));
   }
   else
   {
       iCombat = ((iBaseCombatStr * 10000) / (100 - iModifier));
   }
This is where the game determines the actual total modifiers. All modifiers total up onto the defender rather than some going to the attacker and some the defender and so on, and I realize for the player this is a little difficult to cognize how it mathematically works. It certainly is for me. But it makes it so that if you have a -300% total modifier for the defender, you don't have the defender entering into a negative total strength. If the total of modifiers for the defender (and a positive for the attacker is an additional negative for the defender) then you enter into the second part of that statement there: iCombat = ((iBaseCombatStr * 10000) / (100 - iModifier)); Aside from simply expressing this here, I would have a hard time explaining it. But it keeps the defender able to get a nearly limitless amount of combat penalties.

This is why when you total things up it doesn't always seem to make sense. If you apply the totals through this formula it will begin to look more accurate. However, I admit that the way the total modifier display was calculating was way off. After my next commit, it should be accurate now.

Is this the 'odds being way off' that people have been complaining about for a long time? If so it's nice to think that's finally resolved.

One neat discovery I made was to further explore the odds panel in the bug options and I found that I could get a one line attacker stats listed there too above the defender and that was incredibly handy for me as a player, particularly since sometimes this help page is getting a little overwhelmed now and then lately.
 
My Classic Work boat to the west of Aachen in the south of my empire can't build a beacon on the Great Barrier Reef. A quick look at the XML indicates that it should so a more detailed look is needed
 

Attachments

The changes to the Tech tree have put Cryptography in the same place as another tech edit Road Building I think
 

Attachments

  • cripto_tech.jpg
    cripto_tech.jpg
    359.6 KB · Views: 44
Another bug - automated workers not staying automated

I have two islands both with a city on them. One has one other land plot and the other has two other land plots. I have improved the land plots the way I want and I have the "automated workers don't replace existing improvements" option on.

I used to be able to automate a worker on the island so that it would automatically upgrade the routes when I get the tech and resources for them.

However now the workers are not staying automated, I have to give them orders every turn!

You can see this in the same save as the boat error above but you will need to automate the worker Asyut to see the problem. I set it to fortify so I could play on.
 
Playing C2C_World.py A Trireme which can now enter sea tiles can also enter 'Tropical_Trench', I assumed that 'Tropical_Trench' should be an Ocean type tile (right or wrong?).
 
Playing C2C_World.py A Trireme which can now enter sea tiles can also enter 'Tropical_Trench', I assumed that 'Tropical_Trench' should be an Ocean type tile (right or wrong?).
And here is the problem :lol: navagation by water craft is about how far you are from land not how deep the water is. If there is a maximum of one plot between the trireme and the coast it should be able to get there.
 
I will have to check on distance, but I know it is not in my cultural area and It was at least 3 tiles out.
 
Playing C2C_World.py A Trireme which can now enter sea tiles can also enter 'Tropical_Trench', I assumed that 'Tropical_Trench' should be an Ocean type tile (right or wrong?).
You are right, trenches are too far out from land for the trieme to enter. Could you look into it harrier? Impassable terrain should be listed for the trieme in unitinfo xml.
 
And here is the problem :lol: navagation by water craft is about how far you are from land not how deep the water is. If there is a maximum of one plot between the trireme and the coast it should be able to get there.

I agree with this.
 
Another bug - automated workers not staying automated

I have two islands both with a city on them. One has one other land plot and the other has two other land plots. I have improved the land plots the way I want and I have the "automated workers don't replace existing improvements" option on.

I used to be able to automate a worker on the island so that it would automatically upgrade the routes when I get the tech and resources for them.

However now the workers are not staying automated, I have to give them orders every turn!

You can see this in the same save as the boat error above but you will need to automate the worker Asyut to see the problem. I set it to fortify so I could play on.
I know I reported this awhile ago and it was basically brushed aside. If we're automating workers, we shouldn't be having to re-apply their automation orders every time they complete an item. When it was brushed aside, someone said they were being threatened/wanting to go into a threatened area. Wasn't the case, or if it was, it was too convenient of an answer.
 
The changes to the Tech tree have put Cryptography in the same place as another tech edit Road Building I think
Yep needs moved down one spot. Looks like Hydro has some "rust" to knock off his modding skills. :mischief:
 
I know I reported this awhile ago and it was basically brushed aside. If we're automating workers, we shouldn't be having to re-apply their automation orders every time they complete an item. When it was brushed aside, someone said they were being threatened/wanting to go into a threatened area. Wasn't the case, or if it was, it was too convenient of an answer.

The only 2 modders that can do anything about this is the one reporting and the one who has all the C++ work on his back. And if DH can not fix it then only T-brd "Might" be able too. We can't always fix other ppls coding when a bug finally shows up. We don't have Paid C++ programmers to jump on this. Just so you know. T-brd does keep a list. But that does not mean he can fix everything that "bothers" a player.

Sometimes we just have to let it "slide" because at this time we don't know how to fix it. And that is why you will get a response like this, "just don't use it now".

JosEPh
 
My Classic Work boat to the west of Aachen in the south of my empire can't build a beacon on the Great Barrier Reef. A quick look at the XML indicates that it should so a more detailed look is needed
I'll take a look into it.
Another bug - automated workers not staying automated

I have two islands both with a city on them. One has one other land plot and the other has two other land plots. I have improved the land plots the way I want and I have the "automated workers don't replace existing improvements" option on.

I used to be able to automate a worker on the island so that it would automatically upgrade the routes when I get the tech and resources for them.

However now the workers are not staying automated, I have to give them orders every turn!

You can see this in the same save as the boat error above but you will need to automate the worker Asyut to see the problem. I set it to fortify so I could play on.

I know I reported this awhile ago and it was basically brushed aside. If we're automating workers, we shouldn't be having to re-apply their automation orders every time they complete an item. When it was brushed aside, someone said they were being threatened/wanting to go into a threatened area. Wasn't the case, or if it was, it was too convenient of an answer.
Yeah I did and I'm sorry... it wasn't exactly high priority at the time but I'm up to date on high priority bugs at the moment so I'll look into it now. I was hoping people wouldn't care, honestly, because the problem is that I made it so that workers would order up an escort if they need one and that screwed up human automated workers. This takes place in about 25 different places so it greatly complicates the issue to have to worry about players wanting to be lazy as they play. I don't automate and automation kinda pisses me off because why would you play a game just to have the AI play it for you? But I get it. My wife likes to automate what she can too. I wouldn't trust an automated worker to tie his shoes personally. Yeah, I've a bias against automation, specially that it greatly complicates AI construction and adjustments.

Anyhow, it shouldn't be too difficult to find the reviews I made to worker AI functions and design an !isHuman() switch... aka make it so that if the unit is controlled by a human player, do things the way it used to rather than the new way.

There was a complaint about missionary behaviors a while back but I don't see it as a bug... just a perceived one that has been with us for years that I'm not going to try to get in and resolve because in practice, it still works pretty well. If you want perfection, don't automate.
 
There was a complaint about missionary behaviors a while back but I don't see it as a bug... just a perceived one that has been with us for years that I'm not going to try to get in and resolve because in practice, it still works pretty well. If you want perfection, don't automate.
That has gone back to the way it was in BtS I thought. I'll have to check next time I play C2C.
 
Dont know if this is anything or not, and NOT a repeatable ctd . .. dont worry about it, unless u really want to look at it. . i have already moved on . .
 

Attachments

I wouldn't trust an automated worker to tie his shoes personally. Yeah, I've a bias against automation, specially that it greatly complicates AI construction and adjustments.

Here! Here! 100% agreement on the trust part.
 
SVN revision 9461 - I just got a great prophet when this error appeared:

upload_2017-3-4_14-45-13.png


Clicked OK and life continued on.
 
The quest was applied to different religions willy-nilly not taking into account that religions are different to each other in C2C and so the code does not work. It either needs to be moved back to effect just the standard BtS religions or a new one made for each religion. Either way it needs someone who understands Events to work on it.
 
You are right, trenches are too far out from land for the trieme to enter. Could you look into it harrier? Impassable terrain should be listed for the trieme in unitinfo xml.


Will do. I need to add tropical and polar trenchs to the file.
 
Back
Top Bottom