Single Player bugs and crashes v36 plus (SVN) - After the 24th of October 2015

Status
Not open for further replies.
<snip>

@Joe: I suspect there's a few other issues afoot in your game so if it doesn't diminish turn times as much as hoped don't be too surprised. I expect to find more to address when I look directly into your save.

After applying the last 2 "fixes" to this Epic Deity game the turn times range from a low of 3:10 to a high of 23:43. To play 8 full turns plus taking the 9th turn to the EoT Red Button took 2 hrs and 44 min. I am 1 turn into the Classical Era @ turn 349.

If you need a Current save game let me know.

Couple of questions to you T-brd:
1. A combat rd for each unit in a battle is 6 rds unless killed, correct?
2. A unit while in this 6 rds of fighting Can achieve a Battlefield Promotion, correct?
3. Or are Battle Promos assigned After the fight?
4. If unit is attacked multiple times and survives how many BPs can they achieve and how many checks are run?
5. Or are the BPs assigned at End of All fighting before the next turn starts.
6. I have observed that many times a unit will receive a BP but still die. Why are BPs awarded to dead units? If they die should not this routine for checking or adding BPs be bypassed in the coding? Surely this would cut down on Eot processing would it not?
7. Finally why is combat 6rds? Can it be reduced? Even by 1 turn?
JosEPh
 
Good work that should help alot with the turn times.

It suggests that caching never really worked, i though it did so i didn't look at the checksum:(. There must be some error in the algorithm that is used in CvChecksum that leads to collisions in case you add 1 to it.

CvChecksum is used for other things as well so it could cause more issues.
That explanation was actually found to be incorrect.

Yesterday I spent the day trying to reprogram the whole method only to find that the way I wanted to go about it would not work because the function is declared a const and won't allow some of the things I wanted to do for struct vector based caching.

However, in the process, I noticed that the first time through the routine, when iValue is being found, the first unit that is a valid target, even if it doesn't come up with an iValue, is automatically assigned as the best unit. However, if the value is 0 and every unit that is a valid target is found to have a 0 value then when the function is run and all values are cached and it only finds 0 value units to target then on every subsequent check it really finds NO best unit.

The problem was with this part of the code but it also led to an understanding that the Assassinate missions weren't finding any units to be valid to target because there were some validity assumption checks that weren't being ignored as they should have been for that particular type of situation.

So my initial discovery was correct, that all cached values were coming up with a value of 0. The problem wasn't in the caching so much as it was these two flaws, that when a default defender was found and identified, it wasn't at least assigned some value when this was done for the sake of the caching to find the same default defender later, and that the calculation of value for assassination targets was not working properly.

Both issues are now resolved and we pretty much have the same caching system we did again. Do I have some suspicions there are flaws with the caching? Yes, I do still have some suspicions. But slight inaccuracies there are not equal to the slowdown not having it presents AND my attempt to deepen it failed (though I may later try to add a few new things to the way the current method works now that I understand it a bit better.) I wonder exactly how the checksum mechanism does work and if it gets around accidental mislabeling somehow but I'm not going to further stress on that. It could be the reason for some of those moments when you think you're going to attack one unit and instead you end up attacking another once you complete the command.

After applying the last 2 "fixes" to this Epic Deity game the turn times range from a low of 3:10 to a high of 23:43. To play 8 full turns plus taking the 9th turn to the EoT Red Button took 2 hrs and 44 min. I am 1 turn into the Classical Era @ turn 349.

If you need a Current save game let me know.
Well... you provided one but if you can catch one you know leads right into one of those really long ones it could help. You're obviously, as suspected, hitting something fairly severe.

1. A combat rd for each unit in a battle is 6 rds unless killed, correct?
Incorrect. A combat consists of as many rounds as is necessary to complete the combat. In each round, both units get an attack on one another. Both of these attacks can hit or miss, so in a round, you can have:
1) Unit A strikes Unit B AND Unit B strikes Unit A OR
2) Unit A strikes Unit B BUT Unit B misses Unit A OR
3) Unit A misses Unit B BUT Unit B strikes Unit A OR
4) Both units miss each other.

The likelihood of a unit striking another is based on the ratio between the strengths of the two units in battle. (the core odds)

When a hit takes place, the ratio of strength between the two units is also the major player in defining how much damage takes place. That damage can be modified specifically by tags for that.

After each round of battle, the odds are recalculated due to the new strength ratios based on the current health of the units. (As a unit is weakened, it loses combat worthiness and it becomes harder for it to hit its foe and does less damage when it does.)

Therefore, units that avoid damage and dish out damage early in the battle can get an upper hand that builds momentum against the opponent unit.

Once one unit no longer has any Health remaining because it has taken enough damage to eliminate it, the battle concludes.

