[SOLVED] Demos Refuse to Play
Including the in-game tutorial
#1
Posted 14 November 2011 - 01:55 AM
Terminal Output(expires 2011-11-17 00:58:11)
I also play OpenArena, I know that for demos to record sound in that game I had to disable OpenAL in the game config, but the demos would still record and play just fine, they just wouldn't grab sound, so I'm not sure what about URT is stopping them from playing altogether. Here's my system info.
OS: Debian Linux 6 (64bit)
Graphics Card: ATI Radeon 3100 (256 MB VRAM) Using Proprietary Drivers
I'm in the process of re-downloading the game now just in case, for whatever reason, something got fudged up in the original download.
#2
Posted 14 November 2011 - 03:16 AM
I've also tried launching the game using both the 32 bit and 64 bit *nix binaries, and both of those seem to function just fine, but demos won't play back regardless.
This post has been edited by gerowen: 14 November 2011 - 03:17 AM
#3
Posted 14 November 2011 - 03:23 AM
Linux, unlike Windows, is case sensitive when it comes to filenames. For example, tutorial.dm_68 is seen as a different file than TUTORIAL.dm_68, and they can both be in the same folder together without issues. By default, Urban Terror saves demos with a lower-case filename, however the game looks for filenames saved in upper-case. Renaming the tutorial demo to all upper-case restored my ability to replay demos using the in-game menu. I will test this with some self-made demos just to make sure.
#4
Posted 14 November 2011 - 03:38 AM
/record FILENAME
It will work just fine, as long as you make sure to keep FILENAME all caps. If you use the F12 key, the title of the demo is auto-generated using a combination of the map, your character name, time and date, so there's a good chance that at least somewhere in the filename you'll find a lower-case letter, which will cause the game not to see it when you try to play it back. Your best bet is to start recordings using the console if you're using a Linux system and experience the same problem as myself.
This post has been edited by gerowen: 14 November 2011 - 03:42 AM
#5
Posted 14 November 2011 - 06:57 AM
http://adams-family....urt_demo_fix.sh
#6
Posted 03 December 2011 - 02:28 PM
#!/bin/bash
#Bash script to convert demo names to upper case to work with linux.
#defaults to Urban terror, in the home directory, but accepts any directory as an argument
#please back up your demo dir first! I AM NOT RESPONSIBLE IF THIS HOSES YOUR DEMOS!!!
#tested on opensuse should work on other distros too.
demodir=$HOME/.q3a/q3ut4/demos
DIR=${1:-$demodir}
if [ -d $DIR ]; then
cd $DIR
else
echo -e "$DIR does not exist!\nPlease pass the directory as an argument to the script.\nex. ./demo_cnv.sh /path/to/mydir/demos"
exit
fi
find ./ -iname "*.dm_68" | while read FILE
do
mv "$FILE" `echo $FILE | tr "[:lower:]" "[:upper:]"| sed 's/.DM_68/.dm_68/g'`
done
This post has been edited by cyrus: 17 December 2011 - 01:22 PM
#7
Posted 14 January 2012 - 08:49 PM
#include <iostream>
#include <dirent.h>
#include <list>
#include <string>
#include <stdio.h>
using namespace std;
int main()
{
list<string> filenames;
string tmpname;
int i;
DIR* dir = NULL;
dir = opendir (".");
struct dirent *myfile;
if(dir == NULL) {
std::cout << "Error" << std::endl;
return 1;
}
while ((myfile = readdir(dir)) != NULL) {
filenames.push_back(string((*myfile).d_name));
}
while(!filenames.empty()){
tmpname=filenames.front();
for(i=0;i<tmpname.length();i++){
if(tmpname[i]=='.')break;
if(tmpname[i]>'a'&&tmpname[i]<'z')tmpname[i]=tmpname[i]-('a'-'A');
}
rename(filenames.front().c_str(), tmpname.c_str());
filenames.pop_front();
}
closedir(dir);
return 0;
}
#8
Posted 15 January 2012 - 03:14 PM