Jump to content
Sign in to follow this  
DieAngel

Data storage

Recommended Posts

is there a way to store datas from a multiplayer mission?

like:

-wiriting a text file,

-a database?

-open a webpage (httpobject fashion)

anything that could allow some sort of "load/save" for a persistent mission?

Share this post


Link to post
Share on other sites

i forgot to add, something that allow to load save the mission status, eventually store points for the players that connected (name/userid pair) and that still allow to edit and improve the mission.

I am asking cause i am toying with the idea of making a semi persistant CTI type of map that would remember each player's rank and stuffs, it sound a bit like BF2 but it isn't what i have in mind.

Share this post


Link to post
Share on other sites

Not at the moment, perhaps someone can come up with a work around. It's not like it's difficult for BIS to add, only you will have to buy VBS2, for those kind of features.

Share this post


Link to post
Share on other sites

lol damn what a joke tounge2.gif

I won't find many players that own vbs2 considering the price but this is stretching the difference between game and training tool a bit far.

They could make arma follow a bit the vbs serie in term of features, even if with a certain delay.

But well, back on track, any of the BIS guy could answer to that?

i mean even a function that silently open an URL and can read 200 characters from the body of the page would makes me happy

Share this post


Link to post
Share on other sites

Wouldn't this new command let us write data to a external file?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

echo

Description: Sends any text into the debugger console or the logfile.

Syntax: echo text

Parameters:text: String

Return Value: Nothing

Example 1:echo "Text in logfile"

Also check out the new "htmlLoad" command at least it looks like there is some way to load HTML-files...

/KC

Share this post


Link to post
Share on other sites

Short answer; No.

The long answer is yes. It was possible in flashpoint also but not exactly easy. One excample would be the latest crCTI missions which lets players save their equipment templates between games.

Getting information into the game is alot easier than the other way around, loadFile is enough for that.

Share this post


Link to post
Share on other sites
Quote[/b] ]Wouldn't this new command let us write data to a external file?

TextLog was on old OFP command. It was disabled then and appears to be disabled in Arma to.

Quote[/b] ]Also check out the new "htmlLoad" command at least it looks like there is some way to load HTML-files...

I think thats dialog related? Although getting info in has always been easy enough.

I'm not sure what you can do exactly with HtmlLoad. But the new dialog system in Arma is a big improvment. Dialogs aren't my thing, but I rekon we can do a load of stuff with them, that we couldn't do before.

Quote[/b] ]The long answer is yes. It was possible in flashpoint also but not exactly easy. One excample would be the latest crCTI missions which lets players save their equipment templates between games.

There may well be a work round, CrashDome also made some progress with this kind of thing in OFP. But for me at least, it would have to work in MP to. I've yet to test out the save games in Arma, so perhaps something has changed there, that would help us along.

Share this post


Link to post
Share on other sites

Thanks for clarifying UNN! A bit strange that "echo" is listed in the wiki's "New Scripting Commands List" and then not available in ArmA 1.00? Maybe it's planned further down the road...

/KC

Share this post


Link to post
Share on other sites

I couldn't get echo to write anything to my hard drive either. But I've not looked into what debugging options we do or don't have.

At least, script error messages now use multiple lines, so it's easier to see where you went wrong.

Share this post


Link to post
Share on other sites
Quote[/b] ]I won't find many players that own vbs2 considering the price

you wont find many full stop wink_o.gif

Share this post


Link to post
Share on other sites

There is another possibility, although it's far from perfect. I just tested savegame in OFP with a dedicated server, no reason to assume Arma will be any different.

You can periodically force a saved game on a client. The saved game file contains all the global variables created during the mission. If you use Coc's Bin view you can see the values change in the saved game file every time the mission is saved during a running game.

If you had another exe that monitors the saved game file for changes, then converts the global variables stored in there, to an OFP\Arma function. That function could be called every time a player connects to the server.

Like I said it's far from perfect, there are some things you could do to prevent cheating and allow the server admin to backup player stats. So if someone was up for writing the programs to manage this, then yeah. It's possible.

Perhaps it can all be handled by the server admin, again the server admin would have to run a dedicated client, used just to save the player stats (global variables broadcast over the network) on a regular basis. With a program to convert them to an init function if the server restarts.

Of course you could end up generating loads of data, so there will be limit.

Share this post


Link to post
Share on other sites

whta about this htmlload function , is it only for briefings? or can it be called silently, can it read a page on a remote web server? and be read using a script, like once i want to reload my map i can load the basic infos like (load_data.php) and read the output and parse it?

Share this post


Link to post
Share on other sites