I can get into how this works with withdrawal and so on as well if you like. But that's the basic barebones of it all.

2. A unit while in this 6 rds of fighting Can achieve a Battlefield Promotion, correct?
3. Or are Battle Promos assigned After the fight?
I'd have to check for sure but I believe that a BP is only assigned at the end of the battle. The only promotions that can be given DURING the battle would be poisons and critical hits, which have not yet been fleshed out.

4. If unit is attacked multiple times and survives how many BPs can they achieve and how many checks are run?
The BP is checked at the point where the unit would normally be given XP. It can replace the granting of experience points. Only one check but after each full combat. So if a unit is attacked many times in a turn, it could theoretically get quite a few. Generally speaking, the system is supposed to make it more possible to get a BP when the battle would have awarded a LOT of XP due to the difficulty of success. That's a formula that I think needs some review as a high chance of withdrawal (or automatic withdrawal due to combat limit) does not reduce this chance which is based entirely on the difficulty of a completely successful battle. Therefore a terrible chance of success but a high chance of withdrawal is a great way to earn lots of Battlefield Promotions.

5. Or are the BPs assigned at End of All fighting before the next turn starts.
No, at the end of a battle, not a turn, to replace the XP bonus from that battle or not.

6. I have observed that many times a unit will receive a BP but still die. Why are BPs awarded to dead units? If they die should not this routine for checking or adding BPs be bypassed in the coding? Surely this would cut down on Eot processing would it not?
That's something I've not seen but it could be possible simply due to the delayed death processing of a unit. Units cannot be immediately removed in their entirety after death but must wait til the end of the turn to be completely wiped. It's a crash avoidance issue and drives me nuts. But it's probably possible to put a check to make sure the unit is still alive before it starts getting into assigning a BP. What may be happening in this case is both units can potentially kill each other in a battle now and maybe when that happens, one or the other may seem to be the winner to the system.

7. Finally why is combat 6rds? Can it be reduced? Even by 1 turn?
Again, this is not a fixed number. If it often seems like 6 rnds, that may be helpful to establish as the most common amount. I've been having the code estimate that as 10 rather than 6 and there could be some benefit to getting zeroed in a little more accurately to the standard real average.

Some combats can go as long as 20 or more turns. It depends on a lot of factors. As equipments come into play, diversifying unit capabilities even further, you'll see fights that go on for a lot of rounds because neither side can do much damage to the other due to high armor or high dodge. These kinds of effects will exacerbate or minimize effects like strengthening or weakening with each round, which units will gain with morale or berzerking or encumbrance. Should get very interesting eventually to look at the story as it plays out in the combat log. I've gotten a bit better at understanding how to add to the combat log as well so more info will be going there once I get back to those projects.
 
1st your Capitol is not affected by the Dist. Maint %. All other cities are.
2nd I could not find the GEM 5 civ scenario map. And Only 2 maps in the Maps and Scenario sub forum are up to date with 9265; Pit2015's UEM and the RFC from cross clayton.
3. Was this game continued from a previous version? Or did you start it New with 9265?

4. The Big One: On Noble the DistMaint is reduced by 20%, Number of Cities Maint by 25% and Inflation by 35% which = 80%.

JosEPh

Thanks. I'm aware the 5civ map wasn't up to date, but I figured that'd only affect the map rather than the rest of the game mechanics. I started it new with 9265.

Given #4, then I'm even more confident it's a bug, because those modifiers should affect the individual maintenance subtotals, but instead they're affecting the final total in a cumulative way.

For instance, say your original city maintenance was:

DistMaint: 10 :gold:
Number of Cities Maint: 8 :gold:

Your original total would be 18 gold per turn. But on Noble, those subtotals are reduced to:

DistMaint: 8 :gold: (-20% from original 10)
Number of Cities Maint: 6 :gold: (-25% from original 8)

Your modified total would be 14 gold per turn, which is only a 22.2% reduction overall.

In my game, it's the total (the original 18 gold) that's affected by the -80% modifier, so my actual maintenance payment for that city would be 3.6 :gold: per turn.
 
SVN 9260: The Wanted Promotionline with H&S has the same tag as the Wanted Promotionline without H&S. This leads to Wanted II and the further promos not shown in the civilopedia and the promos not being clickable. When I tried renaming the promotion"line" without H&S, I got a strange error, but the civilopedia was alright.

If there are still some issues with the wanted system, this might be connected.

In SVN 9274 this problem is gone.
 
In SVN 9274 this problem is gone.

Yep. I interacted with it during the other debugging session and it reminded me to look into this. So I might've done this out of turn but it was bothering me and it was easy to fix. However... there's something about the WHY this was not working properly that I haven't researched fully that could become a larger disturbance when it comes to equipment plans. Not sure yet.
 
