Jump to content


Photo

Anybody good at bat files??


  • Please log in to reply
7 replies to this topic

#1 Azrii

Azrii

    Iltha Windspear

  • Member
  • 65 posts

Posted 15 September 2003 - 01:26 AM

Anybody remember bat files? Ya'know the kind you double click, computer goes in dos window, actions run by so fast you don't have a clue as to what it is doing.
I finally got into traify, which wasn't too bad but typing in lines for each d file is going to be a royal pain :angry: . Anybody happen to know how to set up a bat in my game directory to basically read:
weidu --traify xxxx.d --traify# 50 --dout aaaa.d
weidu --traify xxxx1.d --traify# 100--dout aaaa1.d
weidu --traify xxxx2.d --traify# 200 --dout aaaa2.d
ad infinitum
exit :)

or point me in right direction <_<

or is there a weidu command I'm missing :blink:

or will what I typed in first section basically work if given a .bat extension? :o

Thanks David  :D
Minister of disinformation
Iltha Windspear
Working on Iltha Windspear Expansion. At left is Iltha, not me! I'm a guy. Who's Azrii you ask? She's the one who taught me it's a lot easier to fly with a basic storyline in hand as opposed to relying on my 'intuitive and ingenious' imagination.

#2 GreyViper

GreyViper
  • Member
  • 511 posts

Posted 15 September 2003 - 02:18 AM

Well I know how to make .bat file's and know what they are, what I am not familar with are weidu command's. Bat files are from way back when you had to work(or play games) in Dos. What they do is shorten the typing time, that you dont have to type every time the same command lines. Check out autoexe.bat and you understand. :D
So you can make bat file that runs 3 .exe file's or .exe -911 -p with extension.
Its mostly used for dos programs to save time. B)
They are easy to make all you have to know are commands and the location of the files.
When making .bat file I use Dos Navigator. :)
Democracy is three Dragons and a Cow voting on what's for dinner!

"A handsome young Cyborg named Ace,
Wooed women at every base,
But once ladies glanced at
His special enhancement
They vanished with nary a trace."

Barracks Graffiti
Sparta Command

#3 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 15 September 2003 - 03:33 AM

Okay here we go:

You can just whack all your WeiDU commands into a batch file (.txt renamed .bat) and run it. This should work but it is the long way round and it's not flexible. However with the use of a spreadsheet to make a large table this is by far the easiest way for a novice.

For a flexible method the --traify# command becomes a bit of a problem. But without it the problems go away. However, DOS changes between Win9x and WinXP (of course it does, this is Microsoft :) ), so this again get complicated. Hopefully you have WinXP therefore you can simply do this in the command line (no batch required):

