Jump to content

[RELEASE] WAI 2.2.6


JasonTM

Recommended Posts

  On 3/29/2020 at 3:47 PM, Schalldampfer said:

Next, I have made a script to let AIs to fire flare at night.

1. Create this file, dayz_server/WAI/compile/flare_fire.sqf

  Reveal hidden contents

This script will add an AK74/GP25 to the leader of the group, which is the argument of this function.
He'll fire a flare round toward a player close to him at night.

2. add this in dayz_server/WAI/init.sqf

3. Now activate this script in spawn_group.sqf, to make AI to fire flare rounds.
Add this code

just before 

in dayz_server/WAI/compile/spawn_group.sqf

To limit the AI levels and gear type, I put this code instead.

 

Reference:https://forums.bohemia.net/forums/topic/106785-ai-shoots-flares-script-version-13/

Expand  

I was wondering about this:

if ((_skill in ["extreme","hard","random"]) && (_gun in [0,1,"random"])) then {_unitGroup spawn WAI_flare_fire;};

Not sure what this does or what part of the spawn_group.sqf  it goes.

Does this replace existing code?

 

Thanks.

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...
  • 2 months later...

Hey there,

I'm having some trouble with my static crate spawns. I'm using my config from 1.0.6.2 for my 1.0.7 server. Sometimes they load in and other times they don't. I get this error in the RPT when they don't"

_crate call wai_crate_setup;
_crate1 call wai_crate_>
16:06:52   Error position: <wai_crate_setup;
_crate1 call wai_crate_>
16:06:52   Error Undefined variable in expression: wai_crate_setup
16:06:52 File z\addons\dayz_server\WAI\static\default.sqf, line 708
16:06:53 Error in expression < + (wai_num_mags select 0))];
};
};

Does anyone know what I'm doing wrong? My crate config is below:

Thanks!

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 5/3/2021 at 12:53 AM, Vladick said:

Hey there,

I'm having some trouble with my static crate spawns. I'm using my config from 1.0.6.2 for my 1.0.7 server. Sometimes they load in and other times they don't. I get this error in the RPT when they don't"

_crate call wai_crate_setup;
_crate1 call wai_crate_>
16:06:52   Error position: <wai_crate_setup;
_crate1 call wai_crate_>
16:06:52   Error Undefined variable in expression: wai_crate_setup
16:06:52 File z\addons\dayz_server\WAI\static\default.sqf, line 708
16:06:53 Error in expression < + (wai_num_mags select 0))];
};
};

Does anyone know what I'm doing wrong? My crate config is below:

Thanks!

  Reveal hidden contents

 

Expand  

Your problem is right here:

16:06:52   Error Undefined variable in expression: wai_crate_setup

I see in your spoilered part that your crate config calls on it many times, but where is it defined?

Take a look through your old WAI files and search for wai_crate_setup and find where it was defined. As I don't have your full crate config file, I cannot look through the whole thing, but if it is defined in there, it is being defined late for the script, causing issues so it would need to be defined earlier.

Link to comment
Share on other sites

  On 5/5/2021 at 12:49 PM, Voltan said:

Your problem is right here:

16:06:52   Error Undefined variable in expression: wai_crate_setup

I see in your spoilered part that your crate config calls on it many times, but where is it defined?

Take a look through your old WAI files and search for wai_crate_setup and find where it was defined. As I don't have your full crate config file, I cannot look through the whole thing, but if it is defined in there, it is being defined late for the script, causing issues so it would need to be defined earlier.

Expand  

Thanks for your help! It appears that that the wai_crate_setup code is missing. I grabbed it from another post:

 wai_crate_setup = {
        private ["_crate"];
        _crate = _this;
        _crate setVariable ["ObjectID","1",true];
        _crate setVariable ["ObjectUID", "1", true];
        _crate setVariable ["permaLoot",true];
        clearWeaponCargoGlobal _crate;
        clearMagazineCargoGlobal _crate;
        dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_crate];
        _crate addEventHandler ["HandleDamage", {}];
        _crate enableSimulation false;
  };

I will place it at the top of the default.sqf and see if that fixes it.

Thanks again!

Link to comment
Share on other sites

  On 5/5/2021 at 12:49 PM, Voltan said:

Your problem is right here:

16:06:52   Error Undefined variable in expression: wai_crate_setup

I see in your spoilered part that your crate config calls on it many times, but where is it defined?

Take a look through your old WAI files and search for wai_crate_setup and find where it was defined. As I don't have your full crate config file, I cannot look through the whole thing, but if it is defined in there, it is being defined late for the script, causing issues so it would need to be defined earlier.

Expand  

Welp, it looks like that fixed the wai_crate_setup error but I am still getting a bunch of WAI crate errors. Any idea about the ones in the spoiler below?

