Jump to content
z80cpu

A Cautionary Tale - Exile Occupation

Recommended Posts

This is a 'warning' or a 'learning lesson' to those that read this.  I can not explain anything how I got to this point, except, that I did.

 

I have  an Exile server which I have been running for about 4 years now.  On it I have running the following AI missions:

 

A3XAI

DMS

Exile Occupation

Big Foot's Shipwrecks

VEMF

Black Eagle's Missions

 

These have all been running with no issues for years.

 

Then, 'out of the blue', 'weird' things started to happen and not all at once:

 

Crates and safes would show in the DB as being placed, but if after about 10 minutes, anything you placed in them would NOT be in the DB.  Less than approx. 10 minutes?  It would show!  There were no other DB issues.

 

If I was at a trader with my vehicle, and I then drove 3 blocks away, got out, then logged off; Upon returning, my vehicle would be at the trader again.

 

If I spawned (InfiSTAR) of bought a 'URAL_RU_Open' truck, the above issue would happen.  But there was something else weird too!  Going back to the trader, the truck would be there, but you could NOT enter it!  NOTHING would put you into the truck; Exile, InfiSTAR, or my own mod I run as admin.  NOTHING.  If you managed to somehow get into the truck, you could not get out!  You were trapped!  You could not drive it ,open doors, etc. anything.  I had to use my mod to get me out as pretty much nothing would including InfiSTAR.  It appeared the truck became an object versus a vehicle, thus why I could not enter it or 'use it'.

 

The Big Foot shipwrecks, out of the blue, AND about 10 days AFTER the above was going on; the message that someone was stealing the shipwreck quite showing up!  First it was like 3 of 5 would show, then 2 of 5, then ZERO of five!

 

 

I spent about 20 REAL hours 'running this down'.  One of the main reasons is, I would have to wait about 10 - 15 minutes after a restart to 'test' my 'latest theory' and fix.  It either worked or it did not.  Failed?  Retry, reboot, wait another 10 - 15 minutes, put something in the crate, see if it showed in the DB, repeat.

 

One of my last things was to disable every 'sub routine' in each of the above scripts, which is a lot of them!  I FINALLY found the issue and it was with the script 'Exile Occupation', in particular the routine:  "OccupationVehicle.Sqf".

 

 

I have no idea why this script went bonkers on me at this time.  It had been running fine FOR YEARS.  There was no ARMA nor Exile update to break it either, it just went nuts on me!  😉

 

I even updated all the scripts I could find (that was fun because you can not find them hardly anymore) and it made no difference.  I even restored backups (files and DB) from years past...and it STILL FAILED😞

 

As I run my server from my house, I know EXACTLY what is going on with the server and NO changes had been made.  (I use it for the Exile server and my Plex Media Server only).

 

 

It appears that somehow the 'timers' being used were being 'disabled' or 'locked up' somehow by this script.  Reason I say 'timers' is, for example, updates to the DB (such as crate contents) are not done immediately, rather on a 'schedule' of some sort or the saving your vehicle's last position.  As a note, if the vehicle was saved in Exile's Virtual Garage, it would work,  EXCEPT, AT TIMES, the Ural would not work and act as I described above.

 

So after disabling this one routine and testing now for about 2 weeks, I can say for 100% the above 'issues' were being caused by the aforementioned script/routine.

 

 

So if you should see/run across 'weird' stuff and you have this routine enabled, try disabling it by:

 

a3_exile_occupation.pbo -> a3_exile_occupation folder -> config.sqf

 

And changing/setting the line:

 

SC_occupyVehicle                = true;                        // true if you want to have roaming AI land vehicles

 

TO

 

SC_occupyVehicle                = false;                        // true if you want to have roaming AI land vehicles

 

 

 

After making that one single change, EVERYTHING now works as it should (and as it used to)!

 

I hope that some of you can gather at least something from this and that you never have to go thru this like  I did!

 

🙂

 

  • Thanks 1

Share this post


Link to post
Share on other sites

I started getting DB problems after installing Big Foot's Shipwrecks, That if i say i deleted a flag from the DB or if a base flag run out and auto deleted the bases objects would randomly come back loaded into the game without a flag, i deleted Big Foot's Shipwrecks but now the problem persists, i've never made a single change to the exile.ini file. very strange

Share this post


Link to post
Share on other sites

Hello @Sgt Smash,

 

That is weird.

 

As a suggestion, I would put down some flag somewhere, verify that it shows in the DB.  Then remove it and again, verify it.  And to my knowledge, the BF (Big Foot) script does not access the DB at all, so it should have no conflicts with the DB.  I just went and 'verified' that.  The only Exile calls it makes are for messages and nothing else.

 

I am afraid that you have some underlying issue as I did.  Like with humans 'referred pain'...you feel it in your arm, but it really is your leg.

 

What you're talking about are the Exile files themselves.  When a base is whacked, it sets a flag called 'deleted_at'.  THIS is what you need to monitor.

 

I would also verify that ALL dates/times are CORRECT that are used by the server(s).  This is also what Exile uses to determine if something is deleted or not.  For example, setting the 'last_paid_at' to the future, you will not have to worry about paying or it being deleted.  As an example, I have my bases set to: 2022-12-31 12:34:56.  So if your date/time keep 'changing' for some unknown reason, it will appear as 'random'.

 

Also, I would ENSURE 100% that you're using ExtDB2 OR ExtDB3 and ALL files are 'configured' for that version ONLY.  As I stick with 'what is known to work' (ExtDB2), ALL of my scripts are for that version.  I would look into that you're using the correct versions on the server AND in the scripts.

 

It seems like that Exile is not accessing the DB properly to delete and set the flags as needed.  You might need to do what I did, disable all scripts and add back one at a time.

 

Personally, I think you have ExtDB2 and ExtDB3 stuff mixed up somewhere.  I am 99.9% sure it has nothing to do with BF's script, for all it does is spawn a wreck and a crate.  Then sends a message out once found.  Nothing more.  This script is also 100% server-sided too.

 

Maybe re-download the script from somewhere else as well as re-install the Exile server files.

 

Try mine, it does work. 

 

DropBox Link:  https://www.dropbox.com/s/gbisva0b57ebqgv/BigfootsShipwrecks_Server.pbo?dl=0

 

On the file  "\BigfootsShipwrecks_Server\code\ExileServer_BigfootsShipwrecks_spawnShipwrecksCommand.sqf", I added a line at line 49:

_crate setmass 10;

 

You can remove that line or leave it in - It hurts nothing.

 

There is one last POSSIBLE reason for this and it a hardware issue with your network boards or other HW issues.  Such as a packets being lost.  See:  https://en.wikipedia.org/wiki/Packet_loss

 

 

 

 

Wish I could offer more!

 

🙂

 

Share this post


Link to post
Share on other sites

Thanks for the reply

 

I've tested this many times, it's not the flag itself that has a problem but the base objects. I've never touched the DB to change it from or to ExtDB2 and ExtDB3, it has always been ExtDB2 from day one.

 

It's strange tho as it worked fine right upto installing that mod and been broken since, We running from a hosting company so i only have limited dealings with the hardware side of things.

 

It's only base objects that are effected, Storages, flags and vehicles auto delete fine.

 

The only other thing i could think of is how this is setup, Does anything look like it may cause this effect here?

Spoiler

class Database
        {
            // Remove all deleted items from the database after X days
            permanentlyDeleteTime = 5;
            
            // Remove all territories (and contructions + containers in it) that were not paid after X days
            territoryLifeTime = 14;

            // Remove all containers outside of territories that have not been used for X days
            // Example: Tents
            containerLifeTime = 1;

            // Remove all constructions outside of territories that are older than X days or not moved for X days
            // Example: Work Benches
            constructionLifeTime = 1;

            // Remove all vehicles that were not moved/used for X days
            vehicleLifeTime = 14;
            
            // Set safe as abandoned
            abandonedTime = 14;
            
            // Deletes a base X days after the flag is stolen if the ransom money isn't paid
            stolenFlagLifeTime = 7;
            
            // Sets door & safe pins to 0000 and marks safes to abandoned X days after the flag is stolen if the ransom money isn't paid
            unlockLifeTime = 7;
        };
    };

 

Share this post


Link to post
Share on other sites

Well, yours is kinda like mine:

 

class Database
        {
            // Remove all deleted items from the database after X days
            permanentlyDeleteTime = 3;
            
            // Remove all territories (and contructions + containers in it) that were not paid after X days
            territoryLifeTime = 14;

 

            // Remove all containers outside of territories that have not been used for X days
            // Example: Tents
            containerLifeTime = 3;

 

            // Remove all constructions outside of territories that are older than X days or not moved for X days
            // Example: Work Benches
            constructionLifeTime = 3;

 

            // Remove all vehicles that were not moved/used for X days
            vehicleLifeTime = 14;
            
            // Set safe as abandoned
            abandonedTime = 3;
            
            // Deletes a base X days after the flag is stolen if the ransom money isn't paid
            stolenFlagLifeTime = 8;
            
            // Sets door & safe pins to 0000 and marks safes to abandoned X days after the flag is stolen if the ransom money isn't paid
            unlockLifeTime = 4;
        };

 

So, I do not think that would be it.  Good guess...I did not think of that.  🙂

 

I know it may seem that mod caused it, but I can assure you 100%, IF you got a KNOWN working copy of it, such as what I posted for you, it is NOT the mod.  That mod has nothing to do with the issues you have.  It just spawns crates - that is it!

 

And since it is not a ExtDB2/ExtDB3 issues, and you have changed NOTHING, then lost packets appears to be the 'winner'.  By testing as I suggested (putting down and removing small bases/flag), you should be able to 'catch' what is going on.

 

Again, you also can do what I did:  Disable every sub-routine in each script/mod/pbo to find the one that is 'bad'.

 

Also, as an IT tech myself, if ANYONE has access to those files, DO NOT ASSUME nothing has been changed - VERIFY IT!  I have seen other techs screw up stuff and then deny it.  Verify those files via time stamp.  It would also not hurt to review settings on those files while you are there.

 

Just remember:  You see someone doing exercise and then they have a heat attack.  Was it the exercise OR did the already have heat issues PRIOR to doing the exercises?  Such as diabetes, over weight, etc.?  Prior issues is the culprit.

 

What LOOKS guilty, a lot of the times, it is not.  In your case, and you can examine the code if you at that level, the BF mod just spawns crates.

 

Try what I suggested:  Build a 2 part base with flag and whack it - Watch the DB.  You can also temporarily change the 'delete' time to 1 day:

 

            // Remove all deleted items from the database after X days
            permanentlyDeleteTime = 3;

 

TO

 

            // Remove all deleted items from the database after X days
            permanentlyDeleteTime = 1;

 

This would 'speed up' the deletion.

 

Since I am not there and I am not a minder reader; if you're using 'MySQLWorkbench', make SURE you're 'refreshing' the DB view(s).  Most likely with any other DB viewer, you would have to do that too.  Do not mistake 'old' data for current data.  😉

 

 

🙂

 

 

 

Share this post


Link to post
Share on other sites

Ah i'm very sorry i got the wrong mod mixed up, my bad🤦‍♂️

 

I meant the KnocksVille missions pack that had a heli rescue mission, i can't remeber what it's call now

It was one of the first versions that spawned vehicles to the DB

 

Sorry for wasting your time fella, i feel like a real twit now

Share this post


Link to post
Share on other sites

hahahahahahaahaha....its no big deal....I tried to find this mission, but I could not.  And fret not, you did not waste my time and thank you for saying such!  🙂

 

 

IF what you state is true, then it IS the mission.  Exile changed the DB structure a few times and this mod is writing in the OLD FORMAT.  Which means it might have trashed your entire DB now.

 

They always included 2 files in the 'MySQL' folder:

 

upgrade-1.0.2-1.0.3.sql

upgrade-1.0.3-1.0.4.sql

 

And if this is one of the first scripts to use the DB, it means it is writing to the DB in the '.9' era of Exile.  This script is 3 (maybe even 4) versions behind on the DB format.

 

As I do not know how to do DB's too well, all I can suggest is to DELETE this old mission and restore a DB backup from prior to its install.

 

I do seem to remember if people did not do the DB upgrade scripts, all sorts of 'bad things' happened to them.

 

You might have to do a DB wipe, remove this script, and start all over.

 

If you do not have access to a DB backup and you CAN run batch files, I can give you a batch file that automatically backs up your DB.  I run it at every server start, so I always have a DB backup.  By default, it makes 30 days worth, and you can change that.  So with a 4 hour reboot schedule, I have 180 backups for a 30 day month.

 

File name looks like:  FullBackup.2020-14-04-13-29.zip

 

Made today:  04-13-2020 @ 1329

 

So if you can run batch files and the '7 Zip.EXE', let me know and I can get this to ya...works wonders and has saved me a time or too as well!

 

If you can not run such, you MIGHT be able to ask your host about a backup, which they should have, question is; How old are they?

 

🙂

 

 

Share this post


Link to post
Share on other sites

×