chromium Posted November 18, 2018 Posted November 18, 2018 Hi, I'm trying to track weapons usage in some way and relate it to the resource manager. I noticed that if I dump the warehouse table I get something like this for any kind of weapons: ["warehouses"][8]["weapons"][393] = table: 00000005A053AD30 { ["warehouses"][8]["weapons"][393]["wsType"] = table: 00000005A053AE10 { ["warehouses"][8]["weapons"][393]["wsType"][1] = 4, ["warehouses"][8]["weapons"][393]["wsType"][2] = 7, ["warehouses"][8]["weapons"][393]["wsType"][4] = 158, ["warehouses"][8]["weapons"][393]["wsType"][3] = 33, }, ["warehouses"][8]["weapons"][393]["initialAmount"] = 120, }, this is, for example, for a S-8 rockets (OFP2 or KOM, don't remember). Does anyone knows where I can find corrispondence between the "393" id and the fact that relates to S-8 rockets? thanks 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.
chromium Posted November 19, 2018 Author Posted November 19, 2018 Well at the moment I'm using a "manual entry table" so it's a very preliminary thing. If someone has any other suggestion, it's welcome :) 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.
Pikey Posted November 21, 2018 Posted November 21, 2018 The weapon id's are in the weapons lua in the core dcs files. You can track them there. New weapons in a mod have to create their own in their lua. db_weapons_data.lua ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *
chromium Posted November 21, 2018 Author Posted November 21, 2018 You can track them there Can you suggest me how? I looked into that files, but wpn are defined this way: { NatoName = "(AA-6)", CLSID = "{4EDBA993-2E34-444C-95FB-549300BF7CAF}", Picture = "R40R.png", displayName = _("R-40R"), Weight = 475, attribute = {4, 4, 7, 7}, Elements = { [1] = { DrawArgs = { [1] = {1, 1}, [2] = {2, 1}, }, -- end of DrawArgs Position = {0, 0, 0}, ShapeName = "R-40R", }, }, -- end of Elements }, while, instead, into the warehouse file are this way (don't bother the different visualization type, I highlight in red the id I need): ["warehouses"][8]["weapons"][[b][color="Red"]373[/color][/b]] = table: 000000055B879D28 { ["warehouses"][8]["weapons"][373]["wsType"] = table: 000000055B879E08 { ["warehouses"][8]["weapons"][373]["wsType"][1] = 4, ["warehouses"][8]["weapons"][373]["wsType"][2] = 5, ["warehouses"][8]["weapons"][373]["wsType"][4] = 70, ["warehouses"][8]["weapons"][373]["wsType"][3] = 9, }, ["warehouses"][8]["weapons"][373]["initialAmount"] = 0, }, I can't find the file that couple a particoular weapon to that code. And it's needed to ensure warehouse update from a mission to another (that I already got working) this is my personal "manual" built simple table (for Mi-8 ), which has the display name (from wpn desc table) and warehouse id number: local validWeaponsCode = { ["S-8OFP2"] = 392, ["S-8KOM"] = 407, ["S-8OM"] = 393, ["S-8TsM"] = 401, ["S-5"] = 405, ["S-5M"] = 402, ["S-13"] = 408, ["KORD 12.7 Gun"] = 87, ["7.62mm"] = 88, ["23mm HE"] = 89, ["30mm HE"] = 81, ["12.7mm"] = 80, ["FAB-100"] = 369, ["FAB-250"] = 370, ["FAB-500"] = 372, ["SAB-100"] = 322, } 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.
chromium Posted December 9, 2018 Author Posted December 9, 2018 Ok now I'm pretty angry. I got a complete warehouse items tracking from a mission to the next one, using the manual table above... but I discovered that those weapons "ids" are not fixed and change (at least) from a scenery to another and (maybe) from a mission to another. I seriously NEED to get those IDs to be dynamic... and I can't get how :(. 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.
Recommended Posts