FOR %1 IN (MyMod/d/*.d) DO WeiDU --traify %1 --dout ify-%1


(If that doesn't work take out the ify- (I haven't tried this yet) from the new filename and use the --out command.) If you want to use it in a batch file use %%1.

For Win9x it is more complicated. I won't go into it here, but I'll point you to a very good batch file help site: http://ericphelps.com/batch/

If there is a demand for this I could make up a series of simply batch files for mass decompiling/compiling, -traify-ing etc. (I might even be able to solve the --traify# problem.) I already have the basics a a cross-platform method for doing this, but XP/NT users really only need to use the FOR command - it is extremely powerful. It's 9x users who are screwed :)

#4 Azrii

Azrii

    Iltha Windspear

  • Member
  • 65 posts

Posted 15 September 2003 - 12:52 PM

First, thanks Idobek and GreyViper Second :D :D :D :D
I'll post this incase someone wants to use this.
In bgii folder I put weidu.exe, all renamed d files and my tra.bat file which is exact copy tra.txt file. I made both so I could update tra.txt when needed and save as tra.bat
The following is copy/paste of tra.txt and tra.bat

weidu --traify 01.d --traify# 100 --dout BILTHA.d
weidu --traify 02.d --traify# 200 --dout GARJUMIW.d
weidu --traify 03.d --traify# 300 --dout GARRENIW.d
weidu --traify 04.d --traify# 400 --dout ILTHA.d
weidu --traify 05.d --traify# 500 --dout ILTHADUM.d
weidu --traify 06.d --traify# 600 --dout ILTHAJ.d
weidu --traify 07.d --traify# 700 --dout ILTHAP.d
weidu --traify 08.d --traify# 800 --dout SERAPH.d
weidu --traify 09.d --traify# 900 --dout TAAR.d
EXIT
/* D file in D/TRA file out  tra number range
/*    01 =    biltha            range 100 - xxx */
/*    02 =    garjumiw      range 200 - xxx */
/*    03 =    garreniw        range 300 - xxx */
/*    04 =    iltha              range 400 - xxx */
/*    05 =    ilthadum        range 500 - xxx */
/*    06 =    ilthaj            range 600 - xxx */
/*    07 =    ilthap            range 700 - xxx */
/*    08 =    seraph          range 800 - xxx */
/*    09 =    taar              range 900 - xxx */

CONTINUED NEXT POST
Minister of disinformation
Iltha Windspear
Working on Iltha Windspear Expansion. At left is Iltha, not me! I'm a guy. Who's Azrii you ask? She's the one who taught me it's a lot easier to fly with a basic storyline in hand as opposed to relying on my 'intuitive and ingenious' imagination.

#5 Azrii

Azrii

    Iltha Windspear

  • Member
  • 65 posts

Posted 15 September 2003 - 01:01 PM

Doubled clicked tra.bat file and worked like a :D CHAMP :D

I type in upper range of @ numbers in xxx portion of tra.txt
Now when I need to change the traify, say add more d files, change starting traify #, etc., I simply go into tra.txt, make changes, save, then save as tra.bat
and voila!! copy all files to bgii folder and double click.
Well hope this helps someone.
David

P.S. I have windows XP. I would think that since most platforms is basically just DOS in the 'English language' it should work with just about anything but I'm not 100% sure. Works with XP though.
Minister of disinformation
Iltha Windspear
Working on Iltha Windspear Expansion. At left is Iltha, not me! I'm a guy. Who's Azrii you ask? She's the one who taught me it's a lot easier to fly with a basic storyline in hand as opposed to relying on my 'intuitive and ingenious' imagination.

#6 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 15 September 2003 - 01:28 PM

Glad you worked it out. Just a quick question (coz I'm curious); why are you using --traify# at all? You don't appear to need to.

Also I've made a batch file for doing this (minus --traify# - I'm working on incrementing variables, but cross platform support is questionable) that will also work for all WeiDU command line options. It is 9x and XP compatible, you only have to change the WeiDU commands and the input and output directories the batch does the rest. I would post it, but it's a little long. I'll e-mail it to any one who wants to try it.

#7 Azrii

Azrii

    Iltha Windspear

  • Member
  • 65 posts

Posted 15 September 2003 - 02:59 PM

Idobek Posted: Sep 15 2003, 11:28 PM

why are you using --traify# at all?


No good way of AddJournalEntry and EraseJournalEntry. Also most other mods coming have, of course when complete. I could still work on mod and not have journal entries work till I'm complete and then traify. Biggest reason: I'm stubborn!
Minister of disinformation
Iltha Windspear
Working on Iltha Windspear Expansion. At left is Iltha, not me! I'm a guy. Who's Azrii you ask? She's the one who taught me it's a lot easier to fly with a basic storyline in hand as opposed to relying on my 'intuitive and ingenious' imagination.

#8 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 15 September 2003 - 03:16 PM

Biggest reason: I'm stubborn!

Reason enough for me! :D

I think I've solved the increment variables problem I was having. It'll only work in XP but as you have XP that's not a problem. I'm going to clean up the file and post an XP only version (it's a lot smaller than the 9x compatible version).

Does anybody out there know how to increment variables in Win98 DOS?