Autopickup item X when race Y?


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

Mines Malingerer

Posts: 36

Joined: Monday, 31st October 2011, 01:38

Post Saturday, 18th November 2017, 02:28

Autopickup item X when race Y?

I would like to have every Troll I play automatically set up to autopickup large rocks. Is it possible to do that in init.txt?

EDIT: Also would like them by default to not pick up spellbooks.
User avatar

Dungeon Master

Posts: 502

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

Location: Lexington, KY, US

Post Saturday, 18th November 2017, 16:44

Re: Autopickup item X when race Y?

There's a "Conditional options" section of the options guide, with an example. You'd want something like

  Code:
: if you.race() == "Troll" then
autopickup_exceptions += <large rock,>spellbook
: end


However, in the case of large rocks, you can usually add it without a condition: The no-autopickup of useless items overrides the pickup for species that can't use large rocks, so it only actually enables pickup for ogres and trolls.

For this message the author neil has received thanks: 2
bel, nago

Mines Malingerer

Posts: 36

Joined: Monday, 31st October 2011, 01:38

Post Saturday, 18th November 2017, 18:43

Re: Autopickup item X when race Y?

neil wrote:There's a "Conditional options" section of the options guide, with an example. You'd want something like

  Code:
: if you.race() == "Troll" then
autopickup_exceptions += <large rock,>spellbook
: end


However, in the case of large rocks, you can usually add it without a condition: The no-autopickup of useless items overrides the pickup for species that can't use large rocks, so it only actually enables pickup for ogres and trolls.


So basically, this (which includes my line for throwing nets) would functionally work the same (and cover ogres as well)?

  Code:
autopickup_exceptions += <throwing net,<large rock

: if you.race() == "Troll" then
autopickup_exceptions += >spellbook
: end


EDIT: Neither iteration seems to be working...maybe I don't know how to use the "conditional options" thing properly.

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 10 guests

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