Thanks. I'm aware the 5civ map wasn't up to date, but I figured that'd only affect the map rather than the rest of the game mechanics. I started it new with 9265.

Given #4, then I'm even more confident it's a bug, because those modifiers should affect the individual maintenance subtotals, but instead they're affecting the final total in a cumulative way.

For instance, say your original city maintenance was:

DistMaint: 10 :gold:
Number of Cities Maint: 8 :gold:

Your original total would be 18 gold per turn. But on Noble, those subtotals are reduced to:

DistMaint: 8 :gold: (-20% from original 10)
Number of Cities Maint: 6 :gold: (-25% from original 8)

Your modified total would be 14 gold per turn, which is only a 22.2% reduction overall.

In my game, it's the total (the original 18 gold) that's affected by the -80% modifier, so my actual maintenance payment for that city would be 3.6 :gold: per turn.

I have to correct myself, the Noble difficulty those modifiers are what the AI gets not the player.

There are many files that affect the Dist and Num City Maint modifiers. I do not know all of them. And to try and confirm or refute your claim I can not answer at this time.

JosEPh
 
I'll take a look soon... most minis you've posted I couldn't do anything with since the dll version has changed since then. But this one, if I get right on it before manipulating the dll further, should be something I can at least look at.
 
Have any of you noticed "trade blocked fields by enemy ship" after destroying enemy ship which was performing this action?

I have noticed it couple of times (using couple of revisions) - currently I am using 9274 rev. It is quite annoying - I don't know any workaround to remove this blockade.
 
Have any of you noticed "trade blocked fields by enemy ship" after destroying enemy ship which was performing this action?

I have noticed it couple of times (using couple of revisions) - currently I am using 9274 rev. It is quite annoying - I don't know any workaround to remove this blockade.

I believe this is on the Bug "to do" list. We are currently backlogged.

JosEPh :)
 
A LONG ago list perhaps. Nothing recent. I was planning on considering some work on blockade issues within this version anyhow - though I didn't know if I'd actually try biting that chunk off or not. I can look into this then but I don't know how much control over that kind of front end stuff the dll has and how much of it may be in python. I believe it was determined to only be a graphical issue.
 
I believe it is not only a graphical issue - blocked fields can't be used by city.

I have tried these scenarios - 100% occurance:
1. delete cache/start civ4save with ship blocking my city -> next turn (because i am building ship) -> kill the unit - still blocked fields
2. delete cache/start civ from save after killing enemy unit -> still I have blocked fields
 
Please provide a save from the moment you would normally go to kill the unit. Save just before the attack and provide instructions as to what to attack with and how to find it on the map.
 
There's also something I recently noticed with regards to blockades. I've had blockades that can't be lifted, despite the blockading ship being destroyed. What's more, they wind up wreaking havoc on affected resources, to the point where they're occasionally still accessible, or even multiplied. I suspect it's related to defender withdrawal, in that if the blockading ship withdraws from an attack it no longer counts as the blockading unit, but the blockade still persists.
Somewhere to start, perhaps. Mind, I'm not certain if this is actually the case, and I don't have a convenient save nor is the issue common enough to quickly produce one. I'll try setting up such a scenario in worldbuilder sometime though, if I have the time and remember to.
 
SVN 9271 (or so, early August).

1. After Famen Temple is built, missionaries have no Morale promotion (but I think their success rate is 100%).

2. (maybe by design) Triremes (and maybe other water units) built in a city with Flavian Amphiteatre have no Combat 1 (but land units still do).

3. Maybe more light on problems with Workboats and Decaremes. I knew when they are selected, their mouse menu is displayed improperly (no menu or menu of an unit previously selected). Now I discovered their Sevopedia entries are empty. I suspect improper labels in their data.

S.
 
SVN 9271 (or so, early August).

1. After Famen Temple is built, missionaries have no Morale promotion (but I think their success rate is 100%).

2. (maybe by design) Triremes (and maybe other water units) built in a city with Flavian Amphiteatre have no Combat 1 (but land units still do).

3. Maybe more light on problems with Workboats and Decaremes. I knew when they are selected, their mouse menu is displayed improperly (no menu or menu of an unit previously selected). Now I discovered their Sevopedia entries are empty. I suspect improper labels in their data.

S.

Update to latest SVN and see if this is still the case. Promotions are now showing up in WB too as they were meant to do.

JosEPh
 
@T-brd,
15 minute EoT with this save. From game where previous save was supplied. This one includes SVN 9273 or 74 changes.

JosEPh
 

Attachments

Status
Not open for further replies.
Back
Top Bottom