Jump to content
code34

iniDBI - Save and Load data to the server or your local computer without databases!

Recommended Posts

Sorry if this is a noob question lol

Can I use this when setting up an epoch server?

I just want a small co-op max 5 players between friends and I have an arma server already.

Thanks

This addon works with pretty much anything granted you use the proper signature keys in your server.

Share this post


Link to post
Share on other sites

I found that if I am inside of any vehicle it will save my position like a champ. If I get out of a vehicle it will save my position correctly, however, all subsequent saves will remain the position I exited the vehicle. I know this is a huge clue but I do not understand the mechanics of it yet to come up with an AHA! moment :/

Share this post


Link to post
Share on other sites

This addon works with pretty much anything granted you use the proper signature keys in your server.

So this will save the players bank and inventory etc?

Any help or tips on where to start adding this to an epoch mission server would be awesome :)

I can't even get the mission to load but I think it's because it's trying to find me or add me to a database that doesn't exist (or I'm a noob and don't know what I'm doing lol).

Share this post


Link to post
Share on other sites

So this will save the players bank and inventory etc?

Any help or tips on where to start adding this to an epoch mission server would be awesome :)

I can't even get the mission to load but I think it's because it's trying to find me or add me to a database that doesn't exist (or I'm a noob and don't know what I'm doing lol).

The best advice I can give for this addon is be patient. This is by far not for begginers. I say that because of the methods you have to code yourself to your needs. The documentation in the folder is priceless. Look at the examples of how they should be used and start extremely small. Try to save player names or player weapons or even just date and time to a table. Once you get that far you can branch out to others quite easily. I do  not have any desire to fool with epoch of any kind so i cannot help much there :/ sorry.

Share this post


Link to post
Share on other sites

I got tired of testing the same freaking thiings over and over so I just made some work arounds for player position. I am functional, allbeit not how i intended, functional non the less though. If anyone has an idea as to why I can continuously update player position inside a vehicle but not outside a vehicle i would be very happpy lol.

Share this post


Link to post
Share on other sites

After hours of messing with this, I think i finally almost have it, but i'm running into one final problem. A percentage of the time, maybe 30%, the player's profileBroadcaster.sqf isn't being loaded (i'm using a similar setup to the example), and the server never 

gets the players information.

 

If i disconnect and reconnect, it works perfect, loads the equipment, it's just every once in a while, even though I can see the players Init.sqf start up and send logs, it doesn't start the profileBroadcaster.

 

Is there any reason this might be happening? I can't think of any good reason for this

Share this post


Link to post
Share on other sites

After hours of messing with this, I think i finally almost have it, but i'm running into one final problem. A percentage of the time, maybe 30%, the player's profileBroadcaster.sqf isn't being loaded (i'm using a similar setup to the example), and the server never 

gets the players information.

 

If i disconnect and reconnect, it works perfect, loads the equipment, it's just every once in a while, even though I can see the players Init.sqf start up and send logs, it doesn't start the profileBroadcaster.

 

Is there any reason this might be happening? I can't think of any good reason for this

 

Maybe if you posted your rpt log we could find some msg about not finding the addon or the file. I seemed to have trouble getting the DB to compile if i ran it globally. I had to specufy server only and save that way.

Share this post


Link to post
Share on other sites

I've checked the rpt logs for both the server and the player, unfortunately there's no messages or warnings, I just either see my diag_logs about the profile broadcaster (and profile loading) being started, or it doesn't happen and there's no other differences. I can see the player's Init start up 100% of the time, it just doesn't always load the broadcaster.

 

I'm currently running it from a server. What do you mean running it globally vs server only?

Share this post


Link to post
Share on other sites

Good spot on the var name in the file.

 

To make it simpler I have moved back to trying to reference the TEST.ini in the 'db' folder that comes with iniDBi.

 

Code is being run via Debug Window in the A3 editor on Stratis.

call compile preProcessFile "\inidbi\init.sqf";
inidbExists = "TEST" call inidb_exists;
value = ["TEST", "GLOBAL", "units", "STRING"] call iniDB_read;
diag_log format["inidbExists: %1, value: %2",inidbExists, value];

Output from the Diag_Log

"inidbExists: any, value: any"

The TEST.ini is exactly as it is in the @inidbi distro.

 

Is anyone able to verify they are running iniDBi on Windows 10 ?.

 

hi,

 

If you want to test first, if inidbi is well installed

 

you can do that way :

 

diag_log call iniDB_version;

 

Inidbi version returns the version of the pbo calling code in the pbo

Dll version returns the version of the dll calling code in dll through the pbo code

 

"Inidbi: 1.4 Dll: "

 

In your case, the dll is not loaded. It should be at this place :  Arma 3\@inidbi\iniDB.dll

