Jump to content

Recommended Posts

WrANTKC.png

 

Vandeansons Dynamic Spawn Scripts

 

A "plug and play" script package that will spawn various sites and AI, fully randomly placed that will be dynamically de and respawning for ongoing survival action!

 

Never again will it be pointless, dull and boring to run around in armas beautiful forrests, just because all the loot and action is stuck in cities and other remains of civilisation!

My scripts spawn in bandit camps to raid, small survivor hideouts to find and loot in the deepest forest, crashed helicopters that should definitely be searched before other survivors get there, ferocious packs of wild dogs that will jump you in the dark or animals to hunt for survival. Find a tame horse as a compagnion and tie it up next to your homebase while setting up barricades and boobie traps to fend off attacks against your newly claimed home.

You will never rest easy, knowing that your steps may be watched from far and the moment you get too comfortable at a place, bandits pick up your trace and hunt you down!

 

more to come...;)

 

Direct download link of the Dynamic Spawn Script collections: (Version 2.31 - 06.12.2018)

 

 

VDSSP v2.31:

https://drive.google.com/open?id=1V6mysMzbsqwDUm3Ku9SvJRDgHHzQ3MSY

 

 

How to install and modify the scripts:

 

1. Download the file above un-zip it

2. Open the unzipped folder and copy the whole content into your mission folder.

you may already have the following files:

 

- init.sqf

- description.ext

- initplayerlocal.sqf

- onplayerrespawn.sqf

 

you will need to merge these two versions of the files.

 

 

3. Minimum setup in eden editor:

- read the comments under VD_Settings.sqf

- place the blacklist areas for the sites that spawn at land this is done to avoid that sites spawn outside maps such as chernarus:

6FE5BFD8BFA68AD8AD3209A2035EEC4D68872F28

 

 

- place the blacklist area markers for the shipwreck spawner

- place markers on airfields for the plane spawner

 

thats it!

 

if you want to spawn the tradercamp, banditcamps or shipwrecks on markers, follow the instructions in VD_Settings.sqf

 

