NeedzWD40 Posted November 16, 2024 Posted November 16, 2024 7 hours ago, Esac_mirmidon said: I was trying to use SWS.lua to extract some weapon codes but im unable to find what is the code for the OH-58D APKWS guided rockets. Could someone help me out find it? I´ve tried with 4,7,33,147 but it seems incorrect. Thanks for any help An updated file with all codes would be welcomed also. Currently, APKWS is defined as {4,4,8,292} for the AGR-20A and {4,4,8,293} for the AGR-20A with M282. These can also be accessed/added/modified with the friendly codes of "weapons.missiles.AGR_20A" and "weapons.missiles.AGR_20_M282" respectively. I strongly recommend using the friendly codes where possible since the wsType isn't reliable. 1
Esac_mirmidon Posted November 17, 2024 Posted November 17, 2024 (edited) Thanks NeedzWD40 10 hours ago, NeedzWD40 said: Currently, APKWS is defined as {4,4,8,292} for the AGR-20A and {4,4,8,293} for the AGR-20A with M282. These can also be accessed/added/modified with the friendly codes of "weapons.missiles.AGR_20A" and "weapons.missiles.AGR_20_M282" respectively. I strongly recommend using the friendly codes where possible since the wsType isn't reliable. Thanks ¡¡ They are working great ¡¡¡ I´m still trying to find an updated complete list of items because im such an incompetent trying the scripts to work. XDD. I need to find the M3P gunpods also and maybe the KA-503 Vikhrs code Edited November 17, 2024 by Esac_mirmidon 1 " You must think in russian.." [sIGPIC][/sIGPIC] Windows 7 Home Premium-Intel 2500K OC 4.6-SSD Samsung EVO 860- MSI GTX 1080 - 16G RAM - 1920x1080 27´ Hotas Rhino X-55-MFG Crosswind Rudder Pedals -Track IR 4
NeedzWD40 Posted November 17, 2024 Posted November 17, 2024 10 hours ago, Esac_mirmidon said: Thanks NeedzWD40 Thanks ¡¡ They are working great ¡¡¡ I´m still trying to find an updated complete list of items because im such an incompetent trying the scripts to work. XDD. I need to find the M3P gunpods also and maybe the KA-503 Vikhrs code Unfortunately, wsType codes are unreliable as noted, so making a list and keeping it updated it will be fairly rough. Part of the codes can be found in Quaggles datamine along with the friendly code (nominally defined as "_unique_resource_name") but not all the friendly codes work, particularly with aircraft equipment like gunpods. Generally speaking, fuel tanks, missiles, rockets, and bombs are OK with a few exceptions, but TGPs, guns and mounts, and related equipment don't have reliable codes. To get the current wsType code for these problematic parts, I set a mission with an airfield or warehouse with limited ordnance, then add a unique quantity value to the item in question. I then reclass the mission to a zip file, extract warehouses from it, then open with text editor/code editor and search for ["initialAmount"] = #, where # is the unique quantity previously defined. I can then grab the wsType from the warehouse file and directly add the item. This is unfortunately time consuming, so I mostly only apply it to equipment used by FARPs. Using the above image, we can see that the series of M3P gunpods for the OH-58D(R) are currently {4,15,46,2604}, {4,15,46,2605}, {4,15,46,2606}, {4,15,46,2607}, and {4,15,46,2608}. These items likely changed due to updates to the OH-58D(R) a patch or two ago, which is why the previous codes don't work. So as to make it easier to sort out which is added straight from a warehouse vs wsType, I made a script to add 25 of the wsType, then 50 of the derived warehouse items, resulting in this: We can see that our traditional bombs like FAB-100 are added from the source warehouse, but equipment like the KMGU-2 dispenser, gun mounts, and gunpods are added from our wsType that we had to clumsily grab due to lack of effective friendly strings/codes. Unfortunately, I don't have an easy answer to the whole ordeal, so the best I can offer is a test mission with the script code I used for the demonstration above. local wareitems = Airbase.getByName("Batumi"):getWarehouse():getInventory() local wareadd = Airbase.getByName("Static FARP-1"):getWarehouse() mywarehouselist = { {4,15,46,2608}, {4,15,46,2607}, {4,15,46,2606}, {4,15,46,2605}, {4,15,46,2604}, {4,15,46,1771}, {4,15,46,1770}, {4,15,46,1769}, {4,15,46,1764}, {4,15,46,1765}, {4,15,46,1766}, {4,15,46,1767}, {4,15,46,1768}, {4,15,46,170}, {4,15,46,171}, {4,15,46,183}, {4,15,46,1294}, {4,15,46,1295}, {4,15,46,824}, {4,15,46,825}, {4,15,46,300}, {4,15,47,1100}, {4,15,47,680}, {4,15,47,679}, {4,15,46,2476}, {4,15,46,2477}, {4,15,46,2478}, {4,15,46,2479}, {4,15,46,2480}, {4,15,46,2481}, {4,15,46,2482}, {4,15,46,2483}, {4,15,46,2484}, {4,15,46,2579}, {4,15,46,2580}, {4,15,46,2581}, {4,15,46,1057}, {4,15,46,160}, {4,15,46,161}, {4,15,46,184}, {4,15,46,174}, {4,15,46,175}, {4,15,46,176}, {4,15,46,177}, {4,15,46,20}, {4,5,32,94}, {4,5,32,95}, } --add equipment from the list first for i, d in pairs(mywarehouselist) do wareadd:addItem(d,25) trigger.action.outText("Adding: " .. tostring(d) .. " to FARP!", 5, false) end for i, d in pairs(wareitems.weapon) do wareadd:addItem(i,50) table.insert(mywarehouselist,i) trigger.action.outText("Adding: " .. tostring(i) .. " to FARP and global munitions list!", 5, false) end trigger.action.outText("Total items added to list: " .. tostring(#mywarehouselist), 10, true) Note that the wsTypes are not current and were only changed for the M3P on the OH-58D; otherwise it's grabbed from a list I had previously made which seems to work for some equipment. wareaddstuff.miz 2
NeedzWD40 Posted November 22, 2024 Posted November 22, 2024 On 11/14/2024 at 5:59 AM, davidp57 said: To work around this network sync problem, I've scheduled the resupply code to run each time a human spawns in the mission (using the S_EVENT_BIRTH event). I was trying to come up with an interim fix for this issue myself and the way that seems to work for now is scheduling an addItem call every 5 minutes. In my case, I'm not trying to accurately track inventory, only replicate the previous infinite munition behavior, so I doubt this will work if one is trying to properly track inventory. It may be possible instead to getItemCount, then removeItem for every piece of equipment (as well as associated liquids), then schedule a function to add the items back seconds later so as to allow/encourage propagation of values. This could be run on an update cycle every so often to try and brute force the problem, but that's kind of intense to do depending on how many warehouses need updating. Whether or not it's worth pursuing an interim fix until the next patch is another matter.
davidp57 Posted November 25, 2024 Posted November 25, 2024 On 11/22/2024 at 11:48 PM, NeedzWD40 said: I was trying to come up with an interim fix for this issue myself and the way that seems to work for now is scheduling an addItem call every 5 minutes. I think the problem will be exactly the same; in fact that's what I did in the beginning - and it didn't work (as described in my original post) Zip - VEAF :pilotfly: If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !
krazyj Posted December 3, 2024 Posted December 3, 2024 On 11/14/2024 at 1:34 PM, BIGNEWY said: I've spoken to the team we should see improvement with the next patch. thank you would be great if there was an import/export stores to a csv so mission planners could easily load stores in to/from a CSV or Txt file as opposed to having to do various hoops. or even better a roll over function in campaigns 1
davidp57 Posted December 5, 2024 Posted December 5, 2024 From the latest DCS update changelog: Quote Warehouse updates. Send create and update messages one by one to overcome message size limits. Fix for warehouse updates desync. Let's hope that it solves our problems! Thank you @BIGNEWY Zip - VEAF :pilotfly: If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !
ED Team BIGNEWY Posted December 5, 2024 Author ED Team Posted December 5, 2024 25 minutes ago, davidp57 said: From the latest DCS update changelog: Let's hope that it solves our problems! Thank you @BIGNEWY let me know if it helps thank you Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, PIMAX Crystal
CallsignFrosty Posted January 25 Posted January 25 On 8/20/2023 at 9:56 AM, funkyfranky said: Is a warehouse always associated with an airbase, FARP or ship? Asking, because we also have static objects such as warehouse, ammunition depo, tank 1, tank 2, tank 3, which act as warehouses, which do not belong to an airbase. Obviously for these, the warehouse cannot be retrieved with the airbase:getWarehouse(). According to hoggit , there should be a Warehouse.getByName() function https://wiki.hoggitworld.com/view/DCS_func_getByName. But that does not appear to work (not even for airbase warehouses). I'm not sure if the answer has been posted somewhere but I have been playing around with trying these scripting functions on static object warehouses. They have all the functionality but as FunkyFranky says, they don't seem to count as an airbase... Does anyone know the process? Thanks
Recommended Posts