Custom materials.txt / titles.txt - All you need to know


El Capitan
06-03-2003, 04:50 AM
Its just occurred to me that it would in fact be possible to edit the materials.txt from a .bat file. Obviously it would be better to have the option in dod for custom map materials files, etc but it isn't (yet)... so we have to think of alternatives. Heres a couple of ideas on how this can be achieved.

1. The "Use existing texture names method" - You can create material sounds based on existing textures, although this can be annoying. For a list of the textures and the sounds they create when you walk over them, go to the dod/sound/materials.txt and look at the already existing sounds. Then load Wally and rename the relevant textures to these names. I highly recommend you use this method, just make sure you don't use names that conflict with other wad files that you have included!

dod/titles.txt holds the following information for maps:

- Text displayed when called...eg CHARLIE_AXISBRIEFING will display the briefing text when it is called from the map, which would be targetter using an entity...this allows the user to customize the message.
...%p = players name, %n = location, %t = team capturing location
- Locations, eg. POINT_ANZIO_LAUNDRY = "the laundry"

It is possible to change all of these within a map itself, rather than having to put them in the titles.txt, so this shouldn't be necessary.

2. If you insist that you absoloutely have to edit the materials.txt or titles.txt, there is ONE way to do it without asking the user to manually edit the file, using external programs or just overwriting the file (never do this)

What you need to do is create a text file titled:

dod_<mapname>_materials.txt and
dod_<mapname>_titles.txt

Then, create a .bat file, called dod_<mapname>.bat and place this in your root dod directory.

Now edit the following files

dod_<mapname>_materials.txt // Insert what materials you want adding here....you must, however put a blank line in this file before you start typing anything....eg

--------Beginning of text file---------

C a_texture
-------- End of text file --------

dod_<mapname>_titles.txt // Again, insert a blank line and then start entering in what you want adding to the titles.txt file.

Next, edit the dod_<mapname>.bat file.....

Insert the following lines....

copy /A /D /Y sound\materials.txt + dod_<mapname>_materials.txt /a sound\materials.txt
echo Materials file edited
copy /A /D /Y titles.txt + dod_<mapname>_titles.txt /a titles.txt
echo Titles file edited
echo Installation complete

REPLACE <mapname> with your mapname!!
REMEMBER to include the blank lines (just press return to make one!)

izuno
06-03-2003, 10:27 AM
Indeed these are the only two methods custom maps textures can take advantage of. Good writeup. A while back I tried to get the team to change that in the code so that each map would get it's own file, but that never really materialized.

As such, I would not expect that map specific materials.txt method to be implemented, so this is probably the only way it's going to work.

I suggest doing the Use existing texture names method, even though it is somewhat time consuming and slow.

As for custom titles...
We used the titles.txt file method mainly for localization purposes so DoD could be translated into French, German, Spanish, Italian (any others?) fairly easily. Otherwise, we would have kept all the titles in English and hard coded them into maps using game_text entities. For a tutorial on that, click here (http://www.planethalflife.com/izuno/game_text_tut.htm).

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.