.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Air Assault Task Force- Save $8.00
Bronze- Save $10.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old April 29th, 2004, 11:22 AM
Will's Avatar

Will Will is offline
Lieutenant Colonel
 
Join Date: Mar 2001
Location: Emeryville, CA
Posts: 1,412
Thanks: 0
Thanked 0 Times in 0 Posts
Will is on a distinguished road
Default Re: AI Utility

Well, I could have the script only grab text files that begin with 'AI_' (AI_*.txt), but the problem is I'm not sure how I could chop off the 'AI_' part and replace it with '%dirname%_'.

I could make a perl script to do this pretty easily, it's just I'm not sure about the extent that Win NT/2k/XP natively support perl. A quick google search hasn't got me much...

I'll take a look into it more tomorrow, but right now I have to sleep, then wake up in the morning, go over a proof of the Completeness and Compactness Theorems of First-Order Languages, then write up a quick enumeration scheme for formulae of a First-Order Language a la the scheme used by Gödel. Something like prime(n) = nth prime number, an (a name in the language) = prime(n), (kth function of i parameters)ƒik = prime(1)^k * prime(2)^i, (mth relational symbol between j terms) Pjm = prime(3)^m * prime(4)^j, then combining them all together is a huge long product... bleh. What I just typed isn't right, but it's somewhere in the ballpark, I'm too tired...
__________________
GEEK CODE V.3.12: GCS/E d-- s: a-- C++ US+ P+ L++ E--- W+++ N+ !o? K- w-- !O M++ V? PS+ PE Y+ PGP t- 5++ X R !tv-- b+++ DI++ D+ G+ e+++ h !r*-- y?
SE4 CODE: A-- Se+++* GdY $?/++ Fr! C++* Css Sf Ai Au- M+ MpN S Ss- RV Pw- Fq-- Nd Rp+ G- Mm++ Bb@ Tcp- L+
Reply With Quote
  #2  
Old May 1st, 2004, 11:32 PM
Will's Avatar

Will Will is offline
Lieutenant Colonel
 
Join Date: Mar 2001
Location: Emeryville, CA
Posts: 1,412
Thanks: 0
Thanked 0 Times in 0 Posts
Will is on a distinguished road
Default Re: AI Utility

Ok, figured out a sort-of kludge... turns out I don't really need perl, I can work around it in other ways

code:
 
@for /D %%d in (*) do @for %%f in (AI_*.txt) do @for /F "usebackq tokens=2* delims=_" %%g in ('%%f') do @copy %%f .\%%d\%%d_%%g_%%h
@for /D %%D in (*) do @for %%F in (.\%%D\*.txt_) do @rename .\%%D\%%~nF.txt_ %%~nF.txt

Same procedure as before, takes all files matching AI_*.txt in a directory, and copies it to all subdirectories, taking off the 'AI_' and replacing it with '{subdirname}_'.

Link in first post has been updated.
__________________
GEEK CODE V.3.12: GCS/E d-- s: a-- C++ US+ P+ L++ E--- W+++ N+ !o? K- w-- !O M++ V? PS+ PE Y+ PGP t- 5++ X R !tv-- b+++ DI++ D+ G+ e+++ h !r*-- y?
SE4 CODE: A-- Se+++* GdY $?/++ Fr! C++* Css Sf Ai Au- M+ MpN S Ss- RV Pw- Fq-- Nd Rp+ G- Mm++ Bb@ Tcp- L+
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 01:29 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.