UrT Demo Loader

Everything technical and nerdy stuff here plz !

UrT Demo Loader

Postby JRandomNoob » 12.14.10

Found a lovely piece of software (Windows-only though) that allows you to double-click on the demo file in Explorer and launches UrT to play it. Real heaven-sent for those who watch a lot of demos, as the UrT's built-in demo browser stinks on ice. (I can't see half of the contents of my demo folder at all.)

As far as I know, that's the only way to start demos externally; it seems there's not even a command line option.

Ah, yes, link: http://www.1upclan.info/projects.php (last one on the page).
User avatar
JRandomNoob
DSWP Meme Artist
 
Posts: 1852
Joined: 12.05.10
Location: Estonia
-----tdm:  
nick: WidespreadPanic
skill: 618.539
kills: 12260
deaths: 10971
ratio: 1.11
-----bomb:  
nick: SelfRescuingPrincess
skill: 254.796
kills: 219
deaths: 202
ratio: 1.08

Re: UrT Demo Loader

Postby Witch » 12.14.10

Interesting tool :)
But no version for linux and that is too bad. :P
People were created to be loved,Things were created to be used.
The reason why world is in chaos, Is because things being loved
And people being used...
User avatar
Witch
posted some :)
 
Posts: 104
Joined: 02.01.10

Re: UrT Demo Loader

Postby Unclefragger » 12.14.10

you can easily create this with a shell script
using pwd and fs_homepath
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
- Martin Golding
User avatar
Unclefragger
Godlike
 
Posts: 2006
Joined: 10.14.08
Location: rooftops
-----tdm:  
nick: [dswp]ucf
skill: 472.479
kills: 532
deaths: 332
ratio: 1.60

Re: UrT Demo Loader

Postby JRandomNoob » 12.14.10

…the rest is left as an exercise for the reader, yes? I mean, if you don't care about the fancy double-click-on-demo-to-play behavior, throwing together something that does the work would indeed be quite easy, even for me. If one knew how the hell could he pass along the demo file to the game so it would play it.

And still haven't found any way to do it (not that I've been searching all that hard, I do have a working solution).

EDIT: Start the game with +demo <file> (extension optional):-) Found this by experimenting, no search turned up anything useful. Now, how to make this more usable… Blegh, have been awake for seventeen hours and really don't want to think now…
User avatar
JRandomNoob
DSWP Meme Artist
 
Posts: 1852
Joined: 12.05.10
Location: Estonia
-----tdm:  
nick: WidespreadPanic
skill: 618.539
kills: 12260
deaths: 10971
ratio: 1.11
-----bomb:  
nick: SelfRescuingPrincess
skill: 254.796
kills: 219
deaths: 202
ratio: 1.08

Re: UrT Demo Loader

Postby SvaRoX » 12.14.10

Witch wrote:But no version for linux and that is too bad. :P

Fortunately you don't use Linux :p

Hmm there was a demo launcher for Q3 10 years ago, I wonder if it works with UrT but I guess it does. Anyway cool stuff, good to see other communities with other UrT-related projects. They have a gadget for server monitoring too !! :)
ut4_he_tennis_v0.1
-------------------------
"We are talking about computers here, compared to those I can read women like a book ;P"
Unclefragger
User avatar
SvaRoX
Leader
 
Posts: 1972
Joined: 11.29.08

Re: UrT Demo Loader

Postby eXtr33m » 12.14.10

Wait.. what?

Actually clicking on demo -> Properties -> Open With -> Custom command 'PATH/TO/LAUNCHER +demo %f'...
%f is full path to opened file..

Aaaaaand you will get error cuz stupid UrT is looking in demos//home/blablabla...
So either you have to change %f to show just filename and symlink it somehow, or maybe some ../ hack :D or made new script which do the work :/

aaaaaand if u solve problem up there you can associate the file with your FireRox so you just click on demo and choose open and tramdadada you have automatically launched game and demo... :)

Just Random Noob: Wow, good job on that +demo thing!!! :)
User avatar
eXtr33m
Ingame Mod
 
