0.71b - development version

Fixed

Same bug. The engine plays the sound for the tile on the right of the hero. And in the case of #15 it tries to play the sound for border, which doesn’t exist. The bug is there:

client/CPlayerInterface.cpp:			newTerrain = cb->getTileInfo(path.nodes*.coord)->tertype;

I don’t know how to fix it, nor why there’s an off-by-one error.*

#50 When you set sound to lowest lvl, next time you start game it is still same. settings do not save.

Fixed.

Fixed.

Fixed.

Fixed,

I’m not observing this behaviour in H3. Even if I haven’t moved the slider, the OK button is active and clickable.
Screen from original H3:
img190.imageshack.us/img190/4444/split1.th.jpg

Or should we treat this as a feature request?

Fixed.

Fixed. The hero position in the game is actually one tile to the right than “visible” hero position. Path uses internal (“h3m”) hero positions, so it needs to be converted (CGHeroInstance::convertPosition).

It’s because of server-client interprocess communication.
Will be fixed somewhen later.

Fixed. I hope.

Fixed.

Really fixed.

When Map Editor is opened, VCMI cannot map the .lod files.
(Interestingly, it worked fine before, when we used ifstream to handle them. Maybe we should consider returning to it?)

Fixed by Tow Dragon.

Fixed by Tow Dragon.

The Lod file stays open during the game, and so it it’s locking out writers. However that may not be necessary since all the data is actually duplicated. The file just has to be closed. I’ll make a fix for that.

#51 - In a battle, my side had Master Gremlins (speed 5), Stone Gargoyles (speed 6) and Magi (speed 5). On the Stone Gargoyles turn I cast Slow on the one stack of Marksmen on the other side, reducing their speed to 4. However the Marksmen still got first attack, so I guess that part of the code determining battle order/priority after casting Slow or Haste isn’t working as intended yet. In a battle with the same army against a stack of Horned Demons - a Haste on the MGs or Slow on the Horned Demons affects number of hexes of movement but not the battle priority/order.

#52 - On a related issue, the +1 to attack, +1 to defense and +1 to speed for creatures on their native terrain isn’t implemented yet.

Best regards,
Steven.

Possibly related to the above:

#53 Cannot open WoG (anymore?) when VCMI is open. I am getting the following message box: “Unexpected Program Termination - Files from Heroes III are missing. Please reinstall Heroes III.”

I am not sure this is a new bug, because I’m testing on a different machine, with a different Heroes III version. But I never had this issue in previous builds on my other PC (I was quite often having both of them open in parallel, to compare some elements).

[size=75]@Tow: yes, I couldn’t resist the temptation & downloaded WoG & VCMI to test this last build. :stuck_out_tongue: I put them over an old version of SoD I had on the laptop I have with me on holiday. So the differences in game files as opposed to the PC I normally use for testing are that at home I have Heroes III Complete + the WoG Script Update, while here I have SoD & only WoG 3.58f, no Script Update][/size]

#54 LoadGame issues (could be related to #42).

This happened after I played 3 turns (3 Autosaved games), exited the game, then entered again:

  • Loading Autosave 3 led to crash: the Windows error window, even though sounds & animations were still working; however when I tried to move the hero, I only got the movement sound, as the game froze. I noticed afterwards that opening Autosave_3 led to an overwrite of Autosave_1.vlgm1 (but not .vsgm1 - see the date of the files in attachment).

  • Not surprisingly, afterwards loading Autosave_1 took long, and led to Runtime Error, with client being terminated (but not the console)
    Reloading A_3 overwrites A_1 + error (see file date.time).ZIP (135 KB)

#55 The Event message boxes do not adjust their width for larger texts:

H3C: i4.photobucket.com/albums/y104/Zamolxis/VCMI/VCMI%2007/th_090526-ATerribleRumorH3Cstart.jpg vs VCMI: i4.photobucket.com/albums/y104/Zamolxis/VCMI/VCMI%2007/th_090526-ATerribleRumorVCMIstart.jpg [size=75](map start: A Terrible Rumor)[/size]

What we have in VCMI seems to be the minimal width used in H3 for short Event messages. However H3 had 4 different widths (and 3 different length) depending on the size of the message. You can see in the H3C screenshot above the maximum width, or better open the attached map in WoG to check all the different sizes.

