Jump to content

b3lx

Member
  • Content Count

    197
  • Joined

  • Last visited

  • Medals

Everything posted by b3lx

  1. Started modelling and I'm not happy with the texture results.The rvmat is loaded but the NOHQ is not visible and the texture has less detail than the CO image What could be wrong? This is using a 2048x2048 CO image. The rvmat:
  2. 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]};
  3. Use what you need: configs, paa's, whatever. If you make better versions I might end up asking you the same 😉
  4. MILITIA FAST FACTIONS Scripted factions compatible with your favourite weapons mod: Veteran Mod, CUP, RHS, or just plain vanilla FEATURES: - Compatible with your favorite weapons mod: Veteran Mod, CUP, RHS or just plain vanilla (not so realistic considering the available assets), - Factions can be of any side - There can be limitless factions without cluttering your assets - Variation and randomness, loadouts are created at spawn based on probabilities - Works with spawn scripts - Language, faces and names are coherently assigned to each faction (considering the available choices) - Each faction has an assault team that can be used as special force or different loadout pattern from the main faction - Custom insignia and flags for each faction, they are added to vehicles used by faction and can be removed or replaced in-game - Special (scripted) ammobox with specific faction weapons - Custom made uniform textures - Spawn modules that work with most CUP ME and RSO buildings (only the ones that work), - User created/adapted factions can be reloaded on-the-fly with no need to relaunch arma (makes it much less time consuming) - Extending factions for VTN mod users without infringing their rules REQUIRED ADDONS: -works with just vanilla but it's intended to work with Veteran mod, CUP or RHS. DOWNLOAD: https://steamcommunity.com/sharedfiles/filedetails/?id=2062342317 http://www.armaholic.com/page.php?id=35984
  5. You can use them without making this as dependency. What are you making?
  6. Palms available in Arma are basically two kinds: phoenix palms available in Altis and a variant used in Malden, and various tropical palms available form CUP (used in Fallujah I think) and Tanoa better quality ones. In maps that that portray middle eastern regions terrain makers have opted exclusively AFAIK for the tropical kinds which for me it makes maps seem either south asian or african instead of middle eastern. The best alternative would be to make a new model which can be used to replace the ones in existing maps by script or used in new terrains. Meanwhile the phoenix palm seems the most viable choice: I'l post some examples of using these phoenix palms in existing maps soon. I know it may be a silly discussion for many but since I stumbled on this issue twice already I think we can discuss it here instead of hijacking other people's topics. And maybe we'll get a proper date palm model in the game.
  7. I made a personal use mod to show them in the editor. Another option is to create them as simple objects from the model path, but that is mostly cosmetic as they can't be damaged. You can find the model paths using something like this in the debug console: _alltrees = (nearestterrainobjects [player,["tree"],200]) apply {(getmodelinfo _x) select 1}; _alltrees = _alltrees arrayInteresect _alltrees; copytoclipboard _alltrees;
  8. The Bastek terrain! Indeed, I love it. And now we have these versions of the Malden palms from the western sahara cdlc: a taller model and two withered models
  9. No, this just replaces. But it shouldn't be very difficult to make a module for that. Will try to make it if I have time.
  10. 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:
  11. b3lx

    [MP][COOP] Vindicta (Alpha)

    This is a very fun to play guerrilla scenario! I think it could be greatly improved with some changes (don't know if they are possible within the code limitations you alluded to): 1-I don't understand why building resources are collected in police stations. I think they should be collected in factories or buildings in construction. Of course you could be caught stealing them and be arrested, civilians could snitch on you and factories could be guarded or patrolled. 2-While I much prefer this incognito mode to antistasi, sometimes it creates weird situations. I can go to a building shoot some people hide weapons and everything is fine. Some time should be necessary to pass before you could go undercover again if you are near the enemy. 3-Dialogs could be improved with more options (with some utility, of course). 4-Maybe keep one policeman guarding prisioners and later take them to jail. It's way to easy to liberate them. 5-Civilians could drive between towns. 6-More civilians outside towns. 7-Something that would be nice here (it was also missing from antistasi) is some sort of an advanced start in case you are not in the mood to run the initial errands. Maybe start with a camp and some units and simple weapons and vehicles. 8-Make many of these and other features in the game optional.
  12. TERRAIN: Fallujah 1.2 ASSETS: Diyala, CUP terrains, RSO buildings, Veteran mod, MILITIA scripted factions, Max women, Women at work POSTPROCESSING: ReColor
  13. forget my previous fallujah RSO replacement script. Here's a great and fast one I'm working on for RSO, CUP and METIS Nature. The replacement function I use on on the Object Replament Modules mod is good for simple all purpose modifications but for so many different changes on a terrain it's better a specific script like this one. And this is the result:
  14. I think the sights on the ZU23 (both the collimator and the optical sight) are very difficult to use against land targets unless you have someone telling you where to aim. In single player if I don't want to cheat I have to get out of the vehicle to use the binoculars and get back in to aim. Could you make it possible to use binoculars while sitting on the gunner seat of the ZU23?
  15. Major update: -Can set area shape (rectangle or ellipse) -New object selection filters: probability, condition expression, exclusion areas -New object creation options: custom or random direction, snap to terrain, random height (good for trees), simple object mode, expression to run on each created object
  16. Thanks everyone for your suggestions!. I use postInit because contrary to preInit it makes it possible to use together with editor hide object modules. Definitely much faster than after mission initialised. I've been using a different updated version of this script that I put in my object replacement mod. @pognivet this is what I used for fallujah together with another script only to replace trees. Best way is to define the replacement script as a function and call it instead of execVM and call it pre or postInit. You can use center=player and use a small radius to see a preview in the editor. Don't use worldsize as radius if you don't use pre or post init, it will take forever. _center = [worldsize/2,worldsize/2]; _radius = worldsize; //chernarusian billboards [_center, _radius,[],["bilboard_cigara_chernomorky.p3d","bilboard_toaletak_armasan.p3d","bilboard_vodka.p3d","bilboard_beach.p3d","bilboard_everon.p3d","bilboard_likery_bardak.p3d","bilboard_strana_noveho_radu.p3d","bilboard_smadny_maskrnik.p3d","bilboard_bienvenudo.p3d","bilboard_escape.p3d","bilboard_seci_stroje.p3d","bilboard_riviera.p3d","bilboard_pizza_presto.p3d","bilboard_alkohol.p3d","bilboard_hlinik.p3d","bilboard_cibulka.p3d"], ["Land_Billboard_F"],0,false,1,[0,100],{_this setobjecttexture [0,(selectrandom billboardstextures)]}] execVM "replaceobjects.sqf"; //house with arches small and hut with no interior [_center,_radius,["HOUSE"],["Land_Dum_istan2","Land_Dum_olez_istan2"], ["rso_construct3","rso_complex5","rso_complex6","rso_h1","rso_h10","rso_h19","rso_shop3","rso_shop3b","rso_apartmentcomplex","rso_garages","rso_garage1","Land_villa_b","Land_villa"],0,false,1,[12,16]] execVM "replaceobjects.sqf"; //cubic buildings with interior [_center,_radius,["BUILDING","HOUSE"],["Land_Dum_olez_istan2_maly2","Land_Dum_olez_istan2_maly"], ["rso_hut1","rso_hut2","rso_hut4","rso_stores","rso_shack"],0,false,1,[8,10]] execVM "replaceobjects.sqf"; //old building very large [_center,_radius,["BUILDING","HOUSE"],["Land_Dum_istan2_02"], ["rso_big_f"],270,false,1] execVM "replaceobjects.sqf"; //old buildings single piece and double piece [_center, _radius,["BUILDING"],["Land_Dum_istan2_01","Land_Dum_istan2_03","Land_Dum_istan2_03a"], ["Land_House_C_10_EP1","rso_stores2","rso_stores3","rso_shop1"],0,false,1] execVM "replaceobjects.sqf"; //brown house small [_center, _radius,["HOUSE","BUILDING"],["Land_Dum_istan3_pumpa"], ["rso_store1","Land_House_C_4_EP1","Land_Unfinished_Building_01_F"], 0,false,0.5] execVM "replaceobjects.sqf"; //old house no interior [_center, _radius,["BUILDING"],["dum_mesto3_istan.p3d"], ["Land_17str","Land_17strb","rso_h20","rso_h21","Land_14str","Land_Unfinished_Building_02_F"],90,false] execVM "replaceobjects.sqf"; //brown house big [_center, _radius,[],["Land_Dum_istan3_hromada2"], ["rso_h17","Land_5str","Land_villa","Land_6str","Land_villa3","Land_villa_b"], 0,false,0.5] execVM "replaceobjects.sqf"; //house with arches big [_center, _radius,["house"],["Land_Dum_istan3"], ["rso_h18","Land_16str","Land_7str","Land_22str","rso_h6","rso_h15"], 90,false,0.5,[22.7,22.9]] execVM "replaceobjects.sqf"; //house without classname (parasol) [_center, _radius,[],["dum_olez_istan1_open.p3d"], ["Land_House_C_1_EP1","Land_House_C_1_v2_EP1","rso_cornershop1","Land_21str","Land_21str_b","Land_21str_c"]] execVM "replaceobjects.sqf"; //yellow apartment buildings [_center, _radius,["house"],["Land_Dum_istan4","Land_Dum_istan4_big"], ["rso_complex1","rso_complex2","rso_complex3","rso_complex4"], 180,false,0.1] execVM "replaceobjects.sqf"; //phonebooth [_center, _radius,[],["phone_box.p3d"], ["Land_GarbageHeap_02_F"]] execVM "replaceobjects.sqf"; //dumpster [_center, _radius,[],["kontejner.p3d"], ["Land_ChairPlastic_F","Oil_Spill_F", "Land_Plank_01_4m_F","Land_CratesPlastic_F","Land_CanisterFuel_Blue_F","Land_BarrelEmpty_F","Land_BarrelTrash_grey_F","Land_MetalBarrel_empty_F"]] execVM "replaceobjects.sqf";
  17. Updated. Now is possible to use model names instead of classnames of objects to be replaced.
  18. How can I order groups or units carrying mortars or Metis backpacks to assemble their weapons by script? I made an High Command action that orders a group to assemble their weapon. It works great and I'm trying to make it compatible with VTN but I only made it work with static MG's. It seems Mortar and Metis backpacks work in a totally different way. Ended up finding an alternative using createvehicle, removebackpack and another shenanigans. Love this mod, guys. Keep up the good work!
  19. You? Doing an Iraq terrain? And you care about palms?
  20. Update available on Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=2062342317 Major changes since last post: MILITIA Mod now works with either Veteran Mod, CUP, RHS or just vanilla.
  21. AI properly following weapon safety rules: units should never have their weapons pointed at friendlies, maybe force lower weapon if cursorobject is a friendly
  22. The latest update includes a few modules that makes it very easy to set up an occupied area -Read module: put down vehicles and turrets for each faction (I advise only HMG's for now), customise vehicles appearance and put down objects that you want to attach to them (I use PLP materials to bulletproof vehicles for instance) -Area spawn module: it will spawn vehicles read by the read module preserving customisations, crew them and add passenger groups if seats are available. It will spawn units and turrets in buildings in CUP ME and RSO buildings (only the good ones not the those that AI can see through). (I've mapped a ton of positions, so this goes well beyond building positions). A ton of other options: VBIED included -Blacklist module: exclude buildings in area from occupation -Core module: faction selection I'm very happy with the result. I made them for myself but I'm sure other people will have fun with this.
  23. So if one is to create a config for these walls to make them bulletproof what properties should be changed?
×