DFQEdit requires that both the QRC and QBN files of a quest are present in the same directory. If you save a new QRC file DFQEdit will automatically save the QBN file, notifying you if the quest files already exist. Quest file names are also very important as they give information such as which guild, minimum rank etc... In general, the only characters in the quest name which can be safely changed are the last two which are simply a quest index number to differentiate files. DFQEdit will automatically generate the quest file name, except for the last two characters which can be specified when you save.
START-UP
When you first start DFQEdit you should be presented with a colorful
text screen in 80x50 resolution (a standard VGA text mode which permits twice
as much information to be displayed at a time than the normal 80x25 mode).
The top center of the screen displays the current quest loaded, which at
startup should be none, the new quest filename (in red). The new quest
filename is automatically built based on the quest parameters below on the
page. Thus you can save quest with the right name so that Daggerfall can
correctly read the file.
Below this are several lines of quest information telling you various information about the current quest. If you click on the little green arrows you will get a listing of possible values. Changing these values will modify the new quest filename at the top of the screen.
The next section below this is a listing of quest texts. Currently up to 32 different texts can be shown at a time, hopefully many more than you'll ever need (all quests I've seen have had less than 20 different texts). The quest text description, which is not currently 100% accurate, can be clicked to edit that text. To the right of the description is a value 'Yes/No'. This represents if that text section has any text in it currently. The number in brackets to the left of the quest text description represents the hexadecimal text type loaded from the QRC file. It is only useful if you are into determing more of the format for quest files.
At the bottom of the DFQEdit screen are the buttons Load QRC, Save QRC, New QRC, and Exit which should be self-explanatory and are described in more detail below.
LOADING a QRC FILE
To load a QRC file click the LOAD button at the bottom of the screen
(eventually text shortcut keys will be assigned to everything). A new window
will appear on the screen listing files, directories and drives. When DFQEdit
is first started, this list is the current directory but on subsequent saves
and loads it will remember where you left it. Use the mouse, TAB, and cursor
keys to select a directory or QRC file. Wildcards are accepted in the file
name box (default is *.QRC). When a QRC file a wish to edit is found, press
the ENTER key or click the OK button, otherwise ESC or CANCEL will exit the
window. The QRC file should now be loaded. The main DFQEdit screen will be
changed to the new file. Unless you are particularily lucky however, many
of the quest texts will be labled as 'Unknown'. This is because the type of
quest seems to affect how the texts are labelled in the QRC file and the
quest type in the QBN file is not understood. Likewise, the quest type box
at the top of the screen will probably not be correct at the moment either.
I have programmed it to find the closest matched quest type but only a handful
of types are programmed into DFQEdit at the moment (did I mention the quest type in the
QBN file isn't understood?). No worries though, you can still edit 'Unknown'
text types although you'll have edit the text to see what it contains.
SAVING a QRC FILE
Saving a QRC file is much the same as loading. Simply click the SAVE
button and enter a new or existing filename. If the file already exists you
will be asked if you wish to overwrite or not. If you save to a new QRC file
you will need to copy the appropiate QBN file to the new name as well, since
both Daggerfall and DFQEdit require both QRC and QBN files for loading quests.
The new quest filename based on current quest parameters will be the default
filename. All that's needed is to add a two digit index and save.
EDIT QBN/QRC
This is a new button as of version 0.30b. It allows you to change
the editting mode from QBN to QRC and vice-versa. See the sections 'Editting
a QRC' and 'Editting and QBN' for more information on each screen.
NEW QUEST
This simply clears the contents of the window. Will be more useful
when you can create quests from scratch.
ABOUT DFQEdit
This button displays a window listing information about DFQEdit and the
current environment.
EXITING DFQEdit
You can quit DFQEdit by either pressing the EXIT button or by the ESC
key when in the main DFQEdit window. You will be asked if you trully want to
exit but it won't currently tell you of unsaved files.
EDITTING a QRC TEXT
To edit a qrc text simply click on the text description (even if it
says 'Unknown'). This will bring up another window with allowing you to
Edit, Delete, or Cancel. Deleting the text will clear it from memory and the
text section will be omitted if you save the file. This might cause problems
in Daggerfall if it needs that text for the quest (deleting the quest
description and then saving is asking for disastor). If edit is selected you
will be brought to the text editor which looks much like the DOS edit program,
although much simpler (see the TEXT EDITOR MANUAL below for more information).
Here you can edit text, load new text, or save text for later. When you load
or save text, you are loading normal text files, nothing related to the QRC
file. Special quest variables and codes are displayed in different colors.
Help can be found by pressing F1 or ALT-H and the file menu can be activated
by mouse or ALT-F. The text editor's code appears to be quite solid and I
have yet to have it crash, although loading too large a file or binary files
might cause undefined behaviour. When you quit the text editor, any changes
in the text are automatically recorded although you still need to save the
QRC file. If you delete all text by the 'NEW' command, DFQEdit assumes you
don't want the text section and 'turns it off'.
EDITING A QBN
First of I'd like to say that editting the QBN section of a quest
file is not for everyone at the moment. We don't currently completely under-
stand the QBN file format but I've included what sections we do mostly know,
the Item and NPCs. When in the QBN Edit mode you will notice several buttons
on the left-hand side of the screen. These are the various QBN sections
which can be currently editted. Right now these include only Items and NPCs.
The outlined box in the center of the screen represents the current object
data. At the top of the box is a line giving the current object number with
current number loaded and the maximum allowed to be loaded. The object number
can be changed with the 'Prev' and 'Next' buttons at the bottom of the screen
(the 'Add' button is currently disabled at the moment).
The values you can edit will appear as list boxes or text fields. Simply click on the arrow to display lists and click on text fields to edit their contents. The values in light-blue below these are the numerical values of the fields. This is useful in recording a value the fields show as 'Unknown'. If you can identify such a value, please let me know.
Sometimes, if a particular field is not currently well understood, the actual numerical value of the field is displayed. This value is always a decimal, or base 10, value. The title of the field should also contain one of the words, char, int or long to identify the length and allowed values of the field as follows.
char 0-255 int 0-65,536 long 0-4,294,967,295If you input a value greater than the allowed limit it will 'wrap'. For example entering '256' in a char field will result in the value of 0 being displayed and saved. The values are always unsigned so inputting a negative value will also result in 'wrapping'. For example entering -1 in a char field results in the value 255 being displayed.
The input text fields also accept hexadecimal, octal, and binary input as well as decimal as follows
Binary (base 2) Ends with a b, ie: 10001b, 001100101111b, etc... Octal (base 8) Start number with a 0, ie: 056, 01462, etc... Hexadecimal (16) Starts with a 0x, ie: 0xFA45, 0x45, etc...Entering an invalid value in a certain base (such as 0xT6, 12356b, etc...) will result in a 0 being displayed. Please note that even though you may input the number in another base, the value is still displayed as a decimal.
QBN EDITING: ITEMS
The item sections is completely free for one to edit, although we are
not completely sure what all the values do yet. The item types and the item
fields should be self-evident. Usually one should use the 'Item' or 'Gold'
values in the item type field as the 'Artifact' and 'Unknown' values are not
well understood. The item list is loaded from the file ITEMS.DAT in the
DFQEdit directory and can be editted to add more items if you're sure you
follow the correct format (don't get fancy). If you can identify the value
of an unknown item, please let me know as there are currently many I'm
missing.
The item message type usually relates to the message variable used in the QRC texts. Sometimes, however, the number is not related to such a variable, usually when the item represents a letter. If you click on the 'Find Msg' button the program searches through all current QRC texts for any texts which have this message variable. It shows a list of matches which you can then edit/view.
The Message ID #1 field is not well understood but we believe it to represent the text message displayed when the PC receives the item. This is only if the ID is non-zero. Click the 'View Msg' button to view the message if there is one.
The Letter MSG ID field represents the message id displayed when the PC uses an item, such as for a letter. A zero value here implies no message. Click the 'View Msg' button to view the message if there is one.
QBN EDITING: NPC's
The NPC section is still scetchy at best but it's values are useful
for hacking purposes. All but 5 bytes of the NPC field can be edited (the
value1 and value2 fields cannot yet since their purpose is unknown).
The gender field is a guess at best since it usually contains one of
4 values (but mostly one of 3 values).
The gender message type is similar to the item message type described
above. Click the 'Find Msg' Button to search QRC texts for a match to this
variable. It usually relates the NPC to a variable name in the QRC texts.
The two message id fields are also currently unknown at this time. Click the
'View Msg' buttons to view the messages if the value is non-zero.
QBN EDITTING: LOCATION
The location section is still very unknown at the moment so we'll
concentrate on only the location numbers for now.
The general location value places the location of the quest either in the current town (like the kill the rats type quests) or the more common Outside Town type (for dungeons, other towns, etc...). There is a third option which may indicate the quest takes place in the current house/dungeon but this is not verified.
The location type places the quest in a random home, a random dungeon, or a specific place. The specific locations are not yet known at the moment but most of them occur in the main quest files (S*.QBN)
There are many unknown fields here, of which I haven't the foggiest idea what they do...yet. Feel free to test them out if you're brave enough.
Like most sections, the location field also has a message type value.
QBN EDITTING: MONSTERS
The monster section is a small one, with only three editable fields
which are relatively well understood.
The monster index field selects exactly which monster is to appear. A monster can be a non-human monster (rats, orcs, daedra etc...) or a human one (barbarians, assassins, thieves, etc...). The human monsters are not well documented at the moment but feel free to try them out (and let me know what they are).
There is one unknown field with a few limited values. Most of the time the value is '1' here. It may govern the number of monsters appearing but that is merely a guess.
Again, this section has a message type value associated with it.
ALT+F / Mouse - Activate File Menu ALT+Q - Quit Text Editor F1 / ALT+H - This help Screen F2 - Save Text to TXT file (not to QRC!) F3 - Load TXT file CTRL+Y - Delete Current LineSpecial quest variables and codes are displayed in different colors and are explained in the edit help screen (F1 or ALT+H). The text editor's code appears to be quite solid and I have yet to have it crash, although loading to large a file or binary files might cause undefined behaviour. The header at the top of the screen also displays what type of text you are editing (although this is currently quite inaccurate...have I mentioned the quest type in the QBN file is not known?).
The text editor assumes that TAB's in loaded text files are 5 spaces. It saves TABS as spaces and currently doesn't accept the key TAB as input. The editor has many shortcoming in combining lines with deleted or added text since lines are currently limited to 78 characters or less (you can't scroll left or right).
In the DFQEdit's about window (and in the exit messages) there is a line giving the far heap's status. Now, without going into too much technical stuff, the heap is related to the memory available to the program for loading files and for variables (i.e., very important). The status of the heap _should_ return OK at all times. If the heap is corrupted it may result in crashes and data loss in DFQEdit (the heap is corrupted usually by some bug in the program or some option which was overlooked). If, when exiting or checking the About window, the heap status returns corrupted you should immediately exit the program, reboot and send in a bug report. The reboot is probably not nessecary, but better to be safe (during debugging I used to get a corrupt heap every 5 minutes and only rarely did the system lock-up after exiting the program). If you wish to save the current quest, do so in a different file name as it may or may not be corrupted. If the program crashes (or other wierd stuff) when you load it, the save file is corrupt and should be deleted.
Occasionally DFQEdit will not be able to free up all the memory allocated while it was running. This is a less serious bug but still should be reported. Include the difference between initial and final memory.
Peggy S Hanks (df4@juno.com) Lord Phoenix (gozer@esoterica.pt)
This prgram also uses 3rd party keyboard and mouse routines which have saved me much time from writing and debugging them myself.
INT9 (IRQ1) keyboard handler #9 by Patch (hamell@cs.pdx.edu) MOUSE Routines by Michael Chen (mchen@groucho.cs.psu.edu)
For latest version updates of DFQEdit, The ESP: Daggerfall Files
For the Quest Editing Guide, The ESP: Quest Editing Guide
If there's any other sites you think should be included here, feel free to suggest them.
DFQEDIT.EXE ... Main Executable GUILDS.DAT .... Contains listing of guilds/factions MSG.DAT ....... Contains listing of variable names ITEMS.DAT ..... Contains listing of items and their codes MOBS.DAT ...... Listing of known human and non-human monsters SEC41.DAT SEC42.DAT SEC43.DAT ..... Listing of values for the three unknown fields of QBN section 4 SEC71.DAT ..... Listing of values for the unknown field of QBN section 7 LOC.DAT ....... Listing of known locations DFQEDIT.TXT ... Program documentation (this file) DFQFAQ.TXT .... Quest hacking guide Source Code ... Is not included in archive due to size, but is freely available if you want it.
v0.20 Beta
v0.10 Beta
INT9 (IRQ1) keyboard handler #9 by Patch (hamell@cs.pdx.edu) MOUSE Routines by Michael Chen (mchen@groucho.cs.psu.edu)
Also, a number of people have contributed invaluable information concerning the format of quest files. Many thanks go to the following...
Peggy S Hanks (df4@juno.com) - General info Lord Phoenix (gozer@esoterica.pt) - General info Michael P. Schneider (slannesh@pacbell.net) - Much information on the file formats, variable names. Has his own quest editor for any 32bit Windows system (Win32s, Win95, WinNT).
I am in no way connect with BETHESDA, the computer gaming company who created TES: Daggerfall. This is completely a third party hack of the quest files.
All files in the above file list are free domain software and can be copied, duplicated, at will. If you wish to use the source for a project of your own, I would consider it a curteousy to tell me and give credit somewhere.
Variable Description =========== ========================== %cn country %di some direction %g He/She etc... %g1 He/She ??? %g2 Him/Her etc... %g2self Himself/Herself etc... %g3 His/Hers/Theirs etc... %god some god (listed in TEXT.RSC) %jok a joke %kno appears to be a guild name %mn A person's name? %n Quest Giver's Name %nam came up empty for me %nrn seems to be a random name inserted %oth an oath (listed in TEXT.RSC) %pcf character's first name %pcn character's current name %pct character's title in guild %qdt Quest date %ra player's race %reg Current region %rn Regent's Name %rt Regent's Title %t Regent's Title ( again? ) %vam Vampire Name %vcn Vampire's Clan
ITEM Variable ITEM Variable =============== =================== _1stparton_ _2myndung_ _agent_ _agentplace_ _agentuk_ _alchemist_ _alchemyshop_ _ally_ _amulet_ _apothecary_ _arena_ _artifact_ _artifact2_ _artifact4_ _assassin_ _aurielsbow_ _aurielshield_ _bank_ _banker_ _betrothed_ _betrothedhome_ _book_ _bookstore_ _bow_ _bribe_ _brother_ _casfort_ _castfort_ _castle_ _chemist_ _child_ _childlocale_ _cleric_ _clothes_ _clothing_ _coastal_ _competitor_ _conhouse_ _contact_ _contact1_ _contact2_ _cousin_ _damsel_ _darkb_ _darkbmember_ _daughter_ _daughterhouse_ _db_ _dbgold_ _dbguild_ _depository_ _destination_ _dirtypit_ _dispatcher_ _drugs_ _duelist_ _dummy_ _enemy_ _evilfocs_ _evilitem_ _fakename_ _fakeplace_ _father_ _finger_ _flowers_ _foil_ _friend1_ _friend2_ _friend3_ _friend4_ _gaffer_ _gem_ _gems_ _giant_ _giver_ _givershouse_ _gold_ _gold1_ _gold2_ _goldgoth_ _guard_ _guard4_ _guardian_ _guildhall_ _healer_ _heist_ _hermit_ _hidingplace_ _home_ _hooker_ _hookerhouse_ _house_ _house2_ _house3_ _hunter_ _informant_ _ingredient_ _inn_ _item_ _item1_ _item1_ _item2_ _item3_ _itemplace_ _jewelry_ _key_ _kidnapper_ _knight_ _lady_ _lessgold_ _local_ _lordsmail_ _love_ _lovechild_ _lover_ _lovgold_ _mage_ _mageguild_ _magesguild_ _magic_ _magicitem_ _magicsword_ _maker_ _man_ _mansion_ _marknpc_ _master_ _meetingplace_ _mensclothing_ _merchant_ _messenger_ _metal_ _mfriend_ _mg_ _mggold_ _missingperson_ _mistresshome_ _mitem_ _mondung_ _money_ _monster_ _murder_ _necs_ _newplace_ _noble_ _noblehouse_ _nobleman_ _npc_ _npc1_ _npc2_ _npc3_ _oblivion_ _orsinium_ _other_ _painting_ _palace_ _patsy_ _pawn_ _pickuplocal_ _pickupregion_ _place_ _poison_ _potion_ _priest_ _prophet_ _prophouse_ _qgenemy_ _qgfriend_ _qgiver_ _qgiverhome_ _queen_ _queenreward_ _questg_ _questgiver_ _rebel_ _relartifact_ _religiousitem_ _religitem_ _replace_ _reward_ _reward2_ _ring_ _ripperhouse_ _rippername_ _rock_ _ruler_ _safehouse_ _sage_ _scarab_ _scholar_ _scholarreward_ _sister_ _sistershouse_ _sleepingmage_ _soldier_ _spouse_ _store_ _storehouse_ _target_ _targethouse_ _tavern_ _teacher_ _temple_ _thief_ _thiefhouse_ _thiefmember_ _thiefplace_ _thievesguild_ _townhouse_ _traitor_ _traitorreward_ _transporter_ _treasure_ _upfront_ _vamp_ _vamp1_ _vamp2_ _vamphouse_ _vampire_ _vampitem_ _vampname_ _vampproof_ _vamprelic_ _vampreward_ _victim_ _victimhouse_ _villager_ _villains_s _warrior_ _weapon_ _weapons_ _weapons_s _widow_ _witch_ _withouse_ _witness_ _wizard_ _womensclothing_ _woodsman_ __agentplace_ __alchemyshop_ __arena_ __bank_ __banker_ __betrothedhome_ __castfort_ __castle_ __chemist_ __childhouse_ __childlocale_ __competitor_ __conhouse_ __contact_ __contact1_ __contact2_ __darkb_ __daughterhouse_ __db_ __dbguild_ __depository_ __destination_ __dirtypit_ __dispatcher_ __dungeon_ __gaffer_ __giver_ __guard_ __hidingplace_ __home_ __hooker_ __house_ __house2_ __house3_ __informant_ __inn_ __itemdung_ __kidnapper_ __knight_ __local_ __lovehouse_ __lover_ __mageguild_ __magesguild_ __mansion_ __master_ __meetingplace_ __merchant_ __mg_ __missingperson_ __mondung_ __newplace_ __noblehouse_ __npc1_ __npc2_ __oblivion_ __oracletemple_ __palace_ __patsagent_ __pawn_ __priest_ __qgfriend_ __qgiver_ __questgiver_ __rebelhouse_ __safehouse_ __sage_ __school_ __shop_ __sistershouse_ __store_ __target_ __targethouse_ __tavern_ __temple_ __thiefplace_ __thievesguild_ __traitor_ __tranporter_ __vamp_ __vamp2_ __vamphouse_ __vampire_ __widow_ __witch_ __witness_ ___agent_ ___alchemist_ ___ally_ ___apothecary_ ___bowdung_ ___casfort_ ___chemist_ ___competitor_ ___contact_ ___contact1_ ___contact2_ ___contactdung_ ___cousin_ ___crypt_ ___darkb_ ___darkbmember_ ___db_ ___dispatcher_ ___dummy_ ___dungeon_ ___dungeon1_ ___dungeon2_ ___dungeon3_ ___father_ ___fatherdung_ ___gaffer_ ___giver_ ___guard_ ___guardian_ ___healer_ ___hideout_ ___hintdung_ ___hooker_ ___house2_ ___informant_ ___itemdung_ ___kidnapper_ ___knight_ ___local_ ___lover_ ___maker_ ___mapdung_ ___merchant_ ___mfriend_ ___mg_ ___mondun_ ___mondung_ ___mondung2_ ___myndung_ ___newdung_ ___noble_ ___npc1_ ___npc2_ ___oblivion_ ___orsinium_ ___other_ ___patsagent_ ___pickuplocal_ ___pickupregion_ ___priest_ ___qgfriend_ ___qgiver_ ___questg_ ___questgiver_ ___ringdung_ ___ruler_ ___sage_ ___scholar_ ___scholardung_ ___sleepingmage_ ___spouse_ ___stronghold_ ___thief_ ___thiefmember_ ___traitor_ ___ukcrypt_ ___vamp_ ___vamp2_ ___vampire_ ___villager_ ___witch_ ___witness_ ___woodsman_ ___wrongdung_ ____dungeon_ ____newplace_ ____tavern_ ____temple_
Variable Variable =============== =============== ==daedra_ ==dummydaedra_ ==other_ ==priest_ ==qgiver_ ==questgiver_ ==vampire_ =1stparton_ =2dagger_ =2dung_ =2mondung_ =2myndung_ =2ndparton_ =2palace_ =2ransom_ =2shedungent_ =2storehouse_ =acolyte_ =assassin_ =atronach_ =bloodfather_ =bodyguard_ =boss_ =chemist_ =child_ =cleric_ =competior_ =contact_ =contact2_ =cousin_ =daedra_ =daedroth_ =db_ =decoy_ =elder_ =enemy_ =executiondelay_ =fighter_ =finddaughter_ =firedaedra_ =gettraitor_ =giant_ =guard_ =guardian_ =guards_ =hooker_ =huntstart_ =itemindung_ =keytime_ =kidnapper_ =knight_ =lich_ =lover_ =mage_ =mage1_ =mage2_ =mage3_ =mage4_ =man_ =merchant_ =mmaster_ =monster_ =monster_ =monster1_ =mummy_ =noble_ =npc1_ =npc2_ =orc_ =other_ =pawn_ =posse_ =priest_ =prophet_ =qgfriend_ =qgiver_ =qtime_ =questgiver_ =queston_ =queston1_ =queston2_ =questtime_ =realmummy_ =replace_ =reward_ =scholar_ =sneaker_ =snitch_ =soldier_ =spy_ =target_ =thief_ =thug_ =tiger_ =time1_ =time2_ =timeforq_ =total_ =towertime_ =transporter_ =traveltime_ =vamp_ =vamp2_ =vampire_ =vampleader_ =vamprival_ =victim_ =wereboar_ =widow_ =witch_ =witness_
GUILDS.DAT MSG.DAT ITEMS.DAT MOBS.DAT SEC41.DAT SEC42.DAT SEC43.DAT SEC71.DATThese files contain data for the various lists used in the program such as guild names and monsters. Having these values contained in files make the program much more flexible and it is easier to change any value(s) in these files. It is possible for one to modify these files to reflect any new information obtained through editting quest files or by any other means. For instance, through many hours of quest editting you figure out that the Giant Rat and Giant Bat in the MOB.DAT file are switched. You could edit the file (with any text editor) to swap these values. If you do come across errors or any additions for these files, make sure to let me know (aj589@freenet.carleton.ca)
DUAL LIST FILE FORMAT
All data files except MSG.DAT are of the dual format. These files
contain a number followed by a text description on one line.
Example: 1043 Does Wierd StuffThe number may be of binary (1001b), octal (0174), or hexadecimal (0x5Fa) as well as the usual decimal values. Each line of the data file contains exactly one record and the data is read until the end-of-file, there are no comment type characters. If after modifying one of these files the program unexpectingly crashes or the list outputs strange data, you probably made a mistake (I guess it's too late to mention back-ups...)
SINGLE LIST FILE FORMAT
At the moment, only the file MSG.DAT uses this format. In this format
each line represents one list item. Again, there are no comment characters
and the entire file is read.