Welcome, Guest. Please login or register.
Did you miss your activation email?
May 22, 2013, 02:43:31 pm

Login with username, password and session length
Search:     Advanced search
Savage: XR is a new patch for Savage, created by the Newerth.com staff. The RC3 Client is out now! Download it now!
169878 Posts in 9658 Topics by 16443 Members
Latest Member: fieldtrip
* Home Forum Wiki Help Search Login Register
  Show Posts
Pages: [1] 2 3 ... 5
1  Savage XR / Modding Forum / Re: demo bind. on: February 21, 2013, 07:16:55 pm
amazing Rigoletto! Smiley

Easy to do other things now too like time of event and player name!
2  Savage XR / Modding Forum / demo bind. on: February 20, 2013, 10:40:43 pm
EDIT: - Working files with Rigoletto's edits attached!

So I made a bind to stop a demo, move it to another folder and start a new demo.
Unfortunately it doesn't give the file a very good name at all (just the time and date) so Rigoletto has suggested I post what I have here for help to make it better.

Here's what I have.

A python file "DemoScript.py"

Code:
import os
import sys
from time import strftime

# *Defining functions here.
# Move a file, and handle any errors if the filename is already taken.
def safeMove(num):
    # Realisitically you won't have 5 demos named the same I hope...
    # Especially since it's down to the second, so this is really just in case you have already this
    # Time in use somehow..
    # So if this gets to 5, I give up, we've a problem moving/renaming the file, so just gtfo.
    newName = strftime("%Y-%m-%d at time %H-%M-%S") + ".demo"
    
    if num > 5:
        return
    try:
        if num == 0:
            os.rename(demosPath+newestFile,newPath+newName);
        else:
            os.rename(demosPath+newestFile,newPath+newName+str(num));
    except WindowsError as winErr:
        safeMove(num+1)

# *Declaring Variables...
# Where your demos are recorded to.
demosPath = "C:\\Program Files (x86)\\Savage XR\\game\\demos\\"
# Where you want to move the demo to.
newPath = "C:\\Program Files (x86)\\Savage XR\\game\\GoodDemos\\"

# *The program starts here really.
# First things first, lets make sure the directory we want to write to exists.
# If it doesn't, lets make it.
if not os.path.exists(newPath):
    os.makedirs(newPath)
# And to be safe, make sure we have the directory where the demo is.
# If not, get out.
if not os.path.exists(demosPath):
    sys.exit()
    
# Find most recent file
allFiles = os.listdir(demosPath)
newestFile = ""
for filename in allFiles:
    if ((os.path.getctime(demosPath+filename) > os.path.getctime(demosPath+newestFile))):
        newestFile = filename

# The parameter is to try change the filename if we have trouble moving it.
# 0 means don't try change.
safeMove(0)

and a .cfg file "demoexec.cfg"
Code:
python "execfile('C:\\Program Files (x86)\\Savage XR\\game\\DemoScript.py')";
msg #name# "Demo saved and moved :)"

So at present I'm just binding a key as follows
bind f9 "demostop;exec demoexec.cfg;demorecord"
3  Savage XR / General Savage XR Discussion / Re: Python command on: February 20, 2013, 06:29:36 pm
Rigoletto, as far as I understand The-Leader, he doesn't want to do this when he actually WATCHES a demo, but when he's playing on pub and thought: "Hey, that was a nice scene, I should save it!". Then he presses the key which moves the already finished demo file to a new place. Did I get that right, The-Leader?

Also, if yes, great idea!  afro
I get that Smiley
But he will still get a directory with a lot of files with a filename that says nothing.

You're both right Smiley.
Your point is very valid Rigoletto, but I'm not too worried about it since I move the file to a new folder which should only have good demos unless I hit the key a bunch of times for no reason.
It would be nice to be able to put the mapname, unit (could be bad to include if you die and loadout before you hit the bind?) and time of save into the filename.
And it seems like maybe you have this written? But I don't know how to use it so..
4  Savage XR / General Savage XR Discussion / Re: Python command on: February 19, 2013, 07:46:47 pm
Well the idea is moreso just for finding making frag vids so you can easily get the good clips you have from countless hours of pub play, rather than for saving entire games or anything.
5  Savage XR / General Savage XR Discussion / Re: Python command on: February 19, 2013, 07:06:25 pm
whats wrong with stopping the demo? You just have to go to the end of any demo file in your good demos folder then when you want to watch any bit you saved?.

