MantisBT - VCMI
View Issue Details
0000289VCMIGUI - Hero screen / Exchange windowpublic2009-12-02 18:042011-05-29 21:07
anonymous 
Ivan 
normalminorhave not tried
closedfixed 
0.75 
0.82 
0000289: Primary stats
My all hero's have atak, defence, power and knownlage near 5milions lvl and mana -2 milions.
No tags attached.
jpg 1.jpg (387,852) 2009-12-02 18:04
https://bugs.vcmi.eu/file_download.php?file_id=150&type=bug
jpg
Issue History
2009-12-02 18:04anonymousNew Issue
2009-12-02 18:04anonymousFile Added: 1.jpg
2009-12-02 18:20WarmongerNote Added: 0000362
2009-12-02 18:22WarmongerNote Edited: 0000362bug_revision_view_page.php?bugnote_id=362#r437
2009-12-02 18:22WarmongerNote Edited: 0000362bug_revision_view_page.php?bugnote_id=362#r438
2009-12-02 23:25ZamolxisNote Added: 0000371
2009-12-04 20:14majaczekNote Added: 0000379
2009-12-04 20:17majaczekNote Edited: 0000379bug_revision_view_page.php?bugnote_id=379#r446
2009-12-04 22:50ZamolxisNote Added: 0000385
2009-12-05 10:56majaczekNote Added: 0000388
2009-12-19 01:23TowNote Added: 0000393
2009-12-19 01:23TowStatusnew => acknowledged
2010-07-26 23:27IvanNote Added: 0001183
2010-07-26 23:42TowNote Added: 0001184
2010-07-26 23:42TowStatusacknowledged => resolved
2010-07-26 23:42TowFixed in Version => 0.89
2010-07-26 23:42TowResolutionopen => fixed
2010-07-26 23:42TowAssigned To => Ivan
2010-07-29 15:42majaczekNote Added: 0001242
2010-07-29 16:24IvanNote Added: 0001244
2010-07-30 13:17majaczekNote Added: 0001251
2011-05-29 21:07ZamolxisStatusresolved => closed

Notes
(0000362)
Warmonger   
2009-12-02 18:20   
(edited on: 2009-12-02 18:22)
Awesome find :D. Any additional info or steps to reproduce?

Do you use 64-bit system?

(0000371)
Zamolxis   
2009-12-02 23:25   
Who needs mana when you have 543521312 Attack skill?! :D

Seriously, if you don't use 64-bit system, is there any other info you can give about it? A client log or description how you got to that?
(0000379)
majaczek   
2009-12-04 20:14   
(edited on: 2009-12-04 20:17)
I think it's about some signed/unsigned conversion or some wrong casting
also it could be memory corruption (wrong casting of classes?)

@huge attack
poor zalmoxis, don't you know that in-battle bonus from attack has a limit, do you? So if you have huge attack and opponent low defense, you only get poor maximum bonus...

(0000385)
Zamolxis   
2009-12-04 22:50   
Wasn't there a vid once with a pikeman vs black dragon battle, in which the dragon couldn't kill the pikeman because of it's high stats? :)
(0000388)
majaczek   
2009-12-05 10:56   
@zalmoxis
then it was a bug with two hexed units, and the dragon was hitting himself which was provoked by position of pikeman, so the pikeman wasn't hurt and the dragon killled himself

But Zal why are we offtoping?
(0000393)
Tow   
2009-12-19 01:23   
It's fault of Polish language files. They're built a little different and VCMI is not properly parsing all data.
Extract package with English files ( http://download.vcmi.eu/dataEN.7z [^] ) to the Data subfolder as a workaround.

Non-English language files are not fully supported yet, that's why we strongly recommend using English version.

@Warmonger
64-system wouldn't change anything, since the released package contains 32-bit binaries. VCMI would have to be recompiled to get an advantage (?) of 64-bit.
(0001183)
Ivan   
2010-07-26 23:27   
Just made VCMI work with Russian language files: for some reason there is single file (with hero classes info) which use "," as decimal separator.
So this one may be fixed - don't have Polish files to check it.
(0001184)
Tow   
2010-07-26 23:42   
Congratulations - Polish version does work too :)
I'll mark it as resolveed.
(0001242)
majaczek   
2010-07-29 15:42   
Ivan but your code assumes that there are two digits after decimal separator it would work weird if it has 3 of them or more
(1,006125 results as 62.25) also 1,5 results in 1.05
or we could safely assume none language files has diffrent numbers than fixed %.2f format?
better will be code which counts digits (also we can made function ReadCustomFloat which does the work of converting diffrent formated float text to real float/double so it may bereused?)
(0001244)
Ivan   
2010-07-29 16:24   
All float-point values in h3 files I saw had always 2 digits so this should work fine as workaround.
Best solution will be to check what symbol is present in file "," or "." and replace decimal separator with it but I don't know how to do this =(

It's easy to check position before and after reading but I thought that this is not required for value that MAY be used by AI which we still don't have.
(0001251)
majaczek   
2010-07-30 13:17   
Ivan, your proposition looks more friendly than mine
I thought about reading float as string then calculate digits after non-digit to be sure that we got proper offset for floating part and rest to be done as it is
(so it will support any float point separator even if it's a letter or ASCII129+)