Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Animatek

Pages: [1] 2 3 4
1
Are you using the external A3Wasteland_settings folder? Because if so, the admins.sqf file contained in it overrides the server \ admins.sqf file inside the mission file.

2
Questions & Suggestions / Re: INDY as Neutral?
« on: Jan 14, 2019, 07:30 PM »
You are welcome. By the way, that is not an example of the code, it is the default one in A3Wasteland.

You must define the relationships between Independents and the other factions.


3
Questions & Suggestions / Re: INDY as Neutral?
« on: Jan 14, 2019, 05:09 AM »
server\functions\relations.sqf

Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************

// @file Version: 1.0
// @file Name: relations.sqf
// @file Author: [404] Deadbeat
// @file Created: 20/11/2012 05:19

if (!isServer) exitWith {};

diag_log "WASTELAND SERVER - Initializing Server Relations";

BLUFOR setFriend [BLUFOR, 1];
BLUFOR setFriend [OPFOR, 0];
BLUFOR setFriend [INDEPENDENT, 0];

OPFOR setFriend [BLUFOR, 0];
OPFOR setFriend [OPFOR, 1];
OPFOR setFriend [INDEPENDENT, 0];

INDEPENDENT setFriend [BLUFOR, 0];
INDEPENDENT setFriend [OPFOR, 0];
INDEPENDENT setFriend [INDEPENDENT, 1];

CIVILIAN setFriend [BLUFOR, 0];
CIVILIAN setFriend [OPFOR, 0];
CIVILIAN setFriend [INDEPENDENT, 0];

Change relationship

4
Editing & Coding / Re: AH-9 Pawnee AA Beep Warning
« on: Jan 13, 2019, 03:13 AM »
Or maybe you'll find a way to add a radar to that helicopter. If that can be done, I'm sure it will be in the vehicleSetup.sqf file

Something like:

Code: [Select]
case ({_class isKindOf _x} count ["B_Heli_Light_01_F", "B_Heli_Light_01_armed_F"] > 0):

{ // Add something as close to a radar here, I don't know.
_vehicle addWeaponRadar? ["This_is_just_an_example", [-1]];
};

5
Editing & Coding / Re: AH-9 Pawnee AA Beep Warning
« on: Jan 13, 2019, 02:23 AM »
What you ask is something complicated to include in any configuration, be it the server or the mission. I recommend that you install an addon that has similar helicopters that do have missile approach detectors.

The fact that this helicopter does not have that type of alert is part of the mechanics of the game, where you must strategically economize the available resources according to the capabilities of the available technology. I mean, do not take that helicopter to hostile territory where there may be AA defenses.

6
@AgentRev, I'm sorry, master, if I make you cry... this is my attempt of coding

Code: [Select]
private ["_static"];
private _static = cursorObject;
private _manager = nearestObject [player, "Land_SatellitePhone_F"];
private _ManagerPosition = getpos _manager;
private _distance = _static distance2d _ManagerPosition;
//Get manager level
private _ManagerLevel = _manager getVariable ["ManagerLevel", 1];
//set default base radius for level 1 manager
private _BaseRadius = 10;
//set base radius based on manager level
switch (_ManagerLevel) do
{
case (2):
{
_BaseRadius = 20;
};
case (3):
{
_BaseRadius = 30;
};
case (4):
{
_BaseRadius = 40;
};
case (5):
{
_BaseRadius = 50;
};
};

if ({_static iskindof _x} count[
"B_SAM_System_02_F",
"B_HMG_01_A_F",
"B_GMG_01_A_F",
"B_SAM_System_01_F",
"B_AAA_System_01_F",
"O_HMG_01_A_F",
"O_GMG_01_A_F",
"I_HMG_01_A_F",
"I_GMG_01_A_F"]>0) && (!({_static iskindof _x} count["B_Static_Designator_01_F","O_Static_Designator_02_F"])>0) then     // except remote laser designator

