MarcosR Posted August 16, 2023 Share Posted August 16, 2023 Just here to say "Thank you".. I had a very very long and buggy code working around this that now I can remove.. now persistence of airbases will work like a dream... 2 Link to comment Share on other sites More sharing options...
Dzsekeb Posted August 16, 2023 Share Posted August 16, 2023 34 minutes ago, Pikey said: the string is weapons.missiles.AIM_9 for the 9M. It's an anomaly for sure. Once you have a look at the print out from the warehouse it should be easy to use. hth. Yes, if you go through all 700+ entries in the table returned by the warehouse, and cross reference them to all potential loadouts for AI, you can figure out which names do not match the ones returned by getAmmo(). Also you ignore pods and fuel tanks and racks, because although they are warehouse items, getAmmo will never return them. If you do all this, you can then track spawns and despawns of AI aircraft, to compensate for any weapons they remove or add, checking if weapon names are part of a list of names that should be corrected. Or, ED could add a checkbox to groups, call it 'ignore warehouses', and make them behave exactly like when they start from air, or from ground, outside the range of a warehouse. Link to comment Share on other sites More sharing options...
Pikey Posted August 16, 2023 Share Posted August 16, 2023 (edited) Very aware of the limitations of getAmmo(), thanks. It was reported on these forums several years ago, I don't have any info I can give you about that - its been discussed in Moose discord and these forums many times over the years. I'd suggest creating your own thread for your idea on the checkbox so that it doesn't get lost in this warehouse thread, thanks! 15 minutes ago, Dzsekeb said: Yes, if you go through all 700+ entries in the table returned by the warehouse, and cross reference them to all potential loadouts for AI, you can figure out which names do not match the ones returned by getAmmo(). Also you ignore pods and fuel tanks and racks, because although they are warehouse items, getAmmo will never return them. If you do all this, you can then track spawns and despawns of AI aircraft, to compensate for any weapons they remove or add, checking if weapon names are part of a list of names that should be corrected. Or, ED could add a checkbox to groups, call it 'ignore warehouses', and make them behave exactly like when they start from air, or from ground, outside the range of a warehouse. et Edited August 16, 2023 by Pikey ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * Link to comment Share on other sites More sharing options...
chromium Posted August 16, 2023 Share Posted August 16, 2023 Thanks a lot! DSMC will be ready tomorrow to update it's warehouse tracking up to the new features , finally getting rid of the getAmmo() limitations about pods, fuel tanks and RMS real time resupplies 2 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...
IndyNavy Posted August 17, 2023 Share Posted August 17, 2023 All hail lord grimes! 1 Link to comment Share on other sites More sharing options...
rurounijones Posted August 17, 2023 Share Posted August 17, 2023 (edited) Excellent update. Thanks to all involved, hopefully this will add some more gameplay loops for the transport degenerates. Edited August 17, 2023 by rurounijones 3 Link to comment Share on other sites More sharing options...
Saruman Posted August 17, 2023 Share Posted August 17, 2023 (edited) Does it work for carriers' warehouses, too? Edited August 17, 2023 by Saruman 1 Link to comment Share on other sites More sharing options...
antiload Posted August 17, 2023 Share Posted August 17, 2023 (edited) Can some kind soul do a little tutorial video on how this works for the lay person. The concept seems very interesting Edited August 17, 2023 by antiload 4 Link to comment Share on other sites More sharing options...
Mistermann Posted August 17, 2023 Share Posted August 17, 2023 1 hour ago, antiload said: Can some kind soul do a little tutorial video on how this works for the lay person. The concept seems very interesting I was thinking the exact same thing as I read through the thread. I think this would be fantastic and show the value to a broader audience. I big thanks in advance to whomever posts the showcase video. 2 System Specs: Spoiler Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, Thrustmaster TWCS (modified), Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Thrustmaster TWCS Mod Link to comment Share on other sites More sharing options...
MAXsenna Posted August 17, 2023 Share Posted August 17, 2023 43 minutes ago, Mistermann said: I was thinking the exact same thing as I read through the thread. I think this would be fantastic and show the value to a broader audience. I big thanks in advance to whomever posts the showcase video. Not a video, but have you guys seen this? 1 Link to comment Share on other sites More sharing options...
ElementLT Posted August 17, 2023 Share Posted August 17, 2023 Yes! so going to love this for some logistics missions!!! Thank you so much for this! 1 Coming Soon... The Fraternity Returns : https://thefraternitysim.com/ Link to comment Share on other sites More sharing options...
DD_Friar Posted August 17, 2023 Share Posted August 17, 2023 rEF THE VIDEO, gRIMREAPERS DID ONE ON THE wAREHOUSE CONCPET QUITE A WHILE BACK Visit the Dangerdogz at www.dangerdogz.com. We are a group based on having fun (no command structure, no expectations of attendance, no formal skills required, that is not to say we can not get serious for special events, of which we have many). We play DCS and IL2 GBS. We have two groups one based in North America / Canada and one UK / Europe. Come check us out. Link to comment Share on other sites More sharing options...
edineygomes Posted August 17, 2023 Share Posted August 17, 2023 For example, a truck arrives at a certain base and delivers 10 aim-9m and 12 more mk-82. Where I see the correct name of weapons, planes etc... Could someone create a mission for demonstration? I'm not a programming expert. Link to comment Share on other sites More sharing options...
phrogZ Posted August 17, 2023 Share Posted August 17, 2023 Thx ED !!! hope to see more API improvement like that in the future 1 Link to comment Share on other sites More sharing options...
eaglefirefly Posted August 18, 2023 Share Posted August 18, 2023 (edited) On 8/17/2023 at 11:26 AM, Saruman said: Does it work for carriers' warehouses, too? I believe so! I am testing it today for the Tarawa you basically use the name of what you want to access the resources of. That I presume includes ships. But I will edit this comment with my findings later. EDIT - The answer is yes all you need to do is enter the unit name of the warehouse you want to access. I will add the relevant part of the cope snippet I used below BASE:E("Fuel check running.....") local _tarawaairbase = Airbase.getByName('BLUE TARAWA') local _tarawawarehouse = _tarawaairbase:getWarehouse() local _tarawainventory = _tarawawarehouse:getInventory() local function dump(o) if type(o) == 'table' then local s = '{\n' for k,v in pairs(o) do if type(k) ~= 'number' then k = '"'..k..'"' end s = s .. '['..k..'] = ' .. dump(v) .. ',\n' end return s .. '}\n' else return tostring(o) end end if first_load == true then _deltawarehouse:setLiquidAmount(0,FuelArray[0]) local _romediesel = dump(_romeinventory['liquids'][3]) local _tarawajet = dump(_tarawainventory['liquids'][0]) BASE:E(_tarawajet) Result = BASE00000.function(100000) Edited August 18, 2023 by eaglefirefly adding result and code 2 Link to comment Share on other sites More sharing options...
eaglefirefly Posted August 18, 2023 Share Posted August 18, 2023 (edited) 18 hours ago, edineygomes said: For example, a truck arrives at a certain base and delivers 10 aim-9m and 12 more mk-82. Where I see the correct name of weapons, planes etc... Could someone create a mission for demonstration? I'm not a programming expert. Something like this would work, maybe have a look at MOOSE they have added the api to their codebase yesterday as a helper if truckenterzone == true then do the add fuel thing end Edited August 18, 2023 by eaglefirefly Link to comment Share on other sites More sharing options...
shagrat Posted August 18, 2023 Share Posted August 18, 2023 Setting inventory - actually being able to fill storages and fuel tanks by script commands - is a huuuuge step! Finally we can create real "convoys" that directly impact available ressources. Thank you sooo much, for finally adding this feature. Total game changer! 1 Shagrat - Flying Sims since 1984 - Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore) Link to comment Share on other sites More sharing options...
Stonehouse Posted August 19, 2023 Share Posted August 19, 2023 (edited) That's probably the most exciting thing I've seen for DCS for a long time. Presumably first bit of the ongoing dynamic campaign work by ED to the users' hands. Getting logistics going is a big part of the skeleton of a dynamic campaign. Plus it finally makes physical units possible rather than relying on the virtual supply system. Edited August 19, 2023 by Stonehouse 1 Link to comment Share on other sites More sharing options...
Saruman Posted August 19, 2023 Share Posted August 19, 2023 What about ammos sharing same name? For example, looking at inventory, you have two distinct "Fuel Tank 300 gal": one is for F-16, the other one is certainly for F-14. How can you refer to one or the other, considering that the F-16's droptank seems not to have an unique typename (the F-14's one is weapons.droptanks.HB_F14_EXT_DROPTANK)? Link to comment Share on other sites More sharing options...
funkyfranky Posted August 20, 2023 Share Posted August 20, 2023 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). 1 A warrior's mission is to foster the success of others. i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss Link to comment Share on other sites More sharing options...
RogueRunner Posted August 22, 2023 Share Posted August 22, 2023 (edited) airbase:getWarehouse() local storage = airbase:getWarehouse("Goulet") --storage=STORAGE:FindByName("Goulet") storage:AddLiquid(STORAGE.Liquid.JETFUEL, 10000) Why does this give me a attempt to index global 'airbase' (a nil value) stack traceback: error? EDIT: was using the wromg version of moose. Edited August 22, 2023 by RogueRunner With the price of ammunition these days do not expect a warning shot. Link to comment Share on other sites More sharing options...
Grimes Posted August 22, 2023 Share Posted August 22, 2023 1 hour ago, RogueRunner said: airbase:getWarehouse() local storage = airbase:getWarehouse("Goulet") --storage=STORAGE:FindByName("Goulet") storage:AddLiquid(STORAGE.Liquid.JETFUEL, 10000) Why does this give me a attempt to index global 'airbase' (a nil value) stack traceback: error? Ask a moose. Seem to be using their classes. 1 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...
HC_Official Posted August 22, 2023 Share Posted August 22, 2023 @Grimes Just wanted to say thanks for all the hard work you put into documenting so much of this stuff , many thanks man 1 No more pre-orders Click here for tutorials for using Virpil Hardware and Software Click here for Virpil Flight equipment dimensions and pictures. . Link to comment Share on other sites More sharing options...
Shrike88 Posted August 23, 2023 Share Posted August 23, 2023 Thank you @Grimes for all your work with this also. Also @Pikey for jumping onto some scripting. Would love to see this somewhat incorporated into Mist / Moose soon and make things a little easier to process for those of us like myself that is severely lacking in the coding / scripting department. 1 1 Link to comment Share on other sites More sharing options...
Pikey Posted August 23, 2023 Share Posted August 23, 2023 1 hour ago, Shrike88 said: Thank you @Grimes for all your work with this also. Also @Pikey for jumping onto some scripting. Would love to see this somewhat incorporated into Mist / Moose soon and make things a little easier to process for those of us like myself that is severely lacking in the coding / scripting department. So there is the STORAGE class in MOOSE that @funkyfranky wrote for Day 1 https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Storage.html but this is the start of what MOOSE might do with it to join things up. I did a warehouse persistance script, just saves your warehouse to file and reloads it: https://forum.dcs.world/topic/332310-script-release-simple-warehouse-saving-sws/ @chromium is writing things now for DSMC https://dsmcfordcs.wordpress.com/ I Chromui He's pinging right now for feedback as he rewrites parts. I presume for all these people there are others doing the same. It's going to take some time to make use of these because everyone is already established in workarounds and years of doing things a certain way. But in terms of using it, its some of the easiest things to use, you can make factories and supply chains that have physical presence. 3 ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now