Grimes Posted May 21, 2016 Share Posted May 21, 2016 (edited) I've been wanting to make something like this for reference purposes for a while now. Basically it is just an export for data that is accessible to the scripting engine for each unit in the game. Each file contains a table of the objects default description, weapons, and sensors table. Some objects have no weapons or sensors, so for these objects those entries won't exist. The data is exported from a combination of 2.0.2 and 1.5.3 releases. Here is a sample of what the table looks like for the A-10C. Note the litening pod wasn't added to its payload so that information is missing from the sensors. I've attached all of the files below, but I have also added each file to my miscScripts repository on my github. I plan to periodically export the files again if major changes occur overall or to include anything I missed. Speaking of which if there is an object missing let me know. Right now the list doesn't include static objects or weapons. the former is pretty easy to add, while the latter would be a bit of a pain to do. Hope this is useful for anyone curious. Edit 22.5.2016: reuploaded fileObjectDB.rar Edited May 23, 2016 by Grimes 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 Link to comment Share on other sites More sharing options...
piXel496 Posted May 21, 2016 Share Posted May 21, 2016 Nice. I have a question related to what you have done here. Is it possible to script the vehicles from the Nevada map "Drive:\DCS World 2 OpenAlpha\Mods\terrains\Nevada\Models\Vehicles\StructTable.sht" somehow? I have no clue how to spawn them in the Nevada map with a script, but it would give new possibilities in my .lua adventures. Thanks, :) old stuff I made Link to comment Share on other sites More sharing options...
Grimes Posted May 22, 2016 Author Share Posted May 22, 2016 Is it possible to script the vehicles from the Nevada map "Drive:\DCS World 2 OpenAlpha\Mods\terrains\Nevada\Models\Vehicles\StructTable.sht" somehow? I have no clue how to spawn them in the Nevada map with a script, but it would give new possibilities in my .lua adventures. I don't know. They aren't quite normal objects so I don't even know if it would be possible to mod them into the core game as AI. 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 Link to comment Share on other sites More sharing options...
Stonehouse Posted May 22, 2016 Share Posted May 22, 2016 Really interesting. So a few questions when you have a moment spare. Box- is that the size of the box that contains the aircraft so sort of a collision box? The speeds look like m/s? It'd be interesting to see what you get if you produced the same info (as to see what is missing and probably should be there) for some of the mod aircraft out there like the B-29. Thanks, Stonehouse Link to comment Share on other sites More sharing options...
Grimes Posted May 22, 2016 Author Share Posted May 22, 2016 Box is more like a "bounding box" like when you select an object in something like 3d max. It can be used to infer the total area an object takes up, but it won't be super accurate. A tank pointing directly north will have a smaller "box" area than if it were angled 45 degrees. Speed is in m/s yeah. The script could be used on modded objects, and its a pretty simplified script at that. Most of it is dedicated to writing the files and changing the name of the file based on attributes. It basically just iterates mist.DBs.unitsByName and then creates a table with the following which is later written to a file via mist.utils.writeData: local writeTable = {desc = obj:getDesc(), sensors = obj:getSensors(), weapons = obj:getAmmo()} 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 Link to comment Share on other sites More sharing options...
chromium Posted May 22, 2016 Share Posted May 22, 2016 (edited) If this could be converted in a single loadable and readable table.... then wow. Maybe if you don't have the "allincluded" file, can I create it someday and send it to you? EDIT: else if you can write here the "tables generator" code, I could modify to get a single table at each mission start to fit my needs :) EDIT2: forgot my request, it's much more easy to retrieve the desc table everytime whitout having to iterate in an enormous table. Edited May 22, 2016 by chromium Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously. Link to comment Share on other sites More sharing options...
Grimes Posted May 22, 2016 Author Share Posted May 22, 2016 Yeah all this is easily available at runtime. I made it mostly as a reference for whenever you are making a script and might be curious what the values for a given unit are. Having taken a more thorough look it seems there is a bug with Unit.getSensors where it is returning only the first unit in a groups sensors. So I will have to re-export the data for ground units and ships. 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 Link to comment Share on other sites More sharing options...
Grimes Posted May 23, 2016 Author Share Posted May 23, 2016 Update the git and file from the first post. I fixed the sensor data for ground vehicles and sams, but it doesn't seem to be available for ships. Also added static objects and the FW-190 since I somehow missed it. 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 Link to comment Share on other sites More sharing options...
Recommended Posts