The only annoying element of the rogue-like game "Dungeon Crawl" is that your character can get killed suddenly and that's that.
. You have to start over. From scratch. After I have invested 50,000 turns in a character, I'm not in the mood for the reality of death. There are two ways to cheat death in Crawl:
Wiz Mode and the use of a Windows batch file or Linux script to run the game. I prefer the latter. Due to the additional features offered by this batch file, even if one doesn't cheat, it is a convenient way to run Crawl.
The idea behind the batch file is that whenever you reach a point where you would like to preserve your existing character, you can save, exit the game, and the batch file will backup the Save directory to a new directory that the game will not modify. If you later get killed, then the batch file can copy this backup directory over to the Save directory, and you can resume from that point.
Hardcore crawlers refer to this practice as "save scumming," and prudes disapprove, which is weird, considering it's just a game. I find the angry reactions aroused by the idea of so-called "cheating" to be peculiar and amusing. All around the Internet and even in comments on my own blog, one can find Dungeon Crawlers scolding other players about this. It is like some kind of religious injunction. I pay it as much mind as I do other religious injunctions.
Here's my handy-dandy script (batch) file for cheating at Dungeon Crawl. At a minimum, it is compatible with
either Linux or Windows, both of which I use.
Although I developed the Windows batch for Windows XP, it now supports Windows 10, which is what I use. I can no longer certify Windows XP or 7 support, since I no longer use XP or 7, and you should not use these outdated systems, either. Time to move on, chilluns. If you do not like Windows 10, that is certainly O.K., move over to the wonderful world of Linux, but do not stay with an antiquated security hole of an operating system. However, I suspect that the few remaining stubborn holdouts still risking their sanity with Windows XP or 7 could get the batch working without too much difficulty. I used to play Crawl on Windows XP, back when I had an XP system. I know for sure that the batch file then ran perfectly on XP back then. But you know, I have made changes since.
I've tried to distill as much intelligence as I can into the batch. I
do not use the Installer, but the batch will adjust
its pathnames automatically upon successful detection of an
Installer-created Dungeon Crawl Stone Soup installation. If you
encounter any problems, it will more than likely have to do with the
pathnames used by your version of Windows or else unsupported batch
commands. There is help widely available on the Internet for programming
in batch, but I will attempt to help anyone that has a problem that is
likely to be shared among many users. I enjoy programming in batch
language, because it does not require a cumbersome and slow compiler,
but concede that the language is quite limited both in capability and
debugging options. I have my own ways of debugging that work for me
although they are quite challenging, but the challenge is part of the
fun for me. Even with good technique, often it takes guesswork and plenty of knowledge to deduce what is going on. So if you get into batch programming, first of all don't get into batch programming--but if you do, then prepare to search Google on a regular basis for tips, tricks and syntax, because Microsoft Help is not always quite as helpful as it could be. I have been banned by Google from searching in the past due to the frequency of my requests. Google interpreted my behavior as being similar to that of a bot. But that is how I learned how to program in Linux script and Windows batch.
I have been using some variation of this batch file for years to play Dungeon Crawl. Happy Crawling!
LINUX Installation: With your mouse, click somewhere in the box below. My javascript should highlight the entire contents of the textbox for your convenience. If it does not, then press Ctrl-A to highlight all of the text, then copy (i.e., press Ctrl-C) to your clipboard. Load a plain text editor and paste the clipboard contents (i.e., Ctrl-V) in that window. Inspect the batch, checking for any instances of Blogger's word wrapping breaking up long lines. Save the text file as "regen.sh". I place my script in /home/games/regen_as regen.sh, but you can store it wherever you like. Open a terminal and modify the security of the script using the syntax, "chmod +x regen.sh". Next, set up a launcher to run the included script file from your desktop. When creating the shortcut, click the "Application" tab, click the "Advanced Options" button, and check the box for "Run in terminal." Run the game at least once by itself before using regen.sh, so that the game can create all its data directories. Additional instructions will be found in the script itself. You can get creative for a launcher icon.
WINDOWS Installation: With your mouse, click somewhere in the box below. My javascript should highlight the entire contents of the textbox for your convenience. If it does not, then press Ctrl-A to highlight all of the text, then copy (i.e., press Ctrl-C) to your clipboard. Load Notepad++ or a similar plain text editor (Notepad, if you must) and paste the clipboard contents (i.e., Ctrl-V) in that window. Inspect the batch, checking for any instances of Blogger's word wrapping breaking up long lines. Save the text file as "regen.bat". The file must have a .bat extension, because Windows will not execute it if it does not. Create a shortcut to "regen.bat" on your Windows desktop and use that shortcut to play the game.
General Notes:
This batch file, and any page on Igor's blog, is not static but is subject to change--improvement--at any time. You may link to this page on other web sites and be assured of referencing the very latest version of regen.bat for Windows and regen.sh for Linux at all times now and in the future.
To use this strategy effectively, you should save your game and quit at a point where you may wish to recover your character later upon any unexpected demise.
I play the latest version of Crawl, either the trunk (beta) or the last stable release. You have a better chance of the script/batch file working correctly if this is also your scenario. Through the years, the Stone Soup developers have altered the path and file names of the saves directory. However, the script/batch is designed in such a way that modifications are elementary, consisting of one or two edits of constants at the most.
On my Linux computer, I have created a new directory in Home called games and placed the linux shell script (regen.sh) and its icon in there. I believe it is important for the name of the directory to have no spaces. One must either chmod the two relevant crawl directories in order to permit file copies and deletions or else grant root permissions for this script, because otherwise Linux denies permission to the many file copies. I'm not well-versed on this sort of thing. I used to give my launcher root permissions via "sudo ~/regen.sh", but my current method is to chmod the two crawl directories, because that eliminates the need to enter the root password every time one plays.
On a Windows computer, regen.bat attempts to self-adjust its assumptions regarding paths--it has some primitive intelligence, not much--but if that doesn't work, regen.bat will tell you so, and at that point you will have to edit the variables relating to pathnames. By design, few pathnames are hardcoded, meaning the batch should be relatively easy to modify.
Linux has a built-in capability of accepting a single keypress for input and overall a far more robust scripting language than Windows. Batch programming in Windows, however, remains in the Stone Age. It is a wonder I ever programmed the Windows batch at all. For Windows users, as of 05/19/2019, I have finally found the syntax to accept single keypress and no longer use a third-party utility to achieve the same effect. Thus, this cheat is transparent with plain text source code, and no one should feel as though there is anything deceptive about it, although there is no doubt as to its being elaborate. Perhaps more than five minutes would be required to understand how the batch works, but not more than thirty minutes, for an experienced batch programmer.
Release Notes:
05/19/2019 Update:
Change to regen.bat only: modification to work with my Windows 10 system and allow single-keypress responses, i.e. not having to press the Enter key. Users are expected to modify one line in the batch specifying where the game is installed.
06/15/2014 Update:
Change to regen.sh: fix for multi-desktop users like myself. No longer will crawl span both desktops.
11/28/2013 Update:
Change to regen.sh: sleep a second after wmctrl, because the computer takes a random number of milliseconds to adjust the display. Clarify a display message.
11/27/2013 Update:
Change to regen.sh: fix a few bugs. Maximize window if wmctrl is available.
10/18/2013 Update:
Change to regen.sh: corrections to the menu display and new optional mods to automate setting tiles to full screen and other preferences of mine. The script now reflects a change in version 13 of the location of the macro file.
9/16/2013 Update:
Change to regen.sh: Recognize the existence of Sprint and Zotdef saves and tidy up the code a little bit.
1/31/2013 Update:
Change to regen.sh: Handle the case where Crawl has not yet been installed or executed.
1/29/2013 Update:
Just a few minor refinements to text messages in regen.sh and the addition of a loop to handle permission-granting, in case the user types an incorrect password.
1/21/2013 Update:
Once again, Linux refinements only. regen.sh was not handling chmod quite right; chmod -R is more to the point as it liberalizes permissions for all the files and folders within the two relevant Crawl directories. I made a few other changes of no special importance. It is my intention that regen.sh should handle DCSS upgrades seamlessly, asking for permission to chmod when necessary.
1/19/2013 Update:
Further refinements to the Linux script, which is now coming into its own, looking better and acting smarter. Rather than have sudo ask me for my password everytime I play (ach!), I prefer to chmod 777 the permissions of two crawl directories, which is Linuxese for "allowing read/write access to everyone".
1/16/2013 Update:
Added a few minor refinements to the Linux script that occurred to me this evening, including a suggestion for avoiding the annoyance of sudo.
1/16/2013 Update:
Many improvements made and features added to the Linux script. It is somewhat more intelligent now and will attempt to detect and report certain problems before they occur.
1/14/2013 Update:
I have successfully ported regen.bat to Linux! Many improvements made between Jan. 13 & Jan.14th to the Linux script, which does however require root permission in order to shift files around. Through trial and error, I have found that sudo is the thing, not kdesudo, which is for graphical programs. Kdesudo will cause errors. There is no way I know of getting around the permission requirement other than disabling the security altogether on one's system. I'm not quite confident enough to second-guess the Linux developers on that score. I'd rather just play along according to their rules.
11/13/2012 Update:
Minor edits for compatibility with Crawl 12 beta.
10/17/2012 Update:
Colorized the text, added for the first time a free public domain icon, reorganized the main menu, and fixed several bugs throughout the mods menu.
Fixed a little bug that had broken the 'edit batch file' option. Oopsy-daisy. Added a little colorizing trick that had occurred to me.
Improved the efficiency of the Install-New-Crawl option. Fixed the broken macro mod. Added polychromatic effect to mod menu.
Fixed a little issue with install-new-crawl. So many variables now, and of course batch language won't help me in keeping track of them.
10/08/2012 Update:
Add option to install new version of Crawl using 7-Zip or WinRar. This will install the game into a directory that is the default for regen.bat and thus ensure 100% compatibility.
Several bug fixes to the Mods menu. Added 'command enhancement' mod.
09/30/2012 Update:
Just a few minor tweaks to improve efficiency. Improved start-up performance by skipping an unnecessary FIND. Eliminated a few redundancies through the use of subroutines. Reworded some comment statements. Everything working well on Windows XP with the latest beta version .11.
79 comments:
I tried tweaking this file, but it couldn't get it working right.
Jeez, .bat files are old-school. But why use c## when good old dos is right there...?
If you make this automatically backup my character into the Saves directory, that'd be handy...!
This one doesn't seem to do that, it just keeps an old copy of my character and keeps backing that up. Or am I getting it wrong?
Thanks for your awesome website. Just found Dungeon Crawl (I'm a huge Rogue/Larn/iLarn/iRogue fan), and it's a shocker that the iPhone app is not made yet.
The 2 Rogue-likes on iPhone are ... not very good. (Hint! Someone? Wanna make your millions?)
rekzkarz.com
PS: It's not accident that Diablo was a great game. The formula is all here -- and Dungeon Crawl has that & more.
The only thing I think Dungeon Crawl is missing is ... 'very simple to make' user created content.
PPS: Please respond on my blog or whatnot. rekzkarz.com
thanks, extremely useful. had to change the location of the stone soup directory to my own personalised dir and also the crawl.exe to crawl_tiles.exe. the latter change seems to work fine with the tiles version.
I use this batch file every time I play. If you use this in conjunction with my auto-installer, then it will not be necessary to make any modification.
how can i get it to work with crawl_tiles?
If you put this batch file in the same directory as crawl.exe, you don't need the cd or anything. And to make it work with crawl_tile, just change the line with crawl.exe to 'crawl_tile.exe'.
Thanks for putting this together. My DOS skills are long since crusted over, and my Linux install is... almost as old as my DOSBox install, and used about as much ;)
Level 7 and scumming!
I have modified the batch to deal with three possible alternative spellings of the crawl .exe.
Enjoy!
modified the batch again to tolerate multiple characters & their associated .sav files.
OMGGGGGGG UR NOT SUPPOSED TO CHEET
Seriously though, when I started playing Crawl, I save scummed a lot too. A few months in though, I started just letting death be death. I guess I'd gotten used to it by then.
Nice work, Igor.
Interesting that "old school" DOS, as the guy calls it, has the power to do what he apparently couldn't. :)
Very thank you, Igor!
This game is great, and with your code, we can live to see its deeper levels!
i'm so glad to see all of your content on this game, excellent job, this is one of the best games ever made, and is virtually unknown to most everyone I know. that being said...
using this method the game is still impossible. try examining the files the game gives you, one for each dungeon level, one for your character with inventory included in it i believe, it's been awhile. the levels are interchangeable from game to game, and they include everything on the ground. so, get an experienced character that's stuck, go up to level 3, let's say, drop all of your awesome gear, save, exit. copy file for level 3, then change the name to a different, new character. go back to game, start new character with this name, on level three, all of the goodies will be there(this should work for all levels that havent yet been identified. not sure about deleting and replacing), i suggest 3 simply because it's early on and easy to get to. i've gotten lots of fun tricks to work, got bored before i could save one of each thing i neede to beat the game, but if someone has enough time, it'd be amazing to post a file with lots of neat stuff on the ground. one of each is infinite of each if you have enough freetime. i'm looking for strength +1 potions and the like. you can find one in a game, then simply load your saved level, drop it off there, and resave. if someone posted one, another person could put a character there, add to it, and repost! i don't know about you, but I've always wanted to beat this game, one way or another. i've had maxed out weapons and armor using this trick, and still have died a million times.
anyone interested?
That sounds interesting. There are many varieties of cheating at Crawl. I have specialized only in one, the simplest and most obvious method. For my part, I have not been motivated to attempt anything other than protecting favorite characters from sudden death by surprise monsters and traps. When using regen.bat, one's odds of winning the game increase substantially, and that's enough for me.
When I first started playing, I relied upon regen.bat a great deal. Nowadays, I sometimes play games where my character does not get killed at all. It does not bother me that other people assume I use the cheat file because I'm lame and cannot win without it. I am playing the game for my own enjoyment. Others are welcome to think whatever they want. It is possible to hit a key by accident in Crawl and die as a direct result. Regen.bat protects against that as well as random glitches.
i hear ya. havent tried your batch file yet, but it sounds like it would save me a lot of copy and pasting of save files. the game's exceedingly thick, so i've just concentrated my efforts on one specific class/species at a time. so far i've had the most luck with troll berserkers, but i still am quite short of making it to the orb. I've come to terms with my acceptance of cheating in this game, as it's still the most challenging game i've played when i'm cheating, and the cheating itself has become part of the game to me. like a puzzle that affects gameplay.
Looks like Blogger lost another comment. I don't see it, even though I approved it. This is what vaughn said:
"i hear ya. havent tried your batch file yet, but it sounds like it would save me a lot of copy and pasting of save files. the game's
exceedingly thick, so i've just concentrated my efforts on one specific class/species at a time. so far i've had the most luck with troll
berserkers, but i still am quite short of making it to the orb. I've come to terms with my acceptance of cheating in this game, as it's
still the most challenging game i've played when i'm cheating, and the cheating itself has become part of the game to me. like a puzzle that affects gameplay."
---
Exactly. This is something that the purists don't get. Cheating enhances gameplay. It does not detract. It changes the game and makes the game more fun.
Troll Beserkers are very powerful in the beginning and don't need any weapon either.
I can't get this to work, do I just open it through regen.bat? Also, is it regen.bat , or "regen.bat"
The filename extension must be .bat, or else Windows will not interpret the batch instructions contained in the file.
An example of a .bat file is in your root directory, c:\. It is called autoexec.bat and is loaded every time Windows XP loads.
To debug a batch file, set ECHO ON as the first line in the batch file in order to display each command. ECHO OFF is a command that turns off the display of batch commands--this is only for batch files that are thought to be problem-free.
Add a number of PAUSE statements at strategic points throughout the batch, to give you a chance to observe the system display.
If you find anything amiss, share your information here. This batch works on my system without any problem. But I am willing to tweak it to help others.
Igor, just checking back in. I saw the new 'winrar' version of your regen.bat. I don't need that, I kinda like the cycling of the bat file (I turned echo on to watch the copying).
Well, I still haven't won -- it's not so much b/c I can't, b/c I probably could. It's more I get impatient with one character 'type' and want to try another.
Ah yes, the story of my life. HA! (How did my relationship issues pop up in Dungeon Crawl!?!?)
Anyway, whenever I do play, I *must* use your cheat b/c otherwise I'd die continuously in a stream of dying.
Frankly, I think it's funny that this is called "Cheating" in a roguelike, but most video games have a 'save' option. Heck, it's not like the game becomes a cakewalk b/c of save/restore. It's still a hard strategic challenge!
My fav 'trick' is to get hungry & just eat corpses. I always wished I could use a fireball or flame wand to cook the meat, y'know? Surprised no one's thought of that. Freakin' raw dungeon rat (or elf/orc) just sounds nasty, y'know? But cooked -- probably tastes like chicken! HA
rekzkarz.com
Not sure what you mean by the "Winrar version" of regen.bat? The new version of regen.bat caters to players like you that tire of one character and want to try another. The main change is the addition of choose32.exe, which remains optional, but allows the user to delete all saves, replay, or quit. There is no way in Windows XP to poll user input in a batch file, so a third party app had to be used. I had been reluctant for a long time to do that, but the benefits for me outweigh the downside.
My Demonspawn summoner eats corpses too. In fact, that is a necessary component of any diet save for Spriggans, who may starve. Real food should be reserved for emergency. It would be nice if it could be cooked, an added bonus for Fire Elementalists and Red Dracons.
After dying, I prefer resuming at the very place I died, rather than at the beginning where I was doing well and had no problems. I prefer to save and quit just before descending a level. That way, if I die on the next level, the next time I play, the level will be regenerated with new and different monsters, map, and treasure.
I anticipate that my functionality will be co-opted by the dev team one day, but until that day comes, I will continue using and developing regen.bat. I'm glad that you and others use it as well.
Hey I just made your batch file on my computer and had a difficult time getting it working. I don't know if I'm using the wrong version of crawl (0.6.0-0) but I had no file in my saves directory with a .chr extension. I finally got it to work by just making a file called 1.chr which finally got the normalsave subroutine to run and copy my game. Was I doing something wrong? Will this work? It seems to have worked so far but I don't want to lose my 50000 turn char and have been using brand new ones just in case. Thanks for your work!
Er, the case may be that *.chr is not a file used in version .6. I am using .7 beta.
I will modify the batch file so that others will not encounter this problem.
Thanks for the tip. With input from others, it is possible to keep the batch useful for everyone rather than just one person (me).
In the new 0.7 version, some changes are needed because Crawl now saves to the users home directory and not the game dir.
Add this block before any save directory is manipulated:
rem --- Goto save directory
%homedrive%
cd %homepath%\AppData\Roaming\crawl
Then CD back to the game dir before any exe file is run.
I am trying to use your bat file for sprint saving. I get the error
backup_saves\*.*
the system cannot find the file specified.
0 file(s) copied
the bat file works playing the game normal with it saving my chars.
the only thing i edit in your bat file was where crawl was being stored on my computer.
i am running the 0.71.tiles win32 game.
thanks for your help
Kelli and Simon, there are now several flavors of the Crawl package available for download: with Installer, without, Tiles and Console both, Tiles only, Console only, or Mac OS. I use the Windows Tiles only download, without installer. I do not intend to test all of the downloads, but welcome helpful comments from users that prefer other flavors.
I tested regen.bat against the official 7.1 Stone Soup Windows Tiles (no Install) on July 25th, 2010, using my autoinstall batch file to do the installation. I did not notice any change in the save directory. However, I did make some changes to my autoinstall batch.
Simon, your suggestion points to a potential fix for the Installer version, if it behaves differently. Another possible fix would be to mod settings\init.txt, appending this line:
save_dir = c:\games\crawl\saves
If someone would like to test Simon's fix, mine, or their own against the Installer version, then I would be happy to add a successful patch to regen.bat, if it remains compatible with the non-Installer version. Drop a comment here.
Crawl has a wizard mode built in which can be accessed with the & key I think, its in the documentation anyway.
The point is, wizard mode gives you whatever you want, from items to portals to enemies to levels to (the apparently important part) death protection. The only thing you give up is your final score, which is irrelevant to anyone not playing on a public server anyway.
Wiz mode is a great alternative method, and I recommend all Crawlers to try it at least once. I have grown accustomed to the batch file method over the years, with many different programs (Larn before Crawl, and Rogue before Larn). It's enough cheating for me.
This is a really great utility!
Thanks Igor!
Your comment about using the official 7.1 Tiles only release WITHOUT installer really helped.
Maybe you could mention this near the beginning of your post?
Thanks again!
If the user does not use the Installer, then the batch works "straight out of the box."
The batch is coded in such a way that if user opts to use the Installer, the batch can still work, as long as the user modifies the batch, changing the directory locations as needed.
I have an autoinstall batch file on the blog that handles all installation needs and is compatible with regen.bat.
Igor,
Thank you VERY much.
Note to all: If you install crawl within c:\Program files
Then the script will break, due to the space in the directory name. I moved it to c:\Games\crawl .
- toby robison, the precision blogger
Thanks, Toby. I do like working on the batch.
i'm going to share my method for save scumming roguelikes. the method i use is version control called mercurial. mercurial (or any dvcs) is perfect not just for source codes but for roguelikes and other types of offline games.
i use it for crawl and adom. of course it can be used with any other roguelikes without knowledge of how it saves the games (just know where its saved).
Version control is another option. One positive about it is that the method can be used in other games. I prefer my batch because it has a couple of additional features just for Crawl.
I think I like working on the batch better than playing the actual game. I find that I get bored with it, especially in the later levels. But I've been playing Crawl for years. Had a good laugh recently when I read the guy on Usenet who said I need to quit save-scumming so I can learn more about the game. That was pretty funny. Talk about clueless.
Thanks a lot for this! Makes a good game great by removing a huge amount of frustration.
Yes, I certainly think so. The batch adds a new dimension to the game, allowing deep exploration of the most difficult levels.
No luck with 0.7.2 and the regen.bat file. I tried to recover old saves after deaths but no luck. I used the installer version. It went into C:\program files\crawl. regen.bat shortcut seems to work fine. IDK ?? help
Version .7 is no longer supported. Use .8.
Works for me with v0.8. If it doesn't work for you, it may have something to do with the use of the Installer, which the dev team could possibly have changed. I don't use the Installer anymore, and if pathnames have been altered, then that could present a problem to the batch. Someone needs to verify this and post a comment with any information.
I suggest that you debug it, if you are determined to get it to work. As batches go, it is pretty easy to debug. At critical points within the logic, insert into the batch enough lines to display (ECHO) the values of variables, PAUSE-ing afterward, to verify that the variables (such as pathnames) are correct. If they are incorrect, then find out why and come back and share any information.
On a whim, I decided to reinstall it this time -using- the installer, and it works! Previously I had just overwritten the 0.7.2 files with the new 0.8 binaries, so if anyone is unable to get this to work, do a clean install. I should have done that in the first place!
Yeah, if you install to say, C:\bongo, the batch won't work. Have to install to either games/crawl or else use the Installer.
This sound really awesome, unfortunately I use a mac. I was wondering how I could make this work on Mac OS
Batch files are bound to the OS in which they are created. Every batch command and even the assumed file structure is Windows-specific. Therefore, the prognosis for a Mac user is poor. At best, my batch file serves as a model for another programmer to adapt for the Mac OS. However, if you are running Crawl using a Windows32 emulator, as may be the case, then that would improve the prognosis and only minor modifications may be necessary. But I cannot help you, because I am ignorant of the Mac OS, although some of my non-techie friends own Macs, and I have a sincere regard for that brand.
i'm unable to play the dungeon crawl stone soup version 0.8 using your batch file, the batch fails to recognize that i'm using the appropriate version. i have windows 7
I'm shooting in the dark, as I use Windows XP. In order to support Win 7, and I am willing to do so, I need someone to be in close and persistent contact, or else submit a patch, and I will amend the batch accordingly.
The lazy route would be to simply disable the lines that check for .8 by transforming them into REMark statements by prefacing them with the command:
rem
followed by one or multiple spaces. Numerous examples of non-executing remarks are strewn throughout the batch. But of course this helps no one else besides the individual user.
while i have no knowledge in batch files i was actually toying around by changing stuff on regen.bat, for example i swapped goto :badversion with goto :begin (if i remember correctly) in order to somehow circumvent the problem and then the game actually started, the only problem was that it showed i was playing version 0.7...
i should also point out that the unchanged regen works perfectly on my gf's laptop but not on my laptop probably because i have windows 7, she has XP
Sounds to me like you have two versions of Crawl installed, one .7 and one .8.
Go ahead & try batch programming. It can be just as fun as playing Crawl if not more so.
Just tweaked it for Windows 7, 3 things to watch out for:
1) Program Files on W7 is "Program Files (x86)"
2) saves go to %userprofile%\appdata\roaming\crawl you could also try %appdata%\roaming\crawl
fullpath = c:\users\%username%\appdata\roaming\crawl
3) had to manually create directories "backup_saves" and "backup_saves_2" in the ....\roaming\crawl directory as the regen.bat doesn't create them if they don't exist and then fails
After that all works perfect on W7
I am modifying the batch based upon anonymous's suggestions. I don't know whether these changes help or not for Windows 7 users. Somebody leave a comment.
Note that it should not be necessary to create the backup directories, as long as the environmental variables are set up right. The batch creates them on an as-needed basis, when saving a game.
I am using Win7 and it seems to be working with just one small problem. It tells me (by default) that I am using an older version on Crawl. I am using .9 and decided to try installing .8 to see if that fixed the problem. It did not (still told me I was using an older version) and I checked the file it was looking for and it was there with the Felid in it. I decided to just rem out the line and everything works fine now. Thanks for all your work on this.
I deleted the section that checks for .8. Glad to hear it works with Win7 now... and the beta .9 of DCSS, at least so far.
Incredible!
Can't say how thankful i am for this batch - death to all the reactionaries :D
I only began to truly enjoy this game when I stopped save-scumming/ 'restoring' my characters. It gave me an entirely new appreciation of the game because when death is truly something to be SCARED of, you take far less risks with your character.
-AHMAD
I often play that way--for keeps. The difference is that with regen.bat, it is my choice whether I wish to play that way or not. The choice is not made for me.
In version 0.7 (may have been 0.8 not sure) I used to have a really enjoyable trick where I would drop all my equipment in the temple and make a spare copy of the file called 'temple.01b'. Then, in future games, I would copy over my 'temple.01b' file so that I had all the old character's equipment.
I found this really enjoyable as I could make progress from player to player, and it felt realistic and non-cheating as I imagined each player was on the same team and would share equipment :)
Do you reckon there's a similar way to achieve this in 0.9? I would love to be able to copy individual level files between games.
How do you delete a character, say you want to if you've run out of room by having too many alts? If I let a character die or exit the dungeon on the first floor, the regen.bat simply restores him.
The (!) delete option deletes all saves and start afresh. In the newest version of regen.bat, this option shows up if regen.bat detects a save, but is hidden otherwise.
Note that regen.bat assumes one save, not many. regen.bat does not support "alternates" or deleting only one save but not others. One possible solution would be to code a subroutine to accept an input field from the user, so that the batch might be instructed as to which save to delete. That is not something I will work on at this time, but anyone who does may share their patch here. It is an interesting idea. At present, I play with one save at a time and have done so for years. If I want to play a different character I just let the other one die.
Ah, thanks for the reply...I have alt-itis, I'm afraid.
Love the concept of saving the saves (lol). I know its not the right place, but someone mentioned before that you could move items across characters, is this still possible in the newest version 0.11?
regen.bat never alters the save, but merely preserves it from deletion. I think of it as "cheating lite," just a little bit of help in case I tap the wrong key at the wrong time.
Wiz Mode is big-time cheating. It allows mods of every variety, so you should use Wiz Mode if that is what you have in mind. Wiz Mode is powerful and comprehensive in its scope, so there is no real need to code anything to make mods to a save.
I just want to say I love you, igor. I cant tell you how many times i've went down a flight of stairs and was immediately greeted and slain by 1-3 named mobs. Sometimes theres just nothing you can do about death, and that gets to me.
Do you know where the Linux version of Dungeion Crawl puts its save file?
No, and I've only been a Linux user for < 1 month, so it is most doubtful whether I will ever get around to porting regen.bat for Linux, for by the time I get proficient at Linux script-writing, the need for the batch may no longer exist, or so says my secret source. In the interim, if you code a script for Linux, then drop it to me in an email, and if I like it, then I will post it here or post a link to it.
Hey Igor,
I just installed your Batchfile in the appropriate folder Win 7). Starting the game vie regen.bat works. But after saving the game and restarting, the regen.bat says that the save data can't be found in the mentioned folder (\games\crawl\backup_saves). The regen.bat itself didn't create these folders, so I manually created them at \games\crawl\ as well as in the win7-specific roaming-folders. But regen.bat doesn't create save-files after saving and exitting. Could the administration rights be the problem?
Regards
Sven
With Windows 7, I am not at all sure what is going on, because I haven't gotten around yet to installing Win 7 on my answering machine, due to shipping delays during the holiday season and other things. Also, since I am now using Linux on my htpc, desktop and laptop, it not likely I will do much batch programming on Windows 7. If you wish to be of service to the Dungeon Crawl community, please post your solution and/or any insight into the issue here. If you develop a specific patch, post it here. I need some help here.
Unfortunately, I am not that good in batch programming. Better said, I have some basic understanding of programming languages but it would exceed my knowledge to develop a specific patch.
But do I understand it correctly, the regen.bat does just copy the save file into another backup folder? Wouldn't that implicate that I could alo manually copy the saved files into another folder?
Yes, your understanding is correct. I'd like to point out that the batch file is easy to patch, if all you're doing is changing output directories, which I think may be the issue here. A problem Windows 7 has had in the past is storing game files in a different folder than Windows XP.
Hello. I have been playing roguelikes since Moria, and though my passion for the genre has never declined, my love of the community and those it creates has dimmed considerably; I find there are many people within said community who defend bad decisions as simply bad, and refuse to update with the times. In addition to the extremely odd attitude on savescumming, there is also the fact that so many roguelikes today include the concept of 'score' and 'winning'. I *know* if I am doing well by how far I have delved and my equipment, knowledge, etc - I do not need the accolades of the 'community' to tell me that.
I have no desire to interact with said community or past yasv, and was looking for a more convenient method of scumming then copying saves. For me, scumming makes me a far better player, as it allows me a familiarity with the variables and possibilities that would take a great deal more time if playing the way people spout as correct. So cheers and thank you very kindly for helping me, and likely many others out!
And I think my new-years is somewhat similar to yours, aha; but so it goes. I am cautiously optimistic for the new year, though... Maybe all the tea. I am not usually this verbose, tishe - but even if I don't comment much, I think I will watch this space. You have very interesting comments and thoughts. Well! All the best!
Yes, I have been playing roguelikes myself since the original Rogue (on the original IBM-PC that used to be 4.77 Mhz, not Ghz!) and the greatest roguelike that ever was until DCSS, Larn, which failed to get updated...
I don't pay any mind to what 'some' say about 'cheating'. They fret over someone posting scores derived from cheating, and how it might make them look, when they didn't cheat. The point of a solitary game is to have fun, and if cheating makes it more fun, then cheating is the right way, as one is not competing against other human beings...only the computer, which is a good sport. The online tournaments sort out the best players, if such a thing matters.
Good luck and I am glad to note your implication that the batch file works OK on your system (not sure whether XP or Windows 7/8). As for me, I've moved to Linux, so for the time being, am playing without.
I've got to get some tea going this morning... that's what was missing yesterday.
Thank you for this script. Working very well and saves me the hassle of tracking my save files. I can freely experiment without loosing my character on which I have worked so hard.
By the way, it is very difficult to find this script through your blog. I heard repeated mentions in your posts but found it only by chance by searching for something unrelated on DCSS. Please include a permanent download link somewhere on your blog so that more people benefit.
P.S - I am using Linux so you can imagine how glad I am that someone for once made an effort to support this platform.
Thanks for the praise, but there is a link, on the right-hand side, in the "Topics" box. I think I need to alter the color of the Topics box so that it stands out a little more. The whole blog just looks like one color at the moment. I will work on that this morning. Maybe change the Topics box from black to, say, dark green.
Yes, Linux is all I ever use anymore. The Windows batch file works fine too for Windows, but I will probably not be making any more changes on it. I love Linux because one can customize the operating system, it is FREE, and it seems a lot safer from malware, although not immune obviously. I think that all home users, around the world, should be using Linux instead of Windows. I can't count the number of people that pay me to reinstall Windows due to malware infection.
Hello Igor,
Used to use your windows regen version, worked great. I switched to Unbuntu. I've gotten the launcher set up, I think. After I die however it doesn't regenerate my character. The modifying the script hasn't been done properly. I tried entering it in terminal but no luck as of yet. A more detailed walk-through might help as I'm and extreme newbie. When I run the launcher it say -This script is not running with root privileges. Help appreciated.
I think the script file prints a little helpful hint about getting things going in Linux. You do have to enter commands on the command line to change the permissions for some crawl directories. The script does not necessarily have to run with root privileges, but if it does then that also solves the problem...
I don't play on Linux nowadaze so can't be of further assistance with the Linux script... one guy wrote in to gripe about the scipt as used in Open Suse. But he expected me to do all the work and wasn't willing to lift a finger. I expect rather someone fix the problem, debug and send me the newly fixed script. Igor not do work of the free variety all the time--only when on sabbatical. Sabbatical over.
BTW, instead of doing:
echo "one" >> "$macro"
echo "#two three" >> "$macro"
echo "whatever" >> "$macro"
you can do:
cat <<EOS >> "$macro"
#one
two three
whatever
EOS
or:
(
echo "one"
echo "#two three"
echo "whatever"
) >> "$macro"
That is probably true. I think I will leave it as-is though because the functionality is the same. There is usually a couple of different ways to do something in any robust programming language, and Linux scripting is no different.
Hi, I know next to nothing about programming. I used to play Crawl when anybody could manually save scum by going into the 'saves' folder or whatever it was and making a copy that you could rename after dying. That way, you could play the same character many different ways, like a choose-your-own-adventure book, worshiping different gods without renouncing any of them, etc.
From what I understand, the batch doesn't let you do this because it just takes your last save point, right? Just thought I'd ask in case I was missing another opportunity. Thanks!
That is what the batch does.
While I'm sure the script behaves in the manner you desire, I found the core concept totally buried in all the fancy color control, window resizing, etc. It's also a bit odd that you use "*.*" on unix, and that you have a directory called "save_file" that contains a directory path.
Anyway, here's the barebones scummer inside my script that does other unrelated conveniences.
Thanks for the inspiration to try out playing this way. If it's fun
enough, I'll probably play this way time to time. Attempting to hack
around the lack of formatting control in blogger posts with dots...
. while true; do
... playgame "$name" "$class" "$race"
... # do we still have files for the player after quitting?
... savefile="${name}.sav"
... if [ -f "$savefile" ]; then
..... echo "You seem to have saved succesfully; will backup, ctrl-c to stop"
..... read
..... cp "${name}"* backup/
..... echo "Game backed up; will relaunch, ctrl-c to break"
..... read -t 3
... else
..... #glob failed, so we get the star back
..... echo "Oh no, you died!; will restore, ctrl-c to stop"
..... read
..... cp backup/"${name}"* .
..... echo "Game restored; will relaunch, ctrl-c to break"
..... read -t 3
... fi
. done
The script and batch files were labors of love for me, things I worked on that were just as fun as playing Crawl and maybe more so. Of course I went whole hog to "show off" and be as elaborate as I could be. In doing so, I learned more about script writing but mainly just had fun. If you want to program your own scripts, do so and have a ball!
I will probably not post further updates, because I've quit using the batch file. I have arrived at a state of mind where I am OK with perma-death.
Post a Comment