Jump to content

Torndeco Mission System - DZAI AI


Torndeco

Recommended Posts

Plz note don't use the latest version till i get a fix in place...

There is alot of ground vehicles getting left behind

 

 

I need to test the code that destroys ground vehicles after a mission & possible make it more aggressive

haha maybe that was the problem on my server too idk, we had like massive vehicle amounts at one place so seems like there was a mission at one time. one admin told me the vehicles spawned back in after he removed them! lol

 

Anyway about the mission spawn:

for "_x" from 1 to missions_max_number do {
        _handle = [] spawn mission_spawn;
        _bandit_missions = _bandit_missions + [_handle];
};       

does that mission_spawn function start the mission right away? (I didn't look through all the code for now), that would explain why I get all missions at once and not after some random wait time it seems..

I just noticed that because its also running on my test server and I have to restart the server alot to test my own scripts :P

 

Edit: another small thing I noticed before, the file debug_missions_go.sqf will be called on each client, is it not? Because you call "createMarker" in there that command should be global and may the issue because they never get removed (at least on my server they never disappear from the map)? Maybe I am just tired, it's almost 5am here I need some sleep. :D

Edited by Axe Cop
Link to comment
Share on other sites

for "_x" from 1 to missions_max_number do {
_handle = [] spawn mission_spawn;
_bandit_missions = _bandit_missions + [_handle];
}; 

Thats just the intial mission spawn

It spawns all the missions after 5 mins @ server start

Its just really to initialize the array

 

The while loop underneath is what spawns the missions later using ScriptDone to check if missions are finished or not.

Appears to be issue with code, since the odd time i end up with 3-5 missions (when its meant to be 2 max) attempting to debug atm

 

--------------

 

Vehicle issue i believe is the code would destroy the vehicles if no player approached them at a mission site.

But the problem is the vehicle getting killed was getting updated in database, so the vehicle would be back alive after server restart.

Still to test & confirm it (will do later today)

 

At most there will be 1 vehicle spawned @ a loot pile & either 1 land vehicle or heli for the AI.

So i highly doubt the issue about massive vehicles in 1 spot is due to mission system

 

Basicly atm my server is littered with pickups with mg's etc all around the map, left behind from a previous mission & server restarted since

 

-----------------

 

The createMarker thing is same method dayz cherno missions use. But i will look @ moving that serverside will simplifiy things abit.

But the map markers should be getting removed, unless its a quirk with 6 clients creating a global map marker + only 5 clients deleting a global map marker.

Works atm on my server but low pop count

 

 

The mission timer for despawning might need some tweaking atm

 

Wait 30 mins or till all Mission AI = DEAD

Wait 15 mins

Keep Waiting (timeout 15mins) if Player is nearby

 

Kill off all AI + Delete Crates

Link to comment
Share on other sites

ok,Torndeco, maybe you can help me.

 

I installed all the files correctly and the missions worked.  the only problem was the Visible AI ONLY spawned with the missions.  I have a battle zone set up and I could see AI in vehicles any AI on foot was invisible.  they were shooting but invisible.   same for a bandit city I set up.

 

I reinstalled my old sarge file and they are now visible.  Not sure about missions cause they haven't spawned yet.

 

Any Idea why one Sarge folder would work and another not?

 

Also, how can I get messages to show up on the screen like it originally was.  I don't like the debug monitor thing.

Link to comment
Share on other sites

Only thing i can think of if u are using a custom mod with epoch that has the player skin banned..

Sarge files i have uploaded already have the workaround for invisible AI applied ot it

 

http://opendayz.net/threads/1-5-or-1-6.11631/#post-58926

 

Besides that u can always use a app like winmerge to compare the 2 sarge addons folders to see what the differences are.

 

------------

Haven't noticed any invisible AI since i applied the fix

Link to comment
Share on other sites

Finally had time to fix to fix vehicle killing & syncing to database.

Its tested & working...

 

If u are using a previous version were ai can spawn with land vehicles @ missions... i recommend u to update..

 

Added code changes to help stop ai from setting up patrol routes within 200m of plotpoles.
Also added seperate code change also added to prevent ai from deciding to patrol in a building with a plotpole aswell (might be un-needed with previous change now)

Link to comment
Share on other sites

Yeah, it has me confused.  If the AI are visible in one place they should be visible everywhere.

 

Wonder if this is my problem"

 

"The issue that the AI doesn't get made visible again seems to only occur on servers with very low fps, or lots of AI groups. It usually takes the amount of groups in seconds for them to become visible."

 

My FPS is fine.  In game it's around 55 to 60 and debug fps is around 24.

Link to comment
Share on other sites

Got a problem with installing I keep getting the message \z\addons\dayz_server\missions\mission_deamon.sqf not found. It seems to be a problem with private servers that if you point to something from the mpmission file to the server pbo it doesent seem to work had it with some other scripts which I moved all files to the mpmission file and redirected the necessary bits and it worked. Will this work with your script and is it just the 3 or 4 files I will need to change.

Link to comment
Share on other sites

If u are running a dayz server off a dedicated server... then u are making a mistake somewhere.

As there is no problem putting scripts serverside that only the server needs to run.

 

 

So i am gonna assume u are paying someone else to host your server.

U really should ask them how to customize the server pbo.

This will reduce the mission file size everyone needs to download.

 

That or u added to call the script mission_deamon.sqf @ the bottom of the init.sqf file

Instead of inside the IF statement block of code to run only for the server.

 

But yes u can move the entire thing serverside & make the necessary changes to where it calls .sqf files. U can do this for pretty much everything

But u will increase the size of the missionfile for no good reason

Link to comment
Share on other sites

Thanks for quick reply I am running the server on a spare pc in my house just a few friends and family connecting via Lan etc. I have access to the server pbo  but there is no mission pbo the mp mission is just in folders. You are correct the script was outside of the  if statement. Im a noob at this level of scripting only ever made counterstrike maps and scripts :-). No error on joining server now but missions don't seem to start. Thanks for help will keep at it. Moved files to mission file works a treat don't know why it wont work the way suggested checked and double checked .