if (_static getVariable ["R3F_LOG_disabled", false]) then // if is unLocked
{
_static setcombatMode="BLUE"; // Force Do Not Attack while is unLocked
_static setbehavior="CARELESS"; // and avoid pointing enemies
};
if (_static _distance > _BaseRadius) then // Check distance from player base, kinda.
{
_static setVariable ["R3F_LOG_disabled", false, true]; // keeping it unlocked and in "BLUE" and "CARELESS" mode, if it is away from player base
playSound "FD_CP_Not_Clear_F";
["Please, lock this in your base.", 5] call mf_notify_client;
};
else
if (_static _distance <= _BaseRadius) then // Now is functionally
{
if (_static getVariable ["R3F_LOG_disabled", false]) then // wait for it...
_static setcombatMode="RED";
_static setbehavior="COMBAT";
};

how bad is it?

7
Could you, please, write the code for me? I do not know how to do it. All I did here was apply logic according to what I want. Mainly how to define _BaseRadius as the example I shared above does. Because I do not know if putting _BaseRadius will be enough if it is already defined in the BoS functions.

8
I have trouble understanding what you want to do

basically it is to force the players to use autonomous static weapons only as a defensive weapon in their bases; so that they are not left unattended when the players leave their bases; and that they do not use it as an offensive weapon or traps in stores, ATMs or near enemy territories.

What I need is to force the behavior of the AI only from autonomous static weapons so that it does not open fire until they are locked inside the bases of the players.

The logic (obviously not the code) that I suggest is:

Code: [Select]
if _veh isKind (any IA static turrets gun); // except remote laser designator
and
_veh R3F_isLocked = false; // in this condition
then
force _veh combatMode="BLUE"; // Force Do Not Attack while is unLocked
and
force behavior="CARELESS"; // to avoid pointing enemies

if _veh distance_to "Land_SatellitePhone_F" > _BaseRadius; // Check distance from player base, kinda.
then
force _veh R3F_isLocked = false; // keeping it in "BLUE" and "CARELESS" mode away from player base

if _veh distance_to "Land_SatellitePhone_F" <= _BaseRadius; //
waitUntil
_veh R3F_isLocked = true; // wait for conditions
then
force _veh combatMode="RED"; // Now is functionally
force _veh behavior="COMBAT"


The thing is I don't know how write this for make it work, and I don't know where put the code. Now do you get it?

9
Subject of greater complexity.
I urge my players to lock and use their autonomous weapons within their bases (in my version I use the BoS addon) as an exclusive defensive purpose, and thus avoid being left near the stores, ATMs, or enemy bases in a troll plan.

Would it be possible to force the AI not to attack until they are locked, and in turn these can only be locked within a radius close to the object that defines the base of the player (the satellite phone, in this case)?

Something like:
If case {static autonomous}
If distance_to "Land_SatellitePhone_F" is_not (less than or equal) than actual_BaseRadius*, then force R3F_islocked = false;
until R3F_ isLocked = true; force "green" (or the most pacifist color)
Sorry for the mess, but I hope you get the idea. And I do not know where I would put this code. LOL. God! I have to learn to code in ArmA 3!

*that number must be the current radius of each base so that it is always inside and so they can be resupplied and rearmed from the BoS menu.


For example:
This is the code used to detect the radius of the base.
Code: [Select]
// @file Version:
// @file Name:
// @file Author: Cael817, all credit to Killzone Kid Edited by: BIB_Monkey
// @file Created:
private _manager = nearestObject [player, "Land_SatellitePhone_F"];
private _ManagerPosition = getpos _manager;
//Get manager level
private _ManagerLevel = _manager getVariable ["ManagerLevel", 1];
//set default base radius for level 1 manager
private _BaseRadius = 10;
//set base radius based on manager level
switch (_ManagerLevel) do
{
case (2):
{
_BaseRadius = 20;
};
case (3):
{
_BaseRadius = 30;
};
case (4):
{
_BaseRadius = 40;
};
case (5):
{
_BaseRadius = 50;
};
};
{
if (!local _x) then
{
private _setOwner_time = time;
[_x, "setOwnerTo", player] call R3F_LOG_FNCT_exec_commande_MP; // Requires R3F 3.1
waitUntil {local _x || time > _setOwner_time + 1.5};
};

_x setHit ["light_1_hitpoint", 0];
_x setHit ["light_2_hitpoint", 0];
_x setHit ["light_3_hitpoint", 0];
_x setHit ["light_4_hitpoint", 0];
_x setHit ["light_1_hit", 0];
_x setHit ["light_2_hit", 0];
_x setHit ["light_3_hit", 0];
_x setHit ["light_4_hit", 0];
_x setVariable ["lights", "on", true];
} forEach nearestObjects [_ManagerPosition, [
"Static",
"Thing"
], _BaseRadius, true];

