October 30th, 2018, 14:59
Posts: 382
Threads: 10
Joined: Apr 2017
Re: the heroes not gaining XP bug, I've encountered it several more times. Seems like it can be replicated semi-reliably under these conditions: stack 3+ heroes (preferably 4+) in an army with various units; and, ensure that one or more of those heroes is lower than Myrmidon level. This is a frequent "newbie training" setup I use which is probably also why I encounter the bug.
Another question -- I've been tinkering with Famous in my builds. Is it truly entirely random? In two separate games, I've ended up getting no offers for several years.. like zilch, nothing, no units and no heroes. In another game I got an upper tier hero, magicians, and engineers all by 1404 or so. Feels like a real flip of the coin pick, which isn't true of other picks.
October 30th, 2018, 16:52
Posts: 10,496
Threads: 395
Joined: Aug 2015
Famous :
Offers don't happen before turn 30.
So in 1404 you've only had about 15 turns for offers to happen. In that short period of time, yes, a 1/6 chance for a hero can easily result in nothing.
The other possible reason is gold. Famous will give you better heroes more often, but those cost more. It also gives you higher level offers, which also costs more. If you don't have the gold available, the hero walks away without ever showing you the offer. It's easy to underestimate the gold required, or have it unavailable for just a few turns as you spend it on some urgent building. While a normal wizard rarely needs over 300 gold that early for a hero, a Famous one will often need 300-600, sometimes even more. (Especially if you also cast Just Cause to unlock one more hero tier above the one Famous already unlocks)
EXP bug : if you can get me a save file where it happens, I'll investigate again. As is I found absolutely nothing that could prevent heroes from gaining XP, I did check.
November 5th, 2018, 08:16
(This post was last modified: November 5th, 2018, 08:17 by jhsidi.)
Posts: 382
Threads: 10
Joined: Apr 2017
I'll get the save file to you next time I see it happen (not playing a hero oriented game at the moment).
About auto-resolve, how much has it been tested? I've seen some unexpected results lately, particularly from Death, which seems to get results from auto-resolve that don't make much sense. For instance, I saw an enemy stack go into a Nature node: the stack was 1 earth elemental (undead), 8 ghouls. The node was (I think) 5 giant spiders plus some war bears. This is early game and the wizard does not have Astrologer, so he'd have nothing useful to contribute in the battle.
My expected outcome from that would be: total wipeout, or the earth elemental survives. Instead, the entire stack survives and also raises 4 undead giant spiders. I'd been wondering why death AI always has huge amounts of undead creatures, so I guess this at least answered that question.
Also, just a note, I've never seen AI use skeletons. Actually I have no idea where the skeletons spell is supposed to fit since ghouls got the massive upgrade of ranged attack. The only thing I've used it for is map blocking (filling every square around my cities to impede the AI), which is admittedly pretty useful if only for quality of life.
November 5th, 2018, 08:22
Posts: 382
Threads: 10
Joined: Apr 2017
Two more questions, and I apologize in advance for being so questionable
1) How do you guys deal with mid / late game unit spam from AI factions? I'm talking about the AI attempting to fill the entire map, including your own territory, with junk units, to the point that it's a hassle just to move around. For some reason I get a *lot* of games where all 3 AI factions declare permanent peace with each other, so whoever I'm not at war at is busy filling space.
2) Along the same lines, what are your tips for keeping turn times down in late game? IIRC, once I raised my Dosbox cycles much beyond 100%, game performance actually seemed to degrade.
November 5th, 2018, 09:52
Posts: 10,496
Threads: 395
Joined: Aug 2015
Earth Elemental : 607 / 891
Ghouls : 451 / 379 / 297
Giant Spiders : 662 / 693 + node bonus
War Bears : 369 / 727 + node bonus
I'd say the result depends on the number of bears. Except, not really. Ghouls are ranged. They make up most of the attacker army. As the armies are roughly evenly matched, with a small advantage for the node, this means the ranged turns will turn this advantage towards the attacker. At 379 ranged power, 189 defense worth of damage is expected per ghoul, 8 of them means 1512. That kills 2, maybe 2.5 spiders worth of the node army. After that, the elemental is about even with a spider, so it's 8 ghouls vs 2 spiders and some, at most 4, bears. The number seems to indicate the ghouls win. They will be damaged, probably heavily, but damage is distributed between the attacking units, so it only brings them down to 1-2 figures instead of killing them.
So this seems to be the correct result. Strategic Combat has been tested quite much, so there shouldn't be any major bugs lurking in there anymore. (Whether the formulas used are an accurate representation of the units is a different story, let's leave that at "it's as good as possible".)
The AI isn't using skeletons because it picks Ghouls as the starting spell to ensure they have something capable of defending their fortress. The AI doesn't research much in the early game, and once they do have ghouls, they won't care to pick Skeletons as their next research for a long while. Skeletons are also horrible for the AI because they require tactics only the human is capable of (attacking missile units with them or using them in a full 9 stack with darkness or using them as unrest removal).
1. I don't care if an ally of mine is making the units, otherwise the only thing you can really do is avoid peace with AIs you could already beat and keep killing the things they build - or if able, eliminate them from the game ASAP. Alternately, you can surround their cities so newly made units don't get to be made due to lack of room, but that's the kind of tactic I rather not use below Master difficulty.
Later, Meteor Storm and Time Stop does wonders to either get rid of the units or completely ignore them. Otherwise I just build good enough garrisons that I can kill the stacks if they do attack.
2. Not much can be done besides killing the units, or eliminating all potential targets from the map. So peace with no lairs goes fastest (but contributes to building up armies), while multi-front war in a lair infested environment is slowest (but consumes the units quickly on one side or both, and then it'll be faster).
The recommended settings for cycles are in the docs/txt that come with the mod.
November 5th, 2018, 09:59
Posts: 382
Threads: 10
Joined: Apr 2017
Re: strategic combat, thanks for breaking down the numbers for me. For dosbox, I do have the cycles set as per the CoM help file, just wondered if there was something secret I'm missing as your turn times seem faster in gameplay videos. Probably it's just your different playstyle that results in less enemy chaff clogging up the map.
November 5th, 2018, 11:55
Posts: 382
Threads: 10
Joined: Apr 2017
OK, here's a save file to replicate the bug. Take the stack with Rakir / Serena / Valana and raze the Klackon settlement. Their xp starting is 87 / 74 / 16. After the battle it'll be 106 / 83 / 16.
... actually it's also odd that Rakir gets more than Serena. Is there something about XP gains I'm missing? Is it staggered by rank, or placement in the stack, or something? I played the battle 3 times and it didn't matter whether Valana cast spells and killed some Klackons or just stayed passive.
Download link: https://ufile.io/if67s
November 5th, 2018, 12:53
Posts: 10,496
Threads: 395
Joined: Aug 2015
No, XP should be equal to every unit. This seems to indicate the variable that stores gained EXP changes between the units somehow. (I looked for that sort of bug too last time but didn't see one.)
Yes, 106/83/16. So Rakir gains 19, Serena gains 9 and gains a level, Valana gains none. I suspect the zero exp might be caused by the level up window then, but the difference in amounts, idk. Need to investigate further.
November 5th, 2018, 13:13
(This post was last modified: November 5th, 2018, 13:13 by Seravy.)
Posts: 10,496
Threads: 395
Joined: Aug 2015
The only modifier to the amount of EXP is the winner being an AI player, and there is no way that could apply to your heroes. It isn't applied to the variable anyway, it only changes the number being added on each hero.
EXP is also skipped for heroes not owned by the winner - again this cannot apply to you.
One way for the last hero to gain no EXP is if the loop variable gets corrupted and it ends early, but can't see any code doing that.
So I've confirmed the bug reproduces, but still don't see anything that can cause it in the code. Might need to put a breakpoint in there and track it manually...
November 5th, 2018, 13:51
(This post was last modified: November 5th, 2018, 14:03 by Seravy.)
Posts: 10,496
Threads: 395
Joined: Aug 2015
Among other news, the Beastmaster is of the Beastmen race. Never knew that. Not that there is anything in the entire game that cares about the race of a unit.
Okay, so it seems Rakir already has 97 experience by the time exp is awarded. That explains how it becomes 106, as the amount of gain is 9. This seems to imply there is something else giving the hero EXP earlier in the code that we aren't aware of.
After clicking the level up dialog, the breakpoint fails to trigger for Valana. That means she is entirely skipped from gaining EXP.
At least this narrows it down - the variable with the EXP in it has no problems. The extra EXP comes from an earlier source, and the missing EXP is caused by skipping the unit.
Now the remaining question is, why. The unit at the time of execution, is owned by you, isn't undead, is alive, and doesn't have a fantastic unit's unit type.
...okay, problem solved. The level up window overwrites combat data entirely. So after it appears, all further EXP gains fail. Basically, this means it's impossible to show the level up dialog at end of battles and not break the game. I have to undo the addition of that feature... And then we are back to not seeing heroes level up.
...I guess if I remove it there and add a separate loop that only checks for levelups, after the end of battle, that could work. Except the dialog expects the hero without the level gain. This will be difficult to sort out.
Also, still no idea where Rakir gets the extra 10 EXP from.
|