Jump to content

Migal

Member
  • Content Count

    18
  • Joined

  • Last visited

  • Medals

Everything posted by Migal

  1. Hi, I'm having some problem with mikero's tool and path and "PBOPREFIX". My mod is in P:/@A/addons/B I have a subfolder P:/@A/addons/B/data My PBOPREFIX is in "B" folder (is it right? or it goes in "addons" folder?) set as: "p\@A\addons\B" I can get my mod compiled and running but I cannot use relative path. I have to reference functions and icons with @A/addons/B. (ex. @A/addons/B/data/icon.paa) If I use path starting from B (ex. data/icon.paa) Mikero give me a "file not found" error. What am I doing wrong? Thank you
  2. Hi I'm writing a multiplayer mission where partecipating sides that a player can join are selected at mission start. I have a single mission.sqm with 3 platoon (west, east, independent), AI is disabled. Now, In the lobby there are all three side and player can choose over all of them, even the "wrong" one (since this is the default Arma3 behaviour). I tryed but didn't find a way to: - access mission.sqm item and delete the one I don't want (I think this is not possibile). - I don't want to make multiple mission.sqm with the various combination of sides. - Try to hide or lock one side in the lobby. I think that one possibility would be to let player choose also the "wrong" side then move it back to lobby with a notification but I prefer to use this option as last resort. Thank you for your help
  3. Thank you. I got it working, created a custom module and got it call a modified BIS function.
  4. Hi, I need to change a local function inside a BIS function, namely: BIS_fnc_modulesector. It contains a local function: _fnc_threat = { private ["_veh","_coef","_scanCrew","_threat","_score"]; _veh = _this select 0; _coef = _this select 1; _scanCrew = _this select 2; _threat = getarray (configfile >> "cfgvehicles" >> typeof _veh >> "threat"); _score = 0.1; //--- Use non-zero value, so even objects with threat[]={0,0,0} can capture {_score = _score + _x} foreach _threat; _score = _score * _coef; if (isplayer _veh) then {_score = _score * _costPlayersLocal;}; if (_scanCrew) then { { _score = _score + ([_x,_costInfantry,false] call _fnc_threat); if (isplayer _x) then {_score = _score * _costPlayersLocal;}; } foreach (crew _veh - [_veh]); }; _score }; Where called _scanCrew parameter is always passed "true" but I want is always as false. Is it possibile? This is the function called by Sector Module. Thank you
  5. Sorry if I necro this post but is the more relevant to my problem. It is enought to spawn sector modules on server in initserver or I have to call it on client?
  6. Hi, I'm playing with sector control module. I got spawn and remove modules by script but I want to count for sector conquer just unit on foot but I cannot find how. here my script. It just need a marker "mrk_1". if !(isNull sec_0) exitWith{systemChat "esiste"}; _pos = getMarkerPos "mrk_1"; _name = "Noa"; _sides = [west, east]; _trgSize = 50; _logic = (createGroup sideLogic) createUnit ["ModuleSector_F", _pos, [], 0, "NONE"]; //Default setting, which are optional _logic setVariable ["DefaultOwner","-1"]; _logic setVariable ["OnOwnerChange",""]; _logic setVariable ["OwnerLimit","0"]; _logic setVariable ["ScoreReward","0"]; _logic setVariable ["TaskOwner","0"]; _logic setVariable ["Name", _name]; _logic setVariable ["CostInfantry", "1"]; _logic setVariable ["CostWheeled", "1"]; _logic setVariable ["CostTracked", "0"]; _logic setVariable ["CostWater", "0"]; _logic setVariable ["CostAir", "0"]; _logic setVariable ["CostPlayer", "1"]; //Set the sides for the sector _logic setVariable ["sides", _sides]; _logic setVariable[ 'BIS_fnc_initModules_disableAutoActivation', false, true ]; _handle = [ _logic, _trgSize ] spawn { params[ '_logic', '_trgSize' ]; waitUntil { !isNil { _logic getVariable [ 'finalized', nil ] } && { !( _logic getVariable [ 'finalized', true ] ) } }; _logic setVariable [ 'size', _trgSize ]; [ _logic, [], true, 'area' ] call BIS_fnc_moduleSector; _trg = ( _logic getVariable 'areas' ) select 0; _mrk = ( _trg getVariable 'markers' ) select 0; _mrk setMarkerSize [ _trgSize, _trgSize ]; }; _logic setVehicleVarName "sec_0"; sec_0 = _logic; Inside BIS_fnc_sectorModule there is a local function: _fnc_threat = { private ["_veh","_coef","_scanCrew","_threat","_score"]; _veh = _this select 0; _coef = _this select 1; _scanCrew = _this select 2; _threat = getarray (configfile >> "cfgvehicles" >> typeof _veh >> "threat"); _score = 0.1; //--- Use non-zero value, so even objects with threat[]={0,0,0} can capture {_score = _score + _x} foreach _threat; _score = _score * _coef; if (isplayer _veh) then {_score = _score * _costPlayersLocal;}; if (_scanCrew) then { { _score = _score + ([_x,_costInfantry,false] call _fnc_threat); if (isplayer _x) then {_score = _score * _costPlayersLocal;}; } foreach (crew _veh - [_veh]); }; _score }; called localy with third argument always true. If I could define _scancrew to always false I could get the solution but I don't know if it's possibile. One way would be to attach to the module a new function. But I cannot get if working. Any help?
  7. Hi, It I'm building my first little addon. If I create the PBO with BI addonBuilder everything goes well but I need a command line tool to build the addon, so I'm trying to use mikero's. If I build the addon with mikero's makePBO it gives an error for missing files. Missing files are icon picture in a subfolder. The addon line is: icon = "ric_zonedefiner\data\cp.paa" The building command is: and the output is: I tryed to change backslash to slash: mikeros compile well and produce the pbo but using the mod on arma3 give an error for file missing. Thank you for your help.
  8. TL:DR . Simply put. How can I reference a file in a subfolder with mikero's tools?
  9. Hi, I'm working in a multiplayer mission were the server needs a custom module. I wrote the module in a small addon and everything works well. The module is used only by the server but clients cannot connect without the small addon with module info. I don't like that players need to get an addon just for this small bite of information (131 kb). Is there a way to make clients get module definition from the server when they download the mission? I hope I've been clear enought. Thank you
  10. Just one sector control running every time a mission start. At the end of the mission, players have another mission start on the same map on another place.
  11. Hi, I need the server to create a marker at startup just for a side. The command create marker has a channel and creator option. createMarker [name, position, channel, creator] My idea is to have a MP server without AI. I can set channel to 1 (side). Since I don't use AI, what creator can I use to identify Blufor and Opfor? I have placed the command in initServer.sqf. Thank you TLDR: Is there an object of side blufor and opfor at startup?
  12. Thank you. Probably this will be the solution but I have another question. I could get every thing almost working placing 2 soldier with model, damage and collision disabled in a remote island and using that ad creator. If I log as Blufor just the blufor marker exist and if logout than login again neither the blufor marker exist anymore. the same happens If i login as opfor. Any hint why markers get deleted if I logout? this is the code I have in initserver.sqf SideBlufor and SideOpfor are disabledAI.
  13. I wanna create a MP server for sector control. I know there are modules for that, but I need custom option for the module. A single battlefield is made of an init module, synced with 2 bases, bases are synced with the control points. Control points define the area that need to be captured. Every map could contain N battlefield choosen randomly or by the admin.
  14. Yes, I means the editor placed one. thank you
  15. Hi, I got this code from the legacy BIS_fnc_synchronizedObjects function. What the "_x" variable means here? I just know the meaning inside loops. For completeness there the full function. Thank you /* Author: Jiri Wainar Description: Get all objects of given type directly synchronized to the given object. Works in EDEN too. Parameter(s): 0: OBJECT - parent object 1: STRING or ARRAY - class name filter; 1 or more classnames of objects we are interested about 2: BOOL - precise match; default: true - only precise class names are considered, if false, inheritance is considered Returns: ARRAY - array of synchronized objects Example: [BIS_Poliakko,"LocationArea_F"] call BIS_fnc_synchronizedObjects; */ private _parent = _this param [0,objNull,[objNull]]; private _classnames = _this param [1,[],[[],""]]; private _preciseMatch = _this param [2,true,[true]]; private _output = []; private _synced = objNull; if (_classnames isEqualType "") then { _classnames = [_classnames]; }; private _condition = if (_preciseMatch) then { {typeOf _synced == _x}; } else { {_synced isKindOf _x}; }; private _objects = if (is3DEN) then { (get3DENConnections _parent select {_x select 0 == "Sync"}) apply {_x select 1} } else { synchronizedObjects _parent }; { _synced = _x; if (_condition count _classnames > 0) then { _output pushBack _synced; }; } forEach _objects; _output
  16. Hi, I'm trying to make my own module. I cannot understand what "Sync", "Synced" parameters and "class Units: Units"do. Thank you class My_Module: Module_F { class Attributes: AttributesBase { // Arguments shared by specific module type (have to be mentioned in order to be present) class Units: Units { property = "myTag_ModuleNuke_Units"; }; }; class ModuleDescription: ModuleDescription { description = "Short module description"; // Short description, will be formatted as structured text sync[] = {"LocationArea_F"}; // Array of synced entities (can contain base classes) class LocationArea_F { description[] = { // Multi-line descriptions are supported "First line", "Second line" }; position = 1; // Position is taken into effect direction = 1; // Direction is taken into effect optional = 1; // Synced entity is optional duplicate = 1; // Multiple entities of this type can be synced synced[] = {"BLUFORunit","AnyBrain"}; // Pre-define entities like "AnyBrain" can be used. See the list below }; };
  17. Hi, what is the "commands" option under game option - difficulty user for?
×