v2.2 tutorial and showcase (don't mind the v2.0 in the loading screen, i forgot to update this)

(the voice audio line is missing and i wont bother updating but rather make a new video at some point)

 

Showcase Videos: (slightly OUTDATED, however principle remains the same)

Quick showcase video:

 

 

 

 

 

 

 

 

 

Functions of the script

 

General:

- all sites spawn and despawn dynamically

- sites will not spawn too close to players and will also not despawn if any player is near the site

- dynamic simulation is enabled for all spawned objects and units (activation is based on view distance or a custom meters amount that you can define)

- the sites perform distance checks so sites do not spawn too close to each other:

(example of a bandit camp spread)

SRaPbDv.jpg

 

- MP and SP compatible

- note that the script is not persistent yet. this will mainly be a bummer for the basebuilding. i currentl lack the knowledge how to provide a database for persistency tailored to my script and lack the time to dig into it. having said that, i plan to provide a solution at some point

 

Bandit Camp:

P9PBD1d.jpg

 

hORsKs0.jpg

 

 

1ZJhUwR.jpg

- finds a random empty place to spawn a random pre-made bandit camp composition

- random loot in main loot crate

- random loot may spawn in secondary loot crate

- AI group that patrols the camp

 

OPTIONAL: Place markers if you prefer to have the camps spawn at random selected markers positions. Change this under VD_Settings.sqf . (both can be active same-time)

 

Trader Camp:

- finds a random empty place to spawn a  pre-made trader camp composition

- all ravage traders (gear, supply, arms)

- one VD trader for weapon attachments, explosives, grenades and respawn backpacks

 

OPTIONAL: Place markers if you prefer to have the camp spawn at random selected markers positions. Change this under VD_Settings.sqf .

 

No Rest! Spawner:

- AI Spawner that will continuously check if you are not moving much over a certain period (e.g. it will check if you stay in a city looting for too long)

- will spawn an AI that will come after you if you remain at on area too long

- will continue to hunt you until you are 200 meters or further away from AI. once AI reaches the last known player position, AI died or you moved too far away, the script stops and the AI is despawned (if not dead)

 

Ship Wreck Spawner:

- spawns a Ship Wreck site with props and one loot crate somewhere at a shore

- the automated placement script works very well now, no debug zone spawns

- OPTIONAL: Place markers if you prefer to have the wrecks spawn near (find a shore) at random selected markers positions. Change this under VD_Settings.sqf . (both can be active same-time)

 

Hideouts:

 

K4EV0SV.jpg

-small lootable 2 man tents with possible AI

- looting the camp may spawn AI nearby that will hunt you (see No Rest! spawner)

 

Crashsites:

- lootable Helicopter crashsites

- lootspawns around wreck

- additional loot may be found in the wrecks cargospace

- looting the wreck may spawn AI nearby that will hunt you (see No Rest! spawner)

 

Infection:

 

a script that "infects" players with a deadly disease when hit by a zombie.

- starts damage-over-time ticker.

effects at each tick (frequency 60 Seconds) are:

-  damage is applied 

- stamina reduced drastically 

- text indicating something is not right

- wounded sounds

- shaking

- delay between damage ticks decreased by 5%, hence, if untreated, the infection will eventually kill you

 

- additional disturbing effects in higher frequency, but these dont deal damage (only stamina loss, shaking, text)

 

- all AI have a low chance to drop injectors at death

- injectors can be used via addaction to curecthe infection. thix addaction is only available when infected

 

This is currently triggered by zombies from the ravage mod, via the parent "zombie". of course this can be changed to any other zombie mod.

 

Vehicle spawns:

- boat spawner

- helicopter spawner (spawns with a site, e.g. field-helipad)

- plane spawner (needs marker placement, see VD_Settings

 

This is spawning vanilla vehicles. the vehicles array can be updated under VD_Settings.sqf

 

Spawners for cool 3rd party mods:

- DBO rideable horses, with custom addaction to tie them down and disable dmg taken, requires the DBO Horses mod by DeanosBeano

https://steamcommunity.com/sharedfiles/filedetails/?id=1470493486

 

- feral dog pack spawner, necessary scripts from JBOY Dog by johnnyboy already included.

 

- huntable animal spawner (Vanilla asset Goats and Sheep spawner that can be hunted with the Ravage mod)

 

Personal Loot-crate:

spawns a loot-crate next to you on mission start, can be dragged around or loaded into a car. can not be destroyed

Disabled by default, can be activated under vd_init.sqf

 

Basebuilding:

removed amd to be replaced

 

VD_Equipper:

- function that equips AI (Bandits, Traders) with random gear and loot according to your settings in VD_Settings.sqf

 

VD_Player_Equipper:

- player equipper that randomly equips players with gear and loot  according to your settings in VD_Settings.sqf , can be called fom initplayerlocal.sqf or onplayerrespawn.sqf (call  VD_Player_Equipper) to make your players respawn with a random loadout 

 

VD_Settings.sqf

- adjust the scripts to your liking here, no scripting knowledge required

- manage mods and lootlists for the script here

 

VD_Arrays.sqf: (do not touch!)

- puts together arrays based on your active mods and VD_Setttings.sqf

- arrays may be used for your own scripts.

 

the arrays are:

 

Weapons:

VD_WeaponArrayRifles

VD_WeaponArrayPistolsAI (use for AI equipper/loadouts)

VD_WeaponArrayPistols (may include Max Melee weapons if mod is active, hence used for loottables and player equipper)

VD_WeaponArrayLaunchers

VD_WeaponArrayAll (all weapons)

 

Equipment:

VD_EquipmentUniforms

VD_EquipmentHeadgears

VD_EquipmentVests

VD_EquipmentGoggles

VD_EquipmentBackpacks

 

Weapon Attachments:

VD_EquipmentMuzzles
VD_EquipmentOptics
VD_EquipmentBipods

VD_EquipmentFlashlights (not automated, only contains vanilla Flashlights for pistol, smg and rifle)

 

 

VD_Settings.sqf:

- apply what Equipment or weapon mods to use

- remove parts of mod content from loottable (e.g. with IFA3 no ww2 gear but only weapons)

- add items, blacklist or remove specific items

- set min/max timers, min/max ranges, safe distances and amount of camps/stuff to spawn

 

Addon dependencies:

- CUP Terrains - Core

- Ravage: this script was made with Ravage in mind, however the script works even if the Ravage mod is not active. Ravage specific classnames may be removed from VD_Arrays.sqf. Just search for "rvg_".

 

Supported Mods: (can be modified under VD_Settings.sqf)

all gear mods are supported and automatically included into spawner (eg. gear and weapons for AI or lootcrates)

 

Known issues:

Spoiler

Mod compatibility:
- Warfare Thai Ex: Works but additionally spawned magazines on AI and players might not match the actual gun. I currently do not know a way to fix this. The weapons do however spawn with matching magazines inserted.

General:

- This script has no persistency system yet.
- this should mainly be a problem for the basebuilding tho

Bandit Camps:

- AI might sometimes act weird and wander off into the distance. Currently no fix available

Trader Camp:

- none noticed

Ship Wreck:

- max distance needs to be set in accordance to the map size and the maximum possible distance for the player to the coast.
If the max distance for the spawn position finder is smaller than the distance the player has from the coast, the spawner will loop until it finds a position again (e.g. the player moved closer to the coast). This is ok and does not cause errors, but its unnecessary FPS spent. Up to you how you want to adjust your settings.

Crashsites:
- no issues known

Hideouts:
- no issues known

Basebuilding:

- not 100% sure if this works with the standard EDN Fortification mod, but it should. I will test asap and if not, change my script
- I will add  more blueprints and add explanation on how to add your own
- will add material traders
- might not load after loading a safegame - to be reviewed

No REST! Spawner:

- None, its awesome!

Feral dog spawner:

- not MP compatible atm
- no other issues known

Animal Spawner:

- no issues known

 

 

To Dos & Ideas:

- TC: add trade option for vehicles, base-building materials, ...maybe more (WIP, partially finished)

- Hideouts & Banditcamps: add IEDs (completed, polishing, will be in v2.3)

- Banditcamps: add option to claim raided banditcamps (BC will not despawn and serve as your base. will trigger regular attacks by bandits) (not started)

- Claimed Banditcamp: add basic base reinforcements (select and place defensive structures) options or option to move current structures (not started)

- Banditcamps: add further patrols and roadblocks in proximity  (not started)

- add spawner that will place survivor notes to BC, when collected, will reveal hidden stashes (money, loot...)  (not started)

- task system: spawn "contracts" that if collected create a random task with rewards (not started)

- task system: add task npcs with selection of tasks that the npc hands out over radio (randomly timed) or via dialoge/addaction  (system in place, need to add a lot of tasks now)

- add ambient chatter and flashlight activation  for AI by johnnyboy  (not started)

- add spooked poof chicken alarm system by johnnyboy  (not started)

- add guard dogs for hideouts and banditcamps  (done, polishing, comes in 2.3)

- add scavenger AI spawn: spawn a hideout in the forest, moves to nearby towns and moves from house to house (feature finished). moves back to base randomly from time to time to stash his loot (fills up lootcrate at base), then returns to looting towns (this is not yet working properly) 

- add Z horde spawner when player remains at same location for a while (or chance that a horde is spawned, should probably not be 100%). Spawns Z's in some distance and in all directions around player with move to waypoint to player position. (based on the No Rest! spawner, hence more or less in place)

- spawn and respawn system for planes (just planes spawning in airstrips, marker based)

- spawn and respawn system for helicopters (small sites with improvised structures such as some sandbags, camo nettings, mechanic tools, some boxes. basically the military has left behind a perfectly fine helicopter:))

 

possible new features - Sanctuary:

 

I am thinking about adding a larger scale sanctuary that is either occupied by friendlies or enemies.

 

if under friendly control it may offer:

 

- mechanic to repair vehicle (for money)

- trader for vehicle repair parts and fuel

- a respawn point

- general traders

- vehicle and helicopter traders

- task npc: patrol tasks, investigate possible hostile presence,... against money reward

- tasks to repair damaged sanctuary defences

- events: help AI fend of enemy attacks to defend the sanctuary

- the defensive structures should be destroyable but there should also be a feature to rebuild e.g. a walls or fences

 

if under enemy control:

 

- the area around the sanctuary will be patrolled by increased amounts of AI

- if you are in the area, AI hunting parties will be sent after you

- roadblocks may be set up

- minefields are placed

- IEDs are placed on roads

- any other feature that would make your stay in the area around the sanctuary miserable and makes you either avoid the area or forces you to take action and capture the sanctuary

- feature to raid the camp and capture it for your allies

- occupation may also change randomly from time to time

- after a takeover by friendlies, you will be tasked to clear the area from remaining enemy AI presence, roadblocks, minefields and IEDs.

 

if overrun my Zombies and contaminated:

 

- a third status would be after the sanctary has been overrun by zombies and has to be cleared again

- or that it has been contaminated and the area can only be entered with contaminatiom gear. players have to either wait for the contamination to find or remove the source of the contamimation

 

will think about what other features could be added that make this provide interesting gameplay... i am very open for your ideas:)

 

 

