Jump to content

Re-Worked WAI 0.173 - Supported System


Recommended Posts

Check your RPT log and report back please :)

 

Edit: My bad, i actually pushed some wrong files that weren't tested yet. I'll fix them a.s.a.p. and will start a branch future development to a testbranch before releasing.

Link to comment
Share on other sites

Check your RPT log and report back please :)

 

Edit: My bad, i actually pushed some wrong files that weren't tested yet. I'll fix them a.s.a.p. and will start a branch future development to a testbranch before releasing.

 

Tested the files now. Should all be good now. Please re-download.

Link to comment
Share on other sites

Redownloaded your latest files. Getting these errors. So many :unsure:

 

I`m on Epoch 1.0.5.1 Arma 125548

22:23:11 Error in expression <call BIS_fnc_selectRandom; };
default			: { _aicskill = ai_skill_random call BIS>
22:23:11   Error position: <: { _aicskill = ai_skill_random call BIS>
22:23:11   Error Invalid number in expression
22:23:11 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 99
22:23:11 Error in expression <call BIS_fnc_selectRandom; };
default			: { _aicskill = ai_skill_random call BIS>
22:23:11   Error position: <: { _aicskill = ai_skill_random call BIS>
22:23:11   Error Invalid number in expression
22:23:11 File z\addons\dayz_server\WAI\compile\spawn_group.sqf, line 99
22:23:11 Error in expression <call BIS_fnc_selectRandom; };
default			: { _aicskill = ai_skill_random call BIS>
22:23:11   Error position: <: { _aicskill = ai_skill_random call BIS>
22:23:11   Error Invalid number in expression
22:23:11 File z\addons\dayz_server\WAI\compile\spawn_static.sqf, line 121
22:23:11 Error in expression <call BIS_fnc_selectRandom; };
default			: { _aicskill = ai_skill_random call BIS>
22:23:11   Error position: <: { _aicskill = ai_skill_random call BIS>
22:23:11   Error Invalid number in expression
22:23:11 File z\addons\dayz_server\WAI\compile\spawn_static.sqf, line 121
22:23:11 Error in expression <killarray;

{
_gunner setSkill [_x,0.7]
_gunner2 setSkill [_x,0.7]
} forEach _sk>
22:23:11   Error position: <_gunner2 setSkill [_x,0.7]
} forEach _sk>
22:23:11   Error Missing ;
22:23:11 File z\addons\dayz_server\WAI\compile\heli_para.sqf, line 78
22:23:11 Error in expression <killarray;

{
_gunner setSkill [_x,0.7]
_gunner2 setSkill [_x,0.7]
} forEach _sk>
22:23:11   Error position: <_gunner2 setSkill [_x,0.7]
} forEach _sk>
22:23:11   Error Missing ;
22:23:11 File z\addons\dayz_server\WAI\compile\heli_para.sqf, line 78
22:23:11 Error in expression <\compile\heli_patrol.sqf"
if (isServer) {

private ["_wpnum","_radius","_gunner2>
22:23:11   Error position: <{

private ["_wpnum","_radius","_gunner2>
22:23:11   Error Missing ;
22:23:11 File z\addons\dayz_server\WAI\compile\heli_patrol.sqf, line 1
22:23:11 Error in expression <\compile\heli_patrol.sqf"
if (isServer) {

private ["_wpnum","_radius","_gunner2>
22:23:11   Error position: <{

private ["_wpnum","_radius","_gunner2>
22:23:11   Error Missing ;
22:23:11 File z\addons\dayz_server\WAI\compile\heli_patrol.sqf, line 1
22:23:11 Error in expression <mpile\vehicle_patrol.sqf"
if (isServer) {

private ["_gunner", "_wpnum","_radius>
22:23:11   Error position: <{

private ["_gunner", "_wpnum","_radius>
22:23:11   Error Missing ;
22:23:11 File z\addons\dayz_server\WAI\compile\vehicle_patrol.sqf, line 1
22:23:11 Error in expression <mpile\vehicle_patrol.sqf"
if (isServer) {

private ["_gunner", "_wpnum","_radius>
22:23:11   Error position: <{

private ["_gunner", "_wpnum","_radius>
22:23:11   Error Missing ;
22:23:11 File z\addons\dayz_server\WAI\compile\vehicle_patrol.sqf, line 1
22:23:11 "WAI: AI Config File Loaded"
22:23:11 "WAI: AI Monitor Started"
22:23:11 "WAI: Mission Config File Loaded"
22:23:11 "WAI: Starting AI Missions Moniter"
Link to comment
Share on other sites

21:14:55 "WAI: Spawned a group of 1 bandits at [11477.8,12790.4,0]"
21:14:55 Error in expression <select 1) - 15, 8]],"M2StaticMG","easy",Random",1,2,"Random","Random",true] call>
21:14:55   Error position: <Random",1,2,"Random","Random",true] call>
21:14:55   Error random: Type String, expected Number
21:14:55 File z\addons\dayz_server\WAI\missions\missions\mayors_mansion.sqf, line 26

 Missions not spawning, getting this error.

Link to comment
Share on other sites

Thanks for the fast fix,

my eyes are obviously not open anymore :D.

 

BTW its out of your latest download link.

 

I know, blame it on rushed testing. Fixed in on github now.

 

Is it possible to add a mission what runs apart the normal wai cycle to fill a map-addition with ai? This would be a nice feature - maybe with an extra "staticmissionInit.sqf" out of the dynamic mission-cycle and without the despawn timer.

 

Yeah the custom_spawns are intended for just that. Enable it, fill the custom_spawns.sqf with whatever you like (examples are given) and they should spawn on server start.

Link to comment
Share on other sites

Still getting this error with the latest files

 0:46:39 Error in expression <(_x select 0),(_x select 1)];
} forEach _aicskill;


ai_vehicle_units 		= (ai_ve>
 0:46:39   Error position: <_aicskill;


ai_vehicle_units 		= (ai_ve>
 0:46:39   Error Undefined variable in expression: _aicskill
 0:46:39 File z\addons\dayz_server\WAI\compile\vehicle_patrol.sqf, line 48
Link to comment
Share on other sites

 

Still getting this error with the latest files

 0:46:39 Error in expression <(_x select 0),(_x select 1)];
} forEach _aicskill;


ai_vehicle_units 		= (ai_ve>
 0:46:39   Error position: <_aicskill;


ai_vehicle_units 		= (ai_ve>
 0:46:39   Error Undefined variable in expression: _aicskill
 0:46:39 File z\addons\dayz_server\WAI\compile\vehicle_patrol.sqf, line 48

@f3cuk, DZMS & EMS had this problem when arma2oa moved up to the last pre-steam version 112555.

 

I'm not clever enough to really understand what the error means but, in DZMS this line was added to DZMSFunctions.sqf:

_skill = _this select 0;
 
You may want to read this thread and then follow the links to Vampires git with the modified files half way down page 2:
 
Hope this helps..
Link to comment
Share on other sites

Still getting this error with the latest files

 0:46:39 Error in expression <(_x select 0),(_x select 1)];
} forEach _aicskill;


ai_vehicle_units 		= (ai_ve>
 0:46:39   Error position: <_aicskill;


ai_vehicle_units 		= (ai_ve>
 0:46:39   Error Undefined variable in expression: _aicskill
 0:46:39 File z\addons\dayz_server\WAI\compile\vehicle_patrol.sqf, line 48

 

Hi Yuri, are you spawning this yourself with custom_spawner.sqf or is it one of the missions that is causing this? (maybe bandit base?)

 

 

@f3cuk, DZMS & EMS had this problem when arma2oa moved up to the last pre-steam version 112555.

 

I'm not clever enough to really understand what the error means but, in DZMS this line was added to DZMSFunctions.sqf:

_skill = _this select 0;

 

You may want to read this thread and then follow the links to Vampires git with the modified files half way down page 2:

 

Hope this helps..

 

Hi RedBaron,

That line makes that it sets the _skill variable to the first input that it gets.

So if you use something like:

["Hi", 25, true, "easy"] call vehicle_patrol;

In vehicle patrol file

_skill = _this select 0; // -> Hi
_number = _this select 1; // -> 25
_use_something = _this select 2; // -> true
_difficulty = _this select 3; // -> easy

In this case it seems nothing to do with that cause both _skill is defined and _aicskill should have an auto fallback to ai_skill_random call BIS_fnc_selectRandom;

 

--

 

Edit: I see i did not declare _aiskill as a private variable.

 

Try this as vehicle_patrol.sqf

if (isServer) then {

    private ["_aicskill", "_gunner", "_wpnum","_radius","_skillarray","_startingpos","_veh_class","_veh","_unitGroup","_pilot","_skill","_position","_wp"];

    _position                 = _this select 0;
    _startingpos             = _this select 1;
    _radius                 = _this select 2;
    _wpnum                     = _this select 3;
    _veh_class                 = _this select 4;
    _skill                     = _this select 5;
    _skillarray             = ["aimingAccuracy","aimingShake","aimingSpeed","endurance","spotDistance","spotTime","courage","reloadSpeed","commanding","general"];

    switch (_skill) do {
        case "easy"        : { _aicskill = ai_skill_easy; };
        case "medium"     : { _aicskill = ai_skill_medium; };
        case "hard"     : { _aicskill = ai_skill_hard; };
        case "extreme"     : { _aicskill = ai_skill_extreme; };
        case "Random"     : { _aicskill = ai_skill_random call BIS_fnc_selectRandom; };
        default { _aicskill = ai_skill_random call BIS_fnc_selectRandom; };
    };

    _unitGroup                 = createGroup east;
    _pilot                     = _unitGroup createUnit ["Bandit1_DZ", [0,0,0], [], 1, "NONE"];
    [_pilot]                 joinSilent _unitGroup;

    ai_vehicle_units         = (ai_vehicle_units + 1);

    _veh                     = createVehicle [_veh_class, [(_startingpos select 0),(_startingpos select 1), 0], [], 0, "CAN_COLLIDE"];
    _veh                     setFuel 1;
    _veh                     engineOn true;
    _veh                     setVehicleAmmo 1;
    _veh                     addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}];
    _veh                     allowCrewInImmobile true;
    _veh                     lock true;

    PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_veh];

    _pilot assignAsDriver     _veh;
    _pilot moveInDriver     _veh;

    _gunner                 = _unitGroup createUnit ["Bandit1_DZ", [0,0,0], [], 1, "NONE"];
    _gunner                 assignAsGunner _veh;
    _gunner                 moveInTurret [_veh,[0]];
    [_gunner]                 joinSilent _unitGroup;
    
    {
        _gunner setSkill [(_x select 0),(_x select 1)];
    } forEach _aicskill;


    ai_vehicle_units = (ai_vehicle_units + 1);

    {
        _pilot setSkill [_x,1]
    } forEach _skillarray;

    {
        _x addweapon "Makarov";
        _x addmagazine "8Rnd_9x18_Makarov";
        _x addmagazine "8Rnd_9x18_Makarov";
    } forEach (units _unitgroup);

    {
        _x addEventHandler ["Killed",{[_this select 0, _this select 1, "vehicle"] call on_kill;}];
    } forEach (units _unitgroup);

    [_veh] spawn veh_monitor;

    _unitGroup                 allowFleeing 0;
    _unitGroup                 setBehaviour "AWARE";
    _unitGroup                 setCombatMode "RED";

    if(_wpnum > 0) then {

        for "_x" from 1 to _wpnum do
        {        
            _wp = _unitGroup addWaypoint [[(_position select 0),(_position select 1),0],_radius];
            _wp setWaypointType "SAD";
            _wp setWaypointCompletionRadius 200;
        };

    };

    _wp = _unitGroup addWaypoint [[(_position select 0),(_position select 1),0],100];
    _wp setWaypointType "CYCLE";
    _wp setWaypointCompletionRadius 200;

    waitUntil{clean_running_mission};

    if(clean_running_mission) then {
        deleteVehicle _veh;
        deleteVehicle _gunner;
        deleteVehicle _pilot;
    };

};
Link to comment
Share on other sites

nice work with updating the wai system f3cuk

 

i was wondering if its possible that the vehicles get deleted each server restart
i want people to be able to get the vehicles as a reward and sell them to the traders even.

i just want them gone at the server restart otherwise the map is gonna be flooded with vehicles in no time.

 

thx rob

Link to comment
Share on other sites

Hi Rob,

One of the great features of WAI is that "captured" vehicles will get written to the database, meaning they will not automatically remove on restart. Not writing them to the database will make them delete after restart but will also make them non-sellable. The thing we did to counter the problem you described was simply run a script that removes all empty / unlocked vehicles on restart. This helps keep the map clean and as a bonus respawns new vehicles randomly making sure your coastal area always has plenty of them.

 

--

 

Link to comment
Share on other sites

Why should not writing them to DB make them un-sellable per se?

 

They only need to have ObjectID and ObjectUID and those could be set independently from the DB write.

 

Did not know that. Thanks :)

@robvdheijden: I'll look into making an option that stops vehicles from saving to the database.

Link to comment
Share on other sites

In ai_config you just add it to the ai_wep_assault, ai_wep_machine or ai_wep_sniper like below.

 

,["MAAWS","MAAWS_HEAT"],["RPG18","RPG18"],["Stinger","Stinger"]

 

So it's basically just ,["Weapon","Ammo"],["NextWeapon","NextAmmo"]

 

Then just make sure there's a [ and a ] at the start and end of all the weapons, so like below.

 

ai_wep_assault = [["Weapon","Ammo"],["NextWeapon","NextAmmo"]]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...