Link to comment
Share on other sites

Did you put the mission folder IN your server.pbo??

No in my mpmission folder sorry my mistake I did put in my server.pbo what I have done now is put all but the compile files in my mpmission folder and changed the vm commands to suit all seems to work okay.

Link to comment
Share on other sites

I'm not sure if this is normal for this system or not so I figured I would ask.

 

The missions themselves are great overall.  But it seems to be lacking in variety.  It almost seems as though it gets stuck per reboot.

 

For example, during one 6 hour session, all we get are what to be larger missions (blue markers) that have a vehicle and loot boxes.  However the vehicles are all identical.  I lost count of how many fuel truck missions we ran at one point.  After a reboot we will get nothing but seemingly smaller missions (red markers) with no vehicles.  Other times we got 6 hours of missions with Cessnas.

 

I'm not sure the distinction between blue and red missions, although the blue ones pop up on the debug monitor while the red ones do not.

Link to comment
Share on other sites

Red + Blue missions are both displayed in debug monitor warning...
Its the same code + tested...

 

Only difference between red + blue missions is blue mission has a vehicle spawned @ aswell. with no ai in them.

 

 

--------------

I will add a fix to server count, epoch doesn't update the vehicle count list after startup (as it is only used by vehicle spawning code).

Am using the same variable to generate what vehicles are available to spawn

 

-----------

New update on github

 

Fixed blue missions spawning by default was meant to be random chance...

Added Server FPS check, missions wont spawn if server < 10 fps

 

Disabled spawning missions with AI Setting "ambush", till new code to detonate mines (with any vehicle) + delete mines is done.

 

edit:- also fixed an issue with no loot + ai spawning in open area mission type

Link to comment
Share on other sites

Fixed blue missions spawning by default was meant to be random chance...

Added Server FPS check, missions wont spawn if server < 10 fps

Just a question how many fps are you guys getting? when i use the "#monitor" command I usually have less on my live server when there are many players, but it's still running "smooth" (for ArmA lol)

I mean I have around 40+ FPS when i am on my old test machine but usually about 5 with 40+ players the server is running at 30% CPU so it's just ArmA you won't get 30+ FPS with 50 players , or what about your servers?

 

Edit. last entry from the current server RPT: "0:31:22 "DEBUG FPS  : 3.91581", i know I have to many player bases but still.. this sucks but didn't bother me for some time, I can just disable your FPS lock but I'm wondering if your servers are running at 60 FPS with tmore than 10 players??

Link to comment
Share on other sites

I just added to the code to prevent missions from spawning if server is under stress abit..

I make it a conf option tomorrow, just relaxing atm watchin tv etc

 

Main reason cause i accidentlally added some test code for placing a trigger on each mine (didnt get time to test if it worked) onto main server, with no code to delete the mines after a set time.

I assuming it had an accumulative effect & hurt my Server FPS, no reports of players complaining about lag. Just me beening pre-emptive, for next time i make a mistake.

 

Low pop count atm... but before players when i hosted a popular tavi 2.0  dont notice lag really till server hits around sub 10 fps.

I give u a shout tomorrow what fps i am getting with around 15 players (crosses fingers).
 

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...