Posts: 806
Joined: 12.19.09
Location: @Gauss:
-----tdm:  
nick: [dswp]Jan
skill: 330.877
kills: 220
deaths: 210
ratio: 1.04
-----bomb:  
nick: [dswp]Jan
skill: 664.203

Re: UrT Demo Loader

Postby Unclefragger » 12.14.10

There you go, lacks documentation, help and whatever you want, but takes exactly one argument (path to demo), plays it and well that's about it!
Code: Select all
#!/bin/sh
BINARY="/usr/games/bin/urbanterror"
FS_HOMEPATH="${HOME}/.q3a/q3ut4"

cp $1 ${FS_HOMEPATH}/demos/
$BINARY +demo `basename $1`
rm ${FS_HOMEPATH}/demos/`basename $1`

paths should be pretty default

for draiks clicky bunty file manager it would be custom program: "PATH/TO/SCRIPT %f"

EDIT: wow almost took me as long as writing this post to solve this very difficult problem which totally needs a big program hopefully with even bigger ui
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
- Martin Golding
User avatar
Unclefragger
Godlike
 
Posts: 2006
Joined: 10.14.08
Location: rooftops
-----tdm:  
nick: [dswp]ucf
skill: 472.479
kills: 532
deaths: 332
ratio: 1.60

Re: UrT Demo Loader

Postby natirips » 12.14.10

Lol, I* was thinking about writing something like that tomorrow** (I even bookmarked the thread page) because I thought it can't be much more trivial with +demo available.
_______
*I actually consider myself a n00b when it comes to shell scripts.
**Because I am _that_ lazy.
ssh natirips@*.255.255.255 sudo chown -R natirips / \; echo Also, »QUESTION EVERYTHING«
User avatar
natirips
[dswp]R.Stallman
 
Posts: 2946
Joined: 04.13.09
Location: Solar System/≈Zagreb
-----tdm:  
nick: [ntr]Shortly
skill: 497.05
kills: 3446
deaths: 4411
ratio: 0.78
-----bomb:  
nick: [ntr]Shortly
skill: 707.602
kills: 526
deaths: 863
ratio: 0.60

Re: UrT Demo Loader

Postby eXtr33m » 12.16.10

Unclefragger wrote:...

First) I am not a Draik!! :D maybe i would want to be but anyway.. ;)

yes i didnt like the idea of copying the demo (no offence Uncle :) ) to demos so my script temporary symlink directories and afterwards remove symlink. usage the same as uncle's
Code: Select all
#!/bin/bash
#!/bin/sh
BINARY="/PATH/TO/URT/BINARY"
FS_HOMEPATH="${HOME}/.q3a/q3ut4"
DEMO_DIR=`dirname $1`
ln -s $DEMO_DIR ${FS_HOMEPATH}/demos/
$BINARY +demo ${DEMO_DIR##*/}"/"`basename $1`
rm ${FS_HOMEPATH}/demos/${DEMO_DIR##*/}


This is my first shell/bash script!! yayy :)
Maybe i will do another one which will move demo not create symlink..
User avatar
eXtr33m
Ingame Mod
 
Posts: 806
Joined: 12.19.09
Location: @Gauss:
-----tdm:  
nick: [dswp]Jan
skill: 330.877
kills: 220
deaths: 210
ratio: 1.04
-----bomb:  
nick: [dswp]Jan
skill: 664.203

Re: UrT Demo Loader

Postby natirips » 12.17.10

eXtr33m wrote:i didnt like the idea of copying the demo
A typical large demo from WTS is like 1MB in size. Unless you're running your system off a flash drive the procedure should be very safe for your HDD.

P.S.: Symlinks are evil (and I really mean it).
ssh natirips@*.255.255.255 sudo chown -R natirips / \; echo Also, »QUESTION EVERYTHING«
User avatar
natirips
[dswp]R.Stallman
 
Posts: 2946
Joined: 04.13.09
Location: Solar System/≈Zagreb
-----tdm:  
nick: [ntr]Shortly
skill: 497.05
kills: 3446
deaths: 4411
ratio: 0.78
-----bomb:  
nick: [ntr]Shortly
skill: 707.602
kills: 526
deaths: 863
ratio: 0.60

Next

Who is online

Users browsing this forum: No registered users and 35 guests

Misc