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

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







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

Reply
 
Thread Tools Display Modes
  #1  
Old February 21st, 2001, 10:08 AM

GoatFoot GoatFoot is offline
Private
 
Join Date: Jan 2001
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
GoatFoot is on a distinguished road
Default Manipulating SE IV data files

I don't know if I'm stating the obvious or demonstrating my ignorance, but I've found that sed on cygwin works quite well for modding the various data files in a consistent, controllable, and reproducible fashion.

There may be a bit of a learning curve, but there are plenty are resources on the web if anyone should decide to investigate.

I'd stop reading here, if I were you.


As an example, no chosen quite at random

assuming you've installed cygwin.

To change the Point-Defense research goal from 3 to 5 in all files:

create a text file re3-5.sed
--begin--
# Change Point-Defense research lvl from 3 to 5
/Tech Area Name.*Point-Defense/,/^$/{
/Tech Area Level/s/:= 3/:= 5/
}
--end--

then

back up all your files.

cd <SEIV Dir>/Pictures/Races

for file in `ls */*_AI_Research.txt`; do
sed -f ~/re3-5.sed $file > $file.tmp
mv $file.tmp $file
done

you have just changed every occurence of ":= 3" to ":= 5" that was on a line with "Tech Area Level" and that fell between lines "Tech Area Name... Point_Defense" and a blank line, in every file named <anything>_AI_Research.txt that was in a directory below <SEIV dir>/Pictures/Races.

you can put any number of changes in 1 file, and do them all at once.


I've been up way to long.

[This message has been edited by GoatFoot (edited 21 February 2001).]
Reply With Quote
Reply

Bookmarks


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:42 AM.


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