hint "Lights ON";

It is possible that more than one player intends to lock one of his autonomous static weapons within the area of an enemy base; but I think that the base system itself does not allow it; since the area must belong to you for it.

10
Editing & Coding / Re: Gear Loadouts
« on: Jan 11, 2019, 06:23 PM »
By the way, the code you gave me for this works perfectly. Thank you! :D

11
Editing & Coding / Re: Gear Loadouts
« on: Jan 11, 2019, 06:22 PM »
That does not bother me for now.
The backpackonchest in my case, I use it to spawn the first time; to be able to appear with parachutes, both in spawn beacons and on towns. (I removed the magical parachute and replaced it with Advanced Urban Rappelling), in order to increase the complexity of those who usually fly planes and helicopters.
Also with the ACE3 they can do FRIES from helicopters. It is only because of that, to increase the difficulty and strengthen teamwork.
In the probable case of losing items because of the backpackonchest, they are more than warned.

Besides, it would be a lot of hassle to modify the DB (which works very well) just for that.
Do you know that it would be interesting in that case? that A3Wasteland had its own integrated BackPackOnChest version.

Think about it

12
ahhahahha no...

The thing is that our users play divided into factions; I mean, they believe their NATO or CSAT role in the community. Something similar to Horde and Alliance in WoW. But sometimes a frustrated player takes advantage of that "vulnerability" to change factions and, in revenge for something, they locate enemy bases, break or steal something, and wait for the next restart to continue playing on their side. We pursue that kind of behavior and punish it, but it's better if I can avoid it from the mechanism of the game. Remember that it is the only A3Wasteland server that can be accessed and all his investment of time is there, it is hard to lose something due to indiscipline.

I have tried to imitate the "onload" code, but the client crashes or does not load. This beats me.

You may consider adding that code in an upcoming update of A3Wasteland as an optional, which can be activated and deactivated in the main_config. Something like

Code: [Select]
A3W_SaveLockFaction = 1 // In case your users are a few assholes.

13
@AgentRev:

Using the playerinfo\LastSide table from DB, can I lock players in their a faction between server restarts? If I can, how?

Greatings

14
Editing & Coding / Re: Using gunstore warning for territory
« on: Jan 06, 2019, 09:16 PM »
Look, I'm going to show you a bit of logic, and then try to solve the enigma of the code by yourself. I'm not a programmer, so do not expect much from me. I hope it serves as a guide.
In territory \ server \ monitorTerritories.sqf there is an alert system when the territory starts to be captured. In my case, for some reason it is disabled...

