Jump to content
tebbbs

Persistent Database and Resupply

Recommended Posts

Is it correct that this mod wont save spawned in vehcles (With Zeus) to the DB ?

Share this post


Link to post
Share on other sites

Is it correct that this mod wont save spawned in vehcles (With Zeus) to the DB ?

 

Hi,

 

no thats not right. Every vehicle will be stored in the database. You can however delete them with Zeus again and then run a PHP cronjob that deletes everything that has not been updated in the last 10 minutes. Here is an example how our cronjob looks like. It runs every hour on our windows server. We will maybe include it into the mod sooner or later.

while(true){
	$sql = "SELECT id FROM mission ORDER BY missionLoaded DESC LIMIT 1";
	$qGet = $dbc->prepare($sql);
	$qGet->execute();
	$aGet = $qGet->fetch(PDO::FETCH_ASSOC);
	$iMissionFk = $aGet["id"];
	
	
	/** vehicles */
	
	$sql = "SELECT id FROM vehicles WHERE mission_FK = ?";
	$aAttributes = [$iMissionFk];
	$qGet = $dbc->prepare($sql);
	$qGet->execute($aAttributes);
	$aGet = $qGet->fetchAll(PDO::FETCH_ASSOC);
	$iCount = count($aGet);

	$sql = "SELECT id FROM vehicles WHERE rec_date < NOW() - INTERVAL 60 MINUTE AND mission_FK = ?";
	$aAttributes = [$iMissionFk];
	$qGet = $dbc->prepare($sql);
	$qGet->execute($aAttributes);
	$aGet = $qGet->fetchAll(PDO::FETCH_ASSOC);
	
	if(count($aGet) != $iCount){
		foreach($aGet as $aVehicleToDelete){
			$sql = "DELETE FROM vehicles WHERE id = ?";
			$aAttributes = [$aVehicleToDelete["id"]];
			$qGet = $dbc->prepare($sql);
			$qGet->execute($aAttributes);
		}
	}
	
	
	/** objects */
	
	$sql = "SELECT id FROM objects WHERE mission_FK = ?";
	$aAttributes = [$iMissionFk];
	$qGet = $dbc->prepare($sql);
	$qGet->execute($aAttributes);
	$aGet = $qGet->fetchAll(PDO::FETCH_ASSOC);
	$iCount = count($aGet);

	$sql = "SELECT id FROM objects WHERE rec_date < NOW() - INTERVAL 60 MINUTE AND mission_FK = ?";
	$aAttributes = [$iMissionFk];
	$qGet = $dbc->prepare($sql);
	$qGet->execute($aAttributes);
	$aGet = $qGet->fetchAll(PDO::FETCH_ASSOC);
	
	if(count($aGet) != $iCount){
		foreach($aGet as $aObjectToDelete){
			$sql = "DELETE FROM objects WHERE id = ?";
			$aAttributes = [$aObjectToDelete["id"]];
			$qGet = $dbc->prepare($sql);
			$qGet->execute($aAttributes);
		}
	}

	sleep(3600);
}

Share this post


Link to post
Share on other sites

Hi again :)

 

Would i be possible to make it so when you die you respawn without your previous loadout ? im thinking that this would req the db to make a new entry on respawn if previous Caracter is dead.

 

And make it save ACE adv. medical state.

Share this post


Link to post
Share on other sites

thats not something our mod should do. You usually set this option in ACE3 or somewhere else if player should respawn with last gear or not. Our mod just saves the inventory. It has nothing to do with setting the gear after you die.

Share this post


Link to post
Share on other sites

Hi again..

 

After 1.60 it would seem that your mod dosent load gear in uniform,vest and backpacks, do you have a fix incomming ?? :)

Share this post


Link to post
Share on other sites