Should I be using this to spawn crates?

[[
    [_loot,"USVehicleBox",[0,0]], // [loot variable, crate classname, 2d offsets]
    [[0,0,[3,crate_items_crop_raider],0,0],crates_large,[0,0,0]], // [loot variable, crate array, 3d offsets]
    [[0,0,0,0,0],crates_large,[0,0],60] // [loot array, crate array, 2d offsets, optional direction]
],_position] call wai_spawnCrate;

Rather than this?

_crate = createVehicle ["USVehicleBox",[13697.3,2937.91,0.001],[],0,"CAN_COLLIDE"];

_crate1 = createVehicle ["USVehicleBox",[13711.3,2943.25,0.001],[],0,"CAN_COLLIDE"];

//Dichina
_crate2 = createVehicle ["USVehicleBox",[3891.1,7888.03,0.00140381],[],0,"CAN_COLLIDE"];
_crate3 = createVehicle ["USVehicleBox",[3907.08,7886.69,0.00140381],[],0,"CAN_COLLIDE"];

//Devils Castle
_crate4 = createVehicle ["USVehicleBox",[6881.97,11463.4,0.00149536],[],0,"CAN_COLLIDE"];

//Zub Bandit Crate
//_crate5 = createVehicle //["USVehicleBox",[6546.79,5609.04,0.0015564],[],0,"CAN_COLLIDE"];

//Rog Bandit Crate (Bandit Hideout)
//_crate6 = createVehicle //["USVehicleBox",[11249.2,4282.31,0.00170898],[],0,"CAN_COLLIDE"];

//Bandit Camp Crate
//_crate7 = createVehicle //["USVehicleBox",[1633.03,4322.43,0.00134277],[],0,"CAN_COLLIDE"];

//Bandit Hilltop
_crate8 = createVehicle ["USVehicleBox",[10044.3,13380,0.00178528],[],0,"CAN_COLLIDE"];

//Bandit Oil Dump
_crate9 = createVehicle ["USVehicleBox",[2816.38,12063.6,0.00137329],[],0,"CAN_COLLIDE"];
_crate10 = createVehicle ["USVehicleBox",[2809.15,12056.1,0.00135803],[],0,"CAN_COLLIDE"];

_crate call wai_crate_setup;
_crate1 call wai_crate_setup;
_crate2 call wai_crate_setup;
_crate3 call wai_crate_setup;
_crate4 call wai_crate_setup;
//_crate5 call wai_crate_setup;
//_crate6 call wai_crate_setup;
//_crate7 call wai_crate_setup;
_crate8 call wai_crate_setup;
_crate9 call wai_crate_setup;
_crate10 call wai_crate_setup;


