Jump to content
Sign in to follow this  
DieAngel

Data storage

Recommended Posts

My understanding is that this no longer works in ArmA, but I could be wrong.

Yeah, anything that hooks tends to die with upgrades.

I can get us the data out just can't release anything that injects the data. I will finish up an application that does not hook into the exe or modify it in anyway but will provide all the information that we need. If someone can give me some ideas on what they want i will try to add it into the exe.

Here are some of the things that i have somewhat working.

1. Chat logs (Global, Side). Working on vehicle and group.

2. PublicVariable (Any type)

3. Player Joins (Username, Uid -- Might remove this if it is an issue for people but the server logs have it also)

4. Current Mission

5. Players, scores.

Things i can get working but have not yet

1. Object locations (player, vehicles, AI Units)

2. Object Names

3. Object damage

4. Network Thruput (total sent, current-- Kinda working)

5. Player history

6. Server information requests (gamespy hits?)

I did find out a way to crash the client connected to the server last night. So i guess we could in effect ban the idiots who are running the admin war scripts on the servers. I know i am going to use it to knock their clients out. Sick of watching people connect and sending an admin command over and over trying to find a password.

We never know though, they might do something with the next patch. That is not to far away so i guess we can see what that holds. smile_o.gif

Share this post


Link to post
Share on other sites

You can inject by this:

Quote[/b] ]Just been thinking...

How about the General Scripts folder? Does it also work on dedicated servers?

This aughta be: Your Profile Folder\Scripts (e.g my documents\arma\scripts or my documents\arma other profiles\your name\scripts)

If this could be readable by dedicated server aswell... then you could put scripts or update scripts in there, and exec(vm) them to get the variables!

For single player this should already work!

So simply put you can give commands by above method, and get returned values with your extraction methods, I think?

Share this post


Link to post
Share on other sites

Yeah. I am making it so that people can write plugins to the program to do as they want. Pretty much i will just fire off events to the plugin that they can respond to. It is read only though. I cannot do any writing at the moment. We might get something in the game to help us to a degree in the future. Have to see.

Share this post


Link to post
Share on other sites
Yeah. I am making it so that people can write plugins to the program to do as they want. Pretty much i will just fire off events to the plugin that they can respond to. It is read only though. I cannot do any writing at the moment. We might get something in the game to help us to a degree in the future. Have to see.

Awesome notworthy.gif

Share this post


Link to post
Share on other sites

In regards to writing data to the game I had an idea I will pursue a bit during the weekend.

UNN managed to create a systematic error reports such as:

Quote[/b] ]Cannot create non-ai vehicle Time:4.005 Pos:[2538.71,2519.41,0.00143909] Dir:2.35279

I am thinking of writing a small daemon program (in Windows) to pick up this type of data and transform this into an "example.sqs" script in the desired mission folder such as:

Quote[/b] ]

lastpos = [2538.71,2519.41,0.00143909]

publicVariable "lastpos"

This way the mission could start example.sqs at a defined point in time and all important global variables would get updated within the current game.

Here's the problem: how do you get the mission to start such an example.sqs outside of the mission.pbo? Would the engine accept a singled-out file anywhere else?

Cheers,

Victor

Share this post


Link to post
Share on other sites
...

Awesome idea! Hope to read positive progress soon smile_o.gif

Anything needs testing or help just shout smile_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]Just been thinking...

How about the General Scripts folder? Does it also work on dedicated servers?

This aughta be: Your Profile Folder\Scripts  (e.g my documents\arma\scripts   or my documents\arma other profiles\your name\scripts)

If this could be readable by dedicated server aswell... then you could put scripts or update scripts in there, and exec(vm) them to get the variables!

For single player this should already work!

Quote[/b] ]This way the mission could start example.sqs at a defined point in time and all important global variables would get updated within the current game.

Here's the problem: how do you get the mission to start such an example.sqs outside of the mission.pbo? Would the engine accept a singled-out file anywhere else?

Something like this in Arma should work, depending on what you want to do:

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

       {

       _Input=LoadFile "C:\Input.sqf";

       If !(_Input in ["","@"]) Then

               {

               Call _Input;

               Sleep 1;

               EXTERNALTERMINATE=True;

               PublicVariable "EXTERNALTERMINATE";

               Sleep 1;

               WaitUntil

                       {                

                       _Input=LoadFile "C:\Reset.sqf";

                       Sleep 1;

                       EXTERNALTERMINATE=Call _Input;

                       !EXTERNALTERMINATE

                       };

               PublicVariable "EXTERNALTERMINATE";        

               }

               Else

               {

               Sleep 1;

               };

       (_Input=="@")

       };

Where input.sqf is a file created with the external program and contains stuff like:

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

PublicVariable "ANYVARIABLE1";

ANYVARIABLE2=456;

PublicVariable "ANYVARIABLE2";

ANYOBJECTNAME1 SetPos [1,2,3];

And so on.