===================================

Changelog

Spoiler

06.12.2018

fixed: 

- general clean up

- land and coast area blacklist markers updated and can be configured under VD_Settings. Since the last arma update, an error pops up if more markers are named than are placed on the map. hence leave empty if you need no blacklisted areas for shipwrecks or land site spawns, else name only the marker areas that you have actually placed on the map

- JBDOGs feraldog packs aggroing range can now be adjusted under VD_Settings

- IED debug Marker disabled by default (BC and HO) 

- some code cleanup

- stuff i've already forgotten, sorry ;)

 

removed:

- VD adaptation of edn basebuilding: removed as i am working on an alternative

 

new:

- dynamic boat spawner

- dynamic heli  spawner

- dynamic plane spawner (needs markers on airfields)

- Zombie infection script including chance for any AI to drop cure injectors (addaction available once infected). in short: Z hits you, you get infected, you take damage over time all 60s, you lose stamina latest all 60 secs, frequency is increased by 5% every tick. additional disturbing effects such as shaking, stamina loss, wounded sounds occur randomly. text also indicates that something is wrong with you. if you take an injection the effect gets removed.

 

- detailed AI  (only affects VDSSP spawned AI) and player loadout manager for your customization under VD_Settings.sqf. Option to allow players to initially spawn and respawn with a random (according to your settings) loadout





10.11.2018

- changed basic initialisation order, see comments for details

6.11.2018

-Added version of tradercamp spawner woth automated placement/no marker requirement. this is the default setting
- fixed drag/drop/loadin/loadout addaction problems for the player lootcrate and material boxes
- various smaller fixes


4.11.2018

Major overhaul, much stuff redone from scratch


11.09.2018

- CUP,RHS,NIARMS,WarfareThiaEx,FrithsRuins Equipment and Weapons arrays added (where availalbe)
- VD_Settings.sqf created for users to adjust the script to their needs
- packed all into a zip for easy download
- added EDN fortification download (not original version)
- some bugfixes

10.09.2018

WIP:

- VD_Arrays.sqf redone (no longer using automated arrays) WIP

- Basebuilding with EDN Fortification (external mod)

- Basebuilding Material spawner

- Lobby: added some "settings" to VD_Array.sqf" where you can adjust some of the features (eg. spawn BC on markers or not, use CUP weapons or not)

- Weapon Arrays are work in progress, currently you can use CUP weapons or NIARMS. Or you can add your custom weapons.



Fixed:

- Smokepillars can not be deleted at despawn, hence removed

- fixed problem with VD_equipper Function that would not properly equip AI with Magazines

- General issues fixed

- probably a lot more that i have forgotten, best only use these versions of my scirpts;)



New:

- WIP basebuilding script including: Matspawner, function to drag boxes with materials in it and to load it onto any vehicle that is close enough, blueprints for craftable stuff, spawner that will spawn these blueprints into buildings until all are found

DL from here and follow the installation guide:

http://www.armaholic.com/page.php?id=26963



