MantisBT - VCMI
View Issue Details
0000124VCMIMechanics - Otherpublic2009-10-08 02:522011-10-28 19:35
Steven Aus 
Ivan 
normalmajoralways
closedfixed 
0.74 
0.82 
0000124: When gaining more than one level at once (say in a very large battle) the game does not correctly update skills each level...
...so it can give the hero more than eight secondary skills, always resulting in a crash when you try to open their hero screen. If you receive the same skill twice (or perhaps three times in an even huger battle) you get extra levels of level of the skill (ie. Advanced for two level ups at once) and it doesn't crash. I think this is an unresolved bug from a previous version - VCMI needs to update the number of secondary skills the hero has and the levels of those secondary skills immediately after a level up and before the next level up, to prevent more than eight skills (and it crashing always) or skills initially showing as Basic and then turning out to be Advanced (or probably Expert if you get the Basic skill three times from one battle). I think that sometimes, apart from big battles, events such as a Tree of Knowledge can occasionally give two levels at once if you are low level and close to a level up already. And of course events giving an amount of experience that results in more than one level up at once would probably also trigger this issue.
No tags attached.
related to 0000050closed Tow Crash bug with hero advancing multiple levels at once (also gaining same ability several times) 
related to 0000574closed Warmonger Pyramid: If hero gains Expert Wisdom after fighting at Pyramid, he should be able to learn the spell offered 
parent of 0000145closed Ivan New gained secondary skill appears on the left side of the level advancement window. 
has duplicate 0000297closed  Gaining mutiple secondary skills is always basic even if should be adv or expert. 
related to 0000615closed Warmonger Creatures banks - if hero gains more than 1 lvl, reward appears after first gained lvl not after last. 
Issue History
2009-10-08 02:52Steven AusNew Issue
2009-10-08 05:24WarmongerNote Added: 0000065
2009-10-08 05:24WarmongerNote Edited: 0000065bug_revision_view_page.php?bugnote_id=65#r87
2009-10-08 05:27WarmongerStatusnew => confirmed
2009-10-08 11:19anonymousNote Added: 0000066
2009-10-09 01:35ZamolxisRelationship addedrelated to 0000050
2009-10-09 01:38ZamolxisNote Added: 0000078
2009-10-18 13:47Tow dragonNote Added: 0000130
2009-10-27 17:41WarmongerRelationship addedparent of 0000145
2009-11-20 23:31TowNote Added: 0000240
2009-11-20 23:31TowAssigned To => Tow
2009-11-20 23:31TowSeveritycrash => major
2009-12-04 22:46ZamolxisRelationship addedrelated to 0000297
2009-12-05 22:24ZamolxisRelationship replacedhas duplicate 0000297
2010-07-28 22:52IvanNote Added: 0001228
2010-07-28 22:52IvanStatusconfirmed => resolved
2010-07-28 22:52IvanFixed in Version => 0.89
2010-07-28 22:52IvanResolutionopen => fixed
2010-07-28 22:52IvanAssigned ToTow => Ivan
2010-07-29 15:03majaczekNote Added: 0001238
2010-07-29 15:05majaczekNote Added: 0001239
2010-07-29 16:12IvanNote Added: 0001243
2010-07-29 16:34IvanNote Edited: 0001243bug_revision_view_page.php?bugnote_id=1243#r1051
2010-08-18 14:15WarmongerRelationship addedrelated to 0000574
2010-08-24 14:34WarmongerRelationship addedrelated to 0000615
2011-10-28 19:35ZamolxisNote Added: 0002096
2011-10-28 19:35ZamolxisStatusresolved => closed

Notes
(0000065)
Warmonger   
2009-10-08 05:24   
Yes, we know well this problem. It works like first game sends all packages with level-ups containing levels to client and only then he has a chance to choose skill, which does not affect this particular group of levels.
However, set of skills has to be randomized on server to prevent cheating / oracle by client.

(0000066)
anonymous   
2009-10-08 11:19   
maybe do a pingpong call? I mean: lvl up - send - get skill choices - send - choose a skill - send - again lvl up - send - etc.
(0000078)
Zamolxis   
2009-10-09 01:38   
As compared to what we have reported as 0000050, this also adds a new piece of information, namely that apparently we may end up gaining more than 8 secondary skills during level up. Though considering the bug behavior, it kinda makes sense since the game doesn't seem to take into account the previous level up(s) when we have more of them in one go.
(0000130)
Tow dragon   
2009-10-18 13:47   
@anonymous

It's not the problem of concept - we know how it should be fixed. The problem is it's not so simple to implement.
(0000240)
Tow   
2009-11-20 23:31   
Not a crashbug anymore, since 0000050 is fixed (r1363).
(0001228)
Ivan   
2010-07-28 22:52   
rev 1702: fixed by implementing ping-pong call
(0001238)
majaczek   
2010-07-29 15:03   
I'd like also to not crash hero screen if we got more than 8 hero skills for mod able to handle greater maximum amount (and in h3 hero could know up to all skills, just it couldnt discover morethan limit)

WoG already gives a rule to check to be able to learn 10 skills and 10>8

also please do a scrolling feature for skills>8types
(0001239)
majaczek   
2010-07-29 15:05   
or should I post it to mantis as new request under feature?
(edit don't work here but posting new post does work, so my doublepost)
(0001243)
Ivan   
2010-07-29 16:12   
(edited on: 2010-07-29 16:34)
It will crash if have have more than 8 skills? Then it should be fixed I suppose.
Scrolling is a nice but not needed for now. Create report if you want but I think it will wait till some mod support.

Edit:
I have not tested more then 8 skills but code looks to be fine exept one minor issue that still shouldn't lead to crash:
498 //secondary skills
499 for(int g=1; g<=8; ++g) --- hardcoded 8 needs to be replaced with global variable
500 {

(0002096)
Zamolxis   
2011-10-28 19:35   
Checked in 0.86 and confirmed as fixed.

@majaczek: you can indeed create another report if you want. If you do, make it a Low priority Feature, maybe also mention "WoG feature request:..." in the Subject. It will be kept aside until support for WoG scripts will be created.