Share this post


Link to post
Share on other sites

hi,

 

If you want to test first, if inidbi is well installed

 

you can do that way :

 

 

 

Inidbi version returns the version of the pbo calling code in the pbo

Dll version returns the version of the dll calling code in dll through the pbo code

 

 

 

In your case, the dll is not loaded. It should be at this place :  Arma 3\@inidbi\iniDB.dll

 

Ok, it is now working.  I have not changed anything at all.  The only difference is that I have just got an A3 update (1.50 -> 1.52).

 

Anyhow.  it is working and that is great.

 

Many thanks for taking the time in replying.

 

Update: Spoke too soon.  Now it is not working again

 

Previous result

23:36:52 Unable to get file version size: D:\Program Files (x86)\Steam\steamapps\common\Arma 3\@inidbi\iniDB.dll
23:36:52 "Inidbi: 1.4 Dll: 1.1"

Now the result is 

23:51:17 "Inidbi: 1.4 Dll: "
23:51:45 "inidbExists: any, value: any"

What happened in between working and now not working.....

 

Added another mod.  -> Stopped working.

Removed the other mod -> Still not working.

 

Maybe there is an issue with the launcher.  Will try with a batch file.

 

Update 2: Ok, if I go in the editor and preview then open the diag GUI and run the command to get the dll version it all works fine.  If I run xCam before doing that it all fails.  Seems to be something to do with activating the .dll in the game before it is used.  I will also report on the xCam thread.  At least I can use both iniDBi and xCam now with that one extra step.

Share this post


Link to post
Share on other sites

Hello!

 

I have a question regarding name encoding when file is created.

 

That snippet shows how filename is created:

_mstart = missionStart;
_mname = briefingName;
_wname = worldName;
_filename = format ["%1__%2__%3", _mstart, _mname, _wname];

I am writing to this file only statistics from all played missions on server. This file is read and parsed by another program.

 

One of ours mission makers wrote this in mission.sqm:

briefingName="co 20-37 PRZEÅĘCZ v 1.0";

and because of that inidbi file name is:

[2015,10,25,20,33,50]__co 20-37 PRZEÅĘCZ v 1.0__Mountains_ACR

My primary question is: how programatically can I avoid this?

Maybe encode to base64 and then decode will be way to go... But filenames are then unreadable by human.

 

 

---

I can write this string to file without problems with encoding, everything is ok. Only filename is affected. 

Share this post


Link to post
Share on other sites

hello Doman,

 

have to think about it but you have to consider that inidbi v1 is not anymore supported.

 

Im looking to release inidbi v2, if some guys are interested by :)

  • Like 1

Share this post


Link to post
Share on other sites

Yes of course I am interested !

And I suppose that many other people are waiting too ;)

 

This is so far one of the best db solutions, because it is simple, reliable and fast  :)

Share this post


Link to post
Share on other sites

thanks you for your support Kremator and Doman, i will give you feedback soon :)

Share this post


Link to post
Share on other sites

packaging the application is running :)

 

if you have any request ? :p

Share this post


Link to post
Share on other sites

We can make requests? :D

 

I have found, that touching database file can cause in server crash (even copying file) - when users are online and database is going to be used for writing.. 

Share this post


Link to post
Share on other sites

hi

 

can you give please more explanation of what you did ? :)

Share this post


Link to post
Share on other sites

I am using inidbi to store data about: clientname, client slot description, client group name and time.

Every database is in another file named [year,mont,day,hrs,min,sec]__mission_name__map_name.ini.

This happens first after 60 seconds after mission start. Then every time when someone connects/disconnects.

I can send You code via pm if You wish. But I think, that it is not necessary ;)

 

Sometimes i need to copy all files/databases to another directory (via ftp) to do some processing and display results on website.

When I do this with "connected" database, then sometimes server crashes.

 

What I think.. maybe when inidbi tries to write to file, but this file is opened by another program (like ftp) then it crashes.

Maybe solution here is to check if file is there and is readable/writable and then write data to it?  :)

 

I really like inidbi and how it works, it simplicity and readable output stored in files. I tried other DB solutions, but in all cases it was overkill for what i need ;)

Share this post


Link to post
Share on other sites

mm ok, i tried to reproduce this bug in next version, but it doesn't happen.

 

i locked the file, or try to acces with several thread, no problems

Share this post


Link to post
Share on other sites

Hi guys has anyone made a arma 3 epoch server using this databse system?

And if so could I get some advice on how to do it?

Share this post


Link to post
Share on other sites

EDIT:  removed as inidb no longer exists .... you need to change to inidb2 IB!

 

FURTHER EDIT:  I'd ask to get this thread closed down now code34.

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

×