[_crate,[[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4]] call dynamic_crate;
[_crate1,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
[_crate2,[[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4]] call dynamic_crate;
[_crate3,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
[_crate4,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
//[_crate5,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
//[_crate6,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
//[_crate7,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
[_crate8,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
[_crate9,[[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4]] call dynamic_crate;
[_crate10,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;

If so, what would that look like?

Thanks again for your help.

Vladick

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 5/6/2021 at 12:24 AM, Vladick said:

Welp, it looks like that fixed the wai_crate_setup error but I am still getting a bunch of WAI crate errors. Any idea about the ones in the spoiler below?

Should I be using this to spawn crates?

[[
    [_loot,"USVehicleBox",[0,0]], // [loot variable, crate classname, 2d offsets]
    [[0,0,[3,crate_items_crop_raider],0,0],crates_large,[0,0,0]], // [loot variable, crate array, 3d offsets]
    [[0,0,0,0,0],crates_large,[0,0],60] // [loot array, crate array, 2d offsets, optional direction]
],_position] call wai_spawnCrate;

Rather than this?

_crate = createVehicle ["USVehicleBox",[13697.3,2937.91,0.001],[],0,"CAN_COLLIDE"];

_crate1 = createVehicle ["USVehicleBox",[13711.3,2943.25,0.001],[],0,"CAN_COLLIDE"];

//Dichina
_crate2 = createVehicle ["USVehicleBox",[3891.1,7888.03,0.00140381],[],0,"CAN_COLLIDE"];
_crate3 = createVehicle ["USVehicleBox",[3907.08,7886.69,0.00140381],[],0,"CAN_COLLIDE"];

//Devils Castle
_crate4 = createVehicle ["USVehicleBox",[6881.97,11463.4,0.00149536],[],0,"CAN_COLLIDE"];

//Zub Bandit Crate
//_crate5 = createVehicle //["USVehicleBox",[6546.79,5609.04,0.0015564],[],0,"CAN_COLLIDE"];

//Rog Bandit Crate (Bandit Hideout)
//_crate6 = createVehicle //["USVehicleBox",[11249.2,4282.31,0.00170898],[],0,"CAN_COLLIDE"];

//Bandit Camp Crate
//_crate7 = createVehicle //["USVehicleBox",[1633.03,4322.43,0.00134277],[],0,"CAN_COLLIDE"];

//Bandit Hilltop
_crate8 = createVehicle ["USVehicleBox",[10044.3,13380,0.00178528],[],0,"CAN_COLLIDE"];

//Bandit Oil Dump
_crate9 = createVehicle ["USVehicleBox",[2816.38,12063.6,0.00137329],[],0,"CAN_COLLIDE"];
_crate10 = createVehicle ["USVehicleBox",[2809.15,12056.1,0.00135803],[],0,"CAN_COLLIDE"];

_crate call wai_crate_setup;
_crate1 call wai_crate_setup;
_crate2 call wai_crate_setup;
_crate3 call wai_crate_setup;
_crate4 call wai_crate_setup;
//_crate5 call wai_crate_setup;
//_crate6 call wai_crate_setup;
//_crate7 call wai_crate_setup;
_crate8 call wai_crate_setup;
_crate9 call wai_crate_setup;
_crate10 call wai_crate_setup;


[_crate,[[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4]] call dynamic_crate;
[_crate1,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
[_crate2,[[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4]] call dynamic_crate;
[_crate3,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
[_crate4,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
//[_crate5,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
//[_crate6,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
//[_crate7,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
[_crate8,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;
[_crate9,[[2,crate_weapons_buildables],[4,crate_tools_buildable],[30,crate_items_buildables],4]] call dynamic_crate;
[_crate10,[[16,ai_wep_sniper],[8,crate_tools_sniper],[4,crate_items_high_value],[]]] call dynamic_crate;

If so, what would that look like?

Thanks again for your help.

Vladick

  Reveal hidden contents

 

Expand  

If I was going to spawn crates in 1.0.7, I'd give Salival's crate script a go, and modify it to my needs, changing all the classnames and spawn locations etc.

https://github.com/oiad/lootCrate

Link to comment
Share on other sites

  On 5/6/2021 at 2:30 AM, Voltan said:

If I was going to spawn crates in 1.0.7, I'd give Salival's crate script a go, and modify it to my needs, changing all the classnames and spawn locations etc.

https://github.com/oiad/lootCrate

Expand  

Thanks for this. Although, this looks like it spawns one crate randomly between a choice of positions. I want to spawn 6 crates every restart in the same positions. Would I still use this? If so, what would that look like? Sorry, I'm not a coder. Thanks!

Link to comment
Share on other sites

@JasonTM Hey Jason. After using this on my sever for the past couple of weeks I have some feedback from a couple of players who have noticed that a couple of the new missions fail to complete, including the Bandit MV-22 Air Drop and the C-130 Air Drop. I have confirmed that even when the counter says all the AI are dead the mission fails to complete. The mission map icon remains, the mines remain and the crate does not populate. This is a problem on these missions since you need the key from the crate to unlock the vehicles.

Anyway, just passing along some feedback. Thanks for all of your hard work on this!

Vladick

Link to comment
Share on other sites

hey all i have WAI installed on my 1.0.7 server , now when some1 goes to complete a mission that has a AI armored vehicle it just blows up all the time i have no errors on the RPT. i have disabled mines to see if that sorts it but it doesn't and i also have infistar installed and even on their menu there is no log about killing a hacker etc etc..

 

any suggestions? thanks

Link to comment
Share on other sites

Hey All,

I'm getting multiple WAI errors in my RPT on startup from the dynamic_crate.sqf. Anyone know how I can fix these?

RPT Errors:

  Reveal hidden contents

dynamic_crate.sqf:

  Reveal hidden contents

Thanks for any help you can give!

Vlad

Link to comment
Share on other sites

  On 5/19/2021 at 12:34 PM, houst said:

hey all i have WAI installed on my 1.0.7 server , now when some1 goes to complete a mission that has a AI armored vehicle it just blows up all the time i have no errors on the RPT. i have disabled mines to see if that sorts it but it doesn't and i also have infistar installed and even on their menu there is no log about killing a hacker etc etc..

 

any suggestions? thanks

Expand  

I also had the issue even in 1.0.6.2.
I added logs to "Killed" EventHandler but there was no valuable logs there

Link to comment
Share on other sites

Hi

I recently installed this on my DZE 1.0.7 server and nothing is happening, i have followed the instructions for installing this on the server and played for a few hours but no missions have spawned and nothing is out put to the web console. as far as i can tell its like the server is ignoring this line "execVM "\z\addons\dayz_server\WAI\init.sqf"; I'm hosting on GTX if that has an impact. it worked on an older server but not since the upgrade.

Thanks for any help

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



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