View previous topic :: View next topic |
Author |
Message |
el sombrero
Joined: 03 Apr 2012 Posts: 12
|
Posted: Tue Apr 03, 2012 23:15 Post subject: How to collect data from a variable and paste at a spreadshe |
|
|
Hi there guys.
I'm using the toolset to create an experiment that I need to create for college.
The experiment will be quite simple, the player will have to learn some sequences and the time he takes to perform it, and the number of tries he need to learn the sequences will be measured.
The thing is, I do not know how to transfer the data tha will be stored in variables (that will register how many times he does this and that) to a spreasheet. Can anyone help me out here? I was considering to transfer the data to a xls spreasheet, but it could be other kind of spreasheet.
Also, since I need to measure the time taken, does anyone have any idea how I could implement a chronometer in game, and transfer the info about the time the player takes to perform each sequence to a spreasheet? The player CAN'T have access to the chronometer.
:0) |
|
Back to top |
|
|
acomputerdood
Joined: 30 Nov 2008 Posts: 27
|
Posted: Wed Apr 04, 2012 15:28 Post subject: |
|
|
my first thought would be to just print out in the module's log file for each step in the process. then a simple perl script could parse all the data and print it out in a format that can be imported to excel.
OR, you could use the odbc plugin to log to a mysql db and use a similar technique to parse the data.
those are the two methods i've been using to pull data from the game to outside the game.
of course, i'm not sure about the granularity of the timestamps that are available for each logging method. i imagine they're both down to the second, though. i guess if you're storing everything into variables and reporting after the fact then granularity doesn't matter.
if that's the case, you can even create an object that will "speak" all of the variables out to the PC. i believe there's an option to log chat messages, too. if not, then you can use the chat plugin to do it as well.
though i know very little about it, i would guess that the client extender could also do something similar, no? |
|
Back to top |
|
|
el sombrero
Joined: 03 Apr 2012 Posts: 12
|
Posted: Wed Apr 04, 2012 19:52 Post subject: |
|
|
Uhm... the idea of creating an object that will speak all variables is interesting. How do you suggest I make it?
(this idea is even more considering that right now I can't script in pearl. would have to learn it. the only languag I really know is the "old c").
About the clock, seconds are just what I need. How could I implement it and store the time in which the subject push a switch in a variable?
Hey... think I'm asking a lot a of questions... but answering those two would REALLY help me out.
thx! |
|
Back to top |
|
|
acomputerdood
Joined: 30 Nov 2008 Posts: 27
|
Posted: Wed Apr 04, 2012 20:32 Post subject: |
|
|
i just found in the toolset the:
GetTimeHour()
GetTimeMinute()
GetTimeSecond()
GetTimeMillisecond()
functions. that should make your clock pretty trivial. i was hoping something like those existed.
as far as the variable speaker, just make a guy standing there with a conversation script. one of the tabs for each line of conversation is "Actions Taken". you can use that to fire off a script that will speak the variables using the "SpeakString" function. i THINK those can be logged - anyone know for sure? otherwise, you're again back to printing to the regular logfile.
alternatively, you can still print everything in the logs using WriteTimestampedLogEntry(), but as mentioned before, that will require a way to parse those entries out. and yes, C isn't the best way to do that you could use a clever combination of grep and such, too.
the other question is how many data points are you going to have? if it's only like 10 or 20, then i'd say it's possible to go through the logs by hand to cut and paste the entries out. tedious, yes, but shouldn't take more than 20-30 minutes. |
|
Back to top |
|
|
eeriegeek
Joined: 07 Jan 2008 Posts: 59
|
Posted: Wed Apr 04, 2012 20:46 Post subject: |
|
|
The system plugin on linux has a function called GetSystemTime() which returns realtime in seconds. You could check to see if the windows version has a similar function.
If, at the end of your test you call WriteTimestampedLogEntry to write a comma delimited list of your results values out as single lines like this:
Code: |
[Sun Mar 25 04:00:25] DATA,pgsql,10,100,1000,0,2,0,266.960,9.997964,0
[Sun Mar 25 04:00:27] DATA,pgsql,31,100,1000,0,2,0,259.960,16.997932,0
[Sun Mar 25 04:00:31] DATA,pgsql,100,100,1000,1,3,0,263.960,12.997985,0
|
you can then select the text and use paste-special to paste with comma delimited values right into columns. |
|
Back to top |
|
|
el sombrero
Joined: 03 Apr 2012 Posts: 12
|
Posted: Wed May 09, 2012 22:27 Post subject: |
|
|
Uhm, using this functions, how do I start the clock ( minutes and seconds are what I need).
I would need the timer to start at the beginning of the module and stop at the end of it, so I can now for sure how long the player played the game. Also, I would like to have some trigger along the way that would tell me how long the player took to reach that point.
acomputerdood wrote: | i just found in the toolset the:
GetTimeHour()
GetTimeMinute()
GetTimeSecond()
GetTimeMillisecond()
functions. that should make your clock pretty trivial. i was hoping something like those existed.
as far as the variable speaker, just make a guy standing there with a conversation script. one of the tabs for each line of conversation is "Actions Taken". you can use that to fire off a script that will speak the variables using the "SpeakString" function. i THINK those can be logged - anyone know for sure? otherwise, you're again back to printing to the regular logfile.
alternatively, you can still print everything in the logs using WriteTimestampedLogEntry(), but as mentioned before, that will require a way to parse those entries out. and yes, C isn't the best way to do that you could use a clever combination of grep and such, too.
the other question is how many data points are you going to have? if it's only like 10 or 20, then i'd say it's possible to go through the logs by hand to cut and paste the entries out. tedious, yes, but shouldn't take more than 20-30 minutes. |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|