ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Different Way of Editing:Finding all Refernces - Splitting AMF files for editing

This forum is the place to discuss the older ADRIFT versions 3.9 and 4.0.

Please refer to the ADRIFT 4 Manual for more information.

Postby AndyBlackard » Sat Jul 21, 2007 2:50 pm

Google and download the UNIXUTIL.ZIP package which are Win/DOS ports of Unix utilities. Unzip CAT.EXE and CSPLIT.EXE and create the following 2 batch files (below). Also get a multi-file, multi-window text editor like TextPad.


1) Export your ADRIFT adventure as a module named EXPORT.AMF

2) Execute SPLIT.BAT

3) Now all your Rooms, Tasks, Characters will be in separate files with the same names as Adrifts internal names.

4) HINT: To find all events, tasks, etc that reference a certain object, find the objects programatic name, ex. "Object12." Use windows explorer to search all the folder containing the split files for "Object12 " using the A word of Phrase in the File option. You will get a list of all split files which reference that object. Highlight them all and right-click and edit (e.g. Textpad) them all at once.

5) Make any changes you want. and use SPLIT.BAT to create a IMPORT.AMF for importing into the Adrift Editor again.

Have fun,
Andy

=====================================
SPLIT.BAT

csplit -k -f "Player" export.amf "/DEFINE Player/"
csplit -k -f "Winning" Player00 "/DEFINE Winning/"
csplit -k -f "Character" Winning00 "/DEFINE Winning/"
csplit -k -f "Introduction" Character00 "/DEFINE Introduction/" {20}
csplit -k -f "Variable" Introduction00 "/DEFINE Variable/" {100}
csplit -k -f "Synonym" Variable00 "/DEFINE Synonym/" {1000}
csplit -k -f "Character" Synonym00 "/DEFINE Character/" {20}
csplit -k -f "Event" Character00 "/DEFINE Event/" {1000}
csplit -k -f "Task" Event00 "/DEFINE Task/" {1000}
csplit -k -f "Object" Task00 "/DEFINE Object/" {1000}
csplit -k -f "Room" Object00 "/DEFINE Room/" {20}
ren room00 header01
del Winning00
del Variable00
del Task00
del Synonym00
del Player00
del Object00
del Introduction00
del Event00
del Character00
del Room00


REJOIN.BAT

cat Header01 Room* Object* Task* Event* Synonym* Variable* Introduction01 Character* Winning01 Player01 >import.amf

NOTE: this appears to have wrapped so you may need to rejoin lines that wrapped.
AndyBlackard
 
Posts: 1
Joined: Sat Jul 21, 2007 2:29 pm
Location: NC

Return to ADRIFT 3.9 and 4.0

Who is online

Users browsing this forum: No registered users and 6 guests