EDIT: By loading the attached map, I noticed that VCMI actually does have another Event msg window width, which however should not exist (too narrow): i4.photobucket.com/albums/y104/Zamolxis/VCMI/VCMI%2007/th_090528-SmallestEventmsgboxinVCMI.jpg

#56 While the width is minimal, there seems to be no limit in the length of the Event message boxes. Longer texts even go out of a 1024x768 interface: i4.photobucket.com/albums/y104/Zamolxis/VCMI/VCMI%2007/th_090526-ATerribleRumorVCMIstart-cust.jpg

We don’t have to stick to the H3 exact sizes. And I’m saying that because somehow I find it easier to read a message box which longer rather than wider. But the length should at least be limited to that of the game interface. Also, the higher resolutions should allow bigger message boxes (again, preferably in length, not width), to avoid the need of a scroll bar.

#57 Not really a bug, but more an observation: I know the VCMI fonts are different – no issue here – but what I notice by comparing them with the H3 message boxes, is that they seem bolded (or a size bigger?). That’s ok for short Event messages, however for long messages (those not fitting in the standard maximum size box) I’d rather have them seem a smaller rather than bigger as compared to H3.

To reduce the chance that a large message doesn’t fit, as well as the need of scrolling too much, maybe we can have something like:

  • Reduce font with 1 size as of 640 message characters (approximate length which seems to still fit w/o scrollbar in H3)
  • And maybe even reduce font with 2 sizes as of 1280 message characters

#58 Scrollbar support for Event message boxes. Even if we implement bigger boxes and/or adjust the fonts, VCMI should of course still be ready to support “too-long-for-most-players-to-read” :stuck_out_tongue: Event messages.

The full functionality should be:

  • only when the message is too long to fit in the maximum size message box
  • support for Up/Down arrows (scroll per row)
  • support for Page Up/Down (scroll per page)
  • NEW: support for mouse scroll (this was missing in H3, while I guess most players would prefer it over any other hotkey)
  • NEW: maybe also support for Home/End buttons (scroll to start/end of message) – though this is not so important

This also reminds me of:

#59 Page Up/Down hotkeys do not work in the list of Scenarios in the Main Menu. And as long as we are on the subject, it would be great if you could implement mouse scroll support and the Home/End hotkeys also for the Main Menu Scenario list. :->
A-Terrible Rumor edit.h3m (11.2 KB)

And a couple of Console bugs:

#60 Using a letter i/o a digit to select the resolution blocks the console (i.e.: we cannot type “resolution” anymore in order to select the right value). If further we do try to start a game in VCMI, the Console gets populated with log text, however very slow, and eventually crashes when Adventure Map opens.

In the screenshot below, you can see that I could select “4” as resolution with no problem (just the appropriate “Invalid resolution ID” message) and then I could type in again “resolution”. However when I typed “e”, the Console blocked as you see it in the screenshot, and I couldn’t type anything in it anymore:

i4.photobucket.com/albums/y104/Zamolxis/VCMI/VCMI%2007/th_090527-MistypinginConsole1.jpg

#61 Perhaps a non-issue: closing the Console i/o the Client gives a Windows error message.
[size=75](I won’t bother posting a screenshot here as the Windows on my laptop is in Dutch so probably it won’t tell you anything)[/size] :stuck_out_tongue:

Mouse scroll works in scenario list :).

^ Well, that is good news. :slight_smile: I admit I tested that only on my laptop, using laptop’s scroll bar. It seems that it works in some applications (Word, Excel, IE, Total Commander etc), but it’s not recognized in others (VCMI, Chrome…). No idea if it’s the driver of my laptop’s scrollbar or something in the way the scrollbar is coded in these applications in order to be recognized or not.