edit: just noticed when you do demostop the demo doesn't get it's proper name so yeah your thing would be useful for naming the demo.
6  Savage XR / General Savage XR Discussion / Re: Python command on: February 19, 2013, 06:41:45 pm
Ah workaround.
using exec on a .cfg file with the original line works.
7  Savage XR / General Savage XR Discussion / Re: Python command on: February 19, 2013, 06:21:50 pm
bind key "python \"execfile('C:\\Program Files (x86)\\Savage XR\\game\\DemoScript.py')\""
key = the actual key you want to use.

You will need to put this bind in a file such as auto_exec. Savage loves to eat away the " after reboots!

Yeah I had tried that but that somehow removes all the backslashes from the filepath!
8  Savage XR / General Savage XR Discussion / Re: Python command on: February 18, 2013, 10:09:46 pm
just making a bind to stop a demo, run a python script to move the most recently created file in dmeo folder to a seperate folder titled GoodDemos and rename if that name is taken, then start recording a new demo.

-- Urr maybe I'm being a noob, but grount this doesn't work when it's bound to a key or a variable >.<.
How can I doo?
9  Savage XR / General Savage XR Discussion / Re: Python command on: February 18, 2013, 06:53:40 pm
Awesome, worked perfectly thanks!
10  Savage XR / General Savage XR Discussion / Python command on: February 17, 2013, 07:45:43 pm
I can't figure out how to make this work....

I've been trying to make a bind to stop demo recording, run a python script, and start demo recording again..

But I can't get the python command to work.

I've tried
python execfile("C:\\Program Files (x86)\\Savage XR\\game\\DemoScript.py")
But it just won't work.. I think maybe the inverted comma's aren't being recognised?

Help?

-answer-

bind f9 "demostop;exec demoexec.cfg;demorecord"

so throw that bind into startup.cfg and unzip these 2 files to game folder and it'll work.
11  Savage XR / General Savage XR Discussion / Re: Preset's idea. on: February 14, 2013, 12:15:51 am
The biggest problem savage has is lack of accessibility to new players so this is a fantastic idea!
12  Savage XR / Savage XR Videos / Re: Comm demo on: January 31, 2013, 12:28:56 am
"Cannot read server frame x, previous frame x-1 was buffered out."

So I'm looking at some old demos I have and I can't play them because I'm getting this error...
Is there any fix? It crashes when I have cl_ignorebadpackets 0, but gives the above error in console and then eventually crashes with cl_ignorebadpackets 1...
13  Competitions / Roster Regulation / Re: [DA] Deadly Alliance on: January 19, 2013, 08:48:56 pm
Jam
http://www.newerth.com/?id=stats&action=view&uid=860945&pp=search_playername&pk=---james---
14  Savage XR / Support Forum / Re: Report: XR 1.0 Feedback (Bugs and Issues) on: December 24, 2012, 01:26:28 pm
Didn't take a screenshot since I was busy commanding and then forgot, but when I was commanding 2 days ago on g&g I noticed that the last letter of each player in my teams name was missing in the tab menu. (you know the menu with promote/givegold/disallow requests for certain players etc.

(windows)
15  Savage XR / Support Forum / Re: Report: XR 1.0 Feedback (Bugs and Issues) on: October 21, 2012, 02:11:56 pm
my savage 1.0 is fucked since latest update today.
I checked and my RC3 version is working so it's not my internet.
Some other players were saying they have the same.

I can't see any other players whatsoever or redstone mines or grimms walls (they can see me evidentally as they can hit me Tongue ). I'm randomly getting states (offi/elec/chem/mag) for a few seconds.
When I kill npcs it makes no sound and they die a few seconds after my "hits". No noise when hitting stronghold etc.

Completely unplayable, please fix.

edit: using windows 7
my console is getting spammed with this error message:

cmd != SNET_UPDATE_OBJECTS, it was 38
*** (WARNING: BAD PACKET DATA RECEIVED FROM SERVER (cmd 5) ***

I put in 38 but it's actually loads of different numbers, most commonly 0 1 34 35 36 37 38 39 128
Pages: [1] 2 3 ... 5
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.104 seconds with 18 queries.