Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0003759Dwarf FortressDwarf Mode -- Tradepublic2010-11-30 13:482014-07-23 10:18
Videospirit 
Toady One 
normalminorhave not tried
resolvedfixed 
0.31.18 
0.40.05 
0003759: Dwarven caravan brought silver crossbow, ITEMS_WEAPON_RANGED ignored in world gen?
A while back I purchased myself a -silver crossbow- off of the dwarven caravan, I probably shouldn't have been able to do that.
Reload the game just before the caravan arrives over and over again, the year after requesting crossbows, if it's not a world specific issue it should happen eventually.
It's just been laying around in a weapons stockpile the whole time. I haven't actually tried seeing if it works any better in melee than your standard crossbow, or if the thing even works although I don't see why it wouldn't, my Artifact Tin crossbow sure does.
binary patch
Issue History
2010-11-30 13:48VideospiritNew Issue
2010-11-30 13:53FootkerchiefNote Added: 0014319
2010-11-30 13:53FootkerchiefNote Edited: 0014319bug_revision_view_page.php?bugnote_id=0014319#r5451
2010-11-30 13:54FootkerchiefSummaryDwarven Caravan brought Silver Crossbow => Dwarven caravan brought silver crossbow, ITEMS_WEAPON_RANGED ignored in world gen?
2010-11-30 13:54FootkerchiefTag Attached: AWAITING UPDATE
2010-11-30 18:49VideospiritNote Added: 0014326
2010-11-30 19:38FootkerchiefNote Added: 0014328
2010-11-30 20:10VideospiritNote Added: 0014330
2011-03-15 00:19assaultdoorNote Added: 0016262
2011-03-15 00:21assaultdoorNote Edited: 0016262bug_revision_view_page.php?bugnote_id=0016262#r6071
2011-03-15 04:54InfiltratorNote Added: 0016266
2011-03-15 04:54InfiltratorIssue Monitored: Infiltrator
2012-04-02 16:04VideospiritNote Added: 0022045
2012-04-02 17:51FootkerchiefTag Detached: AWAITING UPDATE
2012-08-02 12:20QuietustNote Added: 0023397
2012-08-02 12:22QuietustNote Edited: 0023397bug_revision_view_page.php?bugnote_id=0023397#r8719
2012-08-02 12:24QuietustNote Edited: 0023397bug_revision_view_page.php?bugnote_id=0023397#r8720
2012-08-02 12:24QuietustTag Attached: binary patch
2014-01-15 14:40Kirig Stonebeard IIIssue Monitored: Kirig Stonebeard II
2014-01-17 10:09Kirig StonebeardIssue Monitored: Kirig Stonebeard
2014-03-25 13:09DwarfuAssigned To => Dwarfu
2014-03-25 13:09DwarfuStatusnew => acknowledged
2014-07-23 10:18Toady OneStatusacknowledged => resolved
2014-07-23 10:18Toady OneFixed in Version => Next Version
2014-07-23 10:18Toady OneResolutionopen => fixed
2014-07-23 10:18Toady OneAssigned ToDwarfu => Toady One

Notes
(0014319)
Footkerchief   
2010-11-30 13:53   
Are you using any mods? What version was the world generated in?

(0014326)
Videospirit   
2010-11-30 18:49   
It was generated in 0.31.18, I tweaked a few things in the raws but I doubt they'd effect this issue.

My Changes: Tweaked dwarven soul to prevent stat decay and make all stats better in general, especially agility.
Added Longskirts to goblins and made them common for elves(added chausses to goblins too but they seem to prefer their socks, will remove their ability to make socks next time I make a world)
Gave Elves evil plants, and evil and underground wood tokens.
Removed unremarkable stone layers(a lot of them) and all soil layers that were not sand or ocean bottom layers to make site finding easier.
Made Glumprong and sliver barb [Wet][Dry][Evil]
That should be all of them


I think it was the very first caravan this fort welcomed that brought the crossbow, it was shortly before I started reporting bugs on here and I forgot to mention it until earlier today. It's still sitting in the stockpile if you know of some place I can upload the save.
(0014328)
Footkerchief   
2010-11-30 19:38   
You can upload to http://dffd.wimbli.com/ [^]

Did you make those changes before or after generating the world? Do you have any hidden backup files cluttering your raws folder, like in 0001428?
(0014330)
Videospirit   
2010-11-30 20:10   
Those changes were made before generating the world, I can't find any hidden files but I'm not actually sure where to turn the preferences to show them instead of hide them are for vista.

http://dffd.wimbli.com/file.php?id=3505 [^] save is here.
(0016262)
assaultdoor   
2011-03-15 00:19   
(edited on: 2011-03-15 00:21)
If it helps, I just saw a human caravan carrying a -silver crossbow- and a silver bow. I'm using vanilla raws.

(0016266)
Infiltrator   
2011-03-15 04:54   
I'm pretty sure I've seen silver crossbows too. I'm not at my desktop now, so I can't check. However, if the save still has the silver crossbow, I'll upload it.
(0022045)
Videospirit   
2012-04-02 16:04   
I just had this happen again in the latest version, so it's definately still a thing.
(0023397)
Quietust   
2012-08-02 12:20   
(edited on: 2012-08-02 12:24)
While looking at a disassembly of the code used to create caravan items (in order to better understand how the game keeps track of what materials entities can use), I found the part that creates weapons and noticed an error in the logic - it checks whether or not the weapon is ranged to determine the type of material to use, but the check is backwards, so ranged weapons draw from the "melee weapon material" list (which includes silver, and is also used for trap components) and melee weapons draw from the "ranged weapon material" list (which does not include silver).

In other words, this bug not only permits caravans to bring ranged weapons made of silver but also prevents them from bringing melee weapons made of silver.

The following binary patch should fix this problem in Win32 v0.34.11 SDL:
0x4AA9F5 : 74 -> 75