Cannot compile trunk:( The backtarce:

r/lib -lpthread -lSDL_ttf -lSDL_image -lSDL_mixer -lSDL -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -lboost_iostreams-mt -Wl,-rpath -Wl,/usr/local/lib/vcmi
vcmiclient-GUIClasses.o: In function __gnu_cxx::__exchange_and_add(int volatile*, int)': /usr/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ext/atomicity.h:46: undefined reference to__sync_fetch_and_add_4’
collect2: ld returned 1 exit status
make[1]: *** [vcmiclient] Ошибка 1
make[1]: Leaving directory `/home/user/trunk/client’
make: *** [all-recursive] Ошибка 1

#62 - Some starting artifacts (such as Badge of Courage) don’t give a bonus when automatically equipped at the start of the game.

#63 - Badge of Courage (and other +1 luck, or +1 morale artifacts) seem to be giving 3 luck or morale rather than 1.

Best regards,
Steven.

#64 - Reproducible crash bug from the attached savegame. Logs also attached.

Best regards,
Steven.
VCMI_0-71b_Crash_28May09.7z (117 KB)

Your g cc seems configured for i386. Try

CXXFLAGS="-g -O2 -march=i686" ./configure --disable-debug

and rebuild vcmi.

Both should be fixed.

I changed some of the code managing the scrollbar, so these should be fixed.

Fixed. Both monk and zealots use the same animation.

#65 - Magic heroes don’t get their specific starting spells yet.

Best regards,
Steven.

Thanks:)

#66 - Some another bug. Crashed after trying to buy a spellbook for Valeska. Backtrace:

[user@1x1linux HoMM3WoG]$ ./vcmiclient                                  
Starting...                                                             
Creating console and logfile: 0                                         
Loading settings: 0                                                     
VCMI 0.71c (client)                                                     
        Initializing screen: 130000                                     
        Initializing minors: 0                                          
        Initializing fonts: 20000                                       
        Initializing sound: 0                                           
Initializing screen, fonts and sound handling: 150000                   
Warning: No Sprites/ folder!                                            
Loading .lod files: 60000                                               
        General text handler: 20000                                     
        Hero handler: 10000                                             
        Artifact handler: 10000                                         
        Creature handler: 10000                                         
        Town handler: 0                                                 
        Object handler: 0                                               
        Def information handler: 30000                                  
        Building handler: 10000                                         
        Spell handler: 0                                                
creature 125 doesn't have sounds                                        
creature 129 doesn't have sounds                                        
creature 137 doesn't have sounds                                        
creature 142 doesn't have sounds                                        
creature 144 doesn't have sounds                                        
creature 150 doesn't have sounds                                        
creature 151 doesn't have sounds                                        
creature 152 doesn't have sounds                                        
creature 153 doesn't have sounds                                        
creature 154 doesn't have sounds                                        
creature 155 doesn't have sounds                                        
creature 156 doesn't have sounds                                        
creature 157 doesn't have sounds                                        
creature 158 doesn't have sounds                                        
creature 159 doesn't have sounds                                        
creature 164 doesn't have sounds                                        
creature 165 doesn't have sounds                                        
creature 166 doesn't have sounds                                        
creature 167 doesn't have sounds                                        
creature 168 doesn't have sounds                                        
creature 169 doesn't have sounds                                        
creature 170 doesn't have sounds                                        
creature 171 doesn't have sounds                                        
creature 172 doesn't have sounds                                        
creature 173 doesn't have sounds                                        
creature 192 doesn't have sounds                                        
creature 193 doesn't have sounds                                        
creature 194 doesn't have sounds                                        
creature 195 doesn't have sounds                                        
creature 196 doesn't have sounds                                        
Initializing VCMI_Lib: 160000                                           
Screen handler: 10000                                                   
Loading and transforming heroes' flags: 270000                          
        Main graphics: 730000                                           
Initializing game graphics: 0                                           
Message handler: 20000                                                  
        CPreGame: main menu initialization: 100000                      
        CPreGame: newgame menu initialization: 100000                   
        CPreGame: loadgame menu initialization: 100000                  
        CPreGame: scenario choice initialization: 260000                
        CPreGame: scenario options initialization: 20000                
        CPreGame: displaying main menu: 30000                           
Initialization CPreGame (together): 610000                              
Initialization of VCMI (together): 1670000                              
Unable to play sound file 40(music parameter was NULL)                  
Preparing shared memory and starting server: 10000                      
Waiting for server... 0                                                 
Establishing connection...                                              
Found endpoints:                                                                                               
        0: 127.0.0.1:3030                                                                                      
Trying connection to 127.0.0.1:3030  (0)                                                                       
Established connection with VCMI 0.71c (server)                                                                
        Connecting to the server: 0                                                                            
        Gamestate: 0                                                                                           
Server opened map properly.                                                                                    
        Sending/Getting info to/from the server: 0                                                             
Opening map file: Maps/111.h3m   done.                                                                         
        Our map checksum: 691115356                                                                            
        Reading header: 0                                                                                      
        Reading rumors: 0                                                                                      
        Reading predefined heroes: 0                                                                           
        Reading terrain: 10000                                                                                 
        Reading defs info: 0                                                                                   
        Reading objects: 10000                                                                                 
        Reading events: 0                                                                                      
        Calculating blocked/visitable tiles: 10000                                                             
Reading and detecting map file (together): 40000                                                               
        Server checksum for Maps/111.h3m: 691115356                                                            
        Our checksum for the map: 691115356                                                                    
        Using random seed: 207600468                                                                           
Initializing GameState (together): 80000                                                                       
Creating mapHandler: 0                                                                                         
        Loading town def info: 0                                                                               
        Unpacking and handling defs: 430000                                                                    
        Checking used heroes: 0                                                                                
        Collecting loaded def's handlers: 0                                                                    
        Preparing FoW, roads, rivers,borders: 110000                                                           
        Making object rects: 40000                                                                             
Initializing mapHandler (together): 580000                                                                     
Loaded AI named Genius 1.0                                                                                     
Loaded AI named Genius 1.0                                                                                     
Loaded AI named Genius 1.0                                                                                     
Loaded AI named Genius 1.0                                                                                     
Loaded AI named Genius 1.0                                                                                     
Loaded AI named Genius 1.0                                                                                     
Loaded AI named Genius 1.0                                                                                     
Loaded AI named Genius 1.0                                                                                     
System message: Saving...                                                                                      
System message: Game has been succesfully saved!                                                               
Unable to play sound file 25(music parameter was NULL)                                                         
Unable to play sound file 25(music parameter was NULL)                                                         
Unable to play sound file 25(music parameter was NULL)                                                         
*** glibc detected *** /home/user/trunk/client/.libs/lt-vcmiclient: free(): invalid pointer: 0x0ab80c1c ***    
======= Backtrace: =========                                                                                   
/lib/libc.so.6[0xb7b6d281]                                                                                     
/lib/libc.so.6[0xb7b6e9ba]                                                                                     
/lib/libc.so.6(cfree+0x6d)[0xb7b71abd]                                                                         
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb7d43d01]                                                               
/home/user/trunk/client/.libs/lt-vcmiclient[0x81133b2]                                                         
/home/user/trunk/client/.libs/lt-vcmiclient[0x81139a3]                                                         
/home/user/trunk/client/.libs/lt-vcmiclient[0x812ee55]                                                         
/home/user/trunk/client/.libs/lt-vcmiclient[0x81cc1d2]                                                         
/home/user/trunk/client/.libs/lt-vcmiclient[0x81693c2]                                                         
/usr/lib/libboost_thread-mt.so(thread_proxy+0x68)[0xb7d91868]                                                  
/lib/libpthread.so.0[0xb7ed56bc]                                                                               
/lib/libc.so.6(clone+0x5e)[0xb7bcfffe]                                                                         
======= Memory map: ========                                                                                   
08048000-0821f000 r-xp 00000000 08:07 790451     /home/user/trunk/client/.libs/lt-vcmiclient                   
0821f000-08221000 rwxp 001d6000 08:07 790451     /home/user/trunk/client/.libs/lt-vcmiclient                   
08b87000-0d106000 rwxp 08b87000 00:00 0          [heap]                                                        
ae2ae000-ae40e000 rwxp ae2ae000 00:00 0                                                                        
ae67f000-ae800000 rwxp ae67f000 00:00 0                                                                        
ae800000-ae8b1000 rwxp ae800000 00:00 0                                                                        
ae8b1000-ae900000 ---p ae8b1000 00:00 0                                                                        
aea00000-aeaed000 rwxp aea00000 00:00 0                                                                        
aeaed000-aeb00000 ---p aeaed000 00:00 0                                                                        
aeb00000-aebaf000 rwxp aeb00000 00:00 0                                                                        
aebaf000-aec00000 ---p aebaf000 00:00 0                                                                        
aec00000-aece9000 rwxp aec00000 00:00 0                                                                        
aece9000-aed00000 ---p aece9000 00:00 0                                                                        
aed00000-aee00000 rwxp aed00000 00:00 0                                                                        
aee00000-af000000 rwxp aee00000 00:00 0                                                                        
af000000-af0fe000 rwxp af000000 00:00 0                                                                        
af0fe000-af100000 ---p af0fe000 00:00 0                                                                        
af100000-af200000 rwxp af100000 00:00 0                                                                        
af200000-af300000 rwxp af200000 00:00 0                                                                        
af300000-af3e6000 rwxp af300000 00:00 0                                                                        
af3e6000-af400000 ---p af3e6000 00:00 0                                                                        
af400000-af500000 rwxp af400000 00:00 0                                                                        
af500000-af5e6000 rwxp af500000 00:00 0                                                                        
af5e6000-af600000 ---p af5e6000 00:00 0                                                                        
af600000-af7ff000 rwxp af600000 00:00 0                                                                        
af7ff000-af800000 ---p af7ff000 00:00 0                                                                        
af800000-af8ff000 rwxp af800000 00:00 0                                                                        
af8ff000-af900000 ---p af8ff000 00:00 0                                                                        
af900000-afa00000 rwxp af900000 00:00 0                                                                        
afa00000-afaff000 rwxp afa00000 00:00 0                                                                        
afaff000-afb00000 ---p afaff000 00:00 0                                                                        
afb00000-afbff000 rwxp afb00000 00:00 0                                                                        
afbff000-afc00000 ---p afbff000 00:00 0                                                                        
afc00000-afe00000 rwxp afc00000 00:00 0                                                                        
afe00000-aff00000 rwxp afe00000 00:00 0                                                                        
affff000-b0000000 ---p affff000 00:00 0                                                                        
b0000000-b0800000 rwxp b0000000 00:00 0                                                                        
b0800000-b08ff000 rwxp b0800000 00:00 0                                                                        
b08ff000-b0900000 ---p b08ff000 00:00 0                                                                        
b0923000-b09ff000 rwxp b0923000 00:00 0                                                                        
b09ff000-b0a00000 ---p b09ff000 00:00 0                                                                        
b0a00000-b1200000 rwxp b0a00000 00:00 0                                                                        
b1200000-b1300000 rwxp b1200000 00:00 0                                                                        
b1300000-b1400000 rwxp b1300000 00:00 0                                                                        
b1400000-b1500000 rwxp b1400000 00:00 0                                                                        
b1519000-b15e4000 rwxp b1519000 00:00 0                                                                        
b15e4000-b15e5000 ---p b15e4000 00:00 0                                                                        
b15e5000-b1de5000 rwxp b15e5000 00:00 0                                                                        
b1df2000-b2372000 rwxp b1df2000 00:00 0                                                                        
b23bc000-b256a000 rwxp b23bc000 00:00 0                                                                        
b25e6000-b25e7000 ---p b25e6000 00:00 0                                                                        
b25e7000-b2de7000 rwxp b25e7000 00:00 0                                                                        
b2de7000-b5950000 r--p 00000000 08:05 35579      /windows/D/game/HoMM3WoG/Data/Heroes3.snd                     
b5950000-b5951000 ---p b5950000 00:00 0                                                                        
b5951000-b6326000 rwxp b5951000 00:00 0                                                                        
b6326000-b64fb000 rwxs 00000000 00:08 6651951    /SYSV00000000 (deleted)                                       
b64fb000-b64fc000 ---p b64fb000 00:00 0                                                                        
b64fc000-b6cfc000 rwxp b64fc000 00:00 0                                                                        
b6cfc000-b6d53000 rwxp b6d36000 00:00 0                                                                        
b6dce000-b6dd6000 r-xp 00000000 08:07 32736      /usr/lib/libXcursor.so.1.0.2                                  
b6dd6000-b6dd7000 rwxp 00007000 08:07 32736      /usr/lib/libXcursor.so.1.0.2                                  
b6e02000-b6ef0000 r-xp 001bc000 08:07 73710      /usr/lib/locale/locale-archive                                
b6ef0000-b70f0000 r-xp 00000000 08:07 73710      /usr/lib/locale/locale-archive                                
b70f0000-b70fe000 r-xp 00000000 08:07 34851      /usr/lib/libXext.so.6.4.0                                     
b70fe000-b70ff000 rwxp 0000d000 08:07 34851      /usr/lib/libXext.so.6.4.0                                     
b70ff000-b7218000 r-xp 00000000 08:07 37720      /usr/lib/libX11.so.6.2.0                                      
b7218000-b721c000 rwxp 00118000 08:07 37720      /usr/lib/libX11.so.6.2.0                                      
b721c000-b7238000 r-xp 00000000 08:07 83911      /home/user/trunk/AI/GeniusAI/.libs/GeniusAI.so.0.0.0          
b7238000-b7239000 rwxp 0001b000 08:07 83911      /home/user/trunk/AIАварийный останов