New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRADER_AVOID flag is applied inconsistently #22743

Closed
Night-Pryanik opened this Issue Jan 13, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Night-Pryanik
Member

Night-Pryanik commented Jan 13, 2018

Game version: 0.C-7052

Operating system: Windows XP SP3 x86

Tiles or curses: tiles

Mods active: default only

Expected behavior

Items with TRADER_AVOID flag shouldn't appear as a viable option in player inventory when trading with NPCs.

Actual behavior

Sometimes items with TRADER_AVOID flag indeed doesn't appear as a possible trade item, sometimes they do. One can't choose tinfoil hat to trade, but can choose heavy crossbow, both have the aforementioned flag.

Steps to reproduce the behavior

Wish for some items with the flag (tinfoil hat and heavy crossbow, or active emp grenade and lit Louisville Slaughterer, for example) and try to trade them with some NPC.

@BevapDin

This comment has been minimized.

Show comment
Hide comment
@BevapDin

BevapDin Jan 16, 2018

Contributor

TRADER_AVOID is supposed to prevent that item from appearing in the generated inventory of any NPC. It does not mean the NPC can't/won't/shouldn't take that item. From the documentation in "doc/JSON_FLAGS.md": "NPCs will not start with this item."

It's implied by the NPC_THROW_NOW (which is not actually coded that way) and PSEUDO flag. The PSEUDO and the DANGEROUS flag imply TRADER_AVOID according to the code.

NPCs flat out don't want to buy anything that has a price below 80 (in cent, I believe), except when they are your friend. I just tested this: the tinfoil hat does not appear when trading with a neutral NCP, but appears (with price 0.21) when the NPC is a friend.

The flag works as intended, but it might have a slightly misleading name. But the documentation clearly states what it does.

Contributor

BevapDin commented Jan 16, 2018

TRADER_AVOID is supposed to prevent that item from appearing in the generated inventory of any NPC. It does not mean the NPC can't/won't/shouldn't take that item. From the documentation in "doc/JSON_FLAGS.md": "NPCs will not start with this item."

It's implied by the NPC_THROW_NOW (which is not actually coded that way) and PSEUDO flag. The PSEUDO and the DANGEROUS flag imply TRADER_AVOID according to the code.

NPCs flat out don't want to buy anything that has a price below 80 (in cent, I believe), except when they are your friend. I just tested this: the tinfoil hat does not appear when trading with a neutral NCP, but appears (with price 0.21) when the NPC is a friend.

The flag works as intended, but it might have a slightly misleading name. But the documentation clearly states what it does.

@Night-Pryanik

This comment has been minimized.

Show comment
Hide comment
@Night-Pryanik

Night-Pryanik Jan 16, 2018

Member

Ok, I got it.

Member

Night-Pryanik commented Jan 16, 2018

Ok, I got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment