Beginner Question about Options


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

Temple Termagant

Posts: 8

Joined: Thursday, 9th March 2017, 18:35

Post Thursday, 9th March 2017, 18:45

Beginner Question about Options

Hi there everyone, first time poster here with a pretty simple and straightforward question.

Is there any way, through the extended options, to disable the green box highlight which appears around eligible items for pickup? While I understand that the norm is to reduce challenges posed by the game's interface, I personally prefer to set up the game such that I still have to pay attention to small things (plus I just prefer slightly more immersion by reducing on screen hints of any kind); I want to be free to make mistakes.

One more question:

Given that autofight_prompt_range = true/false is an option (to display prompts such as your god's disapproval of certain weapons before moving towards an enemy), is it possible to disable those prompts entirely? I just wrote in autofight_prompt = false in hopes it would work, but haven't tested it yet.

Any help would be greatly appreciated, thanks.
User avatar

Dungeon Master

Posts: 502

Joined: Wednesday, 7th March 2012, 13:25

Location: Lexington, KY, US

Post Thursday, 9th March 2017, 20:42

Re: Beginner Question about Options

Ryleigh wrote:Is there any way, through the extended options, to disable the green box highlight which appears around eligible items for pickup? While I understand that the norm is to reduce challenges posed by the game's interface, I personally prefer to set up the game such that I still have to pay attention to small things (plus I just prefer slightly more immersion by reducing on screen hints of any kind); I want to be free to make mistakes.

There is not, but you could turn off autopickup entirely with something like:
  Code:
autopickup =
autopickup_exceptions =

Then I think (but have not tested) that you'll only get the green box for things that are explicitly turned on in the \ menu.

Ryleigh wrote:One more question:

Given that autofight_prompt_range = true/false is an option (to display prompts such as your god's disapproval of certain weapons before moving towards an enemy), is it possible to disable those prompts entirely? I just wrote in autofight_prompt = false in hopes it would work, but haven't tested it yet.


There is not an option for that; the usual prompts aren't part of autofight, but happen whenever you make an attack; the autofight_prompt_range option is there because moving doesn't count as an attack.

However, you could probably do something with Lua: If you define a Lua function "c_answer_prompt" it will be called whenever you get a y/n question, with the text of the prompt as its parameter. If the function returns true, that will count as a "Y"; and if it returns false, that will count as a "N"; anything else (like nil) counts as "not an answer" and you will be prompted. So for example (completely untested!):

  Code:
: function c_answer_prompt(msg)
:   if string.find(msg, "Really attack") then
:     return true
:   end
:   return nil
: end

For this message the author neil has received thanks:
Ryleigh

Temple Termagant

Posts: 8

Joined: Thursday, 9th March 2017, 18:35

Post Friday, 10th March 2017, 03:30

Re: Beginner Question about Options

Thanks for the quick response neil!

I just tested the lines to disable autopickup and they work as advertised; thank you!

I'm going to start up one of my Deep Dwarf Fighters of The Shining One to test the Lua script you suggested, and I'll get back to you ASAP with my findings. Thanks again, neil!

Temple Termagant

Posts: 8

Joined: Thursday, 9th March 2017, 18:35

Post Friday, 10th March 2017, 04:56

Re: Beginner Question about Options

So the "autopickup =" and "autopickup_exceptions =" thing kinda worked, but then the green squares were still showing up on seemingly any previously encountered/identified items. Maybe it's not really possible, and honestly, after playing a bit with no autopickup at all, I think I'll just save the hassle and keep it on.

That being said, is there any way to change the colour of the green square to something that would be less obvious, like light/darkgrey? I tried the detected_item_colour = darkgrey just now with no success.

Still no word on the "Really Attack" disabler, as I just YASD'd to an Ogre with a giant spiked club before finding the altar.
User avatar

Dungeon Master

Posts: 502

Joined: Wednesday, 7th March 2012, 13:25

Location: Lexington, KY, US

Post Friday, 10th March 2017, 12:40

Re: Beginner Question about Options

Ryleigh wrote:So the "autopickup =" and "autopickup_exceptions =" thing kinda worked, but then the green squares were still showing up on seemingly any previously encountered/identified items. Maybe it's not really possible, and honestly, after playing a bit with no autopickup at all, I think I'll just save the hassle and keep it on.


Ah, I forgot one thing. You'll also need to disable the Lua autopickup functions, because that is where the "autopickup items already in your inventory" is set:

  Code:
: chk_force_autopickup = false


Ryleigh wrote:That being said, is there any way to change the colour of the green square to something that would be less obvious, like light/darkgrey? I tried the detected_item_colour = darkgrey just now with no success.


Unfortunately that's done using a image tile rather than drawing the color, so you'd have to either: get the source, change the icon (rltiles/misc/cursor_green.png), and recompile; OR, find your version's icons tilesheet (dat/tiles/icons.png, wherever that gets installed on your OS) and edit the icon with the green border, which is currently approximately twelfth from the left on the first row. You could erase the green and make it completely transparent, for example.

For this message the author neil has received thanks:
Ryleigh

Temple Termagant

Posts: 8

Joined: Thursday, 9th March 2017, 18:35

Post Friday, 10th March 2017, 19:03

Re: Beginner Question about Options

neil wrote:
Ryleigh wrote:So the "autopickup =" and "autopickup_exceptions =" thing kinda worked, but then the green squares were still showing up on seemingly any previously encountered/identified items. Maybe it's not really possible, and honestly, after playing a bit with no autopickup at all, I think I'll just save the hassle and keep it on.


Ah, I forgot one thing. You'll also need to disable the Lua autopickup functions, because that is where the "autopickup items already in your inventory" is set:

  Code:
: chk_force_autopickup = false


Ryleigh wrote:That being said, is there any way to change the colour of the green square to something that would be less obvious, like light/darkgrey? I tried the detected_item_colour = darkgrey just now with no success.


Unfortunately that's done using a image tile rather than drawing the color, so you'd have to either: get the source, change the icon (rltiles/misc/cursor_green.png), and recompile; OR, find your version's icons tilesheet (dat/tiles/icons.png, wherever that gets installed on your OS) and edit the icon with the green border, which is currently approximately twelfth from the left on the first row. You could erase the green and make it completely transparent, for example.


Thanks! if I do decide to disable autopickup entirely after all, I'll make sure to disable the Lua for it. Since my original goal was to just remove the green squares, it sounds like your suggestion to edit the icon file would be the best approach. I'll get to tinkering and edit in my conclusions soon.

Edit: So lacking photoshop or really any proper image editing software, I downloaded Gimp and was able to change the green to transparent (WOOO!) I can understand if anyone reading this thread thinks "wow, that was some work for such a minor thing", but I guess I just prefer an aesthetic more resembling older games, so less on-screen noise is preferable for me.

That was really all I wanted to change, and you've been a great help in figuring out how. Thanks so much, neil.

For this message the author Ryleigh has received thanks:
neil

Temple Termagant

Posts: 8

Joined: Thursday, 9th March 2017, 18:35

Post Sunday, 12th March 2017, 19:49

Re: Beginner Question about Options

Hey neil, quick update: Haven't had time to play much in the last few days, so I just got around to testing the "Really attack" disable, and just found that at least when I try to (f)ire something at an unaware enemy, I still get a prompt. I thought maybe adding the slightly different "Really fire" to the code would work, but it either isn't working, or I didn't add that message qualifier correctly.

  Code:
{
: function c_answer_prompt(msg)
:   if string.find(msg, "Really attack", "Really fire") then
:     return true
:   end
:   return nil
: end
}


This is what I currently have; do you think I need more of the message for it to recognize it? And if so, what variable would indicate any currently targeted monster rather than writing in all the specific names mentioned in the prompt; what I'm asking is how to make "Really fire at the helpless Gnoll?" into "Really fire at the helpless ____?".

EDIT: So it seems that the script above DOES work, and my issue seems to be that I've not listed multiple msg variables correctly (only the first message is being considered).
I'm going to do a bit more searching through options_guide and Google to find how to list multiple messages like that properly, but if you see this before I edit this again, that info would be much appreciated.

FINAL EDIT: Got it. I figured since the second half of the prompt, ("This attack would place you under penance!") was the same in both cases, I could just use that as the msg variable, and sure enough it works! All my questions have been answered; neil is truly a Dungeon Master!

This is the final result of the prompt thing btw:

  Code:
{
function c_answer_prompt(msg)
   if string.find(msg, "would place you under penance") then
     return true
   end
   return nil
end
}

For this message the author Ryleigh has received thanks:
neil

Temple Termagant

Posts: 8

Joined: Thursday, 9th March 2017, 18:35

Post Tuesday, 14th March 2017, 01:36

Re: Beginner Question about Options

Alright, so maybe I'll just stop wrapping this up before I'm out of questions lol.

Do you know how I might be able to list more than one message in the c_answer_prompt function? I tried just adding it after a comma, like this:

  Code:
{
function c_answer_prompt(msg)
   if string.find(msg, "Really .*", "Continue anyway?") then
     return true
   end
   return nil
end
}


but the program is only reading the first quoted message for the function.

bel

Cocytus Succeeder

Posts: 2184

Joined: Tuesday, 3rd February 2015, 22:05

Post Tuesday, 14th March 2017, 06:52

Re: Beginner Question about Options

I stopped playing nethack after I accidentally performed cannibalism due to food being in slot "y" (that was just the straw that broke the camel's back).

I guess there are people who actually like it that way! Takes all sorts to make a world, I suppose.
User avatar

Dungeon Master

Posts: 502

Joined: Wednesday, 7th March 2012, 13:25

Location: Lexington, KY, US

Post Tuesday, 14th March 2017, 12:56

Re: Beginner Question about Options

Ryleigh wrote:Alright, so maybe I'll just stop wrapping this up before I'm out of questions lol.

Do you know how I might be able to list more than one message in the c_answer_prompt function? I tried just adding it after a comma, like this:

  Code:
{
function c_answer_prompt(msg)
   if string.find(msg, "Really .*", "Continue anyway?") then
     return true
   end
   return nil
end
}


but the program is only reading the first quoted message for the function.


One way would be to use "or":
  Code:
{
function c_answer_prompt(msg)
   if string.find(msg, "Really ")
      or string.find(msg, "Continue anyway?")
   then
     return true
   end
   return nil
end
}

For this message the author neil has received thanks:
Ryleigh

Temple Termagant

Posts: 8

Joined: Thursday, 9th March 2017, 18:35

Post Tuesday, 14th March 2017, 13:41

Re: Beginner Question about Options

neil wrote:
Ryleigh wrote:Alright, so maybe I'll just stop wrapping this up before I'm out of questions lol.

Do you know how I might be able to list more than one message in the c_answer_prompt function? I tried just adding it after a comma, like this:

  Code:
{
function c_answer_prompt(msg)
   if string.find(msg, "Really .*", "Continue anyway?") then
     return true
   end
   return nil
end
}


but the program is only reading the first quoted message for the function.


One way would be to use "or":
  Code:
{
function c_answer_prompt(msg)
   if string.find(msg, "Really ")
      or string.find(msg, "Continue anyway?")
   then
     return true
   end
   return nil
end
}


See I had tried using "or" (among other things like elseif; I'm not a coder lol I just try to solve problems), and couldn't get it to work, but I think it's because I didn't have the syntax right. I think from what you've given me at this point, I could work out how to adjust it further if need be (although I noticed that many of the prompts include "Really... ?" or "...Continue anyway?", so those two should cover enough).

Tyvm once again, neil!

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 7 guests

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