I couldn't say off hand. The only html pages in the Arma campaign, or overview's and breifings. I can only assume the same restrictions apply to them as they did in OFP?

Share this post


Link to post
Share on other sites

Any more work done here? Sounds like there was some good progress at one point.

Share this post


Link to post
Share on other sites

The HTML load is not going to work. It loads to a control or something to that degree. It also does not load webpages just files. The real method is as Unn put it. We will have to build a sqf file and update variables in the game. It would not be to hard at all to manage this with global variables.

Unn has the correct idea. You save variables to the save game files (savevar & saveidentity = Objects.sav). I have not been able to get the objects.sav working 100% as of yet but i will keep trying. I am using it to store my transit system, store stocks, building states and town status as i am working on a MP game that does co-op and Cti at the same time. That way you can have everyone working. So far i use mysql to store some settings that get imported to change how the AI troops are generated and where. Just wish i could get the data i need exported to control locations that counter attacks get launched from. I will play with the echo command later on tonight to see if i can get it to work.

So far i wrote an application that pretty much monitors the events on the dedicated server console application. If i could figure out how to get more information dumped out to that i can build a system to update a website. Also toying around with setting up named variables and pulling their values from memory. Not sure how well that will work with the memory locations always changing and different mods change it more. So that solution might be out of the question (hope not as it is a direct way to interface into the game).

Share this post


Link to post
Share on other sites
There may well be a work round, CrashDome also made some progress with this kind of thing in OFP. But for me at least, it would have to work in MP to. I've yet to test out the save games in Arma, so perhaps something has changed there, that would help us along.

In OFP, the saveStatus command could sav the object's status to an object.sav file. In SP, it was located in the user's mission folder. In MP, it was in the User's temp folder instead. UNN's idea makes up the 3 years of work we did in SoW to make saving in MP (like the Resistance campaign) possible. You simply created a logic... set it's health to a number between 0.000000 and 1.000000 and you have saved some form of data. We did all kinds of work with compressing integers together into smaller grops of logics etc.. but the hassle was very huge for the small benefit.

I don't own ArmA yet... but other people have told me that saveStatus no longer saves in MP anymore. I await to hear someone find out otherwise, but I assume they disabled the commands in MP altogether.

I cannot believe they do not provide this feature because it is too difficult to program, it provides a cheating capability, or would hinder gameplay... IMO they won't give it to us because the potential of the community or another third-party to duplicate or surpass the many external capabilities of VBS2...

(read as: They are purposely leaving that feature out and will probably never add it)

Share this post


Link to post
Share on other sites

Ill test them out tonight for you and let you know.

I'm curious how biz stands on updating memory locations via the ReadProcessMemory and Writeprocessmemory API. With some work we can build a system to just inject the values into the server on our own. This is as quick as it can get but with this form of updating/reading some game companies will toss the books at you to ensure you don't. I am working on doing this anyway for my own server to store info. Just gotta figure out the correct offsets to the exe.

Share this post


Link to post
Share on other sites

So the echo command is out due to the system locks ARMA puts on the files. Without really doing some work i would say using echo is a no go. Bummer.

Share this post


Link to post
Share on other sites

Well, i have made progress. I was able to read a single variable from outside Arma then i was able to update it inside the game also with an external program i wrote. So it is more than possible to store data now. Made my weekend.

Share this post


Link to post
Share on other sites

Please share?!

Seriously, you have me on the edge of my seat. I need to know what steps you've taken and how viable large data storage is.

Share this post


Link to post
Share on other sites
Please share?!

Seriously, you have me on the edge of my seat. I need to know what steps you've taken and how viable large data storage is.

Not sure yet. Trying to write functions inside of the game and a system to pull them out. I have tested a 32 character string so far and it works well. Ill update ya a little later on as everything i did before was static values that were just increasing numbers. It will only work with the dedicated server though. Ingame does not work , but who really cares..

Share this post


Link to post
Share on other sites

Nice one. It does sound promising, so let us know how you get on. Can't offer much help, other than on the scripting side of things.

Share this post


Link to post
Share on other sites

Would be great if this thing works - we could have AI scripts saving & reloading data from prior missions. A learning AI would finally be possible.

Imagine storming into a city and getting shot from windows and sidestreet because the AI uses trial&error data of great sniper & cover spots already. tounge2.gif

Share this post


Link to post
Share on other sites

Anyone knows the reason to why BIS decided to disable the new "echo" command in the retail version?

I mean are there any valid reasons for not having it enabled, like hacks, cheating etc.?

/KC

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
Sign in to follow this  

×