Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old October 31, 2010, 19:18   #1
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,921
Derakon is on a distinguished road
Townspeople don't disturb (new option; diff included)

One of the things that bugs me about Angband is how, for purposes of getting around town, players are encouraged to kill townspeople just so they don't disturb running. Thus, I've written up a simple patch to add a new option "Disturb whenever townspeople move". It overrides the disturb_move and disturb_near options, but only when the monster's level is 0; thus, turning it off causes townspeople to no longer disturb you, but has no effect on other monsters.

I've tested this and it works, but the boolean logic involved gets a bit hairy, so I'd appreciate it if someone were to double-check that I haven't screwed things up. Also, for the sake of keeping the movement-related disturbance options together, I inserted this option between "disturb whenever viewable monster moves" and "disturb whenever leaving trap detected area", which means that disturb_detect and disturb_state have been moved down 1 in the options. This doesn't exactly break savefile compatibility but does mean that moving to this patch may cause your options to be wrong.
Attached Files
File Type: txt diff.txt (4.7 KB, 88 views)
Derakon is offline   Reply With Quote
Old October 31, 2010, 20:33   #2
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Hmm. Sangband defaults to this behaviour and I really don't like it. ... which is of course precisely why you've coded it as an option, so fair enough. My last foray into the options menu was a disaster, but I'll have a look at applying this.
Magnate is offline   Reply With Quote
Old October 31, 2010, 22:06   #3
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Derakon View Post
One of the things that bugs me about Angband is how, for purposes of getting around town, players are encouraged to kill townspeople just so they don't disturb running. Thus, I've written up a simple patch to add a new option "Disturb whenever townspeople move". It overrides the disturb_move and disturb_near options, but only when the monster's level is 0; thus, turning it off causes townspeople to no longer disturb you, but has no effect on other monsters.

I've tested this and it works, but the boolean logic involved gets a bit hairy, so I'd appreciate it if someone were to double-check that I haven't screwed things up. Also, for the sake of keeping the movement-related disturbance options together, I inserted this option between "disturb whenever viewable monster moves" and "disturb whenever leaving trap detected area", which means that disturb_detect and disturb_state have been moved down 1 in the options. This doesn't exactly break savefile compatibility but does mean that moving to this patch may cause your options to be wrong.
There are 256-odd option slots (most of them empty) so you don't have to break savefile compatibility....

You should also remove one of the OPT_NONE from option_page when you add a new option, or there's one too many options in that array.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old October 31, 2010, 22:25   #4
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by takkaria View Post
There are 256-odd option slots (most of them empty) so you don't have to break savefile compatibility....

You should also remove one of the OPT_NONE from option_page when you add a new option, or there's one too many options in that array.
I just applied his patch and fixed that warning ...
Magnate is offline   Reply With Quote
Old October 31, 2010, 22:25   #5
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,921
Derakon is on a distinguished road
I rearranged the options because I thought it a bit odd to have the list in option.h not be in the same order as the list in option.c, but fair enough. Fixing the rearrangement is trivial in any event.

Thanks for the correction on the OPT_NONE bit. My mistake.
Derakon is offline   Reply With Quote
Old October 31, 2010, 23:08   #6
Timo Pietilš
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
Timo Pietilš is on a distinguished road
Quote:
Originally Posted by Derakon View Post
One of the things that bugs me about Angband is how, for purposes of getting around town, players are encouraged to kill townspeople just so they don't disturb running. Thus, I've written up a simple patch to add a new option "Disturb whenever townspeople move". It overrides the disturb_move and disturb_near options, but only when the monster's level is 0; thus, turning it off causes townspeople to no longer disturb you, but has no effect on other monsters.
Is it possible to make a option to just generally remove disturbance from monsters that are fleeing from you because of level difference? That way you can use it entire game, not just after your level is high enough that townsfolk doesn't matter anymore. You could even sleep in room with orcs.

I'm not entirely sure what happens if monster that is fleeing from you (because of level difference) gets into dead end, but is not close enough to turn to fight. If it has distance attacks will it use them? Does fleeing black orc shoot missiles? I don't think it will, but I'm not sure.
Timo Pietilš is offline   Reply With Quote
Old October 31, 2010, 23:49   #7
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by Derakon View Post
I rearranged the options because I thought it a bit odd to have the list in option.h not be in the same order as the list in option.c, but fair enough. Fixing the rearrangement is trivial in any event.

Thanks for the correction on the OPT_NONE bit. My mistake.
Well, I fixed that and pushed it to github as http://github.com/magnate/angband/tree/misc. So anyone who can clone and compile it can now try it for themselves ... if people like it I'll push it to the official repo (which should then get it into the nightly builds).
Magnate is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
dummy question: diff will_asher Development 14 September 19, 2010 06:12
feature request - no disturb on 100% search PowerDiver Vanilla 11 June 14, 2010 23:07
1611: Character screen crash (space, h, or f), debug info included Sergio Development 8 August 6, 2009 03:30
feature request - disturb on reverse LOS PowerDiver Vanilla 2 May 18, 2009 07:46
sugestion a new option in V AR_chie Vanilla 2 July 13, 2007 20:52


All times are GMT +1. The time now is 07:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.