Cpp Report post Posted September 14, 2004 Would anyone like being able to record all messages that server sent to you and later replay them like a 3D movie? I only have a test version of it. Recording can be started with command "#record <file name>" (for example "#record test") and ended with "#stop". It saves files to records folder (that must be created before using it :-/). The movie player is another exe, but it wouldn't be hard to merge game and movie player. For now, there is no way to speed up the message playing, but its probably needed. If anyone has any suggestions how i could make player and game client switch in login screen, i would like to hear it. Maybe another input line for file name in login screen (and a button, of course)? What do you all think? Share this post Link to post Share on other sites
MikeH Report post Posted September 24, 2004 you mean record JUST messages or everything so you cna watch yourself do stuff over cuz its really out fo the way for the devs to do that when you can just look at your logs you can choose to have logs recorded or not Share this post Link to post Share on other sites
Keknehv Report post Posted September 24, 2004 I think he means attacks, other player movement, time, etc. That would **probably** be a large file. But I think it could be done. P.S. Pray, and hope Umrion notices this post Share this post Link to post Share on other sites
Wytter Report post Posted September 24, 2004 Well, all data from the server is logged to a file if log_conn_data==1. So it shouldn't be hard to make EL just read the data from the server if you add a time (SDL_GetTicks) offset to the data log, then make EL bypass all login to the server and user input and instead read the recorded data from the data log. You wouldn't be able to interact with anything, but you'd be able to see everything that was recorded. It's really not that hard to do, I just don't have the time for it atm :-/ Share this post Link to post Share on other sites
Leeloo Report post Posted September 24, 2004 Interesting how many people are discussing if and how it can be done, when Cpp started by saying that he already did it. Share this post Link to post Share on other sites
Cpp Report post Posted September 24, 2004 Yea, lol, thanx Leeloo. Btw, it's finished, unless someone would like something changed. Hmm, i thought that this post was dead already, thanx for answering! Well, it records everything, so you can rotate the camera or even open inventory or any other window (except ones that are opened by server). The size of file isnt that bad... I have recorded aprox 2 hours long riva meeting and it takes up 75KB. A program for replaying the records is separate, but codes are merged into one piece. File choosing is done in a bit changed login screen. Also there is a possibility to speed things up to 4 times and slow down to 5 times or stop it at all. If you are wondering what you could record, i can suggest a guild meeting, a bug or macroer But if someone wants to try it out, there is a small problem - i have never used cvs diff Share this post Link to post Share on other sites
Keknehv Report post Posted September 27, 2004 Excellent. And maybe now admins would be able to do #upload [blah] to show abuse. Maybe we could have the program chop it up into sections (session/day?)... MUCH better than a chatlog, now we can SHOW them it Also, maybe Ent could implement this on the server so the server logs everything--(couple megs/day?) Share this post Link to post Share on other sites
crusadingknight Report post Posted September 28, 2004 Excellent. And maybe now admins would be able to do #upload [blah] to show abuse. Maybe we could have the program chop it up into sections (session/day?)... MUCH better than a chatlog, now we can SHOW them it Also, maybe Ent could implement this on the server so the server logs everything--(couple megs/day?) 1. If we want to use this as a log, won't we have to make it a binary file w/ a single array so it can't be tampered with? 2. Wouldn't that slow down the server a bit? (You server-logging idea) Share this post Link to post Share on other sites
Leeloo Report post Posted September 28, 2004 A binary file that can't be tampered with???? Ph34r m9 1337 |-|E>< 3d1t0r. Share this post Link to post Share on other sites
crusadingknight Report post Posted September 28, 2004 A binary file that can't be tampered with???? Ph34r m9 1337 |-|E>< 3d1t0r. It would certainly slow down our 1337 \|/ | |\| |) () \|/ 5 |-| @ >< 0 |2Zs. Share this post Link to post Share on other sites
Tropicano Report post Posted October 4, 2004 say that this DID get implented on the server... that would be like 360mb per day - stored on the server... (300x50x24kb) or smth like that. IF the game got a 24/h/day crew, just sitting online and w8ing for someone to abuse someone (and this 360mb file was accessable for everyone in that crew at any time) - this might be a good thing, if wiped every day or so.. If this is really recording everything you might be able to zoom out in for example CC and see who is bagspamming - and actually ban them for it. And u can also easily see who is macroing and who aint by looking for exact loops in their inventory while they are manufacturign etc... But right now this looks like something more suited for entertaining purposes than technical. Share this post Link to post Share on other sites
Lyanna Report post Posted October 4, 2004 The potential for this patch is amazing: 1) You could record events and wars in KF, and put it on EL.net for everyone to see. (Forget a newspaper - why not live TV?) 2) You could record an entire Roleplaying adventure. 3) You could create special cut-scenes to tie in with some quests. (eg. create characters "Aluwen" and "Mortos", and script a scene between them.) They might serve as tangible quest rewards. (Heck, if you have enough bandwidth, you could even stage a whole "Pirate Invasion" movie in MM...) 4) Adverts for EL. 5) Wedding movies, guild foundings, EL anniversaries, etc. 6) And yes, tracking abusers and macroers, etc. Great job, Cpp! Try to develop its versatility as much as possible! There are so MANY uses for this... -Lyn- Share this post Link to post Share on other sites
Acelon Report post Posted October 4, 2004 Wow I just read the post and its a great program! I definetly want this either serverside or in a modified client. (send me the code ) Share this post Link to post Share on other sites
Cpp Report post Posted October 4, 2004 Well, here is the source... Currently i don't know what should be changed and how because i am pretty busy in school, so i'm leaving that to you. The record.c file version that i'm posting here is made for replay program. To compile the client for playing and recording change variable replaying value to 0 in line #6 in record.c. Btw, i have chosen to make it a variable, not a define so that it would be easyer to merge the two exe's and make 1 exe that could be toggled between client and movie player. You will need record.c and record.h. Add record.o object into your makefile. Here's the diff (sorry for that many changes): Index: console.c =================================================================== RCS file: /cvsroot/elc/elc/console.c,v retrieving revision 1.29 diff -r1.29 console.c 66a67,92 >  //record? >  if(my_strncompare(text_loc,"record ", 7)) >  { >   start_recording(&text_loc[7]); >   return; >  } >  //stop record?? >  if(my_strcompare(text_loc,"stop")) >  { >   end_recording(); >   return; >  } >  //replaying commands >  if(replaying) >  { >  //speed? >  if(my_strncompare(text_loc,"speed ", 6)) >   { >   int temp; >   sscanf(text_loc, "speed %i", &temp); >   rec_speed = (float)temp/10.0f; >   if(rec_speed > 4.0f) rec_speed = 4.0f; >   if(rec_speed < 0.0f) rec_speed = 0.0f; >   return; >   } >  } Index: events.c =================================================================== RCS file: /cvsroot/elc/elc/events.c,v retrieving revision 1.73 diff -r1.73 events.c 96c96 <   if(interface_mode==interface_opening && !disconnected) --- >   if(interface_mode==interface_opening && (disconnected==0)) 102c102 <   if(disconnected && !alt_on && !ctrl_on) --- >   if((disconnected==1) && !alt_on && !ctrl_on) 141a142,158 >     if(event->key.keysym.sym==SDLK_KP_PLUS && replaying) >   { >    if(rec_speed >= 1.0f && rec_speed < 4.0f) >    rec_speed += 0.5f; >    if(rec_speed < 1.0f) >    rec_speed += 0.2f; >    break; >   } >   if(event->key.keysym.sym==SDLK_KP_MINUS && replaying) >   { >    if(rec_speed > 1.0f) >    rec_speed -= 0.5f; >    if(rec_speed <= 1.0f && rec_speed > 0.0f) >    rec_speed -= 0.2f; >    break; >   } > 395c412,413 <     send_login_info(); --- >     if(replaying) start_replaying(username_str); >     else   send_login_info(); 566c584 <     interface_mode==interface_opening && !disconnected) --- >     interface_mode==interface_opening && (disconnected==0)) Index: global.h =================================================================== RCS file: /cvsroot/elc/elc/global.h,v retrieving revision 1.52 diff -r1.52 global.h 89a92 > #include "record.h" Index: hud.c =================================================================== RCS file: /cvsroot/elc/elc/hud.c,v retrieving revision 1.63 diff -r1.63 hud.c 687c690,699 < --- >  if(replaying) >  { >  if(rec_speed<=0) >   speed_adjusted_x_len=0;//we don't want a div by 0 >  else >   speed_adjusted_x_len=100/(4.0f/rec_speed); >  draw_stats_bar(mana_bar_start_x, mana_bar_start_y-18, rec_speed*10, speed_adjusted_x_len, 0.2f, 1.0f, 0.2f, 0.2f, 0.5f, 0.2f); >  sprintf(str, " - Speed (KP + or - to change; 10 = normal)."); >  draw_string_small(food_bar_start_x-40,mana_bar_start_y-21,str,1); >  } Index: init.c =================================================================== RCS file: /cvsroot/elc/elc/init.c,v retrieving revision 1.91 diff -r1.91 init.c 668c668,673 <  connect_to_server(); --- >  if(replaying) >  { >  interface_mode=interface_log_in; >  disconnected=3; >  /*start_replaying("test.rec");*/ >  } else   connect_to_server(); Index: interface.c =================================================================== RCS file: /cvsroot/elc/elc/interface.c,v retrieving revision 1.61 diff -r1.61 interface.c 486c486 <   mouse_y<=log_in_y+log_in_y_len && username_str[0] && password_str[0]) --- >   mouse_y<=log_in_y+log_in_y_len && username_str[0] && (password_str[0] || replaying)) 507,512c507,515 <  if(mouse_x>=password_bar_x && mouse_x<=password_bar_x+password_bar_x_len <   && mouse_y>=password_bar_y && mouse_y<=password_bar_y+password_bar_y_len && left_click==1) <  { <   username_box_selected=0; <   password_box_selected=1; <  } --- >  if(!replaying) //we dont want to change file type >  { >  if(mouse_x>=password_bar_x && mouse_x<=password_bar_x+password_bar_x_len >    && mouse_y>=password_bar_y && mouse_y<=password_bar_y+password_bar_y_len && left_click==1) >   { >   username_box_selected=0; >   password_box_selected=1; >   } >  } 518c521,522 <   send_login_info(); --- >   if(replaying) start_replaying(username_str); >   else   send_login_info(); 526,527c530,538 <  draw_string(username_text_x,username_text_y,"Username: ",1); <  draw_string(password_text_x,password_text_y,"Password: ",1); --- >  if(replaying) >  { >  my_strcp(display_password_str, ".rec"); >  draw_string(username_text_x,username_text_y,"File: ",1); >  draw_string(password_text_x,password_text_y,"Type: ",1); >  } else { >  draw_string(username_text_x,username_text_y,"Username: ",1); >  draw_string(password_text_x,password_text_y,"Password: ",1); >  } 596a608 >  if(replaying) return; //we dont want to change file type. 605a618 >  if(replaying) return; //we dont want to change file type. Index: main.c =================================================================== RCS file: /cvsroot/elc/elc/main.c,v retrieving revision 1.39 diff -r1.39 main.c 49c49,50 <   get_message_from_server(); --- >   if(replaying) replay_qued_msg(); >   else   get_message_from_server(); 88a90,94 >  if(rec_file) >  { >  if(replaying) end_replaying(); >  else   end_recording(); >  } Index: multiplayer.c =================================================================== RCS file: /cvsroot/elc/elc/multiplayer.c,v retrieving revision 1.57 diff -r1.57 multiplayer.c 761a762,763 >    if (rec_file) >    record_msg(pData, size); Index: text.c =================================================================== RCS file: /cvsroot/elc/elc/text.c,v retrieving revision 1.32 diff -r1.32 text.c 62a63,64 >  if(replaying) >  return; PS. Thanx to Lyanna for thinking of that many examples, i wouldnt have thought about some of them myself Share this post Link to post Share on other sites
Tropicano Report post Posted October 5, 2004 sweet well ill try to compile that and see for myself.. till then, keep up the good work Share this post Link to post Share on other sites
jamesvm Report post Posted October 15, 2004 hey patch when applied manueled got this error ------ Build started: Project: elc, Configuration: Release Win32 ------ Compiling... interface.c interface.c(46) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data interface.c(47) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data interface.c(49) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data interface.c(50) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data interface.c(52) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data interface.c(54) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data interface.c(55) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data interface.c(212) : warning C4244: '=' : conversion from 'float' to 'short', possible loss of data interface.c(213) : warning C4244: '=' : conversion from 'float' to 'short', possible loss of data interface.c(608) : error C2059: syntax error : 'if' hud.c hud.c(682) : warning C4244: 'function' : conversion from 'float' to 'int', possible loss of data hud.c(683) : warning C4244: 'function' : conversion from 'float' to 'int', possible loss of data hud.c(684) : warning C4244: 'function' : conversion from 'float' to 'int', possible loss of data hud.c(685) : warning C4244: 'function' : conversion from 'float' to 'int', possible loss of data hud.c(690) : error C2065: 'speed_adjusted_x_len' : undeclared identifier hud.c(692) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data hud.c(693) : warning C4244: 'function' : conversion from 'float' to 'int', possible loss of data hud.c(694) : error C2065: 'str' : undeclared identifier hud.c(694) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int' hud.c(695) : warning C4047: 'function' : 'const unsigned char *' differs in levels of indirection from 'int' hud.c(764) : warning C4244: 'function' : conversion from 'int' to 'GLfloat', possible loss of data hud.c(783) : warning C4244: 'function' : conversion from 'int' to 'GLfloat', possible loss of data hud.c(1113) : warning C4244: '=' : conversion from 'Uint32' to 'float', possible loss of data hud.c(1116) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data hud.c(1122) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data Build log was saved at "file://c:\James\complie el source code\elc\Release\BuildLog.htm" elc - 3 error(s), 22 warning(s) when look code is being insert into function int display_stats_bar_handler(window_info *win) it is latest cvs source code Share this post Link to post Share on other sites
frak Report post Posted October 15, 2004 i think u forgot to add the files record.c and record.h to ur project. Share this post Link to post Share on other sites
Cpp Report post Posted October 15, 2004 Hmm, i think that i forgot to add str declaration because my copy isnt very clean. Sorry about that. Just add Uint8 str[200]; at the beginning of the scope. About that 'if' - no idea what could be wrong there Share this post Link to post Share on other sites
jamesvm Report post Posted October 15, 2004 Hmm, i think that i forgot to add str declaration because my copy isnt very clean. Sorry about that. Just add Uint8 str[200]; at the beginning of the scope. About that 'if' - no idea what could be wrong there only error got now is hud.c(690) : error C2065: 'speed_adjusted_x_len' : undeclared identifier Share this post Link to post Share on other sites
Platyna Report post Posted October 15, 2004 I wonder when people will start using #upload to put server connection down or to upload "funny" movies. Regards. Share this post Link to post Share on other sites
frak Report post Posted October 15, 2004 I wonder when people will start using #upload to put server connection down or to upload "funny"movies. Regards. if there is something like common sense about how to use computers than u lack it. Share this post Link to post Share on other sites
Platyna Report post Posted October 15, 2004 Run anonymous FTP with writable incoming dir on your LAN (big one - 300 people like are in game). Then look in that dir after a week. You will get scared. Regards. Share this post Link to post Share on other sites
jamesvm Report post Posted October 16, 2004 Hmm, i think that i forgot to add str declaration because my copy isnt very clean. Sorry about that. Just add Uint8 str[200]; at the beginning of the scope. About that 'if' - no idea what could be wrong there only error got now is hud.c(690) : error C2065: 'speed_adjusted_x_len' : undeclared identifier ok need help when declared 'speed_adjusted_x_len' as float in function it compiles but when run client type #record test.rec it immediatlely crash on me Share this post Link to post Share on other sites
Cpp Report post Posted October 16, 2004 Ok, sorry for any mistakes i've made... Add float speed_adjusted_x_len; somewhere at the beginning of the scope... Also the record command should be #record test (without .rec) Sorry again Here's a new diff (someone test it?): Index: console.c =================================================================== RCS file: /cvsroot/elc/elc/console.c,v retrieving revision 1.30 diff -w -b -i -r1.30 console.c 66a67,92 > //record? > if(my_strncompare(text_loc,"record ", 7)) > { > start_recording(&text_loc[7]); > return; > } > //stop record?? > if(my_strcompare(text_loc,"stop")) > { > end_recording(); > return; > } > //replaying commands > if(replaying) > { > //speed? > if(my_strncompare(text_loc,"speed ", 6)) > { > int temp; > sscanf(text_loc, "speed %i", &temp); > rec_speed = (float)temp/10.0f; > if(rec_speed > 4.0f) rec_speed = 4.0f; > if(rec_speed < 0.0f) rec_speed = 0.0f; > return; > } > } Index: events.c =================================================================== RCS file: /cvsroot/elc/elc/events.c,v retrieving revision 1.73 diff -w -b -i -r1.73 events.c 96c96 < if(interface_mode==interface_opening && !disconnected) --- > if(interface_mode==interface_opening && (disconnected==0)) 102c102 < if(disconnected && !alt_on && !ctrl_on) --- > if((disconnected==1) && !alt_on && !ctrl_on) 141a142,158 > if(event->key.keysym.sym==SDLK_KP_PLUS && replaying) > { > if(rec_speed >= 1.0f && rec_speed < 4.0f) > rec_speed += 0.5f; > if(rec_speed < 1.0f) > rec_speed += 0.2f; > break; > } > if(event->key.keysym.sym==SDLK_KP_MINUS && replaying) > { > if(rec_speed > 1.0f) > rec_speed -= 0.5f; > if(rec_speed <= 1.0f && rec_speed > 0.0f) > rec_speed -= 0.2f; > break; > } > 395c412,413 < send_login_info(); --- > if(replaying) start_replaying(username_str); > else send_login_info(); 566c584 < interface_mode==interface_opening && !disconnected) --- > interface_mode==interface_opening && (disconnected==0)) Index: global.h =================================================================== RCS file: /cvsroot/elc/elc/global.h,v retrieving revision 1.55 diff -w -b -i -r1.55 global.h 92a93 > #include "record.h" Index: hud.c =================================================================== RCS file: /cvsroot/elc/elc/hud.c,v retrieving revision 1.66 diff -w -b -i -r1.66 hud.c 659a660 > Uint8 str[200]; 663a665 > float speed_adjusted_x_len; 702a705,714 > if(replaying) > { > if(rec_speed<=0) > speed_adjusted_x_len=0;//we don't want a div by 0 > else > speed_adjusted_x_len=100/(4.0f/rec_speed); > draw_stats_bar(mana_bar_start_x, mana_bar_start_y-18, rec_speed*10, speed_adjusted_x_len, 0.2f, 1.0f, 0.2f, 0.2f, 0.5f, 0.2f); > sprintf(str, " - Speed (KP + or - to change; 10 = normal)."); > draw_string_small(food_bar_start_x-40,mana_bar_start_y-21,str,1); > } Index: init.c =================================================================== RCS file: /cvsroot/elc/elc/init.c,v retrieving revision 1.93 diff -w -b -i -r1.93 init.c 688c688,693 < connect_to_server(); --- > if(replaying) > { > interface_mode=interface_log_in; > disconnected=3; > /*start_replaying("test.rec");*/ > } else connect_to_server(); Index: interface.c =================================================================== RCS file: /cvsroot/elc/elc/interface.c,v retrieving revision 1.63 diff -w -b -i -r1.63 interface.c 482c483 < mouse_y<=log_in_y+log_in_y_len && username_str[0] && password_str[0]) --- > mouse_y<=log_in_y+log_in_y_len && username_str[0] && (password_str[0] || replaying)) 502a504,505 > if(!replaying) //we dont want to change file type > { 508a512 > } 514c518,519 < send_login_info(); --- > if(replaying) start_replaying(username_str); > else send_login_info(); 521a527,532 > if(replaying) > { > my_strcp(display_password_str, ".rec"); > draw_string(username_text_x,username_text_y,"File: ",1); > draw_string(password_text_x,password_text_y,"Type: ",1); > } else { 525a537 > } 594a607 > if(replaying) return; //we dont want to change file type. 603a617 > if(replaying) return; //we dont want to change file type. Index: main.c =================================================================== RCS file: /cvsroot/elc/elc/main.c,v retrieving revision 1.39 diff -w -b -i -r1.39 main.c 49c49,50 < get_message_from_server(); --- > if(replaying) replay_qued_msg(); > else get_message_from_server(); 88a90,94 > if(rec_file) > { > if(replaying) end_replaying(); > else end_recording(); > } Index: multiplayer.c =================================================================== RCS file: /cvsroot/elc/elc/multiplayer.c,v retrieving revision 1.58 diff -w -b -i -r1.58 multiplayer.c 772a773,774 > if(rec_file) > record_msg(pData, size); Index: text.c =================================================================== RCS file: /cvsroot/elc/elc/text.c,v retrieving revision 1.32 diff -w -b -i -r1.32 text.c 62a63,64 > if(replaying) > return; Share this post Link to post Share on other sites
jamesvm Report post Posted October 16, 2004 for world my can not figure why el with patch keep crash without sign when type #record test and leave beginning of file ps also keep rnsyc on me Share this post Link to post Share on other sites