Your external program would have to wait until Input.sqf is not locked, before updating. Plus the sleep commands would have to be adjusted to accomodate the length of time it takes to create and empty the sqf. A lot depends on what your trying to do, in most cases I don't think you will need to update it that often? The @ is there just it case you wanted to terminate the loop. EXTERNALTERMINATE could be detected by the external program and used to empty Input.sqf. Once Input.sqf is empty Reset.sqf would be set to "False", so the script knows to start checking for new content in Input.sqf. I'm using LoadFile to avoid any worries with the scripts being cached.

Well it probably needs a little more thought than that, but I'm sure something along those lines will work.

Share this post


Link to post
Share on other sites

Ok, so it does not seem like much but it is the basis and start of the program. This has no hooks into the application at all and there will never be a fade or anything goofy. What it does do however is monitor all the network communications for the game and works off that. Currently it does the following.

1. Logs users coming into the system and leaving the system (game).

2. Complete chat log from the server.

3. PublicVariable commands to and from the server will be caught and stored in the variable list.

4. Current weapon in the players hand.

It runs off a plugin type system and installs as a windows service. So you can get it to log to where ever you want or just write your own plugin to do what you want.

I am working on providing more information on each item.

Classes

Vehicles - Position, Damage, in use

Players - Position, Damage, gear

Other items in works but not working the way i want.

Ability to chat with users from the server console

boot a user (disconnect)

inject public variables to the server

ban a user (timelimit Min:Hour:Day) or Perm. If perm the program will drop all the ip packets to your server (Even requests) kinda like a firewall.

I also am playing with the ability to change the name of the server while it is running. (not sure why but oh well).

svrmon.jpg

Share this post


Link to post
Share on other sites

Wonderful... That's all that needs to be said really.

Share this post


Link to post
Share on other sites

Nice work Nutty!

Is it limited to dedicated servers or will it work when hosting as well?

/KC

Share this post


Link to post
Share on other sites

I was afraid you were simply making a network monitor. While it has excellent range of uses there are several issues if we were to use this to dump data. Mainly because this works on a single machine only. Since other units are local to other machines, I am concerned over the ability to accurately retrieve that data.

Also, since this is network related.. we say.. cannot determine the value of a variable externally while in say preview mode or single player mode? It also relies completely on public variable??

Edit... OK, I re-read to get more info. Sounds cool! Will definately become very handy. I'd still like to see something that could work in preview mode or single-player mode.

Share this post


Link to post
Share on other sites
I'd still like to see something that could work in preview mode or single-player mode.

Since BIS would not allow hooking into the program because this is also what cheaters etc. do... I personally dont think there is any other way than working through the network code... limiting it to MP only smile_o.gif

Share this post


Link to post
Share on other sites

Well the RPT file is still valid for data out and we know that loadfile will work on a generic folder... so it is still possible without injecting code.

As much as I am not fond of the RPT file, I would just like to keep some options open smile_o.gif

Share this post


Link to post
Share on other sites
Well the RPT file is still valid for data out and we know that loadfile will work on a generic folder... so it is still possible without injecting code.

As much as I am not fond of the RPT file, I would just like to keep some options open smile_o.gif

Yeah, but give me a little time i will be able to turn the publicvariable command into a real time variable system. I am working on making it so that the system will drop this from hitting the clients all the time (not sure of the impact of the missing packets on a client as of yet). Then we can do some selective variables that can be pushed out at any rate that we want and the software will just capture them, delete them from going past the local computer. Then we can also inject variable information to the server thru forged packets. No promises on it yet but i am going to try.

Share this post


Link to post
Share on other sites

Oh yeah. Local information opens the game to cheaters also. As anything local can be modified on the client side. So i would not rely on that information if you can.

Share this post


Link to post
Share on other sites

wow! great work guys....

due to all my other little ArmA projects, i didnt get to saving/using gamedata.

it seems you guys have tackled just that!

Share this post


Link to post
Share on other sites

Good work Nutty, interesting to see what types of new game play will come from this.

Quote[/b] ]Oh yeah. Local information opens the game to cheaters also. As anything local can be modified on the client side. So i would not rely on that information if you can.

Yeah, local should be reserved for single play only. Unless you go to the trouble of validating it against the server.

Speaking of potential cheats, is your app restriced to the server only? I guess we would not want cheaters to be able to inject thier own network traffic.

Share this post


Link to post
Share on other sites
Good work Nutty, interesting to see what types of new game play will come from this.
Quote[/b] ]Oh yeah. Local information opens the game to cheaters also. As anything local can be modified on the client side. So i would not rely on that information if you can.

Yeah, local should be reserved for single play only. Unless you go to the trouble of validating it against the server.

Speaking of potential cheats, is your app restriced to the server only? I guess we would not want cheaters to be able to inject thier own network traffic.

It will only work on the server as it needs to see information leaving from the server.

Share this post