- personal lootbox, can be dragged arround and loaded onto any vehicle (has an addaction that will "stabalize" any object arround you, that you have built, WIP.

- Option to spawn Bandit Camps at markers

- added a new script "No REST!" that will wait until the player gets comfortable at one place, and if the player does not move on for too long, will sent out AI bandits to hunt him until he is 200 meters away from the AI.

This should counter the issue that, in Ravage, when you stay at one place, no further AI usually spawns and attack you.



04.09.2018

- shipwreck spawner script included

- smoke pillars added to TC and BC campfires (far cry style;)

- added map marker that spawns when player has a radio equipped (at trader camp spawn). It also broadcasts a small message.

- Trader Camp Spawn Script added including custom traders

- Weapon attachment trader added

- Explosives trader added

- array of loot exported

- VD_Arrays.sqf updated to include Trader Camp info and added code that creates an array of weapon attachments based on the available weapons

- code rewritten in general



03.09.2018

- I have disabled the Trader Camps guard AI spawn as they would just keep shooting at the traders, no idea why=) until i do, i disable this.

- marker dependency removed

- all arrays externalized

- added own AI equipment script

- added distance check: camp will not be placed 500 near any house

- fixed deletion code to no longer delete ALL dead AI in the mission (upsi;)

- one lootcrate per tent, no loot on the ground, one lootcrate has high value loot

- using BIS fnc for AI behaviour

- automated weapons array (will pull all active mods)

- added option to include own custom weapon list (this will automatically overwrite the automated weapon arrays

- added option to add Blacklisted weapons (will be removed from loottable



27.03.2018

- Updated the OP to hopefully add clear instruction on script usage (thanks @Gunter Severloh)

- updated the script to contain line-per-line explanation

- added CUP version as the structures fit better to the "camp" feeling

- added clean up code for loot able objects/furniture that are spawned into camp structures by the ravage loot module

- added range check for script to only run if player is within 4000 meters proximity of the markers



08.03.2018

- sorted the arrays and put them at one place on top (easier to enter your own buildings, tents, weapons or items from other mods)

- added a bigger variety of vanilla structures and weapons that may spawn (includes a chance to spawn working Car or Helicopter)

- random amount of enemy AI spawns and patrols now with random gear based on your ravage equipment module settings

- added a WaitUntil function to stop the camps from de-spawning if the player is within 200 meters of the current camp

- added some explanation on how to install and edit the script

- removed all dependencies other than CBA and Ravage

 

 

  • Like 15
  • Thanks 5

Share this post


Link to post
Share on other sites

Nice work man!

Going to add it to my mission i been working on!

 

For those of you who haven't a clue on how to implement this into a script,

follow my simple guide:

 

Step 1 - The init script

1. Open notepad.

2. Copy this code ------>  [] execVM "banditcamp.sqf";  

3. Paste the code into your notepad doc.

4. Save the notepad document with this name -----> init.sqf

5. Move the init.sqf to your mission folder in the editor.

 

Step 2 - The Script itself

1. Open notepad.

2. Copy this code ------> on the post above .

3. Paste the code into your notepad doc.

4. Save the notepad document with this name ------> banditcamp.sqf

5. Move the banditcamp.sqf to your mission folder in the editor.

=====================

 

Question

7 hours ago, Vandeanson said:

This showcase only shows the camp spawning at one marker, but the actual script will chose one of multiple pre placed markers to place the camp.

These preplaced markers, these i have to place myself correct? 

and what do i put in the markers to call the script or is the script already doing this, i see the

_houseArray2 = getMarkerPos _mark nearObjects ["Camp",50];

 

in the script, but theres only 2 of them as far as i can tell, lastly you have CUP items in there, this will require CUP mods?

To work or is it dynamic based on what your running?

  • Like 3
  • Thanks 5

Share this post


Link to post
Share on other sites

Hi Gunther,

 

Thanks for the feedback, and thanks for clarifying on the installation and marker placement topic, I have missed to explain that=)

To clarify regarding the markers:

- place the 5 markers (same name as in the script) in your mission, ideally on flat ground until i figure out how to align the tents to the terrain via script;)

- if you want to add or remove markers, do not forget to add or remove them in the script

- I personally will copy the script eg banditcampB.sqf, replace the marker names to "mrkrB_1,...". then i will place those markers e.g. in the east part of the map to have multiple camps up at the same time in different regions=)

 

The script will select one of the markers randomly, and then place the camp composition around it. the "_mark" that is used in the script will refer to that randomly selected marker throughout the script. this will change every time the script runs, hence the randomess of the camp spawns.

The _houseArray2 = will search the tents with classname "CampEastC" and "Camp" that are near the marker that the script has chosen and will fill its buidling positions with loot. (in this case ravage survival items and FAK)

The _houseArray1 = does the same with normal houses (e.g. the windmill or the small church). In this case however, it will spawn objects (crates, bags) where ravage will place loot in. If you do not use the ravage mod, this will just be cosmetic.

 

I am not sure if that clarifies your question?

 

I do not like the vanilla weaps, hence I use CUP, RHS or Thai warfare, even ww2 weaps.

In this case you will need to replace the class names with items from either vanilal arma or the weapon mods that you are using.

 

However please note the line below that will add matching magazines to the weapon.

I noticed this does work for vanilla, rhs and cup, but not for thai warfare items (I might be wrong but this was my experience. FYI

Quote

_magazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
    _mag = _magazines select (floor (random (count _magazines)));
    _itemBox addMagazineCargoGlobal [_mag, 2 +random 4];

 

happy to help if anything is unclear;)

