MantisBT - VCMI
View Issue Details
0001557VCMIOtherpublic2013-10-22 21:352016-09-30 10:52
Povelitel 
SXX 
normalminoralways
closedfixed 
PCWindows7sp1
0.94 
0.97c 
0001557: Impossible to start game with dot "." symbol in the map name.
If in the name of the map there is a point symbol "." on it it is impossible to play.

example

Map MAPS/APEIRON - VER 1.2 is invalid. Message: Resource with name MAPS/APEIRON - VER 1 and type MAP wasn't found.
No tags attached.
related to 0002533closed AVS Maps with dot in file name are not recognized as valid maps in scenario list 
? Apeiron - ver 1.2.h3m (97,929) 2013-10-22 21:35
https://bugs.vcmi.eu/file_download.php?file_id=1600&type=bug
Issue History
2013-10-22 21:35PovelitelNew Issue
2013-10-22 21:35PovelitelFile Added: Apeiron - ver 1.2.h3m
2014-02-18 13:55PovelitelNote Added: 0004492
2014-02-18 13:56PovelitelNote Edited: 0004492bug_revision_view_page.php?bugnote_id=4492#r2521
2014-02-18 16:52IvanSummaryStart game. "Point" symbol in the map name. => Impossible to start game with dot "." symbol in the map name.
2014-02-18 16:52IvanAssigned To => Ivan
2014-02-18 16:52IvanStatusnew => assigned
2015-01-26 08:40SXXNote Added: 0005399
2015-01-26 08:52SXXNote Edited: 0005399bug_revision_view_page.php?bugnote_id=5399#r2800
2015-01-26 13:39SXXAssigned ToIvan => SXX
2015-01-26 14:22SXXNote Added: 0005400
2015-02-07 15:19SXXNote Added: 0005422
2015-02-07 15:19SXXStatusassigned => resolved
2015-02-07 15:19SXXFixed in Version => 0.97c
2015-02-07 15:19SXXResolutionopen => fixed
2015-04-11 18:08PovelitelStatusresolved => closed
2016-09-30 10:52PovelitelRelationship addedrelated to 0002533

Notes
(0004492)
Povelitel   
2014-02-18 13:55   
(edited on: 2014-02-18 13:56)
Проще говоря если в названии карты есть символ "точка", то в игре ее нифига не видно.

(0005399)
SXX   
2015-01-26 08:40   
(edited on: 2015-01-26 08:52)
So this one was annoying for me too so I'm decide to investigate and fix it.
End up that this happen because ResourceID::setName coded to remove file extension because all game resources only contain one dot.

Though when you open new game menu game going through list of maps and their extension already removed at this point. As result "setName" remove one more part of map name and loading of header fail for this map.

(0005400)
SXX   
2015-01-26 14:22   
Sent fix as pull request:
https://github.com/vcmi/vcmi/pull/79 [^]

Now detected "extension" (everything after last dot) of file will be only removed if it's belongs to specified file type. So basically such filenames would work now:
MapName 1.0.h3m
M.a.p.N.a.m.e.h3m
MapName.txt.h3m
MapName.json.h3m


Though filenames like that wouldn't work:
MapName 1.0.h3m.h3m

Though I think it's right behavior for that case.
(0005422)
SXX   
2015-02-07 15:19   
Should be now be fixed in git:
https://github.com/vcmi/vcmi/commit/1396476869aa52ac21fe92f1ac4ae000dd668b9d [^]