Puddlemonkey Posted December 9, 2012 Posted December 9, 2012 (edited) v1.1 updated to fix issue with mission not being savable in mission editor v1.2 updated to fix issue corrupting pylons with empty stations The auto generated unit names aren't meaningful and renaming them manually is rather a chore. Meaningful unit names are helpful in the debriefing screen after missions, when trying to work out what shot you! I set about creating a lua script to automatically rename units based on their group name. This zip contains a few scripts and various lua functions which load and save a mission lua file into a table. Being able to load and save the mission file potentially opens the door to automate other tasks, such as moving or exporting objects from one mission to another. Some basic instructions: Preparing The Environment: 1) Extract the Mission File Tools vx.x.zip into a folder. 2) Download a lua environment such as luaforwindows and install (http://code.google.com/p/luaforwindows/) Using The Script: 3) Open .miz file with winzip or similar 4) Extract mission file and place anywhere 5) Edit SampleRenameUnits.lua: a) set strMissionFile to the full path and filename, using double \\ rather than single \ b) set strSaveFile to the full path and filename of the output file - this can be the same as the input c) set the number of characters to be taken from the group name and used in the unit name (intCharacters) 6) Launch SampleRenameUnits.lua in the lua environment (not DCS World) 7) Take the output mission file and rename to 'mission' if necessary (depending on what you set strSaveFile to) 8) Use Winzip or similar to insert the mission file into the .miz file. 9) Enjoy An example of what this script does: You have a mission with a group called "USA Tanks" made up of "Unit 1", "Unit 2", "Unit 3". After running the script you will have a group called "USA Tanks" with units "USA Tan.1", "USA Tan.2", "USA Tan.3"mission File Tools v1.2.zip Edited December 14, 2012 by Puddlemonkey 2
Ripcord Posted December 12, 2012 Posted December 12, 2012 I like this. Where you the 3 lua files go? Into which folder? Oh wait, these files have to be used outside the sim somehow, did I understand that correctly? Being able to load and save the mission file potentially opens the door to automate other tasks, such as moving or exporting objects from one mission to another. I like the remaming units idea, but I really am particularly interested in getting to this. [sIGPIC][/sIGPIC]
Megagoth1702 Posted December 12, 2012 Posted December 12, 2012 (edited) Great script! Awesome! I found out: Download luaForWindows, open the editor or use LExecutor, put in the "SampleRenameUnits.lua" file, give it the full path to your mission file, execute/run (F5 in the editor) and the mission file will be changed. :) Then put mission file back into mission miz and done! Also, intCharacters is not setting the SUFFIX but the PREFIX of the unit's new names. I got a problem though. After running the script I can not save the mission in the mission editor anymore when I change something. The save button keeps "pressed". If I try to exit the editor via the red exit button it asks me if I wanna save the mission. If I hit "yes" nothing happens. If I hit "no" I get back into the main menu but obviously the mission is not saved. Puddlemonkey, what is going on there? :-/ Is it a mistake on my part? Edited December 12, 2012 by Megagoth1702 1 [sIGPIC][/sIGPIC] System specs:2500k @ 4.6 GHz 8GB RAM HD7950 OC'd Win7 x64 Posting tracks to make your DCS better - attention bump incoming!
Grimes Posted December 12, 2012 Posted December 12, 2012 Check your me.log when that happens. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Megagoth1702 Posted December 12, 2012 Posted December 12, 2012 Ah, grimes thank you. Oh wow, I can't make anything of this. :-/ 00000.000 INFO VFS: Using 'Saved Games': "C:\Users\Andrej\Saved Games" 00000.026 UNKNOWN main: locale: en EN 00000.077 UNKNOWN main: me_db_api creation started 00000.231 UNKNOWN main: MOD loading: ./mods/aircrafts/A-10C/entry.lua 00000.232 UNKNOWN main: MOD loading: ./mods/aircrafts/REAL SOUND v1.2 MOD folder/entry.lua 00000.232 ERROR EDCORE: can't open MO-file C:\Program Files (x86)\DCS World\mods\aircrafts\REAL SOUND v1.2 MOD folder\l10n\en\LC_MESSAGES\messages.mo 00000.232 UNKNOWN main: MOD loading: ./mods/aircrafts/Su-25T/entry.lua 00000.232 UNKNOWN main: MOD loading: ./DemoMods/tech/CombinedArms/entry.lua 00000.232 ERROR EDCORE: can't open MO-file C:\Program Files (x86)\DCS World\DemoMods\tech\CombinedArms\l10n\en\LC_MESSAGES\messages.mo 00000.233 UNKNOWN main: MOD loading: ./DemoMods/aircrafts/A-10C/entry.lua 00000.233 UNKNOWN main: MOD loading: ./DemoMods/aircrafts/Flaming Cliffs/entry.lua 00000.233 ERROR EDCORE: can't open MO-file C:\Program Files (x86)\DCS World\DemoMods\aircrafts\Flaming Cliffs\l10n\en\LC_MESSAGES\messages.mo 00000.233 UNKNOWN main: MOD loading: ./DemoMods/aircrafts/Ka-50/entry.lua 00000.233 ERROR EDCORE: can't open MO-file C:\Program Files (x86)\DCS World\DemoMods\aircrafts\Ka-50\l10n\en\LC_MESSAGES\messages.mo 00000.233 UNKNOWN main: MOD loading: ./DemoMods/aircrafts/P-51D/entry.lua 00000.233 ERROR EDCORE: can't open MO-file C:\Program Files (x86)\DCS World\DemoMods\aircrafts\P-51D\l10n\en\LC_MESSAGES\messages.mo 00000.233 UNKNOWN main: PLUGINS START------------------------------------------------- 00000.233 UNKNOWN main: plugin: A-10C Warthog by Eagle Dynamics applied 00000.233 UNKNOWN main: plugin: REAL SOUND for DCS World by zzzspace applied 00000.233 UNKNOWN main: plugin: Su-25T by Eagle Dynamics applied 00000.233 UNKNOWN main: plugin: Combined Arms by Eagle Dynamics applied 00000.233 UNKNOWN main: plugin: Flaming Cliffs by Eagle Dynamics applied 00000.233 UNKNOWN main: plugin: Ka-50 Black Shark by Eagle Dynamics applied 00000.233 UNKNOWN main: plugin: P-51D Mustang by Eagle Dynamics applied 00000.233 UNKNOWN main: PLUGINS DONE-------------------------------------------------- 00000.243 UNKNOWN main: ./MissionEditor/data/scripts/unitsclasses.lua loaded 00000.245 UNKNOWN main: ./MissionEditor/data/NewMap/classifier.lua loaded 00000.276 UNKNOWN main: me_db_api creation complete 00000.303 INFO EDCORE: createSerialQueue IOQueue 00000.415 UNKNOWN main: options data successfully loaded 00000.702 ERROR DXGUI_EDGE_RENDER: Cannot load texture '' 00000.856 INFO SOUND: loaded 494 sdefs from ".\sounds\sdef" 00000.879 INFO SOUND: XAudio2: Using device ID:'{0.0.0.00000000}.{72fcb108-fc7d-47d6-a411-79ce079f4351}' Name:'Lautsprecher (3- Creative SB X-Fi)', channels: 2 00000.879 INFO SOUND: XAudio2: channel layout: Headphones/Stereo 00000.892 INFO SOUND: Using SSE FTZ mode. 00000.951 WARNING DXGUI: Invalid align type! 00004.553 WARNING LOG: 3 duplicate message(s) skipped. 00004.553 UNKNOWN main: removing C:\Users\Andrej\AppData\Local\Temp\DCS\tempMission.miz 00006.744 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_infrared.lua 00006.745 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_land.lua 00006.746 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_landheight.lua 00006.746 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_lights.lua 00006.747 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_map.lua 00006.747 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_mfd.lua 00006.748 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/land3.1.lua 00006.748 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_shelf.lua 00006.820 UNKNOWN main: 4 15 47 4 00009.480 WARNING LOG: 13 duplicate message(s) skipped. 00009.480 UNKNOWN main: Loading mission @MissionEditorTesting.miz 00009.534 UNKNOWN main: Mission C:/Users/Andrej/Saved Games/DCS/Missions/@MissionEditorTesting.miz loaded 00009.539 UNKNOWN main: 4 15 47 4 00010.080 WARNING LOG: 13 duplicate message(s) skipped. 00010.080 ERROR DXRENDERER: DXDefTexture: failed to open file wagon-gruz 00010.085 ERROR DXRENDERER: DXDefTexture: failed to open file telega 00010.088 ERROR DXRENDERER: DXDefTexture: failed to open file avtobus 00010.091 ERROR DXRENDERER: DXDefTexture: failed to open file koleso-uaz 00010.094 ERROR DXRENDERER: DXDefTexture: failed to open file zil-135-resh-2-bok 00010.097 ERROR DXRENDERER: DXDefTexture: failed to open file traki 00010.100 ERROR DXRENDERER: DXDefTexture: failed to open file katok-t80-op 00010.103 ERROR DXRENDERER: DXDefTexture: failed to open file katok-mard-wed 00010.106 ERROR DXRENDERER: DXDefTexture: failed to open file camuflag 00010.109 ERROR DXRENDERER: DXDefTexture: failed to open file zil-135-resh-2-werh 00010.112 ERROR DXRENDERER: DXDefTexture: failed to open file protektor 00010.115 ERROR DXRENDERER: DXDefTexture: failed to open file ural 00010.117 ERROR DXRENDERER: DXDefTexture: failed to open file grad-tr-fas 00010.121 ERROR DXRENDERER: DXDefTexture: failed to open file ural-kuzow-b 00010.126 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-okras 00010.130 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-katki 00010.134 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-traki 00010.137 ERROR DXRENDERER: DXDefTexture: failed to open file zub 00021.664 ERROR DXRENDERER: DXDefTexture: failed to open file telega 00021.667 ERROR DXRENDERER: DXDefTexture: failed to open file zub 00021.669 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-katki 00021.672 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-traki 00021.674 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-okras 00021.677 ERROR DXRENDERER: DXDefTexture: failed to open file grad-tr-fas 00021.680 ERROR DXRENDERER: DXDefTexture: failed to open file ural 00021.682 ERROR DXRENDERER: DXDefTexture: failed to open file protektor 00021.685 ERROR DXRENDERER: DXDefTexture: failed to open file zil-135-resh-2-werh 00021.687 ERROR DXRENDERER: DXDefTexture: failed to open file camuflag 00021.690 ERROR DXRENDERER: DXDefTexture: failed to open file katok-mard-wed 00021.692 ERROR DXRENDERER: DXDefTexture: failed to open file katok-t80-op 00021.695 ERROR DXRENDERER: DXDefTexture: failed to open file traki 00021.697 ERROR DXRENDERER: DXDefTexture: failed to open file zil-135-resh-2-bok 00021.700 ERROR DXRENDERER: DXDefTexture: failed to open file koleso-uaz 00021.703 ERROR DXRENDERER: DXDefTexture: failed to open file avtobus 00021.705 ERROR DXRENDERER: DXDefTexture: failed to open file wagon-gruz 00023.082 UNKNOWN main: GUI Error: [string ".\MissionEditor\modules\me_mission.lua"]:6908: bad argument #1 to 'match' (string expected, got nil) GUI debug.traceback: stack traceback: [C]: ? [C]: in function 'match' [string ".\MissionEditor\modules\me_mission.lua"]:6908: in function 'unloadCallsign' [string ".\MissionEditor\modules\me_mission.lua"]:2333: in function 'unload_air_groups' [string ".\Mis 00023.082 ALERT LUACOMMON: Error: GUI Error: [string ".\MissionEditor\modules\me_mission.lua"]:6908: bad argument #1 to 'match' (string expected, got nil) GUI debug.traceback: stack traceback: [C]: ? [C]: in function 'match' [string ".\MissionEditor\modules\me_mission.lua"]:6908: in function 'unloadCallsign' [string ".\MissionEditor\modules\me_mission.lua"]:2333: in function 'unload_air_groups' [string 00025.680 UNKNOWN main: alt_type differs table: 000000000E5E71D0 BARO 00028.011 UNKNOWN main: GUI Error: [string ".\MissionEditor\modules\me_mission.lua"]:6908: bad argument #1 to 'match' (string expected, got nil) GUI debug.traceback: stack traceback: [C]: ? [C]: in function 'match' [string ".\MissionEditor\modules\me_mission.lua"]:6908: in function 'unloadCallsign' [string ".\MissionEditor\modules\me_mission.lua"]:2333: in function 'unload_air_groups' [string ".\Mis 00028.011 ALERT LUACOMMON: Error: GUI Error: [string ".\MissionEditor\modules\me_mission.lua"]:6908: bad argument #1 to 'match' (string expected, got nil) GUI debug.traceback: stack traceback: [C]: ? [C]: in function 'match' [string ".\MissionEditor\modules\me_mission.lua"]:6908: in function 'unloadCallsign' [string ".\MissionEditor\modules\me_mission.lua"]:2333: in function 'unload_air_groups' [string 00029.114 UNKNOWN main: alt_type differs table: 000000000E5E71D0 BARO 00030.528 UNKNOWN main: GUI Error: [string ".\MissionEditor\modules\me_mission.lua"]:6908: bad argument #1 to 'match' (string expected, got nil) GUI debug.traceback: stack traceback: [C]: ? [C]: in function 'match' [string ".\MissionEditor\modules\me_mission.lua"]:6908: in function 'unloadCallsign' [string ".\MissionEditor\modules\me_mission.lua"]:2333: in function 'unload_air_groups' [string ".\Mis 00030.528 ALERT LUACOMMON: Error: GUI Error: [string ".\MissionEditor\modules\me_mission.lua"]:6908: bad argument #1 to 'match' (string expected, got nil) GUI debug.traceback: stack traceback: [C]: ? [C]: in function 'match' [string ".\MissionEditor\modules\me_mission.lua"]:6908: in function 'unloadCallsign' [string ".\MissionEditor\modules\me_mission.lua"]:2333: in function 'unload_air_groups' [string 00035.514 UNKNOWN main: GUI Error: [string ".\MissionEditor\modules\me_mission.lua"]:6908: bad argument #1 to 'match' (string expected, got nil) GUI debug.traceback: stack traceback: [C]: ? [C]: in function 'match' [string ".\MissionEditor\modules\me_mission.lua"]:6908: in function 'unloadCallsign' [string ".\MissionEditor\modules\me_mission.lua"]:2333: in function 'unload_air_groups' [string ".\Mis 00035.514 ALERT LUACOMMON: Error: GUI Error: [string ".\MissionEditor\modules\me_mission.lua"]:6908: bad argument #1 to 'match' (string expected, got nil) GUI debug.traceback: stack traceback: [C]: ? [C]: in function 'match' [string ".\MissionEditor\modules\me_mission.lua"]:6908: in function 'unloadCallsign' [string ".\MissionEditor\modules\me_mission.lua"]:2333: in function 'unload_air_groups' [string 00039.971 UNKNOWN main: turning log false 00039.975 INFO SOUND: detaching sdef path ".\sounds\sdef\" Can you help me out man? I'll provide the mission file BEFORE I run the script and AFTER. The edited file is also much, much smaller than the original file. :-/missionFiles.zip [sIGPIC][/sIGPIC] System specs:2500k @ 4.6 GHz 8GB RAM HD7950 OC'd Win7 x64 Posting tracks to make your DCS better - attention bump incoming!
Puddlemonkey Posted December 13, 2012 Author Posted December 13, 2012 Hi, I took a look at this and it turns out that mission files have some tables which are a combination of numbered (array) and labelled key elements. I have modified the script to deal with this. Hope it works, give it a try and let me know. PM
Megagoth1702 Posted December 13, 2012 Posted December 13, 2012 Nope, gives me an error. I think it would be faster error detection if you did some testing yourself. I attached the mission I use to test out this script. It's just an empty plane and 20 tanks nearby. Maybe this will help you find issues faster? :) 00000.000 INFO VFS: Using 'Saved Games': "C:\Users\Andrej\Saved Games" 00000.057 UNKNOWN main: locale: en EN 00000.163 UNKNOWN main: me_db_api creation started 00000.459 UNKNOWN main: MOD loading: ./mods/aircrafts/A-10C/entry.lua 00000.459 UNKNOWN main: MOD loading: ./mods/aircrafts/REAL SOUND v1.2 MOD folder/entry.lua 00000.459 ERROR EDCORE: can't open MO-file C:\Program Files (x86)\DCS World\mods\aircrafts\REAL SOUND v1.2 MOD folder\l10n\en\LC_MESSAGES\messages.mo 00000.459 UNKNOWN main: MOD loading: ./mods/aircrafts/Su-25T/entry.lua 00000.461 UNKNOWN main: MOD loading: ./DemoMods/tech/CombinedArms/entry.lua 00000.461 ERROR EDCORE: can't open MO-file C:\Program Files (x86)\DCS World\DemoMods\tech\CombinedArms\l10n\en\LC_MESSAGES\messages.mo 00000.462 UNKNOWN main: MOD loading: ./DemoMods/aircrafts/A-10C/entry.lua 00000.463 UNKNOWN main: MOD loading: ./DemoMods/aircrafts/Flaming Cliffs/entry.lua 00000.463 ERROR EDCORE: can't open MO-file C:\Program Files (x86)\DCS World\DemoMods\aircrafts\Flaming Cliffs\l10n\en\LC_MESSAGES\messages.mo 00000.464 UNKNOWN main: MOD loading: ./DemoMods/aircrafts/Ka-50/entry.lua 00000.464 ERROR EDCORE: can't open MO-file C:\Program Files (x86)\DCS World\DemoMods\aircrafts\Ka-50\l10n\en\LC_MESSAGES\messages.mo 00000.465 UNKNOWN main: MOD loading: ./DemoMods/aircrafts/P-51D/entry.lua 00000.465 ERROR EDCORE: can't open MO-file C:\Program Files (x86)\DCS World\DemoMods\aircrafts\P-51D\l10n\en\LC_MESSAGES\messages.mo 00000.465 UNKNOWN main: PLUGINS START------------------------------------------------- 00000.465 UNKNOWN main: plugin: A-10C Warthog by Eagle Dynamics applied 00000.465 UNKNOWN main: plugin: REAL SOUND for DCS World by zzzspace applied 00000.465 UNKNOWN main: plugin: Su-25T by Eagle Dynamics applied 00000.466 UNKNOWN main: plugin: Combined Arms by Eagle Dynamics applied 00000.466 UNKNOWN main: plugin: Flaming Cliffs by Eagle Dynamics applied 00000.466 UNKNOWN main: plugin: Ka-50 Black Shark by Eagle Dynamics applied 00000.466 UNKNOWN main: plugin: P-51D Mustang by Eagle Dynamics applied 00000.466 UNKNOWN main: PLUGINS DONE-------------------------------------------------- 00000.484 UNKNOWN main: ./MissionEditor/data/scripts/unitsclasses.lua loaded 00000.488 UNKNOWN main: ./MissionEditor/data/NewMap/classifier.lua loaded 00000.519 UNKNOWN main: me_db_api creation complete 00000.595 INFO EDCORE: createSerialQueue IOQueue 00000.851 UNKNOWN main: options data successfully loaded 00001.887 ERROR DXGUI_EDGE_RENDER: Cannot load texture '' 00002.114 INFO SOUND: loaded 494 sdefs from ".\sounds\sdef" 00002.126 INFO SOUND: XAudio2: Using device ID:'{0.0.0.00000000}.{72fcb108-fc7d-47d6-a411-79ce079f4351}' Name:'Lautsprecher (3- Creative SB X-Fi)', channels: 2 00002.126 INFO SOUND: XAudio2: channel layout: Headphones/Stereo 00002.159 INFO SOUND: Using SSE FTZ mode. 00002.255 WARNING DXGUI: Invalid align type! 00005.935 WARNING LOG: 3 duplicate message(s) skipped. 00005.935 UNKNOWN main: removing C:\Users\Andrej\AppData\Local\Temp\DCS\tempMission.miz 00009.703 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_infrared.lua 00009.706 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_land.lua 00009.707 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_landheight.lua 00009.708 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_lights.lua 00009.709 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_map.lua 00009.710 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_mfd.lua 00009.711 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/land3.1.lua 00009.712 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_shelf.lua 00009.891 UNKNOWN main: 4 15 47 4 00015.138 WARNING LOG: 13 duplicate message(s) skipped. 00015.138 ERROR DXRENDERER: DXDefTexture: failed to open file t-80ud-traki 00015.157 ERROR DXRENDERER: DXDefTexture: failed to open file zub 00015.161 ERROR DXRENDERER: DXDefTexture: failed to open file t-80ud-katki 00015.615 ERROR GRAPHICSXP: ModelManager: can't find VAZ 00015.860 ERROR DXRENDERER: DXDefTexture: failed to open file telega 00015.868 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-okras 00015.873 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-katki 00015.880 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-traki 00015.890 ERROR DXRENDERER: DXDefTexture: failed to open file wagon-gruz 00015.895 ERROR DXRENDERER: DXDefTexture: failed to open file zil-135-resh-2-bok 00015.900 ERROR DXRENDERER: DXDefTexture: failed to open file traki 00015.904 ERROR DXRENDERER: DXDefTexture: failed to open file katok-t80-op 00015.908 ERROR DXRENDERER: DXDefTexture: failed to open file katok-mard-wed 00015.913 ERROR DXRENDERER: DXDefTexture: failed to open file camuflag 00015.918 ERROR DXRENDERER: DXDefTexture: failed to open file zil-135-resh-2-werh 00015.921 ERROR DXRENDERER: DXDefTexture: failed to open file protektor 00015.924 ERROR DXRENDERER: DXDefTexture: failed to open file ural 00015.926 ERROR DXRENDERER: DXDefTexture: failed to open file grad-tr-fas 00015.929 ERROR DXRENDERER: DXDefTexture: failed to open file ural-kuzow-b 00015.934 ERROR DXRENDERER: DXDefTexture: failed to open file avtobus 00015.936 ERROR DXRENDERER: DXDefTexture: failed to open file koleso-uaz 00015.939 ERROR DXRENDERER: DXDefTexture: failed to open file fonar_ladder 00015.942 ERROR DXRENDERER: DXDefTexture: failed to open file batumi_hangar 00015.947 ERROR DXRENDERER: DXDefTexture: failed to open file has_shelter_nm 00015.958 ERROR DXRENDERER: DXDefTexture: failed to open file kurtka 00015.961 ERROR DXRENDERER: DXDefTexture: failed to open file face 00015.967 ERROR DXRENDERER: DXDefTexture: failed to open file setka1 00015.972 ERROR DXRENDERER: DXDefTexture: failed to open file sopla-f 00016.341 ERROR DXRENDERER: DXDefTexture: failed to open file tor 00061.764 UNKNOWN main: No default task for AAA Vulcan M163 00061.764 UNKNOWN main: Mission C:/Users/Andrej/Saved Games/DCS/Missions/@MissionEditorTesting.miz loaded 00061.770 UNKNOWN main: 4 15 47 4 00061.944 WARNING LOG: 13 duplicate message(s) skipped. 00061.944 UNKNOWN main: C:/Users/Andrej/Saved Games/DCS/Missions/@MissionEditorTesting.miz saved 00265.232 ERROR DXRENDERER: DXDefTexture: failed to open file telega 00265.235 ERROR DXRENDERER: DXDefTexture: failed to open file zub 00265.238 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-katki 00265.240 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-traki 00265.243 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-okras 00265.246 ERROR DXRENDERER: DXDefTexture: failed to open file grad-tr-fas 00265.249 ERROR DXRENDERER: DXDefTexture: failed to open file ural 00265.251 ERROR DXRENDERER: DXDefTexture: failed to open file protektor 00265.254 ERROR DXRENDERER: DXDefTexture: failed to open file zil-135-resh-2-werh 00265.257 ERROR DXRENDERER: DXDefTexture: failed to open file camuflag 00265.260 ERROR DXRENDERER: DXDefTexture: failed to open file katok-mard-wed 00265.263 ERROR DXRENDERER: DXDefTexture: failed to open file katok-t80-op 00265.266 ERROR DXRENDERER: DXDefTexture: failed to open file traki 00265.268 ERROR DXRENDERER: DXDefTexture: failed to open file zil-135-resh-2-bok 00265.271 ERROR DXRENDERER: DXDefTexture: failed to open file wagon-gruz 00267.372 UNKNOWN main: Loading mission @MissionEditorTesting.miz 00267.432 UNKNOWN main: Mission C:/Users/Andrej/Saved Games/DCS/Missions/@MissionEditorTesting.miz loaded 00267.437 UNKNOWN main: 4 15 47 4 00267.682 WARNING LOG: 13 duplicate message(s) skipped. 00267.682 ERROR DXRENDERER: DXDefTexture: failed to open file koleso-uaz 00267.689 ERROR DXRENDERER: DXDefTexture: failed to open file avtobus 00272.806 ERROR VFS: VFS_open_write: CreateFile(C:\Users\Andrej\AppData\Local\Temp\DCS\temp.mis): Unknown error 00272.806 ERROR LUA-ZIPLUA: fopen: Can't open file to zip 00278.151 ERROR DXRENDERER: DXDefTexture: failed to open file telega 00278.153 ERROR DXRENDERER: DXDefTexture: failed to open file zub 00278.156 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-katki 00278.159 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-traki 00278.161 ERROR DXRENDERER: DXDefTexture: failed to open file 2c3-okras 00278.164 ERROR DXRENDERER: DXDefTexture: failed to open file grad-tr-fas 00278.167 ERROR DXRENDERER: DXDefTexture: failed to open file ural 00278.169 ERROR DXRENDERER: DXDefTexture: failed to open file protektor 00278.172 ERROR DXRENDERER: DXDefTexture: failed to open file zil-135-resh-2-werh 00278.175 ERROR DXRENDERER: DXDefTexture: failed to open file camuflag 00278.177 ERROR DXRENDERER: DXDefTexture: failed to open file katok-mard-wed 00278.180 ERROR DXRENDERER: DXDefTexture: failed to open file katok-t80-op 00278.182 ERROR DXRENDERER: DXDefTexture: failed to open file traki 00278.184 ERROR DXRENDERER: DXDefTexture: failed to open file zil-135-resh-2-bok 00278.187 ERROR DXRENDERER: DXDefTexture: failed to open file koleso-uaz 00278.189 ERROR DXRENDERER: DXDefTexture: failed to open file avtobus 00278.191 ERROR DXRENDERER: DXDefTexture: failed to open file wagon-gruz 00279.705 ERROR VFS: VFS_open_write: CreateFile(C:\Users\Andrej\AppData\Local\Temp\DCS\temp.mis): Unknown error 00279.706 ERROR LUA-ZIPLUA: fopen: Can't open file to zip 00286.211 UNKNOWN main: Saving C:/Users/Andrej/Saved Games/DCS/Missions/@MissionEditorTesting2.miz 00286.226 ERROR VFS: VFS_open_write: CreateFile(C:\Users\Andrej\AppData\Local\Temp\DCS\temp.mis): Unknown error 00286.226 ERROR LUA-ZIPLUA: fopen: Can't open file to zip 00293.620 UNKNOWN main: turning log false 00293.627 INFO SOUND: detaching sdef path ".\sounds\sdef\" I think it would be faster error detection if you did some testing yourself. I attached the mission I use to test out this script. It's just an empty plane and 20 tanks nearby. Maybe this will help you find issues faster? :)@MissionEditorTesting.miz [sIGPIC][/sIGPIC] System specs:2500k @ 4.6 GHz 8GB RAM HD7950 OC'd Win7 x64 Posting tracks to make your DCS better - attention bump incoming!
Puddlemonkey Posted December 13, 2012 Author Posted December 13, 2012 Strange. I did of course test it. The first time, I didn't have planes in my missions so hadn't spotted the issue that you did. However, I tested it with your previous mission inserted into a .miz and have just run it on your @MissionEditorTesting.miz. It renames the units, I can save in Mission Editor and I can even fly it (before and after the script). So I'm stumped. Looking at your log, it looks like it can't open the zip file. I wonder about the filename or what you're using to extract and insert from the .miz zips. As I say though, it's all working for me, even with your files. This is the miz after I have run the script and inserted the new mission into the zip. :noexpression:@MissionEditorTesting.miz
Megagoth1702 Posted December 13, 2012 Posted December 13, 2012 (edited) I use winRar to do all the file transfers since it does it in real time. Just open the miz file with Winrar and drag and drop files back and forth. I will test again and pay close attention I don't **** up. Do you also get a SMALLER "mission" file after running your script? EDIT: It works now. I have no idea why but I guess I ****ed up one of the file transfers. Anyway, thanks a lot man. Edited December 13, 2012 by Megagoth1702 [sIGPIC][/sIGPIC] System specs:2500k @ 4.6 GHz 8GB RAM HD7950 OC'd Win7 x64 Posting tracks to make your DCS better - attention bump incoming!
Puddlemonkey Posted December 13, 2012 Author Posted December 13, 2012 I think the reason why the filesize is smaller is that I have used the tab character to indent rather than several spaces. Once compressed, I doubt it makes any difference. Glad its working for you :-)
Megagoth1702 Posted December 13, 2012 Posted December 13, 2012 (edited) Thanks man. Some more testing done and... The script changes loadouts. I am not sure how exactly, on what units etc. but here is the deal: Check the two missions. After I run the script to rename the units the loadout of the SU25 has changed. Basically, one wing full of armament is gone. Also, when I open up the loadout window of the Su25 it tells me "loadout has not been saved, wanna save it as a new one"? So yeah, loadout is being touched by the script. Maan, I think I will stick to hand naming for now. :-/ This looked so promising but I am afraid of trying this on anything bigger than a test mission right now. It also seems to do weird stuff to AI. Check this thread: http://forums.eagle.ru/showthread.php?p=1628003#post1628003beforeScript.mizafterScript.miz Edited December 13, 2012 by Megagoth1702 [sIGPIC][/sIGPIC] System specs:2500k @ 4.6 GHz 8GB RAM HD7950 OC'd Win7 x64 Posting tracks to make your DCS better - attention bump incoming!
Megagoth1702 Posted December 13, 2012 Posted December 13, 2012 Yep, it's clearly the script that is doing some work to the loadouts and also somehow to the AI behaviour. http://forums.eagle.ru/showthread.php?p=1628003#post1628003 After running the script not even a clean SU25 (delete old su25, save, add new one etc. save) will do the job, they will just crash into the ground. :( [sIGPIC][/sIGPIC] System specs:2500k @ 4.6 GHz 8GB RAM HD7950 OC'd Win7 x64 Posting tracks to make your DCS better - attention bump incoming!
Puddlemonkey Posted December 13, 2012 Author Posted December 13, 2012 Yeah, just looking at that now....
Puddlemonkey Posted December 14, 2012 Author Posted December 14, 2012 (edited) Ok, that proved a tricky one. The lua ipairs iterator stops if there is a gap in the list (you didn't have a weapon on the 6th pylon so it would ignore 7 to 11. Should be fixed now. Also, when I run your 'BeforeScript.miz', it rams the ground too. Edited December 14, 2012 by Puddlemonkey
Megagoth1702 Posted December 14, 2012 Posted December 14, 2012 Yeah I probably did not do a clean mission. :-/ After running the script there are AI issues. On a clean mission it does not happen. Daym, man I am tempted to give it another shot, haha. :D [sIGPIC][/sIGPIC] System specs:2500k @ 4.6 GHz 8GB RAM HD7950 OC'd Win7 x64 Posting tracks to make your DCS better - attention bump incoming!
Megagoth1702 Posted December 17, 2012 Posted December 17, 2012 And I did give it another shot. It deletes my A-10's loadout. No matter what I had before, after running the script I am empty. Same goes for other aircraft, the F15E I had , loaded with multiple GBU12s is not empty as well... :( [sIGPIC][/sIGPIC] System specs:2500k @ 4.6 GHz 8GB RAM HD7950 OC'd Win7 x64 Posting tracks to make your DCS better - attention bump incoming!
Recommended Posts