and looking forward seeing this in your mission:rthumb:

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, Gunter Severloh said:

. Copy this code ------>  //[] execVM "banditcamp.sqf";

ups i forgott: delete the "//" when inserting this into your init.sqf

Share this post


Link to post
Share on other sites
1 hour ago, Vandeanson said:

- place the 5 markers (same name as in the script) in your mission, ideally on flat ground until i figure out how to align the tents to the terrain via script;)

So the following from the code are the markers except name the markers....

7 hours ago, Vandeanson said:

_mark = ["mrkrA_1","mrkrA_2","mrkrA_3","mrkrA_4","mrkrA_5"]

mrkrA_1

mrkrA_2

mrkrA_3

mrkrA_4

mrkrA_5

 

Makes sense.

So 1 marker = 1 camp, so if i added more to the code like this for the markers....

 

_mark = ["mrkrA_1","mrkrA_2","mrkrA_3","mrkrA_4","mrkrA_5","mrkrA_6","mrkrA_7","mrkrA_8","mrkrA_9","mrkrA_10"]

i would have 10 camps spawn correct?

 

Now building a mission for myself and placing the markers when i play the mission i will know roughly

where these camps are vs someone playing my mission whom has no idea and would stumble apon them.

 

However looking at the code again (i'm no coder btw, but i have ideas of what things mean after all these years of messing around)

you have  call BIS_fnc_selectRandom;  after the markers with ; a semicolon to close the code, this tells me that once i place the markers whether they are just the 5 from the code

or 5 more i add,  that the markers will randomize themselves once the mission starts and then the camps will spawn on their positions correct?

 

1 hour ago, Vandeanson said:

I am not sure if that clarifies your question?

 

I do not like the vanilla weaps, hence I use CUP, RHS or Thai warfare, even ww2 weaps.

Yes to a point. As for the weapons and items, no worries i like them as well just wanted to confirm that, thats what someone will see in the camps with the script if they are using CUP and or RHS,

you should add some more notes and requirements if you will in your OP stating that the code uses CUP CUP weapons and items that will spawn, and if CUP is not present will the script ask for them or will just Ravage items spawn?

 

I will put together a small demo mission for this so people can get a working example of what it looks like, of course after i try it myself of course ;)

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Vandeanson said:

However please note the line below that will add matching magazines to the weapon.

I noticed this does work for vanilla, rhs and cup, but not for thai warfare items (I might be wrong but this was my experience. FYI

 

Check out BIS_fnc_addWeapon, automatically grabs compatible mags and adds the desired amount to the unit, it also adds the magazine first so you don't have to reload the weapon prior to first use.

 

Cheers

  • Thanks 1

Share this post


Link to post
Share on other sites

Tested it, placed a player put 5 markers down, ran CBA, ravage, and CUp weapons, i put down 5 markers, started the mission, 1 camp spawned i think, at least a building,

house, barrel, no bandits, or ammo, and a truck, other 4 markers idk nothing spawned.

Am i missing something?

the script and init script are in the mission folder, and the mission is set on the flat salt lake on Altis.

Share this post


Link to post
Share on other sites

@Gunter Severloh

the basic idea in my example is to only have one camp up at a time, for one hour or so. then it will despawn and spawn again at a new location. this way i want to achieve that the player keeps searching remote locations for hidden camps. 

 

if u know the helicopter crashsite spawnsystem in dayz standalone, this is the effect i want to achieve.

 

so using my script, only one of the 5 markers is selected and there will only be one camp per time. after 2000 seconds, a new camp will spawn at a new random marker (and the old one is deleted)

 

i will do the following tomworrow hopefully:

- state what mods i was using for my specific example

- create a version without dependencies for easy copy & paste use

- upload a better sample video to showcase the system and its possibilities

 

to your example:

it is not working for you because you need spun fins ai spawn script to set up to spawn AI and probably some objects from another CUP mod (the tents i think)

 as a quick fix for you, you would need to delete all the classnames in my script and replace the buildings and houses under (_tent, _tent2,...) with vanilla structures, the weapons and items that are not vanilla or ravage with classnames that are available for your mod set up. 

will get back to u with an update shortly;)

Share this post


Link to post
Share on other sites

topic is now updated, the script can be copy & pasted if you use CBA and Ravage.

To use it without those mods, delete any classname  in the script starting with "rvg_"

  • Like 1

Share this post


Link to post
Share on other sites

Update:

 

I have updated the AI spawner:

This will add 2 plus a random amount of AI that will patrol the area.

Random gear will be added following your ravage equipment/loot modules set up.

 

It is no longer needed to place a "O_G_Survivor_F" in the Mission via Editor for the units to spawn (as shown in my video).

 

_bandits = createGroup east;
"O_G_Survivor_F" createUnit [getMarkerPos _mark, _bandits, "[this] call rvg_fnc_equip", 0.6, "corporal"];
"O_G_Survivor_F" createUnit [getMarkerPos _mark, _bandits, "[this] call rvg_fnc_equip", 0.6, "private"];
if (60 > random 100) then {
"O_G_Survivor_F" createUnit [getMarkerPos _mark, _bandits, "[this] call rvg_fnc_equip", 0.6, "private"];};
if (50 > random 100) then {
"O_G_Survivor_F" createUnit [getMarkerPos _mark, _bandits, "[this] call rvg_fnc_equip", 0.6, "private"];};
if (40 > random 100) then {
"O_G_Survivor_F" createUnit [getMarkerPos _mark, _bandits, "[this] call rvg_fnc_equip", 0.6, "private"];};
if (30 > random 100) then {
"O_G_Survivor_F" createUnit [getMarkerPos _mark, _bandits, "[this] call rvg_fnc_equip", 0.6, "private"];};
if (20 > random 100) then {
"O_G_Survivor_F" createUnit [getMarkerPos _mark, _bandits, "[this] call rvg_fnc_equip", 0.6, "private"];};
if (10 > random 100) then {
"O_G_Survivor_F" createUnit [getMarkerPos _mark, _bandits, "[this] call rvg_fnc_equip", 0.6, "private"];};
if (5 > random 100) then {
"O_G_Survivor_F" createUnit [getMarkerPos _mark, _bandits, "[this] call rvg_fnc_equip", 0.6, "private"];};

_wp1 = _bandits addWaypoint [getmarkerpos _mark, 0];
    _wp1 setWaypointType "SAD";
    _wp1 setWaypointSpeed "Limited";
    _wp1 setWaypointBehaviour "CARELESS";
    _wp1 setWaypointFormation "COLUMN";

 

  • Like 2

Share this post


Link to post
Share on other sites

Hello! you can also do this: works well with ravage...

{
removeAllWeapons _x;
removeAllItems _x;
removeAllAssignedItems _x;
removeUniform _x;
removeVest _x;
removeBackpack _x;
removeHeadgear _x;
removeGoggles _x;
[_x] call RVG_fnc_AddGear;
[_x] call RVG_fnc_AddWeapon;
[_x] call RVG_fnc_AddLoot;
//Force NVG item
_x linkItem "NVGoggles_INDEP"; } forEach units _bandits; 

 

Maybe assign them a combat animation, this is very flexible tbh

 

{
removeAllWeapons _x;
removeAllItems _x;
removeAllAssignedItems _x;
removeUniform _x;
removeVest _x;
removeBackpack _x;
removeHeadgear _x;
removeGoggles _x;
//Add random gear for guarding units and sets animation state
[_x] call RVG_fnc_AddGear;
[_x] call RVG_fnc_AddWeapon;
[_x] call RVG_fnc_AddLoot; 
[_x,"WATCH","ASIS"] call BIS_fnc_ambientAnimCombat; } forEach units _bandits;

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@Jimmakos thanks man thats great, will apply this;) i ll replace the nvg example with a chance to spawn with gunflashlights!

Share this post


Link to post
Share on other sites
On 3/5/2018 at 5:46 AM, Vandeanson said:

- AI group that patrols the camp

So Vandeanson, the AI will spawn at the camp now, we dont need the other AI script from Phronk, or add AI in the editor like you have in your vid to spawn at the camp?

 

Share this post


Link to post
Share on other sites
25 minutes ago, Gunter Severloh said:

So Vandeanson, the AI will spawn at the camp now, we dont need the other AI script from Phronk, or add AI in the editor like you have in your vid to spawn at the camp?

 

yes that is correct, all you need is to update the init.sqf, create the banditcamp.sqf with above script and place the markers and have cba and ravage running. i will replace the video hopefully this WE, im also trying to find another fix anyway (one that will allow u to have ravage spawn furniture)

  • Like 1

Share this post


Link to post
Share on other sites
On 3/5/2018 at 5:46 AM, Vandeanson said:

Paste the below script into the document and save it.

Hi Vandeanson,

a tip for you to make your installation instructions a bit more specific and clearer for the new guys.

Something i want to point out is what i quoted above, the code that you must copy and paste for the script is not underneath that line in your instruction on the OP,

I would suggest moving and putting the title of the script above the code box so people dont get confused or lost as to what you referring too, or god forbid forget to use it.

On 3/5/2018 at 5:46 AM, Vandeanson said:

Start your mission via editor and place markers named:

 

"mrkrA_1","mrkrA_2","mrkrA_3","mrkrA_4","mrkrA_5"

To name a marker, add the above name into the Variable Names field like this: mrkrA_1.

Place your markers on flat ground to avoid issues with the object placement.

 

Place your player and start your mission.

Also on the OP is your instructions here, i would like to make a recommendation as to bold and or make bigger so that the title is easy to see, and distinguish

as to what your instructing the player to do, and lay it out step by step,  just imo that its easier, and more efficient to have something big, bold, and listed then a

paragraph you need to read that blends in with other text/sentences in the same area.

            Also imo when instructions stand out more its faster and easier for people to see whats what, and give them more an incentive to try, and use your work, and give you feedback.

On 3/5/2018 at 5:46 AM, Vandeanson said:

If you want to have multiple sets of camps spawned, you can do the following:

- copy & paste the file "banditcamp.sqf" and rename it to e.g. "banditcampB.sqf" in your mission folder.

- [] execVM "banditcampB.sqf";  <--- place this text onto a new line into the init.sqf file in your mission folder.

- in "banditcampB.sqf", change all the marker names under " _mark" and give it a new unique name such as "_mrkrB_1",_mrkrB_2",.....

- place markers with those new names on the map.

-e.g. banditcamp.sqf will have markers in the southern part of your map whilst banditcampB.sqf has its markers in the northern part.

 

Also this line, give it a title so it easy to see what it is, and it stands out on its own, and give it some order.

 

Sorry i dont mean to be nitpicking or a editor grammar Nazi, lol but i been messing with the scripts in my mission, and i been finding it hard to locate,

read, and sort what it is i have to and can do.

    Im a big believer in making things obvious, specific, to the point, efficient, and simple as possible most especially when it comes to instructions on how to do something,

my biggest pet peeve is having to read a paragraph to learn how to do something that forces the would be information gatherer to have to sort and make sense of what to do with that information.

If your interested i could edit my 2nd post there and create a whole tutorial outlining the instructions and then you can link the instructions, just a thought.

 

      You got something good here and its perfect for ravage, thanks for your work!

 

Share this post


Link to post
Share on other sites
4 hours ago, Gunter Severloh said:

Hi Vandeanson,

a tip for you to make your installation instructions a bit more specific and clearer for the new guys.

Something i want to point out is what i quoted above, the code that you must copy and paste for the script is not underneath that line in your instruction on the OP,

I would suggest moving and putting the title of the script above the code box so people dont get confused or lost as to what you referring too, or god forbid forget to use it.

Also on the OP is your instructions here, i would like to make a recommendation as to bold and or make bigger so that the title is easy to see, and distinguish

as to what your instructing the player to do, and lay it out step by step,  just imo that its easier, and more efficient to have something big, bold, and listed then a

paragraph you need to read that blends in with other text/sentences in the same area.

            Also imo when instructions stand out more its faster and easier for people to see whats what, and give them more an incentive to try, and use your work, and give you feedback.

Also this line, give it a title so it easy to see what it is, and it stands out on its own, and give it some order.

 

Sorry i dont mean to be nitpicking or a editor grammar Nazi, lol but i been messing with the scripts in my mission, and i been finding it hard to locate,

read, and sort what it is i have to and can do.

    Im a big believer in making things obvious, specific, to the point, efficient, and simple as possible most especially when it comes to instructions on how to do something,

my biggest pet peeve is having to read a paragraph to learn how to do something that forces the would be information gatherer to have to sort and make sense of what to do with that information.

If your interested i could edit my 2nd post there and create a whole tutorial outlining the instructions and then you can link the instructions, just a thought.

 

      You got something good here and its perfect for ravage, thanks for your work!

 

Hi Gunter,

 

Thanks for the constructive and positive feedback!

That all makes perfect sense, I would actually appreciate if you could do that, write a template for instructions from user perspective. I could use that for further scripts as well=)

Feel free to PM it to me and I will update it in my OP;)

 

Does the script work for you? Let me know if you would like to see other features or if things are not clear or even not working!

How are you using it in your mission? I replicated the script 3 times and it works fine for me btw=)

Cheers

Share this post


Link to post
Share on other sites
28 minutes ago, Vandeanson said:

I would actually appreciate if you could do that, write a template for instructions from user perspective. I could use that for further scripts as well=)

Feel free to PM it to me and I will update it in my OP;)

Sure thing.

 

29 minutes ago, Vandeanson said:

Does the script work for you?

Yes, I was recently just testing it on a blank map to see what shows up, but i have a good understanding of how its working.

I haven't implemented it into my mission yet, as i like to create templates sometimes so i can just copy n paste things for future missions.

 

32 minutes ago, Vandeanson said:

Let me know if you would like to see other features or if things are not clear or even not working!

One thing im noticing is when your using ravage and loot spawns, some of the loot (containers) are bunched together, or floating, these are just the ones inside the shacks, houses and windmills.

 

The other thing that i notice is that the would be bandits dont act like bandits, i find them to laid back and not threatening til you get almost on top of them, can we update that

aspect so they would attack you if they spotted you, or came within in a certain range of the camp?

 

Another idea for the camps would be based on a trigger, you could have various large triggers where when you enter the trigger, the camp would spawn somewhere inside it,

but the trigger would have to be large enough to where the camp that would spawn inside cant be seen, but still maintain that random dynamic build of the camp.

When i think of camps, i think more of pitched tents, campfire, and the like, maybe add some more tent aspects to the camp vs a house.

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, Gunter Severloh said:

One thing im noticing is when your using ravage and loot spawns, some of the loot (containers) are bunched together, or floating, these are just the ones inside the shacks, houses and windmills

yes i am working on this one, i will probably disable my own props spawner and let ravage do its work. however i need to further test my clean up script for props that have been spawned in by ravage (else they do not sisappear along with the camp). wip;)

 

16 hours ago, Gunter Severloh said:

The other thing that i notice is that the would be bandits dont act like bandits, i find them to laid back and not threatening til you get almost on top of them, can we update that

aspect so they would attack you if they spotted you, or came within in a certain range of the camp?

good idea, i can change their behavior to combat and search and destroy once player is close and even make them target you. also i will increase their skill level, it was too low initially.

 

16 hours ago, Gunter Severloh said:

Another idea for the camps would be based on a trigger, you could have various large triggers where when you enter the trigger, the camp would spawn somewhere inside it,

but the trigger would have to be large enough to where the camp that would spawn inside cant be seen, but still maintain that random dynamic build of the camp.

yep this is how i initially did it, call the sqf via trigger. should it just spawn one camp at a set location or should it start the dynamic spawn and despawn cycle? both is possible and i can send you instructions on how to do it. it would also be possible to amend my script so that the spawning only starts if the player is in the region where the camp is located (to safe fps).

 

16 hours ago, Gunter Severloh said:

When i think of camps, i think more of pitched tents, campfire, and the like, maybe add some more tent aspects to the camp vs a house.