Link to post
Share on other sites
Good work Nutty, interesting to see what types of new game play will come from this.
Quote[/b] ]Oh yeah. Local information opens the game to cheaters also. As anything local can be modified on the client side. So i would not rely on that information if you can.

Yeah, local should be reserved for single play only. Unless you go to the trouble of validating it against the server.

Speaking of potential cheats, is your app restriced to the server only? I guess we would not want cheaters to be able to inject thier own network traffic.

It will only work on the server as it needs to see information leaving from the server.

...which you CAN do on the client end.

Share this post


Link to post
Share on other sites
Good work Nutty, interesting to see what types of new game play will come from this.
Quote[/b] ]Oh yeah. Local information opens the game to cheaters also. As anything local can be modified on the client side. So i would not rely on that information if you can.

Yeah, local should be reserved for single play only. Unless you go to the trouble of validating it against the server.

Speaking of potential cheats, is your app restriced to the server only? I guess we would not want cheaters to be able to inject thier own network traffic.

It will only work on the server as it needs to see information leaving from the server.

...which you CAN do on the client end.

Yeah, but it would not work on the client as the clients communication is different than a servers. There is alot of information that the client sends to the server that we are reading but since it would be reversed it would not work the way it is needed. It also does not work with the standalone client. Only the dedicated server app. There are some small minor reasons for this and i dont care to debug the standalone as i see the admin playing the game and why would you need the application then. Also i am capturing based upon the exe name (This will be how some people can host more than one server in the end).

The other issue is why bother trying to inject variables to your local computer. It will just cause your client to be all messed up. Map creators should not rely on the client scripts to keep cheaters out. Thus why server logics exist.

Share this post


Link to post
Share on other sites

What I am saying is that this idea can be used to generate network traffic which places you at an offset from where you really are... correct? Or it could be used to modify local variables if they are known.. ? Note: I am not talking about your app specifically. I am speaking more about the concept you are using to create your exporting/importing of data.

Also, I had in mind a completely different idea for this system than everyone else I think, so your comment...

Quote[/b] ] i dont care to debug the standalone as i see the admin playing the game and why would you need the application then.

is not fair to the rest of us. For example, my intention was to 'peek' at values of variables to have a true console for debugging missions during preview mode... or another example, to store campaign progress (which can be done as dedicated or as hosted server). I really need/want the ability to export data, but you see, I have no use for clan-based or public servers. So your app apparently doesn't help me.

I still need to look into other avenues, while innovative, this idea is limited to public/dedicated servers only.

Share this post


Link to post
Share on other sites
What I am saying is that this idea can be used to generate network traffic which places you at an offset from where you really are... correct? Or it could be used to modify local variables if they are known.. ? Note: I am not talking about your app specifically. I am speaking more about the concept you are using to create your exporting/importing of data.

Also, I had in mind a completely different idea for this system than everyone else I think, so your comment...

Quote[/b] ] i dont care to debug the standalone as i see the admin playing the game and why would you need the application then.

is not fair to the rest of us. For example, my intention was to 'peek' at values of variables to have a true console for debugging missions during preview mode... or another example, to store campaign progress (which can be done as dedicated or as hosted server). I really need/want the ability to export data, but you see, I have no use for clan-based or public servers. So your app apparently doesn't help me.

Yeah, what i am doing will not work outside of a dedicated server. Single player does not use network traffic to send out any information. I was working on something that could be used in single player but as Bohemia has stated they will not allow the methods required to do this. Once i get this portion done i can work on something to work with the log files. I will PM you my email address if you want to send me a test mission that exports the data you are wanting to a log file i can start toying with that idea to get some data to be processed...

Please understand i want to help everyone get what they are looking for but i am trying to stick to what has been said. There might also be some ability to write data after the next patch is released. So hold in there for just a little bit. The next patch might have some tools for us to use that makes what i am doing worthless anyway.

Also the app will not generate any random traffic that will cause warping or speedhacking kind of items. The only traffic it will generate will be to inject a publicvariable command to the server to update values requested by the mod maker, map maker or admin. So i highly doubt the tool would ever be used as a cheat.

Share this post


Link to post
Share on other sites

I don't profess to be an expert, but there must be some information thats generated on a client only, and sent to the server during normal game play? It's that info that worried me as being a potential hack. But, if it's physically impossible to run you app on a client and send erroneous information to the server, then there is nothing to worry about.

There are some applications I can think of that would benefit from client side processing. But that could be validated with the server to prevent cheating, using the traditional methods.

Share this post


Link to post
Share on other sites
Yeah, what i am doing will not work outside of a dedicated server. ...

... i highly doubt the tool would ever be used as a cheat.

Oh, by no means was I suggesting you need to accomodate me specially... I was just stating that there are other needs than what was mentioned the previous two pages or so.

I think I will take you up on your email offer, though. I will explain what I am doing and perhaps you can give me some advice.

I will email you as soon as I possibly can.

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  

×