import os ps2path = r'D:\rockstargames\ps2\gtasa' pcpath = r'D:\rockstargames\pc\gtasa' buildpath = r'C:\Users\aap\Desktop\gta_mods\ps2map' def opencreate(path, mode): path = os.path.normcase(path) dir = os.path.dirname(path) if dir != '' and not os.path.exists(dir): os.makedirs(dir) return open(path, mode) def jp(*paths): return os.path.normcase(os.path.join(paths[0], *paths[1:])) ides = [ 'DATA\\MAPS\\generic\\vegepart.IDE', 'DATA\\MAPS\\generic\\barriers.IDE', 'DATA\\MAPS\\generic\\dynamic.IDE', 'DATA\\MAPS\\generic\\dynamic2.IDE', 'DATA\\MAPS\\generic\\multiobj.IDE', 'DATA\\MAPS\\generic\\procobj.IDE', 'DATA\\MAPS\\LA\\LAn.IDE', 'DATA\\MAPS\\LA\\LAn2.IDE', 'DATA\\MAPS\\LA\\LAs.IDE', 'DATA\\MAPS\\LA\\LAs2.IDE', 'DATA\\MAPS\\LA\\LAe.IDE', 'DATA\\MAPS\\LA\\LAe2.IDE', 'DATA\\MAPS\\LA\\LAw2.IDE', 'DATA\\MAPS\\LA\\LAw.IDE', 'DATA\\MAPS\\LA\\LAwn.IDE', 'DATA\\MAPS\\LA\\LAhills.IDE', 'DATA\\MAPS\\LA\\LAxref.IDE', 'DATA\\MAPS\\SF\\SFn.IDE', 'DATA\\MAPS\\SF\\SFs.IDE', 'DATA\\MAPS\\SF\\SFse.IDE', 'DATA\\MAPS\\SF\\SFe.IDE', 'DATA\\MAPS\\SF\\SFw.IDE', 'DATA\\MAPS\\SF\\SFxref.IDE', 'DATA\\MAPS\\vegas\\vegasN.IDE', 'DATA\\MAPS\\vegas\\vegasS.IDE', 'DATA\\MAPS\\vegas\\vegasE.IDE', 'DATA\\MAPS\\vegas\\vegasW.IDE', 'DATA\\MAPS\\vegas\\vegaxref.IDE', 'DATA\\MAPS\\country\\countryN.IDE', 'DATA\\MAPS\\country\\countN2.IDE', 'DATA\\MAPS\\country\\countryS.IDE', 'DATA\\MAPS\\country\\countryE.IDE', 'DATA\\MAPS\\country\\countryW.IDE', 'DATA\\MAPS\\country\\counxref.IDE', 'DATA\\MAPS\\interior\\int_LA.IDE', 'DATA\\MAPS\\interior\\int_SF.IDE', 'DATA\\MAPS\\interior\\int_veg.IDE', 'DATA\\MAPS\\interior\\int_cont.IDE', 'DATA\\MAPS\\leveldes\\levelmap.IDE', 'DATA\\MAPS\\leveldes\\levelxre.IDE', 'DATA\\MAPS\\interior\\gen_int1.IDE', 'DATA\\MAPS\\interior\\gen_int2.IDE', 'DATA\\MAPS\\interior\\gen_intb.IDE', 'DATA\\MAPS\\interior\\gen_int3.IDE', 'DATA\\MAPS\\interior\\gen_int4.IDE', 'DATA\\MAPS\\interior\\gen_int5.IDE', 'DATA\\MAPS\\interior\\savehous.IDE', 'DATA\\MAPS\\interior\\stadint.IDE', 'DATA\\MAPS\\leveldes\\seabed.IDE', 'DATA\\MAPS\\interior\\props.IDE', 'DATA\\MAPS\\interior\\props2.IDE', 'DATA\\MAPS\\interior\\propext.IDE', 'DATA\\MAPS\\veh_mods\\veh_mods.IDE', 'DATA\\TXDCUT.IDE' ] ipls = [ "DATA\\MAP.ZON", "DATA\\INFO.ZON", "DATA\\MAPS\\LA\\LAn.IPL", "DATA\\MAPS\\LA\\LAn2.IPL", "DATA\\MAPS\\LA\\LAs.IPL", "DATA\\MAPS\\LA\\LAs2.IPL", "DATA\\MAPS\\LA\\LAe.IPL", "DATA\\MAPS\\LA\\LAe2.IPL", "DATA\\MAPS\\LA\\LAw.IPL", "DATA\\MAPS\\LA\\LAwn.IPL", "DATA\\MAPS\\LA\\LAw2.IPL", "DATA\\MAPS\\LA\\LAhills.IPL", "DATA\\MAPS\\SF\\SFn.IPL", "DATA\\MAPS\\SF\\SFs.IPL", "DATA\\MAPS\\SF\\SFse.IPL", "DATA\\MAPS\\SF\\SFe.IPL", "DATA\\MAPS\\SF\\SFw.IPL", "DATA\\MAPS\\vegas\\vegasN.IPL", "DATA\\MAPS\\vegas\\vegasS.IPL", "DATA\\MAPS\\vegas\\vegasE.IPL", "DATA\\MAPS\\vegas\\vegasW.IPL", "DATA\\MAPS\\country\\countryN.IPL", "DATA\\MAPS\\country\\countN2.IPL", "DATA\\MAPS\\country\\countrys.IPL", "DATA\\MAPS\\country\\countryE.IPL", "DATA\\MAPS\\country\\countryW.IPL", "DATA\\MAPS\\interior\\int_LA.IPL", "DATA\\MAPS\\interior\\int_SF.IPL", "DATA\\MAPS\\interior\\int_veg.IPL", "DATA\\MAPS\\interior\\int_cont.IPL", "DATA\\MAPS\\interior\\gen_int1.IPL", "DATA\\MAPS\\interior\\gen_int2.IPL", "DATA\\MAPS\\interior\\gen_intb.IPL", "DATA\\MAPS\\interior\\gen_int3.IPL", "DATA\\MAPS\\interior\\gen_int4.IPL", "DATA\\MAPS\\interior\\gen_int5.IPL", "DATA\\MAPS\\interior\\stadint.IPL", "DATA\\MAPS\\interior\\savehous.IPL", "DATA\\MAPS\\leveldes\\levelmap.IPL", "DATA\\MAPS\\leveldes\\seabed.IPL", "DATA\\MAPS\\paths.ipl", "DATA\\MAPS\\paths2.ipl", "DATA\\MAPS\\paths3.ipl", "DATA\\MAPS\\paths4.ipl", "DATA\\MAPS\\paths5.ipl", "DATA\\MAPS\\cull.ipl", "DATA\\MAPS\\tunnels.ipl", "DATA\\MAPS\\occluSF.ipl", "DATA\\MAPS\\occluveg.ipl", "DATA\\MAPS\\occluLA.ipl", "DATA\\MAPS\\occluint.ipl", "DATA\\MAPS\\audiozon.ipl" ] binipls = [ "barriers1.ipl", "barriers2.ipl", "carter.ipl", "countn2_stream0.ipl", "countn2_stream1.ipl", "countn2_stream10.ipl", "countn2_stream11.ipl", "countn2_stream2.ipl", "countn2_stream3.ipl", "countn2_stream4.ipl", "countn2_stream5.ipl", "countn2_stream6.ipl", "countn2_stream7.ipl", "countn2_stream8.ipl", "countn2_stream9.ipl", "countrye_stream0.ipl", "countrye_stream1.ipl", "countrye_stream10.ipl", "countrye_stream11.ipl", "countrye_stream12.ipl", "countrye_stream13.ipl", "countrye_stream14.ipl", "countrye_stream15.ipl", "countrye_stream16.ipl", "countrye_stream17.ipl", "countrye_stream18.ipl", "countrye_stream2.ipl", "countrye_stream3.ipl", "countrye_stream4.ipl", "countrye_stream5.ipl", "countrye_stream6.ipl", "countrye_stream7.ipl", "countrye_stream8.ipl", "countrye_stream9.ipl", "countryn_stream0.ipl", "countryn_stream1.ipl", "countryn_stream2.ipl", "countryn_stream3.ipl", "countryn_stream4.ipl", "countrys_stream0.ipl", "countrys_stream1.ipl", "countrys_stream2.ipl", "countrys_stream3.ipl", "countrys_stream4.ipl", "countrys_stream5.ipl", "countrys_stream6.ipl", "countryw_stream0.ipl", "countryw_stream1.ipl", "countryw_stream10.ipl", "countryw_stream11.ipl", "countryw_stream12.ipl", "countryw_stream2.ipl", "countryw_stream3.ipl", "countryw_stream4.ipl", "countryw_stream5.ipl", "countryw_stream6.ipl", "countryw_stream7.ipl", "countryw_stream8.ipl", "countryw_stream9.ipl", "crack.ipl", "lae2_stream0.ipl", "lae2_stream1.ipl", "lae2_stream2.ipl", "lae2_stream3.ipl", "lae2_stream4.ipl", "lae2_stream5.ipl", "lae2_stream6.ipl", "lae2_stream7.ipl", "lae2_stream8.ipl", "lae_stream0.ipl", "lae_stream1.ipl", "lae_stream2.ipl", "lae_stream3.ipl", "lae_stream4.ipl", "lae_stream5.ipl", "lae_stream6.ipl", "lahills_stream0.ipl", "lahills_stream1.ipl", "lahills_stream2.ipl", "lahills_stream3.ipl", "lahills_stream4.ipl", "lahills_stream5.ipl", "lahills_stream6.ipl", "lan2_stream0.ipl", "lan2_stream1.ipl", "lan2_stream2.ipl", "lan2_stream3.ipl", "lan2_stream4.ipl", "lan_stream0.ipl", "lan_stream1.ipl", "lan_stream2.ipl", "lan_stream3.ipl", "las2_stream0.ipl", "las2_stream1.ipl", "las2_stream2.ipl", "las2_stream3.ipl", "las2_stream4.ipl", "las2_stream5.ipl", "las2_stream6.ipl", "las2_stream7.ipl", "las_stream0.ipl", "las_stream1.ipl", "las_stream2.ipl", "las_stream3.ipl", "las_stream4.ipl", "las_stream5.ipl", "las_stream6.ipl", "las_stream7.ipl", "law2_stream0.ipl", "law2_stream1.ipl", "law2_stream2.ipl", "law2_stream3.ipl", "law2_stream4.ipl", "law_stream0.ipl", "law_stream1.ipl", "law_stream2.ipl", "law_stream3.ipl", "law_stream4.ipl", "law_stream5.ipl", "lawn_stream0.ipl", "lawn_stream1.ipl", "lawn_stream2.ipl", "lawn_stream3.ipl", "levelmap_stream0.ipl", "levelmap_stream1.ipl", "seabed_stream0.ipl", "sfe_stream0.ipl", "sfe_stream1.ipl", "sfe_stream2.ipl", "sfe_stream3.ipl", "sfe_stream4.ipl", "sfe_stream5.ipl", "sfn_stream0.ipl", "sfn_stream1.ipl", "sfn_stream2.ipl", "sfn_stream3.ipl", "sfs_stream0.ipl", "sfs_stream1.ipl", "sfs_stream10.ipl", "sfs_stream11.ipl", "sfs_stream12.ipl", "sfs_stream2.ipl", "sfs_stream3.ipl", "sfs_stream4.ipl", "sfs_stream5.ipl", "sfs_stream6.ipl", "sfs_stream7.ipl", "sfs_stream8.ipl", "sfs_stream9.ipl", "sfse_stream0.ipl", "sfse_stream1.ipl", "sfse_stream2.ipl", "sfse_stream3.ipl", "sfse_stream4.ipl", "sfse_stream5.ipl", "sfse_stream6.ipl", "sfse_stream7.ipl", "sfse_stream8.ipl", "sfw_stream0.ipl", "sfw_stream1.ipl", "sfw_stream2.ipl", "sfw_stream3.ipl", "sfw_stream4.ipl", "sfw_stream5.ipl", "sfw_stream6.ipl", "sfw_stream7.ipl", "sfw_stream8.ipl", "truthsfarm.ipl", "vegase_stream0.ipl", "vegase_stream1.ipl", "vegase_stream10.ipl", "vegase_stream11.ipl", "vegase_stream12.ipl", "vegase_stream2.ipl", "vegase_stream3.ipl", "vegase_stream4.ipl", "vegase_stream5.ipl", "vegase_stream6.ipl", "vegase_stream7.ipl", "vegase_stream8.ipl", "vegase_stream9.ipl", "vegasn_stream0.ipl", "vegasn_stream1.ipl", "vegasn_stream10.ipl", "vegasn_stream11.ipl", "vegasn_stream12.ipl", "vegasn_stream13.ipl", "vegasn_stream2.ipl", "vegasn_stream3.ipl", "vegasn_stream4.ipl", "vegasn_stream5.ipl", "vegasn_stream6.ipl", "vegasn_stream7.ipl", "vegasn_stream8.ipl", "vegasn_stream9.ipl", "vegass_stream0.ipl", "vegass_stream1.ipl", "vegass_stream2.ipl", "vegass_stream3.ipl", "vegass_stream4.ipl", "vegass_stream5.ipl", "vegass_stream6.ipl", "vegass_stream7.ipl", "vegass_stream8.ipl", "vegasw_stream0.ipl", "vegasw_stream1.ipl", "vegasw_stream10.ipl", "vegasw_stream11.ipl", "vegasw_stream12.ipl", "vegasw_stream13.ipl", "vegasw_stream14.ipl", "vegasw_stream15.ipl", "vegasw_stream16.ipl", "vegasw_stream2.ipl", "vegasw_stream3.ipl", "vegasw_stream4.ipl", "vegasw_stream5.ipl", "vegasw_stream6.ipl", "vegasw_stream7.ipl", "vegasw_stream8.ipl", "vegasw_stream9.ipl" ] biniplsint = [ "gen_int2_stream0.ipl", "gen_int3_stream0.ipl", "gen_int4_stream0.ipl", "gen_int4_stream1.ipl", "gen_int4_stream2.ipl", "gen_int5_stream0.ipl", "gen_int5_stream1.ipl", "gen_int5_stream2.ipl", "gen_int5_stream3.ipl", "gen_int5_stream4.ipl", "gen_int5_stream5.ipl", "gen_int5_stream6.ipl", "gen_int5_stream7.ipl", "gen_intb_stream0.ipl", "int_la_stream0.ipl", "int_la_stream1.ipl", "int_la_stream2.ipl", "int_la_stream3.ipl", "int_sf_stream0.ipl", "int_veg_stream0.ipl", "int_veg_stream1.ipl", "int_veg_stream2.ipl", "int_veg_stream3.ipl", "savehous_stream0.ipl", "savehous_stream1.ipl", "stadint_stream0.ipl" ] cols = [ "barriers.col", "countn2_1.col", "countn2_10.col", "countn2_11.col", "countn2_12.col", "countn2_13.col", "countn2_14.col", "countn2_15.col", "countn2_16.col", "countn2_17.col", "countn2_18.col", "countn2_19.col", "countn2_2.col", "countn2_20.col", "countn2_3.col", "countn2_4.col", "countn2_5.col", "countn2_6.col", "countn2_7.col", "countn2_8.col", "countn2_9.col", "countrye_1.col", "countrye_10.col", "countrye_11.col", "countrye_12.col", "countrye_13.col", "countrye_2.col", "countrye_3.col", "countrye_4.col", "countrye_5.col", "countrye_6.col", "countrye_7.col", "countrye_8.col", "countrye_9.col", "countryn_1.col", "countryn_2.col", "countryn_3.col", "countryn_4.col", "countryn_5.col", "countryn_6.col", "countryn_7.col", "countryn_8.col", "countryn_9.col", "countrys_1.col", "countrys_10.col", "countrys_11.col", "countrys_2.col", "countrys_3.col", "countrys_4.col", "countrys_5.col", "countrys_6.col", "countrys_7.col", "countrys_8.col", "countrys_9.col", "countryw_1.col", "countryw_10.col", "countryw_11.col", "countryw_2.col", "countryw_3.col", "countryw_4.col", "countryw_5.col", "countryw_6.col", "countryw_7.col", "countryw_8.col", "countryw_9.col", "counxref.col", "cranes_dyn2.col", "cuntdesxref.col", "cuntysouth.col", "cxref_industrial.col", "dynamic.col", "dynamic2.col", "lae2_1.col", "lae2_2.col", "lae2_3.col", "lae2_4.col", "lae2_5.col", "lae_1.col", "lae_2.col", "lae_3.col", "lae_4.col", "lae_5.col", "lahills_1.col", "lahills_2.col", "lahills_3.col", "lahills_4.col", "lahills_5.col", "lahills_6.col", "lan2_1.col", "lan2_2.col", "lan2_3.col", "lan_1.col", "lan_2.col", "lan_3.col", "las2_1.col", "las2_2.col", "las2_3.col", "las2_4.col", "las_1.col", "las_2.col", "las_3.col", "las_4.col", "las_5.col", "law2_1.col", "law2_2.col", "law2_3.col", "law2_4.col", "law_1.col", "law_2.col", "law_3.col", "law_4.col", "lawn_1.col", "lawn_2.col", "lawn_3.col", "lawn_4.col", "laxref.col", "laxrefdocks.col", "levelmap_1.col", "levelxre.col", "multiobj.col", "procobj.col", "propext.col", "quarrycrane.col", "seabed1.col", "seabed10.col", "seabed11.col", "seabed12.col", "seabed2.col", "seabed3.col", "seabed4.col", "seabed5.col", "seabed6.col", "seabed7.col", "seabed8.col", "seabed9.col", "sfe_1.col", "sfe_2.col", "sfe_3.col", "sfe_4.col", "sfe_5.col", "sfe_6.col", "sfe_7.col", "sfe_8.col", "sfe_9.col", "sfn_1.col", "sfn_2.col", "sfs_1.col", "sfs_2.col", "sfs_3.col", "sfs_4.col", "sfs_5.col", "sfs_6.col", "sfs_7.col", "sfs_8.col", "sfs_9.col", "sfse_1.col", "sfse_10.col", "sfse_11.col", "sfse_12.col", "sfse_13.col", "sfse_14.col", "sfse_15.col", "sfse_16.col", "sfse_17.col", "sfse_2.col", "sfse_3.col", "sfse_4.col", "sfse_5.col", "sfse_6.col", "sfse_7.col", "sfse_8.col", "sfse_9.col", "sfw_1.col", "sfw_2.col", "sfw_3.col", "sfw_4.col", "sfw_5.col", "sfw_6.col", "sfw_7.col", "sfw_8.col", "sfw_9.col", "sfxref.col", "vegase_1.col", "vegase_10.col", "vegase_11.col", "vegase_12.col", "vegase_2.col", "vegase_3.col", "vegase_4.col", "vegase_5.col", "vegase_6.col", "vegase_7.col", "vegase_8.col", "vegase_9.col", "vegasn_1.col", "vegasn_2.col", "vegasn_3.col", "vegasn_4.col", "vegasn_5.col", "vegass_1.col", "vegass_2.col", "vegass_3.col", "vegass_4.col", "vegass_5.col", "vegasw_1.col", "vegasw_2.col", "vegasw_3.col", "vegasw_4.col", "vegasw_5.col", "vegasw_6.col", "vegasw_7.col", "vegasw_8.col", "vegasw_9.col", "vegaxref.col", "vegepart.col", "veh_mods.col" ] colsint = [ "gen_int1_1.col", "gen_int2_1.col", "gen_int2_2.col", "gen_int2_3.col", "gen_int2_4.col", "gen_int2_5.col", "gen_int3_1.col", "gen_int4_1.col", "gen_int5_1.col", "gen_int5_2.col", "gen_int5_3.col", "gen_int5_4.col", "gen_intb_1.col", "gen_intb_2.col", "gen_intb_3.col", "gen_intb_4.col", "gen_intb_5.col", "int_cont_1.col", "int_la_1.col", "int_la_2.col", "int_la_3.col", "int_la_4.col", "int_sf_1.col", "int_veg_1.col", "proc_int.col", "proc_int2.col", "props.col", "props2.col", "savehous_1.col", "savehous_2.col", "stadint_1.col", "stadint_2.col", "stadint_3.col", "stadint_4.col", "stadint_5.col" ]