Hi, i dont think there will be a fix from our side. I asked the guys from ACE3 to maybe implement this mod in the future, but i stopped developing (hunting behind BI's code changes). I removed Arma 3 from my computer and i am not sure.. maybe Spackenbremse wants to find a quick fix for this but i dont have fun with this anymore :P Sorry

Share this post


Link to post
Share on other sites

Hi There, 

 

My group is looking to move over to this from ALiVE as we utilize a lot more zeus for story involvement etc, however while looking at the requirements we noticed that it is extDB2 however when looking for this we see extDB3. So in line with this my query is will this system still function with extDB3? I may have missed the post somewhere with in here and if so I apologise I just want to be sure.

 

Regards 

  • Like 1

Share this post


Link to post
Share on other sites

sorry no idea, i stopped developing

Share this post


Link to post
Share on other sites

I hope you don't mind tebbbs but I have started hosting 2.1.0 on my GitHub, which you may find here. If that is an issue, please notify me, and I will take it down. I will work on it occasionally when I have free time. If you guys want a web application of some sort, myself and a friend could possibly come up with something for Django, the python web framework. As for PHP, I'd have to dust off that part of my brain and work on something. Also, if any of you want to contribute a web application for this, go right along and make a PR on my GitHub.

  • Like 1

Share this post


Link to post
Share on other sites

I hope you don't mind tebbbs but I have started hosting 2.1.0 on my GitHub, which you may find here. If that is an issue, please notify me, and I will take it down. I will work on it occasionally when I have free time. If you guys want a web application of some sort, myself and a friend could possibly come up with something for Django, the python web framework. As for PHP, I'd have to dust off that part of my brain and work on something. Also, if any of you want to contribute a web application for this, go right along and make a PR on my GitHub.

I'd love a web framework, if possible :)

 

Hi There, 

 

My group is looking to move over to this from ALiVE as we utilize a lot more zeus for story involvement etc, however while looking at the requirements we noticed that it is extDB2 however when looking for this we see extDB3. So in line with this my query is will this system still function with extDB3? I may have missed the post somewhere with in here and if so I apologise I just want to be sure.

 

Regards 

This is gonna sound weird, but I really like your avatar.

Share this post


Link to post
Share on other sites

Ok well when I have some free time I could conjure up some kind of framework? What web frameworks are you familiar with?

Share this post


Link to post
Share on other sites

Ok well when I have some free time I could conjure up some kind of framework? What web frameworks are you familiar with?

Hey dixon13, you may be my savour after this mod stopped being developed, i dont have a clue on setting up a database, so this would be my perfect solution, currently im saveing game with publicnanespace, but that doesnt work after restart......one thing i may add if entirely possible (considering the time youve probably already spent on this), i have 2 variables i would like to save (ie cash = 100, kills = 2), would you be able to add this or to help me out thanks?, its if not i know youve probably more important things.

I wish some could release a video tutorial on how to this, i just cant get my head around it from what ov read

Share this post


Link to post
Share on other sites

We are back in business with this mod but i am not sure if this is still required if dixon13 is already working on it. If yes, we could supply you with the alpha of our webinterface.

Share this post


Link to post
Share on other sites

I hope you don't mind tebbbs but I have started hosting 2.1.0 on my GitHub, which you may find here. If that is an issue, please notify me, and I will take it down. I will work on it occasionally when I have free time. If you guys want a web application of some sort, myself and a friend could possibly come up with something for Django, the python web framework. As for PHP, I'd have to dust off that part of my brain and work on something. Also, if any of you want to contribute a web application for this, go right along and make a PR on my GitHub.

 

can this be used for any mod? can it be used with ravage to make vehicle and inventory persistent ? 

Share this post


Link to post
Share on other sites

Thread can be closed. We are currently working on a new version with a different title

Share this post


Link to post
Share on other sites

If you are working on a new version with a different title, then I will close down my repo on GitHub as I have not done much with it but just to host it. I thought I was going to use it and work with it more but never did. Good to hear it will be even more awesome.

Share this post


Link to post
Share on other sites

Hi, Any chance of getting a the version that works with extdb3 so we can use the 64bit dedi server.exe ?? :)

Share this post


Link to post
Share on other sites

here you go ;) http://tebinulrich.de/pdb.pbo

 

Did the older version work good on your server? We never received any feedback of a running installation other than our own.

Share this post


Link to post
Share on other sites

Note you can replace the call compiles with the extensions with parseSimpleArray

Share this post


Link to post
Share on other sites

I am currently in airline training so cant continue development until at least July.

Share this post


Link to post
Share on other sites
On 25/3/2017 at 9:13 AM, tebbbs said:

here you go ;) http://tebinulrich.de/pdb.pbo

 

Did the older version work good on your server? We never received any feedback of a running installation other than our own.

I actually fix'ed it myself :)

We have used it for for about 8 or 9 month now.. and only did a few fixes, as we run big presistent missions every Thursday.. but somtimes it would stop saving if it encountered an error. but made a work around.. :)  Looking forward to the new version you guys are working on :)

Share this post


Link to post
Share on other sites
On 27/03/2017 at 10:36 PM, ConArts said:

I actually fix'ed it myself :)

We have used it for for about 8 or 9 month now.. and only did a few fixes, as we run big presistent missions every Thursday.. but somtimes it would stop saving if it encountered an error. but made a work around.. :)  Looking forward to the new version you guys are working on :)

 

if it stops saving, its usually because objects have a special char in them (as far as i remember, i might be wrong). If you could tell me how you "work around" this problem, i can see if your solution makes sense and if i implemented

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×