Morox AI - Sycosis Simple AI mod

OK so this is very weird.

30 second spawn I can sit all day killing the guy. 50 second span and he never re appears . However if you look a the debug bellow you can see that it says he does.. I tried with both same spawn and death spawn even took the % chance off to make sure he was not spawning dead and the body we auto hiding..

I should also say I hunted around for him as well on the 50 seconds as the initial spawn point is in field with at least 200m each side of the initial spawn point so he was not hiding as no place to hide.

Very weird..

Code:
aispawnpos = _wpme select 1;
 
// 30 Second Spawn
_aispawn = [[7180.07,3534.87,0.002], 1,1,1,1,1,3,6,2,30] execVM "scripts\add_unit_server.sqf"; // TEST
 
18:19:19 "NPC dead! Respawning in 30"
18:19:49 "Respawning NPC at [7180.92,3536.45,0.00144386]"
18:19:49 "globalFaction is 1"
18:19:59 "NPC dead! Respawning in 30"
18:20:08 "DEBUG FPS  : 48.9297"
18:20:29 "Respawning NPC at [7173.78,3534.84,0.00160217]"
18:20:29 "globalFaction is 1"
18:20:31 "NPC dead! Respawning in 30"
18:21:01 "Respawning NPC at [7181.78,3533.97,0]"
18:21:01 "globalFaction is 1"
18:21:03 "NPC dead! Respawning in 30"
18:21:33 "Respawning NPC at [7181.78,3533.97,0]"
18:21:33 "globalFaction is 1"
18:21:34 "NPC dead! Respawning in 30"
18:22:05 "Respawning NPC at [7181.81,3533.94,0.00174999]"
18:22:05 "globalFaction is 1"
18:22:13 "NPC dead! Respawning in 30"
 
// 50 Second Spawn
_aispawn = [[7180.07,3534.87,0.002], 1,1,1,1,1,3,6,2,50] execVM "scripts\add_unit_server.sqf"; // TEST
 
18:25:11 "NPC dead! Respawning in 50"
18:26:01 "Respawning NPC at [7181.07,3535.87,0]"
18:26:01 "globalFaction is 1"


Code:
aispawnpos = _aispawnpos;
// 30 Second Spawn
_aispawn = [[7180.07,3534.87,0.002], 1,1,1,1,1,3,6,2,30] execVM "scripts\add_unit_server.sqf"; // TEST
18:29:42 "NPC dead! Respawning in 30"
18:30:12 "Respawning NPC at [7181.07,3535.87,0]"
18:30:12 "globalFaction is 1"
18:30:17 "NPC dead! Respawning in 30"
18:30:47 "Respawning NPC at [7185.87,3534.51,0.00183868]"
18:30:47 "globalFaction is 1"
18:31:06 "NPC dead! Respawning in 30"
18:31:36 "Respawning NPC at [7182.54,3541.25,0.00162315]"
18:31:36 "globalFaction is 1"
18:31:44 "NPC dead! Respawning in 30"
18:32:14 "Respawning NPC at [7175.72,3541.24,0.00135136]"
18:32:14 "globalFaction is 1"
18:32:20 "NPC dead! Respawning in 30"
18:32:23 Server: Object 3:65 not found (message 94)
 
// 50 Second Spawn
_aispawn = [[7180.07,3534.87,0.002], 1,1,1,1,1,3,6,2,50] execVM "scripts\add_unit_server.sqf"; // TEST
 
18:34:55 "NPC dead! Respawning in 50"
18:35:46 "Respawning NPC at [7181.07,3535.87,0]"
18:35:46 "globalFaction is 1"

Code:
#With the % chance off.
// 50 Second Spawn
_aispawn = [[7180.07,3534.87,0.002], 1,1,1,1,1,3,6,2,50] execVM "scripts\add_unit_server.sqf"; // TEST
18:38:34 "NPC dead! Respawning in 50"
18:39:24 "Respawning NPC at [7181.07,3535.87,0]"
18:39:24 "globalFaction is 1"
 
EDIT: Was able to replicate, working on fix now

That is weird, I tried the same thing and they did respawn for me.

Code:
22:51:34 "NPC dead! Respawning in 50"
22:51:35 "NPC dead! Respawning in 50"
22:51:37 "NPC dead! Respawning in 50"
22:52:24 "Respawning NPC at [7190.82,7680.18,0.00143433]"
22:52:24 "globalFaction is 0"
22:52:25 "Respawning NPC at [7193.04,7678.74,0.00143433]"
22:52:25 "globalFaction is 0"
22:52:27 "Respawning NPC at [7190.77,7682.94,0.00143433]"
22:52:27 "globalFaction is 0"
22:52:28 "NPC dead! Respawning in 50"
22:52:28 "NPC dead! Respawning in 50"
22:52:30 "NPC dead! Respawning in 50"

You are using all the files from the OP right, except for the % vanish change?

You have a gearset 2 so you made a change to the add_unit_server.sqf, can you post it.
 
So I was able to replicate this as I said however it seems to be a very specific use case, could you try this

_aispawn = [[7180.07,3534.87,0.002], 1,1,2,1,1,3,6,2,50] execVM "scripts\add_unit_server.sqf"; // TEST

With two units, and see if they respawn, what I found was if you only have one AI and you kill them it causes an issue with the respawn, I wrote code to fix it though it is a bit over kill as if you have more than 1 aispawn line or more than 1 unit it seems to work fine.
 
Hi,

So doing some more debug.

I tested with 2 units spawning and changing back to gear set 0 (un changed) to make sure nothing was screwew. At first it seemed it worked then I did a server reboot and they spawned only once did another server restart and they spawned a couple more time but never again..

Could it be they are spawning but with no skin/gear ??

Debug Here rather than clutter up the main thread.
http://pastebin.com/qhUCUssJ
 
