Jump to content

theace0296

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Everything posted by theace0296

  1. theace0296

    Dynamic Combat Generator

    class dcg_settings { class dcg_main_blacklistLocations { typeName = "ARRAY"; value[] = { }; }; Just wondering what would be placed in the array here, marker names or coordinates? Thanks!
  2. What part isn't working? Are you using any mods? Does your server/client display any errors? If so, post them. Apologies for not responding sooner, been busy in real life. There have not been any updates to the mod since my post, so I don't see what could have changed.
  3. If you want to add any type of object into the Vehicle Shop script, here is what you would do (including being able to store it in your garage): It looks like a lot, but once you do it once or twice, it gets pretty simple. Go to YOUR MISSION NAME\HG\Functions\Server\ Find the file fn_getType.sqf Line 13 has the information about what types of "vehicles" are allowed Add whichever type of vehicle type you want (this can be found by right clicking the object and going to "Find in Config Viewer") Place it at the end of the list in "" --- don't forget to separate the quoted names with commas EXAMPLE: /* Author - HoverGuy © All Fucks Reserved Website - http://www.sunrise-production.com */ params["_class",["_type","",[""]]]; { if(_class isKindOf _x) then { _type = _x; } else {}; } forEach ["Car","Truck","Tank","Air","Ship","Submarine","StaticWeapon","UAV","Thing"]; _type; NEXT Go to YOUR MISSION NAME\HG\Config\ Open the file: HG_GaragesCfg.h Line 24 has a similar string to the one above, just make sure you have the same types in both. EXAMPLE: /* Author - HoverGuy © All Fucks Reserved Website - http://www.sunrise-production.com Defines available garages class YourShopClass - Used as a param for the call, basically the shop you want to display { whitelistRanks - ARRAY OF STRINGS - Can be PRIVATE/CORPORAL/SERGEANT/LIEUTENANT/CAPTAIN/MAJOR/COLONEL or mixed class YourShopCategory - Shop category, can be whatever you want { allowedTypes - ARRAY OF STRINGS - Allowed vehicle types to be retrieved from the garage, can be Car/Truck/Tank/Air/Ship/Submarine or mixed spawnPoints - ARRAY OF MIXED - Spawn positions (markers/positions) |- 0 - STRINGS/ARRAYS - Markers/positions storePoint - STRING - Point (marker) where the vehicle should be placed to be able to store it, if left empty it will detect the nearest owned vehicle inside a 8m radius around the player }; }; */ class HG_DefaultGarage // HG_DefaultGarage is just a placeholder for testing purposes, you can delete it completely and make your own { allowedTypes[] = {"Car","Truck","Tank","Air","Ship","Submarine","StaticWeapon","UAV","Thing"}; spawnPoints[] = { "garage_spawn_1", "garage_spawn_boats" }; storePoint = ["garage_store","garage_store_boats"]; }; For most things, this is the last step (AMMOBOXES AND UAVS REQUIRE ONE MORE STEP) In the same directory as the file above, I.E. YOUR MISSION NAME\HG\Config\ Open HG_VehiclesShopCfg.h This is where you will add whatever vehicles to the list that can be bought, just follow the commented out steps in the file at the top and you'll be fine. In the example I have "Military" vehicles as a shop, including some basic cars, armored vehicles, a UAV, and an AMMOBOX. You can get the class names of your objects by right clicking them and selecting in the "LOG" tab, "Log Classes to Clipboard" EXAMPLE: /* Author - HoverGuy © All Fucks Reserved Website - http://www.sunrise-production.com Defines available vehicle shops class YourShopClass - Used as a param for the call, basically the shop you want to display { whitelistRanks - ARRAY OF STRINGS - Can be PRIVATE/CORPORAL/SERGEANT/LIEUTENANT/CAPTAIN/MAJOR/COLONEL or mixed class YourShopCategory - Shop category, can be whatever you want { displayName - STRING - Category display name vehicles - ARRAY OF ARRAYS - Shop content |- 0 - STRING - Classname |- 1 - INTEGER - Price spawnPoints - ARRAY OF ARRAYS - Spawn pos (markers/positions) |- 0 - STRING - Display name in the dialog |- 1 - ARRAY OF MIXED - Markers/positions }; }; */ class HG_DefaultShop // HG_DefaultShop is just a placeholder for testing purposes, you can delete it completely and make your own { whitelistRanks[] = {}; class Military { displayName = "$STR_HG_SHOP_MILITARY"; vehicles[] = { {"B_CTRG_LSV_01_light_F",45000}, {"B_G_Offroad_01_armed_F",70000}, {"B_LSV_01_armed_black_F",80000}, {"B_MRAP_01_hmg_F",100000}, {"B_UAV_05_F",200000}, {"B_supplyCrate_F",1000} }; spawnPoints[] = { {"$STR_HG_MARKER_2"} }; }; }; THIS IS AN OPTIONAL STEP FOR AMMOBOXES AND UAVS! But if you want Ammoboxes to spawn with ammo or UAVs to be controllable when they spawn, you need to do this. Go to YOUR MISSION NAME\HG\Functions\Server\ Open the file: fn_spawnVehicle.sqf AT THE END of the file you will need to add some code to detect if the vehicle is a UAV or Ammobox, and to do different things accordingly. PUT YOUR CODE AFTER THE IF STATEMENT AT LINE 73 BUT BEFORE THE CLOSING "true;" FOR UAVs add this code: if(_vehicle isKindOf "UAV") then { createVehicleCrew _vehicle; }; FOR AMMOBOXES add this code: if((typeOf (_vehicle)) == ("CLASS NAME OF YOUR AMMOBOX")) then { _vehicle addMagazineCargoGlobal ["CLASS NAME OF MAGAZINE",AMOUNT]; }; "CLASS NAME OF YOUR AMMOBOX" should be replaced with the class name you used in HG_VehiclesShopCfg.h "CLASS NAME OF MAGAZINE" should be replaced using the class names from this list: https://community.bistudio.com/wiki/Arma_3_CfgMagazines IF you want to add more than one type of ammo (which I assume you would), copy: _vehicle addMagazineCargoGlobal ["CLASS NAME OF MAGAZINE",AMOUNT]; And paste it underneath the previous one like this: if((typeOf (_vehicle)) == ("B_supplyCrate_F")) then { _vehicle addMagazineCargoGlobal ["CLASS NAME OF MAGAZINE 1",AMOUNT 1]; _vehicle addMagazineCargoGlobal ["CLASS NAME OF MAGAZINE 2",AMOUNT 2]; }; You can add magazines like that until you're happy with what'll be inside it Unfortunately this is a blunt way of doing this, so you have to do this step for EVERY ammobox type you want (I.E. NATO, CSAT, AAF, ETC.) But I have tested it, and it does work. It should be noted, however, that EVERY time you take the ammobox out, it will spawn with the ammo regardless of whether or not you took the ammo out. So that could be a way to "duplicate" ammo. This could be avoided by skipping the step where you put the "Thing" type in HG_GaragesCfg.h but this would mean that you couldn't buy it to your garage and take it out then. You could also solve this by adding some sort of IF statement to YOUR MISSION NAME\HG\Functions\Client\Garage\fn_storeVehicleC.sqf You would change line 14 from: _allowedTypes = getArray(missionConfigFile >> "CfgClient" >> "HG_GaragesCfg" >> _garage >> "allowedTypes"); To: _allowedTypes = ["Car","Truck","Tank","Air","Ship","Submarine","StaticWeapon","UAV"]; I haven't tested this, but it should make it so that you CAN'T store an ammobox to your garage, but you would still be able to buy them to your garage and spawn them. You just wouldn't be able to put them back in, thus avoiding the "duplication" of ammo. If you have any questions or need help, just reply to this post or DM me. -TheAce0296
×