Jump to content

zealot111

Member
  • Content Count

    64
  • Joined

  • Last visited

  • Medals

Posts posted by zealot111


  1. Additional to additional tests prooved You were right. Thank you for reporting.

    Problem is fixed. New version released, Please test it.

     

    Lets go back to this autorefreshed directory.

    What is advantage of autoswitching. How often in your opinion directory should be scanned?

    Is your request dictated by a fact you are mod maker?

    Good. Thanks. Definetely will try.

    I think that directory should be scanned 1 time per 15 seconds. (It is reasonable to add checkbox "Autoswitch to latest" for this feature).

    It is very useful if you often restart Arma3 and forget to switch files manually.

     

    Also request ability to change font (or at least ability to edit text file with parameters) for rpt log text.

     

    PS Tried latest version and it works with my language just fine.


  2.  

    Please give me source of your info because practice shows something else that you claims.

    I open RPT files as UTF-8 in notepad++ and always see my national symbols OK only in this encoding.

    And this is obvious for me, All Arma3 files (mission files and etc.) use utf-8 encoding. And you should interpret them as using UTF-8 encoding, even when the are ANSI (in English localization).

    Could you send me source code of your program please? I would try to locate the problem.


  3. Problem is, that arma 3 seems to write RPT as ANSI.

    I will try to solve it somehow.

    Nope, Arma writes RPT as UTF-8, but shows on screenshots as UTF-8 misidentified as ANSI. It is easy to verify. 

    RPT is written without BOM. Maybe it makes java misunderstood it as ANSI. I attached one of my logs with erorrs as example.

     

    Also suggest to add feature to automatically scan RPT files directory for new files and autoswitch to latest of them.


  4. Try replace this 

    null = [this, "MILITARY"] execVM 'Terrorists\initUnit.sqf';

    with 
     

    0 = [this, "MILITARY"] call compilefinal preprocessfilelinenumbers 'Terrorists\initUnit.sqf';
    

    execvm shouldnt be used in unit init since it runs script throught scheduler.

     

    Also replace 

    waitUntil {!isNull player};
    

    in loadout file with 

    if (!local(_this select 0)) exitwith {};
    

    Or you will have problems in multiplayer. And loadout script should not have any sleeps and waituntils 

     

     

     

     

     

     


  5. Thanks for the SMS. But now 3D wires looks too contrast from very far distances. Suggest following change in the line 29 of vip_sms\fn\fn_init.sqf:

    drawLine3D [(_x select 0), (_x select 1), [0,0,0,0.75]]

    replace by

    if (player distance (_x select 0) < 25 || {player distance (_x select 1) < 25}) then {drawLine3D [(_x select 0), (_x select 1), [0,0,0,0.75]]};

    Then wires will be visible only when player is closer than 25 m to them.


  6. Hi, guys. Thanks for the excellent mod.

    Sometimes when selecting unit in virtual arsenal following error appears on screen and logs:

    9:08:45 Warning Message: Cannot load texture tryk_unit\data\dt\dusty_jacke_co.paa.

    9:08:45 Warning Message: Cannot load material file tryk_unit\data\dt\dusty_jacke.rvmat.

    9:08:45 Cannot load material file tryk_unit\data\dt\dusty_jacke.rvmat

    And also tryk_units.pbo contains some unbinarized p3d's. Noticed that when tried to manually repack pbo by Mikero tools.


  7. I have no clue how RHS works, could you provide some some documentation about it please?

    @Nikiforos: i know, rhs has a lot of stuff, but this is no reason not to make my own version and have what i like in the game. Take a look at all the mods that have already been made, if one was to follow what you said no one would bother making mods anymore because someone else got there first. :)

    Sorry, have no idea either. Will inform you if find any document/manual.

    ---------- Post added at 20:16 ---------- Previous post was at 20:14 ----------

    sorry, out of my own curiosity, why would you need optional compatible pbo with RHS damage system for a vehicle (BTR60) that is already included in RHS?

    @chairborne: gj on the release

    Because this mod contains many various skins for btr60 which are very fun to make missions with.


  8. I'm trying to get this to work, or something similar anyway. I just want some vehicles to spawn randomly around the map without me having to set the markers for where they spawn.

    Followed the OP's instructions but no vehicles spawn. Tested in Kavala.

    Try this script variant

    // v1d Civilian Vehicles from [sTELS]Zealot
    if (not isserver) exitwith {};
    
    zlt_civveh_round = 0;
    zlt_civveh_vehicles = [];
    zlt_civveh_spawnedloc = [];
    
    zlt_rnd_seed = 3;
    
    zlt_fnc_random = {
     private ["_a","_c","_m"];
     _a = 75;
     _c = 0;
     _m = 65537;
     zlt_rnd_seed = ( zlt_rnd_seed * _a + _c ) mod (_m);
     (zlt_rnd_seed / _m) ;
    };
    
    
    zlt_fnc_selectrandom = {
    _this select floor ( ([] call zlt_fnc_random) * count (_this));
    };
    
    zlt_fnc_civvehs = {
    _debug = [_this, 1, false] call bis_fnc_param;
    _lrange = _this select 2;
    _cars = _this select 3;
    _t1 = diag_ticktime;
    
    
    _startpos= _this select 0;
    _houses = _startpos nearobjects ["House",_lrange];
    //_vehmax =  _cars;
    _vehmax = 	(round ((sqrt (count _houses)) * 0.5)) max 1;
    
    _classes = ["C_Offroad_01_F"];
    
    _vehs = 0;
    _attemps = 0;
    
    _class = _classes select 0;
    zlt_rnd_seed =  ((_startpos select 0) + (_startpos select 1) mod 65537);
    while {_vehs < _vehmax and _attemps < 10} do {
    	//diag_log ["CV",_startpos, _lrange, _houses];
    
    	_house = _houses call zlt_fnc_selectrandom;
    
    	_housepos = _house modeltoworld [0,0,0];
    	_newpos = _housepos findEmptyPosition [ 3 , 15, _class ];
    	_houses = _houses - [_house];
    	if (count _newpos == 0) then {
    		_attemps = _attemps + 1;
    	} else {
    		_veh = _class createVehicle (_newpos ) ;
    		_veh setvariable ["zlt_civveh", true];
    		zlt_civveh_vehicles set [count zlt_civveh_vehicles, _veh];
    
    		_direction = (random 360);
    		_nearRoads = _newpos nearRoads 10;
    
    		if(count _nearRoads > 0) then
    		{
    			_road = _nearRoads select 0;
    			_roadConnectedTo = roadsConnectedTo _road;
    			if (count _roadConnectedTo > 0) then {
    				_connectedRoad = _roadConnectedTo select 0;
    				_direction = [_road, _connectedRoad] call BIS_fnc_DirTo;
    			};
    		}; 
    
    		_veh setdir _direction;
    		_attemps = 0;
    		_vehs = _vehs + 1;
    		if (_debug) then {
    			["crt"+str(_newpos), _newpos] call zlt_fnc_createmarkerlocal;
    		};
    	};
    };
    _t2 = diag_ticktime;
    if (_debug) then {
    	diag_log str ["civeh.sqf", _t2-_t1];
    };
    };
    
    
    zlt_civ_checkloop = {
    
    
    zlt_civveh_notemptyloc = [];
    
    {
    	_veh = vehicle _x;
    	_isInVeh = (vehicle _x != _x);
    
    
    	// or _veh getvariable ["zlt_civ_round", -1] != zlt_civveh_round
    	if (!_isInVeh || {_veh isKindOf "LandVehicle"}) then {
    		_dist = 1000;
    		_locations = nearestLocations [(getpos vehicle _x), ["NameCityCapital","NameCity","NameVillage"], _dist];
    		_locations2 = nearestLocations [(getpos vehicle _x), ["NameCityCapital","NameCity","NameVillage"], 2500];
    		{
    			if ( not (_x in zlt_civveh_spawnedloc) ) then {
    				_lrange = 50; _cars = 1;
    				switch (type _x) do {
    					case ("NameCityCapital") : {_lrange = 250; _cars = 7;};
    					case ("NameCity") : {_lrange = 150; _cars = 3;};
    				};
    				_pos = position _x;
    				[ [_pos select 0, _pos select 1, 0], false, _lrange, _cars] call zlt_fnc_civvehs;
    				zlt_civveh_spawnedloc pushBack _x; 
    //					_x setside east;
    			};
    		} foreach _locations;
    		{
    			zlt_civveh_notemptyloc pushBack _x;
    		} foreach _locations2;
    		if (_isInVeh) then { _veh setvariable ["zlt_civ_round", zlt_civveh_round];};
    	};
    } foreach (if (player in playableunits) then {playableunits} else {[player]});
    
    
    {
    	_pos = [(position _x) select 0, (position _x) select 1, 0];
    	_ent = ( (_pos) nearEntities ["C_Offroad_01_F", 300] );
    	{
    		if ( _x getvariable ["zlt_civveh", false] and {count crew _x == 0 and fuel _x == 1}) then {
    			deletevehicle _x;
    		};
    	} foreach _ent;
    	zlt_civveh_spawnedloc = zlt_civveh_spawnedloc - [_x];
    } foreach (zlt_civveh_spawnedloc-zlt_civveh_notemptyloc);
    
    zlt_civveh_round = zlt_civveh_round + 1;
    };
    
    while {true} do {
    //scan loop
    
    sleep 3.4; //magic number
    [] call zlt_civ_checkloop;
    
    };


  9. Arma 3 frozes to dead in big cities on some maps. Reproducibility 100% - just fly to the Cherno in editor (in camera mode or heli). Problem is related to one of the buildings in city. Cannot say classname of the building, is the big building with 6 big tankers, arma 3 just hangs when I try to look at these buildings. (The same reproduced by all my teammates). Requesting hotfix.


  10. has something in Arma3 broken this? Works in the editor, but on a dedicated server you don't get the finished, repaired vehicle anymore.

    Tested on a simple mission with one man, one car, no mods, just the repair script and ini file.

    Its a bug in the script with server owned vehicles. I have just fixed it and uploaded new version on the first post.

    ---------- Post added at 13:12 ---------- Previous post was at 13:11 ----------

    Is it possible to make it remove Toolkit after first repair?

    I have just uploaded new version. Please look to line #define DEFAULT_FREE_REPAIRS 1

    Change value to 0 and each field repair would require repair kit.


  11. I was wonderign if this works with helicopters from custom packs? I changed the name in the script for the helicopters I want to use but it doesn't seems to be working

    To add your favorite helicopter from addon you should modify 2 global variables:

    zlt_rope_helis - which defines classes of helicopters which is allowed to use fastrope

    and zlt_rope_helidata - which defines mount points fro ropes on helicopter model;

    for example, if you want to add support for CH_147F from Canadian Army addon you should change the script:

    add "CH_147F" to zlt_rope_helis variable and

    add

    	[
    	["CH_147F"],
    	[-0.1,0.3,-27.7],
    	[]
    ]
    

    to zlt_rope_helidata

    Example:

    // v1g Fast Rope by [sTELS]Zealot
    
    #define MAX_SPEED_WHILE_FASTROPING 10
    #define MAX_SPEED_ROPES_AVAIL 30
    
    
    #define STR_TOSS_ROPES "Toss Ropes"
    #define STR_FAST_ROPE "Fast Rope"
    #define STR_CUT_ROPES "Cut Ropes"
    
    
    if (isdedicated) exitwith {};
    waituntil {player == player};
    
    zlt_rope_ropes = [];
    zlt_mutexAction = false;
    
    zlt_rope_helis = ["O_Heli_Light_02_unarmed_F","O_Heli_Light_02_F","B_Heli_Transport_01_F","B_Heli_Transport_01_camo_F","O_Heli_Attack_02_F","O_Heli_Attack_02_black_F","I_Heli_Transport_02_F","B_Heli_Light_01_F","CH_147F"];
    zlt_rope_helidata = 
    [
    [
    	["O_Heli_Light_02_unarmed_F", "O_Heli_Light_02_F"],
    	[1.35,1.35,-24.95],
    	[-1.45,1.35,-24.95]
    ],
    [
    	["B_Heli_Transport_01_F", "B_Heli_Transport_01_camo_F"],
    	[-1.11,2.5,-24.7],
    	[1.11,2.5,-24.7]
    ],
    [
    	["O_Heli_Attack_02_F", "O_Heli_Attack_02_black_F"],
    	[1.3,1.3,-25],
    	[-1.3,1.3,-25]
    ],
    [
    	["I_Heli_Transport_02_F"],
    	[0,-5,-26],
    	[]
    ],	
    [
    	["B_Heli_Light_01_F"],
    	[0.6,0.5,-25.9],
    	[-0.8,0.5,-25.9]
    ],
    [
    	["CH_147F"],
    	[-0.1,0.3,-27.7],
    	[]
    ]
    ];
    
    
    zlt_fnc_tossropes = {
    private ["_heli","_ropes","_oropes","_rope"];
    _heli = _this;
    _ropes = [];
    _oropes = _heli getvariable ["zlt_ropes",[]];
    if (count _oropes != 0 ) exitwith {};
    _i = 0;
    {
    	if ((typeof _heli) in (_x select 0)) exitwith {
    		_ropes = _ropes + [_x select 1];
    		if ( count (_x select 2) !=0 ) then { 
    			_ropes = _ropes + [_x select 2];
    		};
    	};
    	_i = _i +1;
    } foreach zlt_rope_helidata;
    
    sleep random 0.3;
    if ( count (_heli getvariable ["zlt_ropes",[]]) != 0 ) exitwith { zlt_mutexAction = false; };
    _heli animateDoor ['door_R', 1];
    _heli animateDoor ['door_L', 1];
    {
    	_rope = createVehicle ["land_rope_f", [0,0,0], [], 0, "CAN_COLLIDE"];
    	_rope setdir (getdir _heli);
    	_rope attachto [_heli, _x];
    	_oropes = _oropes + [_rope];
    } foreach _ropes;
    _heli setvariable ["zlt_ropes",_oropes,true];
    
    _heli spawn {
    	private ["_heli","_ropes"];
    	_heli = _this;
    	while {alive _heli and count (_heli getvariable ["zlt_ropes", []]) != 0 and abs (speed _heli) < MAX_SPEED_ROPES_AVAIL } do {
    		sleep 0.3;
    	};
    	_ropes = (_heli getvariable ["zlt_ropes", []]);
    	{deletevehicle _x} foreach _ropes;
    	_heli setvariable ["zlt_ropes", [], true];
    };
    
    };
    
    zlt_fnc_ropes_cond = {
    _veh = vehicle player;
    _flag = (_veh != player) and {(not zlt_mutexAction)} and {count (_veh getvariable ["zlt_ropes", []]) == 0} and { (typeof _veh) in zlt_rope_helis } and {alive player and alive _veh and (abs (speed _veh) < MAX_SPEED_ROPES_AVAIL ) };
    _flag;
    
    };
    
    zlt_fnc_fastropeaiunits = {
    	private ["_heli","_grunits"];
    	diag_log ["zlt_fnc_fastropeaiunits", _this];
    	_heli = _this select 0;
    	_grunits = _this select 1;
    
    	dostop (driver _heli );
    	(driver _heli) setBehaviour "Careless"; 
    	(driver _heli) setCombatMode "Blue"; 
    
    	_heli spawn zlt_fnc_tossropes;
    
    	[_heli, _grunits] spawn {
    		private ["_units","_heli"];
    		sleep random 0.5;
    		_units = _this select 1;
    		_heli = (_this select 0);
    		_units = _units - [player];
    		_units = _units - [driver _heli];
    		{if (!alive _x or isplayer _x or vehicle _x != _heli) then {_units = _units - [_x];}; } foreach _units;
    
    		{ sleep (0.5 + random 0.7); _x spawn zlt_fnc_fastropeUnit; } foreach _units;
    		waituntil {sleep 0.5; { (getpos _x select 2) < 1 } count _units == count _units; };
    		sleep 10;
    		(driver _heli) doFollow (leader group (driver _heli ));
    		(driver _heli) setBehaviour "Aware"; 
    		(driver _heli) setCombatMode "White"; 
    		_heli call zlt_fnc_cutropes;
    
    	};
    };
    
    
    zlt_fnc_fastrope = {
    diag_log ["fastrope", _this];
    zlt_mutexAction = true;
    sleep random 0.3;
    if (player == leader group player) then {
    	[vehicle player, units group player] call zlt_fnc_fastropeaiunits;
    };
    player call zlt_fnc_fastropeUnit;
    zlt_mutexAction = false;
    };
    
    zlt_fnc_fastropeUnit = {
    private ["_unit","_heli","_ropes","_rope","_zmax","_zdelta","_zc"];
    _unit = _this;
    _heli = vehicle _unit;
    if (_unit == _heli) exitWith {};
    
    _ropes = (_heli getvariable ["zlt_ropes", []]);
    if (count _ropes == 0) exitwith {};
    
    _rope = _ropes call BIS_fnc_selectRandom;
    _zmax = 22;
    _zdelta = 7 / 10  ;
    
    _zc = _zmax;
    _unit action ["eject", _heli];
    _unit switchmove "gunner_standup01";
    
    _unit setpos [(getpos _heli select 0), (getpos _heli select 1), 0 max ((getpos _heli select 2) - 3)];
    while {alive _unit and (getpos _unit select 2) > 1 and (abs (speed _heli)) < MAX_SPEED_WHILE_FASTROPING  and _zc > -24} do {
    	_unit attachTo [_rope, [0,0,_zc]];
    	_zc = _zc - _zdelta;
    	sleep 0.1;
    };
    _unit switchmove "";
    detach _unit;
    
    };
    
    
    zlt_fnc_cutropes = {
    _veh = _this;
    _ropes = (_veh getvariable ["zlt_ropes", []]);
    {deletevehicle _x} foreach _ropes;
    _veh setvariable ["zlt_ropes", [], true];
    _veh animateDoor ['door_R', 0];
    _veh animateDoor ['door_L', 0];
    
    };
    
    zlt_fnc_removeropes = {
    (vehicle player) call zlt_fnc_cutropes;
    };
    
    zlt_fnc_createropes = {
    zlt_mutexAction = true;
    (vehicle player) call zlt_fnc_tossropes;
    zlt_mutexAction = false;
    };
    
    
    
    player createDiarySubject [sTR_SCRIPTS_NAME,STR_SCRIPTS_NAME];
    player createDiaryRecord [sTR_SCRIPTS_NAME,[sTR_SCRIPT_NAME, STR_HELP]];
    
    player addAction["<t color='#ffff00'>"+STR_TOSS_ROPES+"</t>", zlt_fnc_createropes, [], -1, false, false, '','[] call zlt_fnc_ropes_cond'];
    player addAction["<t color='#ff0000'>"+STR_CUT_ROPES+"</t>", zlt_fnc_removeropes, [], -1, false, false, '','not zlt_mutexAction and count ((vehicle player) getvariable ["zlt_ropes", []]) != 0'];
    player addAction["<t color='#00ff00'>"+STR_FAST_ROPE+"</t>", zlt_fnc_fastrope, [], 15, false, false, '','not zlt_mutexAction and count ((vehicle player) getvariable ["zlt_ropes", []]) != 0 and player != driver vehicle player'];
    
    player addEventHandler ["Respawn", {
    player addAction["<t color='#ffff00'>"+STR_TOSS_ROPES+"</t>", zlt_fnc_createropes, [], -1, false, false, '','[] call zlt_fnc_ropes_cond'];
    player addAction["<t color='#ff0000'>"+STR_CUT_ROPES+"</t>", zlt_fnc_removeropes, [], -1, false, false, '','not zlt_mutexAction and count ((vehicle player) getvariable ["zlt_ropes", []]) != 0'];
    player addAction["<t color='#00ff00'>"+STR_FAST_ROPE+"</t>", zlt_fnc_fastrope, [], 15, false, false, '','not zlt_mutexAction and count ((vehicle player) getvariable ["zlt_ropes", []]) != 0 and player != driver vehicle player'];
    }];


  12. I have found solution of the problem: http://dev.arma3.com/sitrep-00039

    At least it fixed issue in my case.

    "...

    In case you are experiencing difficulties running the Arma 3 Server tool, please try the following two steps:

    Make sure the steam_appid.txt in the installation folder contains value 107410. Unfortunately the Steam client currently automatically changes this to 233780 with every update of the app. We're trying to solve this with Valve.

    ..."


  13. I have found solution of the problem: http://dev.arma3.com/sitrep-00039

    At least it fixed issue in my case.

    "...

    In case you are experiencing difficulties running the Arma 3 Server tool, please try the following two steps:

    Make sure the steam_appid.txt in the installation folder contains value 107410. Unfortunately the Steam client currently automatically changes this to 233780 with every update of the app. We're trying to solve this with Valve.

    ..."


  14. This looks awesome! I'll definitely give it a shot, but have you looked at the load it puts on the server? As in, is this better than just randomly placing a bunch of empty vehicles yourself in the editor?

    Script itself doesnt demand much from the server. Sure, if your players scatters on the Altis trying to visit as many cities as possible it could create many vehicles (usually 4-5, 8-9 in the big cities) which can cause syncronization lags, but I tested this script in MP games with 50 players and there were no problems with it.


  15. Changing this script to have random fuel should be extremely easy (and a great idea!). Where Zealot creates the vehicle on line 55, just add this after that line.

    _veh setFuel (random 1);
    

    Should set the fuel to random percent between 0 and 1, 0 being empty, 1 being full.

    Right now it is not very good idea, because fuel value now used by script to determine whether vehicle were used by players or not.

    ---------- Post added at 21:21 ---------- Previous post was at 21:09 ----------

    Appears to be the server. First line of the script exits if the script is run on anything other than the server.

    ---------- Post added at 19:33 ---------- Previous post was at 18:49 ----------

    Did a quick test and looks good so far, but a couple of comments/questions.

    1) Looks like it only spawns pickup trucks. Think it's just a matter of adding other civilian options to the _classes array and then selecting one at random from that. Something like:

    _classes = ["C_Offroad_01_F","C_Quadbike_01_F","C_Hatchback_01_F","C_Hatchback_01_sport_F","C_SUV_01_F","C_Van_01_transport_F","C_Van_01_box_F","C_Van_01_fuel_F"];
    ...
    _class = (_classes call BIS_fnc_selectRandom);
    

    2) Be nice to be able to feed the script parameters for the range that spawn/despawn occurs.

    3) Do you 'reset' the variables on these vehicles so if players take them, they don't get cleaned up by despawn?

    1) and 2) will update in the next version.

    3) Script checks fuel state of the vehicles to determine if they were touched by player. If fuel value is not 1, then vehicle was touched and will not be cleaned on despawn.

×