Using your existing _aispawn line add this diag_log line just above the line shown below it

Code:
diag_log format["Creating at %1 a member of %2",_unitpos, _aigroup];
_sniperSkin createUnit [_unitpos, _aigroup, "_aiunit=this;",1,"Private"];
 
Hi,

**Ignore.. I did not realize you meant the unit_killed.sqf file

So I did but nothing happened when I searched the rpt file for Creating. Maybe ive missed something.

Code:
    diag_log format["Creating at %1 a member of %2",_unitpos, _aigroup];
    _sniperSkin createUnit [_unitpos, _aigroup, "_aiunit=this;",1,"Private"];
    _aispawn = [[7180.07,3534.87,0.002], 1,1,2,1,1,3,6,0,50] execVM "scripts\add_unit_server.sqf"; // TEST
 
Here is the correct output not

Code:
16:21:07 "NPC dead! Respawning in 50"
16:21:10 "NPC dead! Respawning in 50"
16:21:11 Server: Object 3:44 not found (message 70)
16:21:57 "Respawning NPC at [7181.02,3536.32,0.00148392]"
16:21:57 "Creating at any a member of any"
16:21:57 "globalFaction is 1"
16:22:00 "Respawning NPC at [7186.53,3535.78,0.00175571]"
16:22:00 "Creating at any a member of any"
16:22:00 "globalFaction is 1"
16:22:00 "NPC dead! Respawning in 50"
16:22:02 "NPC dead! Respawning in 50"
16:22:50 "Respawning NPC at [7183.75,3538.05,0.00186253]"
16:22:50 "Creating at any a member of any"
16:22:50 "globalFaction is 1"
16:22:52 "Respawning NPC at [7187.81,3537.79,0.00118351]"
16:22:52 "Creating at any a member of any"
16:22:52 "globalFaction is 1"
16:22:53 "NPC dead! Respawning in 50"
16:22:54 "NPC dead! Respawning in 50"
16:23:13 Server: Object 3:54 not found (message 94)
 
// DID NOT SPAWN
 
16:23:43 "Respawning NPC at [7187.65,3538.57,0.00153542]"
16:23:43 "Creating at any a member of any"
16:23:43 "globalFaction is 1"
16:23:44 "Respawning NPC at [7189.45,3539.97,0.00136852]"
16:23:44 "Creating at any a member of any"
16:23:44 "globalFaction is 1"
16:23:49 Server: Object 3:65 not found (message 99)
16:23:49 Server: Object 3:66 not found (message 91)
16:23:51 "DEBUG FPS  : 49.2308"
 
Sorry I wasn't clear, add diag_log line to your add_unit_server.sqf just above the sniperskin line
 
Bingo....

Code:
17:35:31 "Creating at [7186.84,3556.27,0] a member of O 1-1-M"
17:35:34 "NPC dead! Respawning in 50"
17:35:35 "Respawning NPC at [7190.08,3569.02,0.00130367]"
17:35:35 "globalFaction is 1"
17:35:35 "Creating at [7191.08,3570.02,0] a member of O 1-1-M"
17:35:38 "NPC dead! Respawning in 50"
17:35:48 Server: Object 3:73 not found (message 91)
17:36:24 "Respawning NPC at [7187.66,3557.39,0.00166607]"
17:36:24 "globalFaction is 1"
17:36:24 "Creating at [7188.66,3558.39,0] a member of <NULL-group>"
17:36:28 "Respawning NPC at [7193.89,3574.49,0.00148487]"
17:36:28 "globalFaction is 1"
17:36:28 "Creating at [7194.89,3575.49,0] a member of <NULL-group>"
17:36:41 Server: Object 3:77 not found (message 94)
 
Dwarfer,

I think I solved the problem- here is the new updated files you need to grab

Also note that I have added an updated humanity handler to the unit_killed.sqf in the factions section, so killing an EAST and Resistance AI counts as a bandit kill with a + 200 humanity gain, WEST kills count as murders and -100 humanity.

This can be easily modified.

Also I have added a the "vanish dead body" code though it is commented out, this can be commented back in should anyone want this feature.

As the file upload option is gone and the scripts are too long to paste into the replay you can grab them here.


add_unit_server.sqf
http://dayz.zombiesurvivalonline.com/files/add_unit_server.txt

unit_killed.sqf
http://dayz.zombiesurvivalonline.com/files/unit_killed.txt

Let me know if there are any issues.
 
This is unrelated to AI, but is gaining humanity for bandit kills a DayZ mechanic or is it only for this mod? This is a stupid question, but 95%+ of my DayZ experience has been with AI.
 
Thanks a bunch for the info. From my past Googling, I've heard conflicting statements about whether or not bandit kills give humanity.

Edit: I think I've found the script responsible for humanity, compile/player_death.sqf. However it doesn't seem to award humanity for bandit kills, as the code for that is commented out. So now I'm scratching my head in confusion.
 
Hi,

Testing the new files I am seeing the following error.

Looks like a typical code figure slip..

diag_log format["globalFaction is %1",_globalFaction};
Should be
diag_log format["globalFaction is %1",_globalFaction];

I am always doing this type of thing in PHP :)

Code:
 9:55:51 "HIVE: Local Time set to [2013,4,27,8,55]"
9:55:51 Error in expression <wnpos,_gearset]",spawncnt];
 
 
diag_log format["globalFaction is %1",_globalFact>
9:55:51  Error position: <format["globalFaction is %1",_globalFact>
9:55:51  Error format: Type Number, expected Array
9:55:51 File mpmissions\dayz_1.chernarus\scripts\add_unit_server.sqf, line 118
 
Well I spent 10min doing murdering and they kept popping back for more.. So I think that has fixed it :)

Thanks :)
 
Back
Top