public ProvinceData(Map map) {
        final int numProvs = Integer.parseInt(map.getString("max_provinces"));
        
        rgbMap = new HashMap<Integer, Province>(numProvs);
        allProvs = new Province[numProvs];
        
        String defFileName = map.getString("definitions").replace('\\', '/');
        if (!defFileName.contains("/"))
            defFileName = "map/" + defFileName;
        
        try {
            parseDefs(Main.filenameResolver.resolveFilename(defFileName), numProvs);
        } catch (FileNotFoundException ex) {
            ex.printStackTrace();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }