Jump to content

Search the Community

Showing results for tags 'mass replacement'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Virolahti
  • TKO's Livonia
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Australia
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • SOS GAMING's TS³ Viewer
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 2 results

  1. Since I got the habit of placing tons of stuff in eden to get terrains to look better for my missions I ended up making a script that makes it much easier are a lot faster. The replaceobjects.sqf replaces whatever (even billboards in the fallujah map) and allows for tuning orientation, probability, randomisation, etc. I am satisfied with the results, but my lack of knowledge does not allow any further improvement. So I am asking for help to optimize the script and make it run in less time. I have no coding skills whatsoever so is highly probable that there are obviously better ways of doing stuff than the ones I used. This script makes it easy to mass replace buildings and other stuff. Here's two pictures of what it can do in two of my favourite maps: fallujah and diyala: This is my script: /* Replaceobjects.sqf by b3lx. This script replaces terrain objects randomly chosen out of a defined array. Good for batch changes in terrains like replacing tree types or houses. The following arguments have to be passed to the script - _pos = the center position of the area to include. - _radius = limits the max search range - _type = (optional) lists the types of objects the script should filter for. if empty it uses classnames passed through _oldobjlist - _oldobjlist = (optional) object classes to replace; only used if _type is empty - _newobjlist = object classes for replacement - _customdir = (optional) leave empty ("") or define aditional rotation angle for new objects. - _hidden = (optional) if true replacing includes hidden objects, default is false; - _percent = (optional) random percentage of matching object to replace, default is 1; - _sizefilter = (optional) array that defines minimum and maximum size values for object to be filtered. Useful when types or classnames don't work or if you want to use diferent replacements for different sized objects. Use [0,100] if you don't want to filter. - _code = (optional) custom code to be executed on each object, default is {}; - _altreplacer = classes to use when terrain slope is greater than 18 degrees (check isflatempty below). IF empty or false its not used. If true uses classes defined below in _altreplacerdefaul, otherwise use an array with desired classes. - _debug = (optional) markers for each replacement and message with number of replacements. Example 1: Replaces all "Land_House_L_6_EP1" houses with two RSO buildings with disabled simulation and rotated 180 degrees, and places debug markers. [player,200,[],["Land_House_L_6_EP1"],["rso_h21","rso_hut3"],180,true,1,[0,100], {_this disableSimulation true},false,true] execVM "replaceobjects.sqf"; Example 2: replaces 20% of houses around player between 0 and 10 size with two RSO buildings or rubble if the terrain is sloped [[worldsize select 0, worldsize select 1], (worldsize select 0) / 2,["house"],[],["rso_h21","rso_hut3"],0,true,0.2,[0,10], {},["Land_Fortress_01_bricks_v1_F"]] execVM "replaceobjects.sqf"; Example 3: replaces all houses around player with two RSO buildings [[player, worldsize,["house"],[],["rso_h21","rso_hut3"]] execVM "replaceobjects.sqf"; Example 4: replaces all billboards in fallujah by empty ones [replacer, radius,[],[], ["Land_Billboard_F"],0,true,1,[6.00263,6.00264]] execVM "replaceobjects.sqf"; List of types that can be filtered by, according to BIS: "TREE", "SMALL TREE", "BUSH", "object", "HOUSE", "FOREST BORDER", "FOREST TRIANGLE", "FOREST SQUARE", "CHURCH", "CHAPEL", "CROSS", "BUNKER", "FORTRESS", "FOUNTAIN", "VIEW-TOWER", "LIGHTHOUSE", "QUAY", "FUELSTATION", "HOSPITAL", "FENCE", "WALL", "HIDE","BUSSTOP", "ROAD", "FOREST", "TRANSMITTER", "STACK", "RUIN", "TOURISM", "WATERTOWER", "TRACK", "MAIN ROAD","ROCK", "ROCKS", "POWER LINES", "RAILWAY", "POWERSOLAR", "POWERWAVE", "POWERWIND", "SHIPWRECK", "TRAIL" */ //shuffle array function from killzonekid KK_fnc_arrayShuffle = { private "_cnt"; _cnt = count _this; for "_i" from 1 to _cnt do { _this pushBack (_this deleteAt floor random _cnt); if _debug then {systemchat format ["%1 randomized", _i]}; }; _this }; private ["_objArray","_filteredArray","_altreplacerdefault","_slctrl","_pos","_radius","_type","_oldobjlist","_newobjlist","_customdir","_hidden","_percent","_sizefilter","_code","_altreplacer","_debug"]; params ["_pos","_radius","_type","_oldobjlist","_newobjlist","_customdir","_hidden","_percent","_sizefilter","_code","_altreplacer","_debug"]; //finds objects according to criteria and puts them in an array _objArray = []; if (count _oldobjlist == 0) then { _objArray = nearestTerrainObjects [_pos, _type, _radius, false, true]; } else { _fullarray = nearestTerrainObjects [_pos, _type, _radius, false, true]; {if (typeOf _x in _oldobjlist) then {_objArray pushback _x}} forEach _fullarray; }; //filters array according to min and max size defined in _sizefilter if (isNil "_filteredArray") then {_filteredArray = []}; if (!isNil "_sizefilter") then { _sizeA = _sizefilter select 0; _sizeB = _sizefilter select 1; {if (((boundingboxREAL _x select 1 select 0) - (boundingboxREAL _x select 0 select 0) > _sizeA) && ((boundingboxREAL _x select 1 select 0) - (boundingboxREAL _x select 0 select 0) < _sizeB)) then { _filteredArray pushback _x}} forEach _objArray; } else { _filteredArray = _objArray; }; sleep 1; //sets default variables if undefined by user if (isNil "_customdir") then {_customdir = 0}; if (isNil "_hidden") then {_hidden = false}; if (isNil "_percent") then {_percent = 1}; if (isNil "_debug") then {_debug = false}; if (isNil "_code") then {_code = {}}; //houses to use if terrain slope is too great for specified ones. default values are used if _altreplacer is set to true _altreplacerdefault = ["Land_Addon_02_b_white_ruins_F"]; _altreplacer = true; if (isNil "_altreplacer" || !_altreplacer) then {_slctrl = false} else { _slctrl = true; if _altreplacer then {_altreplacer = _altreplacerdefault}; }; //randomizes the array using KK function _filteredArray call KK_fnc_arrayShuffle; if _debug then {systemchat "shuffled"}; reverse _filteredArray; sleep 1; _filteredArray resize (floor ((count _filteredArray) * _percent)); _rplcount = 0; //function that replaces the object _replaceobject = { params ["_oldobject", "_replacer"]; private ["_newobject"]; _position = getPosATL _oldobject; _direction = direction _oldobject; _oldobject hideObjectGlobal true; //checks if slope filter is used and selects from which array of objects (normal or for sloped terrain) to create new object if (!_slctrl) then { _newobject = _replacer createVehicle _position; } else { if (position _oldobject isFlatEmpty [-1, -1, 0.4, 1, 0, false] isEqualto []) then { _newobject = (selectRandom _altreplacer) createVehicle _position; _customdir = 0; } else { _newobject = _replacer createVehicle _position; }; }; //positions new created object on floor, adding custom direction and vertical orientation _newobject setPosATL [_position select 0, _position select 1, 0]; _newobject setDir _direction + _customdir; _newobject setvectorUp [0,0,1]; _newobject call _code; _rplcount = _rplcount + 1; //places debug markers if debug is on if (_debug) then { _mrk = createMarker [str _rplcount,_position]; _mrk setMarkerShape "ICON"; _mrk setMarkerType "hd_dot"; }; }; //checks if hidden objects are to be replaced and calls replacement function accordingly //sleep 1; if _hidden then { {[_x, (selectRandom _newobjlist)] call _replaceobject} forEach _filteredArray; } else { { if (!(isObjectHidden _x)) then {[_x, (selectRandom _newobjlist)] call _replaceobject} } forEach _filteredArray; }; if _debug then {systemchat format ["script replaced %1 objects", _rplcount]};
  2. Terrain Object Replacement Modules Replace or delete massive numbers of terrain objects easily Download: https://steamcommunity.com/sharedfiles/filedetails/?id=2276624333 Check images below for how to use: Explanation:
×