yes agreed, this is how i use it, however vanilla arma has a little less assets for that, hence i added some other structures. with cup and other mods you have a much bigger variety for a real camp (various tents and such). i can share my structures array that includes cup structures and makes the camp look more like something that was set up from scratch without fix structures such as houses.

  • Like 1

Share this post


Link to post
Share on other sites
28 minutes ago, Vandeanson said:

should it just spawn one camp at a set location or should it start the dynamic spawn and despawn cycle? both is possible and i can send you instructions on how to do it. it would also be possible to amend my script so that the spawning only starts if the player is in the region where the camp is located (to safe fps).

Ya i think dynamic would be ideal, i mean when your on your journey in a mission you dont want to run into a camp every time, but i think ideally if and when you were to run

into a camp it would spawn in only if you were in the region as you pointed out, otherwise if camps are spawned in somewhere else and you never go in that direction then you have the game rendering

AI you'll never encounter so yes a possible fps loss if any.

 

I think keeping the markers is fine too, the player can add their own extra markers and of course if and when they happen to be in an are of a marker the camp would spawn out of site,

so the distance should be fairly far maybe 500m minimum, really depends on where the player is at too.

Btw i sent you a pm on a proposed format of the thread.

  • Like 1

Share this post


Link to post
Share on other sites

gottcha, will add a condition to only run the script while a player is within reasonable proximity! e.g. mrkr1 will be the center and the other markers are spread arround it within e.g.1000m and the script runs as long as a player is about 1500m proximity of mrkr1

  • Like 3

Share this post


Link to post
Share on other sites

HI Vandeanson,

I just recently started using your bandit camp script and I was wondering if there is a way to have the crate spawn more than one random weapon from the weapons array?

I've played around with changing the values of _itemBox addWeaponCargo [_weapon,2 +random 4]; but it only seems to add more of which ever weapon is selected.

If you or anyone else could explain to me what I need to do, I'd greatly appreciate it.

 

Thanks 

Kaos

  • Like 1

Share this post


Link to post
Share on other sites
12 hours ago, TacticalKaos said:

HI Vandeanson,

I just recently started using your bandit camp script and I was wondering if there is a way to have the crate spawn more than one random weapon from the weapons array?

I've played around with changing the values of _itemBox addWeaponCargo [_weapon,2 +random 4]; but it only seems to add more of which ever weapon is selected.

If you or anyone else could explain to me what I need to do, I'd greatly appreciate it.

 

Thanks 

Kaos

Hi Kaos, happy to hear that you are implementing my script:)

I have drafted up an update of my instructions and the script itself  that schould add some more explanation and clarity. I should be able to upload it today or tomorrow.

 

in the meantime:

1. find the following lines of code under the line //"treasurebox" loot spawn:

_weapon = _weaponArray select (floor (random (count _weaponArray)));

 

2. copy and paste that code right below it and change  it as following:

_weapon2 = _weaponArray select (floor (random (count _weaponArray)));

 

3. next locate the below code a few lines further below:

_itemBox addWeaponCargo [_weapon,1 +random 1];

_magazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"); _mag = _magazines select (floor (random (count _magazines))); _itemBox addMagazineCargoGlobal [_mag, 2 +random 4];

 

4. copy and paste right below it and change as following:

 

_itemBox addWeaponCargo [_weapon2,1 +random 1];

_magazines2 = getArray (configFile >> "CfgWeapons" >> _weapon2 >> "magazines"); _mag2 = _magazines2 select (floor (random (count _magazines2))); _itemBox addMagazineCargoGlobal [_mag2, 2 +random 4];

 

What will this do?

you need to create a new loot spawn position within the lootbox. also you want that second weapon to be different than the first one. hence:

point 2: will select a new random weapon from the "_weaponArray" and define it as "_weapon 2"

 

point 4: will use "_weapon2" and spawn the randomly selected weapon and matching magazines.

 

this can be repeated with items or explosives as well.

 

i am sending this from my mobile but i hope it makes sense. else please let me know. again i will be releasing an update of the script that includes line per line explanation within the script soon;)

 

looking forward to hear if this worked for you.

 

br Vandeanson

  • Like 1

Share this post


Link to post
Share on other sites

Hi Vandeanson,

Thank you for responding to my question, it does make sense and I'll get back to you after I edit and test.

Love the script by the way, best one I've come across in my internet travels.

 

Kaos 

Share this post


Link to post
Share on other sites

It works like a charm!.

Thank you for the help Vandeanson.

 

I've got kind of an off topic question maybe you could answer, if not no problem.

I'm using this to spawn a map marker once a camp activates the trigger area, but once it moves to the next location the previous marker stays..

I'd like for the previous marker to always be deleted when the camp moves locations and just keep cycling. if that makes sense.

 

CampLocations.Sqf

 

params[ "_trigger" ];

_marker = [ format["%1_area",vehicleVarName _trigger], _trigger ] call BIS_fnc_markerToTrigger;
_marker setMarkerBrush "SolidBorder";
_marker setMarkerAlpha 1;
_marker setMarkerColor "ColorOPFOR"

 

OnAct Trigger

null = [ thisTrigger ] execVM "CampLocations.sqf";

 

Cheers

Kaos

Share this post


Link to post
Share on other sites

Alright gents, both the script and OP are updated.

I have added a CUP version of the script with line by line explanation of the script. I hope this provides some clarity.=)

 

See changelog 27.03.2018 in OP

 

Any questions, please let me know

br

vandeanson

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×