Jump to content

mzgr

Member
  • Content Count

    41
  • Joined

  • Last visited

  • Medals

Everything posted by mzgr

  1. Hello, I am trying to create a crate with specific items inside. It was suggested to me to: - create an entry to CfgVehicles - inherit from the desired crate - add and edit content So, I've read about how to do that and this is the result of my first attempt to write any code: class CfgVehicles { class Box_Syndicate_Ammo_F; class WoB_B_AmmoCrate: Box_Syndicate_Ammo_F { author = "mzgr"; class TransportItems { class _xx_V_TacChestrig_cbr_F { count = 3; name = "V_TacChestrig_cbr_F"; }; }; }; }; My problem is: A) I am getting an error missing ; while local executing in the debug console and B) Even if the code was correct, I don't know hwo to apply it /where to put it. Any help would be much appreciated
  2. Previous post puts the right thing in the wrong place. After reading all the comments, manuals, instructions and notes from R3F Logistics, Advanced R3F logistics and R3F Enchanced logistics, I extracted the PBO and edited a few files, everything is working just fine. I am only unable to implement ''B. Creation credits management'' (from R3F documentation) which states: private ["_credits"]; // Get the current credits of my_factory _credits = my_factory getVariable "R3F_LOG_CF_credits"; // Add 15 000 to the value _credits = _credits + 15000; // Set the new credits my_factory setVariable ["R3F_LOG_CF_credits", _credits, true]; I don't want 15000 credits to be added, I want _credits that are associated to my_factory to be set at 1000 every time my_factory enters the trigger area. My_factory is a HEMMT truck. I've created a credit_refill_1000.sqf and adjusted it to: private ["_credits"]; // Define credits _credits = 1000 // Set the new credits my_factory setVariable ["R3F_LOG_CF_credits", _credits, true]; I've placed a trigger: Type: None Activation: Any Player Activation Type: Present Repeatable: Yes Server Only: Yes Condition: this && credits < 1000 On Activation: _thisList execVM "credits_refill.sqf"; And it was suggested to me to adjust the credit_refill_1000.sqf to: params ["_vehicles"]; if (my_factory in _vehicles) then { _credits = 1000; my_factory setVariable ["R3F_LOG_CF_credits", _credits, true]; }; Couldn't get it to work...If anyone is familiar with R3F Logistics, I could use some insight...
  3. 2022. stil roaming the internet for documentation...
  4. Crates are no longer cunts. A bunch of people helped...thank you all. If anyone ever needs a crate, I can be your crate guy
  5. A long shot to ask this here, but: Mod is working with the default settings. I want to customize it so I edited mission init.sqf execVM "R3F_LOG\init.sqf"; R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow + [ "B_WoH_HEMMT_Cargo_1000", "B_WoH_HEMMT_Cargo_400", "O_WoH_Typhoon_Cargo_1000", "O_WoH_Otokar_Cargo_400", "B_WoH_MATV_01", "O_WoH_Karatel_01", "B_WoH_HEMMT_Ammo_01", "B_WoH_HEMMT_Repair_01", "B_WoH_HEMMT_Fuel_01", "O_WoH_Typhoon_Ammo_01", "O_WoH_Typhoon_Repair_01", "O_WoH_Typhoon_Fuel_01", "B_WoH_HEMMT_Transport_700", "O_WoH_Typhoon_Transport_700" ]; R3F_LOG_CFG_cannot_etow = R3F_LOG_CFG_cannot_etow + [ // e.g. : "MyTowableObjectClassName1", "MyTowableObjectClassName2" ]; R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed + [ "B_WoH_RHIB_01", "B_WoH_Assault_Boat_01", "B_WoH_Speedboat_Minigun_01", "O_WoH_RHIB_01", "O_WoH_Speedboat_Minigun_01", "O_WoH_Assault_Boat_01" ]; R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo + [ ["B_WoH_HEMMT_Cargo_1000", 1000], ["B_WoH_HEMMT_Transport_700", 700], ["B_WoH_HEMMT_Cargo_400", 400], ["O_WoH_Typhoon_Cargo_1000", 1000], ["O_WoH_Typhoon_Transport_700", 700], ["O_WoH_Otokar_Cargo_400", 400], ["B_WoH_MATV_01", 50], ["O_WoH_Karatel_01", 50], ["B_WoH_CH_47I_Chinook_01", 200], ["O_WoH_Mi_290_Taru_Transport_01", 200], ["B_WoH_UH_80_Ghost_Hawk_01", 100], ["O_WoH_Ka_60_Kasatka_01", 100] ]; R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo + [ ["Land_HBarrierTower_F", 5], ["Land_HBarrierWall4_F", 5], ["Land_HBarrierWall_corner_F", 5], ["Land_HBarrier_5_F", 5], ["Land_HBarrier_3_F", 5], ["Land_BagBunker_Small_F", 5], ["Land_Shed_13_F", 5], ["Land_Shed_10_F", 5], ["Land_Shed_02_F", 5], ["Land_Shed_03_F", 5], ["Land_BagFence_Corner_F", 5], ["Land_BagFence_Short_F", 5], ["Land_BagFence_Round_F", 5], ["Land_BagFence_Long_F", 5], ["Land_SandbagBarricade_01_hole_F", 5], ["Land_SandbagBarricade_01_F", 5], ["Land_SandbagBarricade_01_half_F", 5], ["Land_CncBarrierMedium_F", 5], ["Land_CncShelter_F", 5], ["Land_CzechHedgehog_01_new_F", 5], ["Land_Mound01_8m_F", 5], ["Land_Razorwire_F¸", 5], ["Land_TimberPile_05_F", 5], ["Land_Shoot_House_Wall_Stand_F", 5], ["Land_Shoot_House_Wall_Long_Stand_F", 5], ["Land_Shoot_House_Wall_Crouch_F", 5], ["Land_Shoot_House_Wall_Long_Crouch_F", 5], ["Land_TinWall_01_m_4m_v2_F", 5], ["Land_TinWall_01_m_gate_v1_F", 5], ["Land_SlumWall_01_s_2m_F", 5], ["Land_Plank_01_4m_F", 5], ["Land_PaperBox_closed_F", 5], ["Land_Pallets_stack_F", 5], ["Land_Pallets_F", 5], ["Land_GarbageBarrel_02_F", 5], ["Land_Grave_11_F", 5], ["Land_ShellCrater_02_small_F", 5], ["Land_ClutterCutter_medium_F", 5], ["Land_SignM_WarningMilitaryArea_english_F", 5], ["Land_Sign_Mines_F", 5], ["Land_Cross_01_small_F", 5], ["CamoNet_BLUFOR_big_F", 5], ["WoH_B_BasicWeaponsCrate", 5], ["WoH_O_BasicWeaponsCrate", 5], ["WoH_B_AdvancedWeaponsCrate", 5], ["WoH_O_AdvancedWeaponsCrate", 5], ["WoH_B_SpecialistWeaponsCrate", 5], ["WoH_O_SpecialistWeaponsCrate", 5], ["WoH_B_LauncherCrate", 5], ["WoH_O_LauncherCrate", 5], ["WoH_B_ExplosivesCrate", 5], ["WoH_O_ExplosivesCrate", 5], ["WoH_B_UAVCrate", 5], ["WoH_O_UAVCrate", 5], ["WoH_B_MortarCrate", 5], ["WoH_O_MortarCrate", 5], ["WoH_MedicalCrate", 5] ]; R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player + [ "Land_HBarrierTower_F", "Land_HBarrierWall4_F", "Land_HBarrierWall_corner_F", "Land_HBarrier_5_F", "Land_HBarrier_3_F", "Land_BagBunker_Small_F", "Land_Shed_13_F", "Land_Shed_10_F", "Land_Shed_02_F", "Land_Shed_03_F", "Land_BagFence_Corner_F", "Land_BagFence_Short_F", "Land_BagFence_Round_F", "Land_BagFence_Long_F", "Land_SandbagBarricade_01_hole_F", "Land_SandbagBarricade_01_F", "Land_SandbagBarricade_01_half_F", "Land_CncBarrierMedium_F", "Land_CncShelter_F", "Land_CzechHedgehog_01_new_F", "Land_Mound01_8m_F", "Land_Razorwire_F", "Land_TimberPile_05_F", "Land_Shoot_House_Wall_Stand_F", "Land_Shoot_House_Wall_Long_Stand_F", "Land_Shoot_House_Wall_Crouch_F", "Land_Shoot_House_Wall_Long_Crouch_F", "Land_TinWall_01_m_4m_v2_F", "Land_TinWall_01_m_gate_v1_F", "Land_SlumWall_01_s_2m_F", "Land_Plank_01_4m_F", "Land_PaperBox_closed_F", "Land_Pallets_stack_F", "Land_Pallets_F", "Land_GarbageBarrel_02_F", "Land_Grave_11_F", "Land_ShellCrater_02_small_F", "Land_ClutterCutter_medium_F", "Land_SignM_WarningMilitaryArea_english_F", "Land_Sign_Mines_F", "Land_Cross_01_small_F", "CamoNet_BLUFOR_big_F", "WoH_B_BasicWeaponsCrate", "WoH_O_BasicWeaponsCrate", "WoH_B_AdvancedWeaponsCrate", "WoH_O_AdvancedWeaponsCrate", "WoH_B_SpecialistWeaponsCrate", "WoH_O_SpecialistWeaponsCrate", "WoH_B_LauncherCrate", "WoH_O_LauncherCrate", "WoH_B_ExplosivesCrate", "WoH_O_ExplosivesCrate", "WoH_B_UAVCrate", "WoH_O_UAVCrate", "WoH_B_MortarCrate", "WoH_O_MortarCrate", "WoH_MedicalCrate" ]; R3F_LOG_CFG_build_costs = R3F_LOG_CFG_build_costs + [ ["Land_HBarrierTower_F", 5], ["Land_HBarrierWall4_F", 5], ["Land_HBarrierWall_corner_F", 5], ["Land_HBarrier_5_F", 5], ["Land_HBarrier_3_F", 5], ["Land_BagBunker_Small_F", 5], ["Land_Shed_13_F", 5], ["Land_Shed_10_F", 5], ["Land_Shed_02_F", 5], ["Land_Shed_03_F", 5], ["Land_BagFence_Corner_F", 5], ["Land_BagFence_Short_F", 5], ["Land_BagFence_Round_F", 5], ["Land_BagFence_Long_F", 5], ["Land_SandbagBarricade_01_hole_F", 5], ["Land_SandbagBarricade_01_F", 5], ["Land_SandbagBarricade_01_half_F", 5], ["Land_CncBarrierMedium_F", 5], ["Land_CncShelter_F", 5], ["Land_CzechHedgehog_01_new_F", 5], ["Land_Mound01_8m_F", 5], ["Land_Razorwire_F¸", 5], ["Land_TimberPile_05_F", 5], ["Land_Shoot_House_Wall_Stand_F", 5], ["Land_Shoot_House_Wall_Long_Stand_F", 5], ["Land_Shoot_House_Wall_Crouch_F", 5], ["Land_Shoot_House_Wall_Long_Crouch_F", 5], ["Land_TinWall_01_m_4m_v2_F", 5], ["Land_TinWall_01_m_gate_v1_F", 5], ["Land_SlumWall_01_s_2m_F", 5], ["Land_Plank_01_4m_F", 5], ["Land_PaperBox_closed_F", 5], ["Land_Pallets_stack_F", 5], ["Land_Pallets_F", 5], ["Land_GarbageBarrel_02_F", 5], ["Land_Grave_11_F", 5], ["Land_ShellCrater_02_small_F", 5], ["Land_ClutterCutter_medium_F", 5], ["Land_SignM_WarningMilitaryArea_english_F", 5], ["Land_Sign_Mines_F", 5], ["Land_Cross_01_small_F", 5], ["CamoNet_BLUFOR_big_F", 5], ["WoH_B_BasicWeaponsCrate", 5], ["WoH_O_BasicWeaponsCrate", 5], ["WoH_B_AdvancedWeaponsCrate", 5], ["WoH_O_AdvancedWeaponsCrate", 5], ["WoH_B_SpecialistWeaponsCrate", 5], ["WoH_O_SpecialistWeaponsCrate", 5], ["WoH_B_LauncherCrate", 5], ["WoH_O_LauncherCrate", 5], ["WoH_B_ExplosivesCrate", 5], ["WoH_O_ExplosivesCrate", 5], ["WoH_B_UAVCrate", 5], ["WoH_O_UAVCrate", 5], ["WoH_B_MortarCrate", 5], ["WoH_O_MortarCrate", 5], ["WoH_MedicalCrate", 5] ]; No effect. Mod is still working with default settings, no error messages. I assume I'm doing a wrong thing in a wrong place...Can anyone take a look?
  6. I want a object (NPCpilot1) to hide when a vehicle (heliB) is destroyed (or damaged) and the same object (NPCpilot1) to show again when the vehicle (heliB) respawns (or gets repaired). Tried with triggers and condition of presence (alive heliB) but couldn't get it to work. I am in a need of a method that would work best on a multiplayer server. heliB is a locked Huron that just sits on a pad. heliB respawn module has this in init to keep variable name after respawn: `if ( isServer ) then { params[ "_newVeh", "_oldVeh" ]; _name = vehicleVarName _oldVeh; _newVeh setVehicleVarName _name; missionNamespace setVariable [ _name, _newVeh, true ]; };`
  7. Hello, I am trying to write a custom crate. I've done it multiple times before, but I am having difficulties with this one. I belive the explosives and mines class names are wrong. If that is the case, where can I find class names for them? I've tried copying from config viewer, asset browser, ace arsenal...something is always wrong. The crate is visible in the editor, all content is there except DemoCharge and ATMIne. class CfgPatches { class WoH_O_ExplosivesCrate { requiredAddons[]= { "A3_Supplies_F_Exp" }; requiredVersion=0.1; units[]= { "WoH_O_ExplosivesCrate" }; weapons[]={}; }; }; class CfgvehicleClasses { class WoH_O_ExplosivesCrate { displayName="WoH_O Explosives Crate"; }; }; class CfgVehicles { class Box_East_AmmoOrd_F; class WoH_O_ExplosivesCrate: Box_East_AmmoOrd_F { author="mzgr"; mapSize=1.25; class SimpleObject { eden=1; animate[]={}; hide[]={}; verticalOffset=0.382; verticalOffsetWorld=0; init="''"; }; scope=2; vehicleclass="WoH_O_ExplosivesCrate"; displayName="WoH_O Explosives Crate"; model="\A3\Supplies_F_Heli\CargoNets\CargoNet_01_box_F.p3d"; icon="iconObject_1x1"; DLC="Heli"; editorCategory="EdCat_Supplies"; maximumLoad=10000; destrType="DestructNo"; armor=200; hiddenSelections[] = {}; hiddenSelectionsTextures[] = {}; class TransportBackpacks { class B_FieldPack_green_F { backpack="B_FieldPack_green_F"; count=4; }; }; class TransportItems { class HandGrenade { name="HandGrenade"; count=40; }; class SmokeShell { name="SmokeShell"; count=10; }; class SmokeShellRed { name="SmokeShellRed"; count=10; }; class SmokeShellGreen { name="SmokeShellGreen"; count=10; }; class DemoCharge_Remote_Mag { weapon="DemoCharge_Remote_Mag"; count=8; }; class ATMine_Range_Mag { weapon="ATMine_Range_Mag"; count=8; }; }; class TransportMagazines {}; class TransportWeapons {}; }; };
  8. I am trying restrict a few items to engineer only. These items are: ACE_DefusalKit, ACE_Fortify and ACE_M26_Clacker In InitPlayerLocel.sqf I named all the classes that can't use these items. But they still can. I created an itemRestriction.sqf in my mission folder. Also i created an InitPlayerLocal.sqf in which i specify which classes can't hold certain items. Long time ago I made it work. But now I messed something up...Can anyone take a look? this is my InitPlayerLocal.sqf: UPDATE: Fixed
  9. They are being massive cunts...I've only copy-pasted a part of the config file, without CfgvehicleClasses and CfgPatches. But here is everything for a single crate. model = "\A3\weapons_F\AmmoBoxes\WpnsBox_F"; is copy-pasted from config viewer in the editor.
  10. I went on to write 16 more crates for the second mission, and suddenly...problems. The crates show up in game, no error messages, with the desired content inside. But the crates are invisible. You can only see their shadow? I ran out of ideas on how to fix this. model=? example of a single crate:
  11. I went on to write all 5 crates without any problems.
  12. Yep, also in class transportMagazines I've replaced name with magazine and now it all works. Thank you very much for you time and patience. And others
  13. Oh I'll rather use your mathod 😄 becouse it works. Last problem with this is that class TransportMagazines and class TransportWeapons don't show in crate. Items from class TransportBackpacks and class TransportItems are inside. When selecting the crate in editor a message pops up: No entry 'bin/config.bin/CfgVehicles/WoB_BasicAmmoCrate/TransportWeapons/_xx_arifle_MX_F.weapon'.
  14. I made a mod that only contains config.cpp with this inside: The crate shows up in editor but the content of WoB BasicAmmoCrate is still the same as Box_Syndicate_Ammo_F.
  15. Understood. Do you have any idea why in-game, the content of the new crate is the same as the original? My changes to the inventory are not applied
  16. The mission uses ACE, RHSUSAF, RHSAFRF, RHSGREF, RHSSAF,TFR and some other mods...to be honest, I am not sure which addons I can remove... And keep in mind the content of the crate is not final. This is just for learning purposes.
  17. So, to get six crates I jus copy-paste this in the same config five more times and modify the details? It is showing up in-game. However the content of the crate has not been changed, compared to the original. I've added the display name as you suggested. Below is the latest version of config.cpp
  18. Hello again, I went through EOs template and did my best. This is the result: class CfgPatches { class WoB_B_AmmoCrate { requiredAddons[]= { "A3_Characters_F_Enoch", "A3_Characters_F", "rhs_c_troops", "rhs_cti_insurgents", "rhsgref_c_troops", "rhssaf_c_troops", "A3_Sounds_F", "A3_Sounds_F_Exp", "ace_gforces", "ace_goggles", "ace_interaction", "ace_movement", "ace_medical_feedback", "A3_Data_F", "A3_Data_F_Curator", "A3_Air_F_Heli", "ace_thermals", "zen_attributes", "task_force_radio_items", "ace_refuel", "AlkFrameWork_Default_UI", "cba_xeh", "rhssaf_c_vehicles", "rhs_c_a2port_car", "rhs_c_vehiclesounds", "rhsgref_c_vehicles_ret", "ace_compat_rhs_afrf3", "A3_Soft_F_Offroad_01", "A3_Soft_F", "A3_Soft_F_Gamma_Hatchback_01", "A3_Soft_F_Exp_Offroad_02", "A3_Data_F_ParticleEffects", "ace_cargo", "A3_Armor_F_Beta", "A3_Soft_F_Beta_Truck_01", "A3_Soft_F_Beta_Truck_02", "A3_Soft_F_Gamma_Truck_01", "A3_Soft_F_Gamma_Van_01", "A3_Soft_F_EPC_Truck_03", "A3_Soft_F_Orange_Van_02", "rhs_c_zil131", "rhs_c_kamaz", "rhs_c_kraz255", "rhs_c_rva", "rhsusf_c_Caiman", "rhsusf_c_fmtv", "rhsusf_c_HEMTT_A4", "rhsusf_c_himars", "rhsusf_c_mtvr", "ace_repair" }; requiredVersion=0.1; units[]= { "WoB_B_AmmoCrate" }; weapons[]={}; }; } class CfgvehicleClasses { class WoB_B_AmmoCrate { displayName="CRO93_Basic Ammo"; }; }; class CfgVehicles { class Box_Syndicate_Ammo_F; class WoB_B_AmmoCrate: Box_Syndicate_Ammo_F { author = "mzgr"; class TransportItems { class _xx_V_TacChestrig_cbr_F { count = 3; name = "V_TacChestrig_cbr_F"; }; }; }; }; Am I going in the right direction? If I pack this up in a PBO, do I need the 3d model files inside...or anything else? Googling these problems did not help much... Also, I actually need 6 crates, but started just with one in order to simplify the learnig process...
  19. Thank you for your replys...I will get back to you with answers soon. I am ashamed to admit it, but I actually thought, to write that, was all I needed to do.
  20. Is there a way to expand this to other gear like backpacks, vests, helmets, optics?
  21. Hi, finnaly found the thing that was blocking the script, thank you very much for your help @Harzach
  22. I am making a PvP mission, bluefor vs. opfor. Each side has an APC which is used as teleport starting point. Players get teleported into an ATV with this kind of script: APC init: and the .sqf is: Problem is, both sides can use both teleporters, instead of each its own. So i am looking for a way to limit ''teleport into a vehicle'' for only one faction
  23. I dont think renaming is the problem. This script worked on ATV's, once I changed the ATV object type in attributes into UAZ, it stopped working. All variable names stayed the same
  24. ''Use that as your argument.'' I never wrote a script, so this is exactly what I need help on.
  25. Hello again, I need to change this last scipt to teleport into a car UAZ 3151 from RHS AFRF (rhs_uaz_vdv) instead of a quad. It was suggested to me to: However, this advice is not enough to help a person with my level of scripting knowledge. All my attempts so far have failed. So, RCA3 if you have the time to jump to the rescue once again that'd be awsome...
×