Page 1 of 1

Autopickup item X when race Y?

PostPosted: Saturday, 18th November 2017, 02:28
by ClefAria
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.

Re: Autopickup item X when race Y?

PostPosted: Saturday, 18th November 2017, 16:44
by neil
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.

Re: Autopickup item X when race Y?

PostPosted: Saturday, 18th November 2017, 18:43
by ClefAria
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.