Jump to content

zyg0tic

Member
  • Content Count

    53
  • Joined

  • Last visited

  • Medals

Everything posted by zyg0tic

  1. Sorry the subject line is misleading. It should be non-random or random item adding to box script. This is a beginner's level script for adding items (randomly or non-randomly) to a container. It could be a supply box, ammo box, vehicle, whatever. The script is designed as a tutorial. So it doesn't choose the items for you, you have to do that yourself. It just has some example items (MX rifles and ammo). It does include a link to where you find all the item codes as a comment. I've added helpful comments to every line of the code in order for beginner's to learn exactly what the code is doing. I myself am a beginner and have been annoyed by how very rarely people add insightful comments to their scripts! Copy-paste the code into a Notepad++ file and save as cacheFiller.sqf. The code itself includes all the instructions. // Save this code as cacheFiller.sqf. I recommend Notepad++ for editing Arma3 scripts. // In the Arma 3 Editor you must add // init_Handle = this execVM "cacheFiller.sqf"; // to the Initialization field of the container. // cacheFiller is just the name I chose for the script. If you change the file-name of the script // you must also correct the file-name in the Initialization field also. _this allowDamage false; // Makes the container indestructible clearWeaponCargoGlobal _this; clearMagazineCargoGlobal _this; clearItemCargoGlobal _this; clearBackpackCargoGlobal _this; // Clears the entire contents of the container // 1. This section adds items non-randomly. _this addWeaponCargoGlobal ["arifle_MX_F", 2]; // Adds an item (in this case 2 MX assault rifles) non-randomly. _this addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag", 20]; // Adds 20 magazines for the MX assault rifle non-randomly. // The class (item ID/codes) were found at https://community.bistudio.com/wiki/Arma_3_Assets // 2. This section adds items randomly. _gun = ["arifle_MX_F", "arifle_MX_GL_Black_F"] call BIS_fnc_selectRandom; // _gun is a custom name we use, important for what comes after. You could call it _banana instead of you prefer. // In the array (items included between the square brackets) we have some guns. The standard MX assault rifle or the GL variant in black. // After the square bracket closes, we have the command to randomly select one of the guns. _this addWeaponCargoGlobal [_gun,5]; // Here you see _gun again followed by ,5. // If you preferred to call it _banana instead of _gun, you would need to change it to [_banana,5] // This means that after the gun is randomly chosen, it will place 5 of them in the container. // _this specifies you want the item placed into the container. // It is critical to limit the items to their own category (Weapon, Magazine, Item, Backpack). // For other categories you will need to add another section of code, as shown below. _ammo = ["30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag_Tracer"] call BIS_fnc_selectRandom; // _ammo is an appropriate name chosen for the magazines. // In the array (items included between the square brackets) we have standard round or tracer round magazines. _this addMagazineCargoGlobal [_ammo,20]; // Adds 20 of the randomly chosen magazine to the container. // What if you want only to spawn the ammo that suits the randomly chosen weapon? if ((_gun == "arifle_MX_F") OR (_gun == "arifle_MX_GL_Black_F")) then { _this addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag", 2 +random 9]; }; // If the guns that take the 6.5mm STANAG magazines spawn, this will add only that ammo. // the +random 9 means there is a chance of spawning 0-9 more magazines than just the 2. // You will need to specify which ammo for which guns. Just copy-paste the section and add/subtract as you please. Without comments: _this allowDamage false; clearWeaponCargoGlobal _this; clearMagazineCargoGlobal _this; clearItemCargoGlobal _this; clearBackpackCargoGlobal _this; _this addWeaponCargoGlobal ["arifle_MX_F", 2]; _this addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag", 20]; _gun = ["arifle_MX_F", "arifle_MX_GL_Black_F"] call BIS_fnc_selectRandom; _this addWeaponCargoGlobal [_gun,5]; _ammo = ["30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag_Tracer"] call BIS_fnc_selectRandom; _this addMagazineCargoGlobal [_ammo,20]; if ((_gun == "arifle_MX_F") OR (_gun == "arifle_MX_GL_Black_F")) then { _this addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag", 2 +random 9]; }; I dont know how to get it to work with MP or Dedicated as Im not that advanced in my scripting knowledge yet. Im just using it with Editor/SP so far.
  2. Okay, so I've put together a mission using ALiVE. It is inspired by Invade & Annex, Domination and Insurgency, taking them to another level and removing some of the "hand-holding" easy mode stuff. I run it nightly on a Sydney, Australia based dedicated server. Server name is Altis Total War Coop. Download links and more info are below. Mod requirements are CBA_A3, ALiVE and ASR_AI3. ASR_AI3 can be removed easily by deleting it from the folder and its init.sqf execVM if you prefer not to use it. Also includes script versions of BTC Quick Revive, TPWACS, TAW_VD, VCOM AI Driving, VAS. Basically I've made the entire island of Altis into a war zone. It is only a coop map though, currently 12 players (but you can increase or reduce that in the editor). OPFOR presense in a sector is marked, with deeper shades of red meaning higher concentration. There are 8 major regions. The first region, Molos, is a staging/practice region. All other regions has an armored platoon, and a random weighted company of 100 soldiers. These are easily configurable in the editor if you want to reduce or increase their numbers. The number of visible enemies is 150 which I think is a good level, and they spawn in at 1600. Heli spawn radius is 500, whereas planes dont spawn enemy at all - again configurable in the editor. I run this on a 4790K CPU with a headless client, so your own server performance results may vary. There is very little "hand-holding" and instead players are given the ability to set their own tasks using ALiVE's C2ISTAR features. This is accessible when you have a laser designator equipped. Ive set it so there is no grass and no fatigue and artillery computers are disabled - if youd like to change that but dont know how Im happy to help. Vehicles are pre-loaded with better inventory than vanilla, and bobcats have an assortment of explosives and mines included. Helis are empty except for first aid kits. VAS boxes are conveniently located around all base vehicles so you can load up a vehicle easily. The map is not easy mode! There are patrolling death squads. After or while you clear a town the enemy will send reinforcements. Learn to use everything you are provided by VAS, including mines, mortars and statics. Resupply your teammates if they are stretched and you will be their hero. I should also mention that the VAS is mostly restricted to NATO items. Edit as you please. ALiVE Database persistence is not enabled - you will need to add that if you want it. Note: Initial load time is long! It does work, it just takes ALiVE a while to do its thing. If running server, the first client to connect will trigger mission load, and subsequent clients will enjoy fast load. Putting -loadMissionToMemory in your server startup parameters may help too. ASR AI3 Settings: override settings for ASR AI3 are located in init.sqf. 1.01 Mission folder zipped http://www.mediafire.com/download/lcv3jk6k7uh7w7p/AltisTotalWar.Altis.zip 1.01 Mission pbo http://www.mediafire.com/download/ar7rqw5q0v5pfo1/AltisTotalWar.Altis.pbo Changelog: 1.01 - Removed personal TS3 details from map. - Added custom objective (military camp) to Almyra airfield. - Fixed double Titan AA launchers in vehicle inventory (was meant to be an AA + AT launcher). - Removed VAS restriction on green and brown NV goggles - Increased amount of VAS custom slots to 25 1.0 - Initial release. Changes which I'd like to make but don't know how: 1. Restricting Titan launchers to the AT class. 2. Making players auto-join the BLUFOR side in lobby (issue with this is that the force assign setting messes with headless client).
  3. zyg0tic

    Altis Total War Coop @ALiVE @ ASR_AI3

    What are your server config file settings? What is your server startup parameters? I suspect those are the culprit rather than the mission itself, but happy to help. Do you have additional addons enabled? If you are using the strictest server config settings (verifySignatures = 2; requiredSecureId = 2;) but the server doesnt have the keys installed to "whitelist" extra addons then it will kick you because of those addons.
  4. zyg0tic

    Altis Total War Coop @ALiVE @ ASR_AI3

    Yes fully loaded worlds are pretty much impossible to run without virtualisation/caching of units. To improve performance you need to use the Editor, load the mission (folder version) and change the values of the Civ and Mil Objs for each region. To reduce the amount of visibile enemies (excluding CQB Module generated ones) use the Virtual AI Module (placed above the BLUFOR base). The CQB Module is set to cover the entire map, and from that you can reduce the amount that spawn also. To reduce the maximum pool of reinforcements edit the Military Logistics Module which Ive placed above the OPFOR AI Commander. Also you can run the mission solo by loading it as multiplayer with a password. This will allow for vehicle respawn and such. Also if you want AI team members then you need to go to description.ext and change disabledAI from = 0; to = 1. To reduce/increase the amount of playable units, use the Editor to cull/add the player units which are located inside of the hangar at the BLUFOR base.
  5. Well nobody has joined the server. Australia is very poor for multiplayer gaming compared to America and Europe. Our population is too small, and internet connections are not very fast. Also dedicated servers too expensive.
  6. I've just started a 16 player Australian server running the ctfx_ctf2-quake.stratis mission. Will keep it up for a few days and monitor to gauge interest for extending to longer term. The other mod I want to have servers for in Australia is BR but its restricted. I used to play CTF mode of the game Vietcong and it was a lot of fun. Eventually I will try some of the other maps you have released... hopefully you have a jungle/forest setting in there somewhere.
  7. Hi. I've just recently begun running a small server and I'm curious about how to allow players to use certain addons. On the server I run a mission that requires - CBA_A3 (which on a side note is a big headache because of uninstall issues and in-game expansion configure problems... Im just reinstalling Arma 3 now because of it!) - ALiVE - ASR_AI3 The server settings I have that are relevant to this discussion are kickduplicate = 1; verifySignatures = 2; BattlEye = 1; onUnsignedData = "kick (_this select 0)"; onHackedData = "ban (_this select 0)"; Currently if players dont have the necessary mods, and if they have other addons, they get kicked. But there are some mods that are okay and I dont mind people using, like sound mods. I dont want it to be required, just allowed. Kind of like a mod/addon whitelist. So what must I do to accomplish that?
  8. I'm assuming this doesnt interfere with the other entries in the init field of editor placed units? If so, great job :) Update: Just tried it. Either Im not applying it correctly or it isnt working for units with execvm's for UPS and UPS Respawn (AIvcl_respawn_UPS) in Editor inits. For infantry group leader this is the init: (group this) setVariable ["zbe_cacheDisabled",false]; nul = [this,"Molos"] execVM "ups.sqf"; For air unit group leader this is the init: (group this) setVariable ["zbe_cacheDisabled",false]; nul = [this, 4, 180, "MolosVS1","Molos"] execVM "AIvcl_respawn_UPS\AIvcl_respawn_UPS_init.sqf"; And this is the air unit group member's init: nul = [this, 4, 180, "MolosVS1","Molos"] execVM "AIvcl_respawn_UPS\AIvcl_respawn_UPS_init.sqf";
  9. zyg0tic

    Urban Patrol Script

    What should I add to the Expression field of the A3 Editor's Vehicle Respawn Module to make the respawned vehicles initialise UPS again? Sorry if this has been asked before, but my mind is fried! This is one of the only 2 things remaining for my mission to be complete, and im finding it really difficult to get clear answers (u havent found any!!!).
  10. Thanks Bhaz! Digging a little further I also found this forum post over on the ALiVE forums. Together with what you suggested I think Im sorted. Will edit with update if/when have working result. http://alivemod.com/forum/266-unable-to-add-addaction-to-spawning-units/0 Update: No success yet. Heres what Im trying on a dedicated server: In description.ext class Extended_Init_EventHandlers { class O_officer_F { init = "_this call (compile preprocessFileLineNumbers 'upgradeOfficer.sqf')"; }; }; In upgradeOfficer.sqf _this addBackpack "B_TacticalPack_ocamo"; for "_i" from 1 to 3 do {_this addItemToBackpack "RPG32_F";}; _this addHeadgear "H_HelmetLeaderO_ocamo"; _this addPrimaryWeaponItem "optic_DMS"; _this addWeapon "launch_RPG32_F"; I've tried with CQB Headless Client spawned units and Zeus spawned (and maybe also custom objective infantry group spawns). Virtual AI is set to virtualise all except synced. Update: Tried every combination from my limited knowledge I thought might possibly work. Nothing has. :( I noticed in the other thread on the ALiVE forum that guy didnt find a solution either. Seems like everyone who should know is providing something that doesnt work. I know I cant rightly complain given its a free mod and all. Just that this is one of the last 3 conundrums I need to solve to complete my mission. Ive spent most of my afternoon and night trying to find working answers and its doing my head in.
  11. Thanks. However its definitly beyond my current knowledge to write a script that'll only give desired units the items. Doing some research now but no progress as yet.
  12. Oh. Has anyone managed to get in working in MP?
  13. zyg0tic

    Authentic Gameplay Modification

    I dont have the mod enabled in command line parameters, yet its still changed all the unit names and gives me AGM modules in the editor. What the?
  14. When using the script version (to enable server side) and adding the execVM code to the init.sqf, do I have to enclose it in 'if (IsServer)'?
  15. Question: does init.sqf scripting (executed on load of mission) effect the virtualised units? I would like to add certain items (RPGs and scopes) to every AI unit, and am concerned it wont work if theyre not spawned on mission load. ILoVE ALiVE :p
  16. zyg0tic

    CODI_ArtilleryComputer

    Any word on the new version? Just discovered this mod and it looks great. Ive been a point and clicker and got bored of it but still wanted to use arti so was looking around for something like this. Does that error BL1P mentioned cause the mod to fail?
  17. zyg0tic

    ASR AI 3

    Smoke does seem to work against AI. Many times Ive revived or been revived only because smoke stopped the enemy fire.
  18. Is this for multiplayer or singleplayer? Multiplayer has notoriously lower framerates, with server performance impacting it. Only on low pop, low load servers will you get high frames. View and object distance, and shadows will also kill your frames. Grass can also be an issue.
  19. If CPU utilization is any indicator of stress, I have about 400 objectives in mine and CPU stays at around 15%, memory at 1.5gb. i7 4790k. Takes a while to load initially, but friends joining server after I had it loaded on my client said it was really quick.
  20. zyg0tic

    ASR AI 3

    Thanks! I upped all the spotting values to 1.00 for all units, having added all the code Robalo shared above into the init.sqf for the mission. I also loaded VTS DuckHunt, and deleted the ALiVE AI Skill module (whilst otherwise keeping basic ALiVE enabled). I dropped in OPFOR and BLUFOR recon and sniper team at opposite ends of the salt lake. Also an OPFOR LMGer and marksman which I moved up incrementally from 1.6km. Here are the results in photos: I forgot what the name of the 7.62mm opfor rifle is. Ranges are taken from the northern tip of the airstrip. BLU snipers are about 200m north of that, and were firing and killing from that position. He killed a few OPFOR, including their sniper, but eventually ran out of ammo. Those two weapons were engaging at 1km. Observer that the Mk18 is silenced and the other is not. "Spec ops! One and a half clicks south!" shouted the group leader after putting away his rangefinder. OPFOR sniper also engaging shortly after placement at very long range. Removed the DMS scope from the marksman's rifle and put it on the LMG. The LMG guy began firing immediately after this, single shots with long pause in between. The marksman continued to fire with the unscoped weapon. I find those results somewhat pleasing, although Ive yet to determine the 6.5mm rifles range. If there was a mod able to add scopes to all non-sniper units, I think it would help a lot also as adding scope to LMG seems to have increased range. Keep in mind Im using VTS DuckHunt, but am not sure at this stage if its actually working (I assume it is), but definitly ASR AI3 increased spotting values has been effective. ^ tested range of unit armed thusly. Began engaging at 750m. Further than that they were aware of enemy presence, staying prone and moving up in slow way one at a time.. but only at 750m did they start firing. They killed the opfor marksman quite soon after getting in range. Update: After further testing Im quite sure VTS Duckhunt isnt working as intended. Firing ranges are the same with Duckhunt enabled or disabled. I think this may be due to ASR AI3 making its own modifications to firing range, possibly something to do with scopes... Ive browsed the config viewer CfgWeapons with ASR enabled and found it does make some modifications and an ASR has added a fire mode optics1 and optics2. Question: could ASR AI3 be extending the firing range of the AI?
  21. zyg0tic

    Authentic Gameplay Modification

    How to enable AGM_AI for my mission, but nothing else?
  22. zyg0tic

    VTS Duck Hunt

    Someone said they havent had success getting this to work with ALiVE. Any updates on compatibility? Im using ALiVE and ASR AI3. I did some testing today with those enabled (without this mod, which I only just found here), and the armor will engage each other at just under 2km, which I think is fine and a good match for view distance settings. AI infantry however can be standing 900m away from each other and do nothing. Concealment plays a role in this, with sniper teams remaining alive (undetected) after all others are dead in the same proxitimity. This is with BLUFOR less skill and OPFOR higher skill (the snipers were BLUFOR and didnt return fire because they BLUFOR had default regular potato AI skill). Getting really sick of being able to mow down everything from 1.5k away in a tank while they are oblivious. Even 1.5k sniping they are vulnerable oblivious and the best they manage is to move closer (after a very long time) or hide in cover. Update after brief testing: 1. Duckhunt enabled. Okay so I installed the mod, enabled it and made a simple Zeus mission in editor. With Zeus I spawned a BLU and OP weapons and sniper teams 1.4km from each other, and manually ordered them to attack each other. The LMG and sniper guys of both sides started firing (and hitting the other) at 1.2km. The assault rifle guys were slowly flanking over to cover, but not shooting. So that was with Duckhunt, ASR AI3 and ALiVE enabled by the way. 2. Duckhunt disabled. Disabled the Duckhunt mod and tried again. Exact same result. The LMG and sniper guys engaged at 1.2km. The assault rifles guys slowly made their way to cover but did no shooting. So same result as some prior testing I had done with ASR AI3. I know that at 800m with ASR AI3 (and possibly unmodded/vanilla? not sure) ordered AI with assault rifles will engage enemy infantry. At what range should the assault rifle guys start shooting with this mod working correctly?? Update: After further testing Im quite sure it isnt working. Firing ranges are the same with the mod enabled as with it disabled. 6.5mm assault rifles start firing 750-800m whether using this mod or not. Snipers will fire at known targets at 2km with or without the mod enabled. Units were spawned in using Zeus. I think increasing the units spotting effectiveness (I did this through ASR AI3 settings) was effective alternative to this.
  23. zyg0tic

    ASR AI 3

    Im using ALiVE and ASR AI3. How do I increase the spot distance, and decrease time it takes for AI to spot enemy? Is it necessary to change a setting in ASR AI3 config files, or should I use the ALiVE AI Skill module settings? Do they work in conjunction?
  24. Upon further editing and testing Ive discovered it is also doing this for the standard, unedited ammo boxes. To test/reproduce, make a mission with the box, player and respawn enabled. Load the mission on dedicated server, connect and drop some items on the ground from the box. Reconnect and check amount of items in the box - has it reduced more than what you removed onto the ground before disconnecting?
×