Some handy scripts

All about making tracks for MX Simulator
Voutare
Posts: 4891
Joined: Sun Jan 13, 2008 5:22 am
Team: Privateer
Location: Southern Vermont
Contact:

Re: Some handy scripts

Post by Voutare »

ddmx488 wrote:cd C:\Users\Davey\Desktop\thor
python saf.py rider-coreBlackTan.png rider-coreBlackWhite.png rider-coreBurgandy.png rider-coreNavy.png rider-coreRed.png rider-coreRedBlack.png rider-coreSpearmint.png thorcore08.saf

That was the command for my thorcore skinpack.
Make sure that all of your files are correctly named, and all in the same folder along with saf.py.

I'm not doing an saf bundle, I'm seeing if I can get the demosplice.

I've got the paths working correctly, but I still get an error when I type python. The same old Traceback <most recent call last>:
File"<stdin>", line 1, in <module>
NameError: name 'python; is no defined

And whenever I do a c:\python25\scripts\

I press enter, and they throw a nifty little arrow under the C.
Image
ddmx
Posts: 5374
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: Some handy scripts

Post by ddmx »

type python in the command line and press enter, what shows up?
Voutare
Posts: 4891
Joined: Sun Jan 13, 2008 5:22 am
Team: Privateer
Location: Southern Vermont
Contact:

Re: Some handy scripts

Post by Voutare »

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Kyle's>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>




Or:

>>> python
Traceback <most recent call last>:
File "<stdin>", line 1, in <module>
NameError:name 'python' is not defined
>>>
Image
ddmx
Posts: 5374
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: Some handy scripts

Post by ddmx »

is it installed right? i didn't follow that video step for step. my path is ";c:\python25\" and that's it. i don't have a scripts folder within python 25.
Voutare
Posts: 4891
Joined: Sun Jan 13, 2008 5:22 am
Team: Privateer
Location: Southern Vermont
Contact:

Re: Some handy scripts

Post by Voutare »

Yes, it's installed correctly.

It's supposed to be C:\python25,


EDIT:
Tried changing my path to just ;c:\python25\, and it makes no difference.


EDIT2:

My path, if it makes any difference:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem:;C:\Python24;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\QuickTime\QTSystem;c:\python25\
Image
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Some handy scripts

Post by DJ99X »

For splicing, you want something like this-

Code: Select all

cd C:\Documents and Settings\DJ\Desktop\MX Simulator Stuff\Pythonstuff
python demosplice.py --sync demo1.mxdemo seconddemo.mxdemo somethingelse.mxdemo exporteddemo.mxdemo
Whatever is the last .mxdemo is the name of the spliced demo being exported
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: Some handy scripts

Post by mace-x »

nice!
got it working, took me about 15 mins
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: Some handy scripts

Post by mace-x »

have a question here:
can i take a .saf file and unsaf it?
and can do the same thing for demos?

as an example:
python demosplice.py --sync

can i change sing for something else?
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Some handy scripts

Post by DJ99X »

From what I know, there is no method of extracting from a .saf file (well, I can think of one method but it would be pretty tedious). But, you can extract particular demos from a spliced/race-with-ai demo.

First, open the demo in a notepad. At the top of the file, there will be a few lines with the bikes used, like this-

Code: Select all

MX04 19 0 10 1666
locust
yz250f|@WMSASeason2/rider-Team Massacre.png|@WMSASeason2/yz250f-Team Massacre.png|@rimpackv2/wheels-red.png
4
crf250(2007)|@NoFearSpectrumPack/rider-No Fear Spectrum Green SE.png|@skinpack/crf250-Monster Energy.png|@ekswheels/wheels-Green_Gold.png
13
rmz250(2007)|@WMSASeason2/rider-Team SFR.png|@WMSASeason2/rmz250-Team SFR.png|@rimpackv2/wheels-red.png
721
rm125|@rider.png|@rm125.png|@wheels.png
148
Say you wanted to extract your demo from that. It is is the 2nd demo. You will use this line

python demosplice.py --sync locust_open.mxdemo,1 macelocust.mxdemo


So, if the demo you want to extract is the n'th one down, you put in the number n-1 as I did above. But you can extract more than one demo if you like. You can also have locust_open.mxdemo,0,1
Joe
Posts: 2971
Joined: Wed Dec 19, 2007 10:17 pm
Team: MXSP
Location: PEI,Canada

Re: Some handy scripts

Post by Joe »

hey guys i have a problem when splicing i have the 2 demo files in my scripts folder and i go into cmd and put python demosplice.py --sync demo1.mxdemo demo2.mxdemo exporteddemo.mxdemo and it says there is no such file or directory "demo1.mxdemo" and i havce all my demos named correctly
Joe
Posts: 2971
Joined: Wed Dec 19, 2007 10:17 pm
Team: MXSP
Location: PEI,Canada

Re: Some handy scripts

Post by Joe »

anyone?????
jlv
Site Admin
Posts: 14954
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Some handy scripts

Post by jlv »

If you type "dir" before you run the script is "demo1.mxdemo" listed?
Joe
Posts: 2971
Joined: Wed Dec 19, 2007 10:17 pm
Team: MXSP
Location: PEI,Canada

Re: Some handy scripts

Post by Joe »

lol i figured it out i was namming it demo1.mxdemo so its was comming out demo1.mxdemo.mxdemo lol
Kawasakis
Posts: 6583
Joined: Sun Mar 16, 2008 5:32 pm
Contact:

Re: Some handy scripts

Post by Kawasakis »

i downloaded python program and the scripts folder are in tools folder is its good ? and i doing every step good but its not letting splic demos.. its says Syntax error...
MXS Cup Winner
AX MX2 Champion

Image
Image
jlv
Site Admin
Posts: 14954
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Some handy scripts

Post by jlv »

I just added new feature to demosplice to extract a specific time range from a demo.

Here's an example:

demosplice.py --cut 2:00.5-2:10.0 full.mxdemo part.mxdemo

That would take the time range from 2:00.5 to 2:10.0 from full.mxdemo and save it in part.mxdemo.
Post Reply