Skip to content

Random stock for traders #877

Answered by dorkster
Danimal696 asked this question in Q&A
Jan 7, 2022 · 5 comments · 2 replies
Discussion options

You must be logged in to vote

Have you tried using the random_stock and random_stock_count properties? They let you use a loot table as the source of items sold by a vendor. For example, Abasi in the Empyrean campaign has the following:

random_stock=loot/trader_abasi.txt
random_stock_count=10,12
### loot/trader_abasi.txt

# normal clothes
loot=4,100
loot=5,100
loot=6,100
loot=7,100

# normal weapons
loot=8,100
loot=9,100
loot=10,100

# normal misc
loot=11,100

# magic clothes
loot=12,75
loot=13,75
loot=14,75
loot=15,75
loot=16,75
loot=17,75
loot=18,75
loot=19,75
loot=20,75
loot=21,75
loot=22,75
loot=23,75
loot=24,75
loot=25,75
loot=26,75

# magic weapons
loot=27,75
loot=28,75
loot=29,75

# magic misc
loot=30,75
loot=…

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by dorkster
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dorkster
Comment options

Comment options

You must be logged in to vote
1 reply
@dorkster
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants