Jump to content

Zeathe

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Zeathe

  1. Necro Thread: Because I found this searching for answers to the new warehouse.... Thanks Google, Sorta.... I think updated code may help others... -- Get the Static Object -- WARNING: you can use Unit.getByName() and get the SO as a Unit and then warehouse functions and cargo functions fail local AmmoStack = StaticObject.getByName("Static Ammo-1") -- Get the Static Object instance description with :getDesc() trigger.action.outText("SO/Unit <Static Ammo-1>: ".. net.lua2json(AmmoStack:getDesc()), 30) -- Result: SO/Unit <Static Ammo-1>: {"life":0,"attributes":{"Cargos":true},"_origin":"","category":4,"displayName":"Ammo","typeName":"ammo_cargo","box":{"min":{"y":-0.0673937946558,"x":-0.65713477134705,"z":-0.58641439676285},"max":{"y":1.0960557460785,"x":0.65079057216644,"z":0.57894480228424}}} -- Get the Static Object instance cargo weight with :getCargoWeight() trigger.action.outText("CargoWeight <Static Ammo-1>: ".. net.lua2json(AmmoStack:getCargoWeight()), 30) -- Result: CargoWeight <Static Ammo-1>: 1500 -- Access the Warehouse of the Cargo Static Object local AmmoStackWH = Warehouse.getCargoAsWarehouse(AmmoStack) -- Get the Warehouse Inventory within the cargo object instance with :getInventory() trigger.action.outText("WH <Static Ammo-1>: ".. net.lua2json(AmmoStackWH:getInventory()), 30) -- Result: WH <Static Ammo-1>: {"liquids":[0,0,0],"weapon":{"weapons.bombs.British_MC_500LB_Bomb_Mk2":1,"weapons.missiles.AGM_65K":1,"weapons.bombs.Mk_82":1},"aircraft":{}} TBD -- I am not sure if the inventory properly impacts weight. I think it does based on the fact that the cargo itself is less than 1500 in ME
  2. See attached MIZ used for testing. NTTR-Warehouse-Test-008.miz
  3. Test Setup: New NTTR Nevada Map Set Nellis to BLUE Enable Warehouse on Nellis Unlimited Air Frames Unlimited Weapons Unlimited Liquids Set Creech to BLUE Enable Warehouse on Creech Zero Out (no available) Air Frames on all airframes Zero Out (none available) Weapons Zero Out (none available) Liquids Add BLUE A-10 II C "Start From Parking Hot" Client to Creech, marked as Dynamic Slot Template Add BLUE A-10A "Start from Parking Hot" Client (Legacy Slot), to Creech Add BLUE A-10 II C "Start From Parking Hot" Client to Nellis, marked as Dynamic Slot Template known Problem (previous forum post ) : Start From Ground Hot does not link to Airfield Warehouse Problem 1 - Dynamic Slots do not honor Airframe Warehouse Status Repro: Create Test Setup Map above From ME, Launch Multiplayer Server to Test Upon Entering Coalition Screen, see (1) A10A and (2) A10CII slots listed, select BLUE coalition Test Legacy Static Slots: From Static Slot Screen, see that A10A is listed, but filtering Available removes it attempt to slot in and see that you are put into spectator at Creech as the airframe is not available from the warehouse Test Dynamic Slots: From Dynamic Slot Screen Tab, Select Creech which spawns DS Refuel/Re-arm Pre-Slot screen Select A-10 II C, and notice that all pylon options are listed as "Unavailable" Slot In ... notice that you are in a magically available A-10 II C airframe at Creech Expected Behavior: Warehouse with zero air frames should block the DS Spawn of an A-10 II C at Creech Actual Behavior: Warehouse is not honored and an A-10 II C is spawned at Creech even though there are no available air frames Problem 2 - Dynamic Slots alter the behavior of static slots with regard to warehouse Repro: Create Test Setup Map above In ME, Change the Static Slot A-10A airframe to A-10 II C From ME, Launch Multiplayer Server to Test Upon Entering Coalition Screen, see (3) A10CII slots listed, select BLUE coalition Test Legacy Static Slots: From Static Slot Screen, see that A10 C II is listed, and filtering Available still shows the air frame even though the warehouse is empty attempt to slot in and see that you are successfully slotted into an A-10 C II ignoring the warehouse values Test Dynamic Slots: From Dynamic Slot Screen Tab, Select Creech which spawns DS Refuel/Re-arm Pre-Slot screen Select A-10 II C, and notice that all pylon options are listed as "Unavailable" Slot In ... notice that you are in a magically available A-10 II C airframe at Creech (Same behavior as Problem 1 for DS) Expected Behavior: Static Slots should honor Warehouse, Dynamic Slots should honor Warehouse, Dynamic Slot Templates should in no way impact Static Slot Client Units. Actual Behavior: Static Slot Airframes behave differently with regard to the warehouse when a Dynamic Slot template of the same air frame exists. Edit: Words are hard, updated item 5.1 to say "Dynamic Slot" instead of "Static Slot" on Problem 1 and same change to 6.1 of Problem 2 Edit 2: Eff Emoticons
×
×
  • Create New...