(September 11th, 2016, 15:16)Nelphine Wrote: This has been happening for a few turns, although I didn't recognize what it was until now; but every time I go into the armies page, and then right click on Jaer's portrait (he's the first hero), the game freezes. It does not happen if I go into the Items page first.
Edit: Addendum, I just froze the game trying to click OK on the Armies page. Apparently NOT just Jaer/first place hero.
Interesting, I rarely use the armies screen aside from equipping heroes. Please give me the save file.
This should be the right save file. (In game, its the second save game slot, and this is save2, so hopefully that's right.) The file name in my game is Impossible Heroes 2
Select Armies, right click on Jaer. I'm assuming there is a remote possibility it's dosbox related (I run cycles = max, and I don't use the dynamic option), although my guess is that isn't the case.
Confirmed, the Wind Mage does crash the game. Not surprising, it's in a stack with two other heroes, yet that stack does not show the wind mage as being part of it. Moving the out of the tower fixes the bug. I suppose the wind mage was on the opposite side of the tower as the other part of the stack. I'll investigate further tomorrow.
Oh, yes, the wind mage did join from the other plane. I forgot that.
My guess is that hovering over the wind mage's army is what actually causes the freeze - right clicking is one way that does this, but if i actually choose that army (perhaps by scrolling through the list, or by selecting one of the other heroes) and then try to hit ok, that probably does it too. Or not, I'm not sure.
I think that actually happened to me once a long time ago, but I just loaded my autosave and didn't attempt to issue anymore commands I knew were invalid due to the planar/army/thingie.
Since I never understood what went wrong though I never said anything, at least I don't think I did. The wind mage is one of my absolute favorite heroes.
I also never realized I could move further than was legal for the ai, nor did I realize wind walking would let the same army fight twice in one turn, I'm just so used to clicking in the same spot I never "try" anything else. I've seen hadriex do a fancy trick with boats to give units getting off the boats all their movement points to use, which I also never do. (Depending on how you click sometimes passengers on a boat lose their movement and sometimes they don't?)
By the way, unrelated but the armies screen seems to allocate memory for 1000 units (which makes sense, that's the original max units in the game), so now that the limit was raised, in the unlikely case you actually produce over 1000 units all by yourself, I expect it to crash. I can't increase these allocations unfortunately, they're in the DS. Don't think anyone will even have that many units though, that's 111 full stacks of 9 units plus two more.
Yeah I can't imagine that. 60 cities, 6 towers, 40 nodes.. well I suppose I can imagine it, but I doubt it'll happen. is there any hung similar if an AI hits that high? They constantly run around with 100s of troops in impossible. I could see a long game having one AI hit 1000+
(September 12th, 2016, 16:07)Nelphine Wrote: Yeah I can't imagine that. 60 cities, 6 towers, 40 nodes.. well I suppose I can imagine it, but I doubt it'll happen. is there any hung similar if an AI hits that high? They constantly run around with 100s of troops in impossible. I could see a long game having one AI hit 1000+
They don't have an army screen and handle their units in "stacks". They have a limit of 80 stacks at a time they can process and a major part of their failure to move on the overland map came from a bug in that, as soon as they found a unit belonging to the 80th stack they didn't assign any remaining units to any stacks even if they were part of the first 80.
I managed to increase this 80 limit to something around 300 for the global stack system, the continent based is still limited to 80 but continents are smaller now so it works.
I'm not aware of any AI system that organizes all their units through variables at the same time so it most likely doesn't exist, at this time I have probably went though over 99% of the AI code. Oh wait, there was one, the disbanding selection but I made that allocate double.
Update!
Focus is on AI improvement. Most important changes :
-AI will now try to save mana in combat if they are low to make sure they don't run out when their capital is attacked and still have enough to cast overland spells for the turn (since the player's turn is in between the mana gain at end of turn, and the AI's own turn)
-AI will try to equip heroes in the best way possible (meaning most stats, best abilities, stats that work well together, and minimal redundant abilities, see related thread for details)
-Fixed more AI settler related problems.
-Fixed AI engineers to not get stuck.
2.8
-AI equips heroes with items smarter. Equipping procedure completely rewritten.
-When units move randomly to look for a target to attack in combat, they will now move on a straight line and will immediately stop and attack if they discover an invisible unit.
-Fixed a memory corruption bug introduced in an earlier version by a typo.
-The AI will not use units to cast Counter Magic in combat if they have less than 35 mana.
-The AI will now only cast Great Unsummoning if the number of enemy fantastic creatures with 12 or lower resistance – allied fantastic creatures of the same is >=5.
-Updated some predefined items
-Rangers are now a stronger unit that requires an Armorer's Guild and has 6 melee, 7 ranged, 4 armor, 8 resistance, 3 movement, 4 health, 4 figures and 6 ammo of arrows
-Fixed AI Disrupt use : It now checks for presence of walls at the correct location instead of outside the battlefield. Fixed the same bug for Crack's Call too, however as that targets units first and walls only if no units are legal targets, in this case the AI goes with the assumption that flying units are most likely behind the walls, so instead of the front, it targets the two towers at back to open a path into the city area where it is least likely units can stop it. If the number of defenders is low enough, this should make it easy to enter the city.
-AI Disrupt use, wall tiles to target and their order of destruction changed to be more effective.
-AI now considers Disrupt a type B (use when at advantage) spell with +10 priority.
-The AI is now forced to reevaluate all continents when a settler boards a ship to make sure it is not going to be sent back where it comes from.
-When the AI selects a main settling continent, it will now check for the availability of a valid spot for building on that continent.
-When the AI selects a main settling continent, selecting continents that are of any type are allowed, except ones with no owned cities yet and existing enemy army presence of at least 1200 production cost total.
-Allied units no longer count as “enemy presence” in global continent evaluations.
-AI teleporting units moving backwards before ranged action should now work.
-If the AI is low on mana, it'll try to conserve it and spend less on unimportant battles.
-The AI will now aim to have 32x its casting skill as mana available in reserve instead of 16x.
-Fixed : AI engineers do not go around obstacles when building and either enter lairs or fail to move completely.
-When a unit attempts to move to a destination that would put the total unit count over 9, it'll keep moving and only stop directly before the invalid tile, instead of not moving at all. This also affects AI movement. (and allows AI engineers to build towards a city with full garrison)
-AI units that want to move but are blocked and have unused movement remaining (meaning they already reached the blocking tile) will stop and cancel the movement order (only really matters on engineers, other units reset orders every turn anyway)
-Increased AI's priority to build engineers
-The armies screen no longer causes a crash when an army is in a tower.
-Fixed bug : AI pays the cost of the second tile for the first tile of building a road.
-AI settlers are no longer allowed to disembark on any type 3 continent, and can only do so on the selected main settling continent, or anywhere if no such continent is available.
-Fixed : “-The AI will not keep certain unit types behind city walls and will always use them to move out and attack if able, even if the enemy does not have ranged superiority or mana leak.” did not work in some cases.
-During combat, the AI will slightly prefer to attack heroes, flying, breath, thrown, first strike units, and slightly avoid regenerating and combat summoned units.
-Fixed : Sorcery Conjunction increases the gained skill improperly.
-Fixed bug : When the game refreshed city data and enforced the minimal farmers to prevent starving, it did NOT include the effect of the farmers into the data. Thus, the city still shrunk. This bug didn't affect the player because recalculation is done every game tick for them, it's pretty much impossible to hit “next turn” before the second recalculation fixes the data. However it prevented AI growth and was the main reason for seeing so much 1 pop capitals (paired with losing population through settlers)
-In the optional portrait files, the Beastmaster hero's unit sprites have been redrawn to match the character name and portrait.
-In the optional portrait files, the Druid hero's unit sprites have been redrawn to match the character name and portrait.
Also, a question. Since random generated items work better now (can include enchantments and try to use up remaining treasure points by adding abilities as long as there are less than 5, generally resulting in items with more diverse effects), do we still want to enforce the game to always use predefined items for treasure unless not a single valid item can be found? Or do we want completely random items to appear sometimes? Keep in mind that I removed most of the predefined items in the cost 0-500 range so those will be often random, there really isn't a point in a predefined item that is +1 attack and defense. Might as well have those low tier items be random for more variety. However mid and high end items, 1000+ cost, there are so many that running out of them is very unlikely. So random items in that range are unlikely to appear in a typical game, maybe very late if the AI already cleared everything out and also created artifacts, which also use the predefined set first. Cost 500-1000 might run out and get random generated in the late game as there are "only" 37 in the range, higher is unlikely.
PS : In the tools file there is a new executable, itemanal.exe which shows you statistics about the predefined items, how many times each type of item, ability, etc appears and such, as well as generating a convenient list about the items themselves, that shows otherwise hidden abilities that aren't displayed in the item editor due to being illegal on the item type.
I'd like to keep the predetermined item, mostly for people who like making their own for the item make file. Maybe an optional file for people who want mote randomized ones?