Code: [Select]
// Trigger for when a capture of a territory has started
_onCaptureStarted =
{
private ["_territoryDescriptiveName", "_ownerTeam", "_msg", "_sideObject", "_descriptiveTeamName"];

_territoryDescriptiveName = _this select 0;
_ownerTeam = _this select 1;

/*
if (_ownerTeam != "") then
{
_sideObject = [_ownerTeam] call _sideObjectForSideStr;
_descriptiveTeamName = [_ownerTeam] call _getTeamName;
_msg = format["Your territory at %1 is being captured by %2!", _territoryDescriptiveName, _descriptiveTeamName];
[[_msg], "A3W_fnc_territoryActivityHandler", _sideObject, false] call A3W_fnc_MP;
};
*/
This is where you must merge the code from createGunStoreMarkers.sqf



Code: [Select]
//Used to set the status of each store.
_setStatus =
{
if(_status select (_this select 0) == (_this select 1)) exitWith {};

_markerName = format ["marker_shop_desc_%1",_x];
_markerNameZone = format ["marker_shop_zone_%1", _gunStores select (_this select 0)];
_markerNameDescription = format ["marker_shop_desc_%1", _gunStores select (_this select 0)];
_npcPos = getPosATL _x;
switch(_this select 1) do {
case "EMPTY": {
_markerNameZone setmarkerColorLocal _col_empty;
_markerNameDescription setmarkerColorLocal _col_empty;
deleteMarkerLocal _markerName;
_marker = createMarkerLocal [_markerName, _npcPos];
_markerName setMarkerShapeLocal "ICON";
_markerName setMarkerTypeLocal "mil_dot";
_markerName setMarkerColorLocal _col_empty;
_markerName setMarkerSizeLocal [1,1];
};
case "ENEMY": {
_markerNameZone setmarkerColorLocal _col_enemy;
_markerNameDescription setmarkerColorLocal _col_enemy;
_markerNameDescription setMarkerTextLocal "GUN STORE (Enemies)";
};
case "FRIENDLY": {
_markerNameZone setmarkerColorLocal _col_friendly;
_markerNameDescription setmarkerColorLocal _col_friendly;
_markerNameDescription setMarkerTextLocal "GUN STORE (Allies)";
};
case "MIXED": {
_markerNameZone setmarkerColorLocal _col_mixed;
_markerNameDescription setmarkerColorLocal _col_mixed;
_markerNameDescription setMarkerTextLocal "GUN STORE (Enemies and Allies)";
};
};

if (["A3W_gunStoreIntruderWarning"] call isConfigOn) then
{
if((_this select 2) && ((_this select 1) in ["ENEMY", "MIXED"])) then {
hintSilent parseText format ["<t size='2' color='#ff0000'>%1</t><br/><br/>%2.","¡AVISO!","¡Enemigos en el área!"];
};
};

_status set [_this select 0, _this select 1];
};

if (["A3W_showGunStoreStatus"] call isConfigOn) then
{
//Check each store to see if their state has changed and then calls the update function to make the display the correct state.
showmarkers = true;
while {showmarkers} do
{
{
_npc = _x;
_friendlyCount = 0;
_enemyCount = 0;

{
if (isPlayer _x && alive _x && _x distance _npc < _radius) then
{
if ([_x, player] call A3W_fnc_isFriendly) then
{
_friendlyCount = _friendlyCount + 1;
}
else
{
_enemyCount = _enemyCount + 1;
};
};
} forEach playableUnits;

if (player distance _npc < _radius) then
{
if(_enemyCount > 0) then
{
if (_friendlyCount > 0) then
{
[_forEachIndex, "MIXED", true] call _setStatus;
}
else
{
[_forEachIndex, "ENEMY", true] call _setStatus;
};
}
else
{
[_forEachIndex, "FRIENDLY", true] call _setStatus;
};
}
else
{
if (_enemyCount > 0) then
{
if (_friendlyCount > 0) then
{
[_forEachIndex, "MIXED", false] call _setStatus;
}
else
{
[_forEachIndex, "ENEMY", false] call _setStatus;
};
}
else
{
if (_friendlyCount > 0) then
{
[_forEachIndex, "FRIENDLY", false] call _setStatus;
}
else
{
[_forEachIndex, "EMPTY", false] call _setStatus;
};
};
};
} forEach _gunStores;

sleep 1;
};
};



This says what conditions are met for each represented color (defined above, at the beginning of the original .SQF). You must change the format of
Code: [Select]
_markerName
_markerNameZone
_markerNameDescription
and etc.
by the definition of the territory in question. (I hope my idea is not diluted in the translation)

Basically it is to add only the part of the colors and those conditions to the first scrip that I showed you, the one that is commented, evidently changing your deficiones and adapting them to those of the territories. Got it?

15
Editing & Coding / Re: Using gunstore warning for territory
« on: Jan 04, 2019, 09:13 PM »
I will using "fake" gunstore for the moment, but if someone have knowledge to introduce a clean mecanism to improve capture system it could be nice ;)

Please, make public what you did.
I use the random single-territory system, it would be nice to have that kind of early warning.

Pages: [1] 2 3 4