View Issue Details

IDProjectCategoryView StatusLast Update
0013506Dwarf FortressWorld Generation -- Generalpublic2026-04-22 15:41
ReporterCanuckMonkey Assigned To 
PrioritylowSeveritytrivialReproducibilityalways
Status newResolutionopen 
Product Version53.10 
Summary0013506: entities.lua missing adjective randomization for many item types
DescriptionIn looking at my options for what type of weapons I could designate for inclusion in one of my stockpiles, I found that "Crossbow" was listed four separate times. I brought this up in the #bug-discussion channel on the Kitfox Discord, and after a bunch of discussion, we determined that these were all most likely to be different types of crossbows that had somehow been overlooked when setting adjectives to differentiate them. After some further digging, we found that in entities.lua, some items, like the bow, had a line of code to pick a random adjective for the item — line 737:

lines[#lines+1]="[ADJECTIVE:"..pick_random(angel_item_info.weapon.BOW.adj).."]"

However, most other items in the file did not have such a line, including crossbows (lines 806-829).

I tested what would happen if I modified entities.lua to add a line for Crossbows based on the line for Bows, inserted at line 809:

    lines[#lines+1]="[ADJECTIVE:"..pick_random(angel_item_info.weapon.CROSSBOW.adj).."]"

I then generated another new world, and this time found I had one "Crossbows" entry and two "Jagged Crossbows". So the fix appears to be to add a line like this to entities.lua for each type of item that doesn't currently have it.
Steps To ReproduceI tested this by generating a new world with my current setup (DF Classic 53.10 with DFHack and the HEWN graphics set, no other mods) and another member on the server tested it in a completely vanilla copy of DF Classic (not sure which version). We both found that setting up a stockpile in the brand new world and looking at the options for configuring the custom content restrictions for a stockpile, the Weapons/trap comps>Weapons section had multiple crossbow entries with nothing to differentiate them. In my original world, there were four such entries, while in the new worlds created by myself and the vanilla user, there were two such entries.
Additional InformationI tested what would happen if I modified entities.lua to add a line for Crossbows based on the line for Bows, inserted at line 809:

    lines[#lines+1]="[ADJECTIVE:"..pick_random(angel_item_info.weapon.CROSSBOW.adj).."]"

I then generated another new world, and this time found I had one "Crossbows" entry and two "Jagged Crossbows" entries. So the fix appears to be to add a line like this to entities.lua for each type of item that doesn't currently have it.
Tags53.10, Lua

Activities

There are no notes attached to this issue.

Add Note

Note

Issue History

Date Modified Username Field Change
2026-04-22 15:41 CanuckMonkey New Issue
2026-04-22 15:41 CanuckMonkey Tag Attached: 53.10
2026-04-22 15:41 CanuckMonkey Tag Attached: Lua