Want to Edit Crawl Files


Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.

Shoals Surfer

Posts: 293

Joined: Tuesday, 25th October 2011, 05:04

Post Tuesday, 25th October 2011, 05:55

Want to Edit Crawl Files

I want to edit some files in Crawl locally to try some ideas I have, but I don't even know where to start when it comes to programming. I followed the links provided on this site and the wiki, but I don't really have the technical knowledge to use GIT or the console.

For starters, I can't read the .des or .lua files in the /dat directory (I presume these are what I need to edit). What do I need in order to look at or edit those?
User avatar

Blades Runner

Posts: 575

Joined: Tuesday, 18th January 2011, 15:11

Post Tuesday, 25th October 2011, 07:03

Re: Want to Edit Crawl Files

if you want to contribute but you can't code, here's some of what you can do:
viewtopic.php?f=19&t=596

there should be a documentation folder packaged with whatever version of the game you have, so check that out.
i assume there are hints to it in the documentation, but lua and des files are plain text, so you can read and edit them with any text editor (notepad, gedit, vi, etc). do not use a word processor, though.

if you're interested in vaults, in particular, here are some examples:
viewtopic.php?f=19&t=499
Wins: DDBe (3 runes, morgue file)

For this message the author absolutego has received thanks:
File200

Shoals Surfer

Posts: 293

Joined: Tuesday, 25th October 2011, 05:04

Post Wednesday, 26th October 2011, 02:22

Re: Want to Edit Crawl Files

I feel silly now.

If I want to edit, say, gods, species or weapons, how would I do that? They don't seem to have corresponding files in the Crawl directory.

E: N/M, I was looking through the files that I got with the installer. Everything seems to be available in the Git version.

E2: Holy moly, never mind. The godconduct.o file requires some different type of interpreter and I can't understand anything here. Back to the vaults for me I guess.

Dungeon Master

Posts: 125

Joined: Sunday, 8th May 2011, 21:54

Post Wednesday, 26th October 2011, 03:03

Re: Want to Edit Crawl Files

They are mostly defined in the (C++) source code. The .o files are object files compiled from that source code; what you want are the .cc and .h, but you'll need to know at least some C++ to modify them. The monster stats are in mon-data.h; most weapon attributes are in itemprop.cc; and unrandarts are in art-data.txt (not a C++ file, but you'll still need to compile to apply changes to it). Gods and species are all over the place.

For this message the author edlothiol has received thanks:
File200

Shoals Surfer

Posts: 293

Joined: Tuesday, 25th October 2011, 05:04

Post Saturday, 29th October 2011, 23:52

Re: Want to Edit Crawl Files

New problem, I tried adding Mountain Dwarf back to the trunk build but when I select it, all the backgrounds are listed as N/A.

What file do I need to change?

If that's too vague, what file determines that demonspawn can't be priests or healers?
User avatar

Dungeon Master

Posts: 182

Joined: Saturday, 18th December 2010, 10:26

Location: Germany

Post Sunday, 30th October 2011, 09:57

Re: Want to Edit Crawl Files

File200 wrote:New problem, I tried adding Mountain Dwarf back to the trunk build but when I select it, all the backgrounds are listed as N/A.

What file do I need to change?

Have a look at the commit in question: http://gitorious.org/crawl/crawl/commit ... 9a3c70d329
You can try to revert the changes using that.

In case you don't know how patches work, lines marked in green have been added in that commit, lines marked in red have been removed, and the lines highlighted in grey just show that the output skips a couple of lines that haven't been modified by the commit. You can also create a "raw patch" (link to the top left) and try to apply the patch to the source code, but a) you might end up getting conflicts that way, and b) you'll learn more about how the code works if you revert the changes manually.

If that's too vague, what file determines that demonspawn can't be priests or healers?

You can change allowed character combinations in ng-restr.cc (which stands for "new game restrictions"). Here, CC_BANNED means that the choice is completely unavailable, CC_UNRESTRICTED means that the choice is recommended (lightgrey) and CC_RESTRICTED that it's not (darkgrey).
Please report bugs to Crawl's bug tracker, and leave feedback on the development wiki. Thank you!

For this message the author jpeg has received thanks:
File200

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.