Hi guys, while my mod is not ready for release, i decided to upload a standalone version of one of my last scripts.
It shows vast amount of useful information on item view screen. Armor and weapon properties, important material stats. Easy and convenient - does not need to be manually activated every time, works in fortress and adventure modes. Custom descriptions can be added to every kind of item or material - they are stored in txt files and thus easily moddable. Also spports moddable ASCII images for every creature and item in the game. Double tap Enter of ESC to close ASCII image popup.
Download here (or from GitHub)Desription repository - feel free to contribute!Here are examples how it looks:
Currently shows user-defined text, material info and temperature for all non-caste items (and even bone body parts
), armor properties, weapon stats for weapons and combat-usable tools, food properties for suitable items. Does not replace existing lines (like reactions and ore metals).
Material strength data percentages are relative to IRON inorganic, or if it is absent (in your mod), to the first inorganic defined in the raws.
ASCII images are loaded from txt files. You may add your custom ascii images for every creature and items, usind their raw tokens (see modding instructions in the mod archive). To enable ASCII use "ascii_item" and "ascii_unit" arguments (in any order), e.g. run script with command "nb_item_info ascii_item"
Custom description guide:
Place this folder in your Dwarf Fortress/raw and Dwarf Fortress/data/save/<saved_world>/raw folders.
Files in this folder are used by nb_item_info script to add custom descriptions to items.
How it works:
Item descriptions:
Description is read line-by-line from the txt files. Filename must match desired item's type code (like those used for custom reactions). If the item has no subtypes (Table, Chair, Barrel etc.) the file is searched in main folder.
For every item that has subtypes (Weapons, Tools etc.) there is a folder containing corresponding item subtype desctiptions (filename must match subtype code, as defined in raw file, for example ITEM_WEAPON_BATTLE_AXE.txt in WEAPON folder)
item_descriptions/TABLE.txt - will be added to description of any table in game, even artifacts
item_descriptions/TRAPPARTS.txt - mechanisms
item_descriptions/AMMO/ITEM_AMMO_BOLTS.txt - bolts
item_descriptions/AMMO/ITEM_AMMO_ARROWS.txt - arrows
Material descriptions:
Material description files and folders are contained in "Material" folder. The sub-folders use the same logic as custom reactions material definitions. (and the same tokens, except folder names "CREATURE" and "PLANT")
1.Built-in materials (like lye, glass, amber) descriptions are placed in "item_descriptions/Material" folder,
for example:
item_descriptions/Material/GLASS_GREEN.txt - green glass
item_descriptions/Material/LYE.txt - lye
2. Inorganics are in INORGANIC folder
for example:
item_descriptions/Material/INORGANIC/IRON.txt is the custom description of iron
3. Creature and plant materials. They have CREATURE and PLANT folders, in which you must create a folder for the creature (or plant). The folder name must match that creature (or plant) raw id. The materials are in that folder, filenames are material ids within creature (or plant) raw.
for example:
item_descriptions/Material/CREATURE/DRAGON/SCALE.txt scale of dragon, (CREATURE_MAT:DRAGON:SCALE)
item_descriptions/Material/PLANT/MUSHROOM_HELMET_PLUMP/STRUCTURAL.txt basic material of a plump helmet, (PLANT_MAT:MUSHROOM_HELMET_PLUMP:STRUCTURAL)
item_descriptions/Material/PLANT/OAK/WOOD.txt (PLANT_MAT:OAK:WOOD)
4. Custom filenames are defined within material raw. The script will look for reaction class starting with CUSTOM_DESCR= in the item's material definition. That filename is relative to item_descriptions/Material/. The same reaction class may be added to several materials, but if material has multiple CUSTOM_DESCR= reaction classes only the first one will be picked.
This section is loaded after the item description and before the individial material data
for example:
if you add [REACTION_CLASS:CUSTOM_DESCR=leather.txt] to several leather materials (or the leather template) the script will load and show addtional description lines from that file.
NOTE: It is important to separate description into short lines, because script does not perform any word wrap.
Several example files are included.
I would really appreciate corrections related to phrases used by the script, since english is not my first language.
Tested with DFHack 0.40.23-r1 on Windows
Changelog:
5.1 beta
Added new ascii art format, reads df tile indexes and draws pictures with appropriate tiles
Celsius temperature is now displayed along with Urist scale. Degree sign added.
Material variables displayed only for certain item types now.
4.2 beta
Help added (type "nb_item_info help")
4.1 beta
Minor change, mac and linux compatability fix.
4.0 beta
ASCII images added for testing.
Item description in adventure mode shows base value of the item.
3.2
Debug mode added. Type "nb_item_info debug" to launch script in debug mode. Prints custom descriptions required file path.
3.1
Fixed the bug that caused error on reaction class check
3.0
Custom descriptions for materials, and groups of materials. Updated the code. description modding is more detailed now.
2.0
Now suppots custom descriptions. You can manually add them as .txt files in item_description folder
Description examples and instructions included
1.4
Fixed bug caused script stop working if it was called when world is not loaded
1.3
Code update (performance). credit to Putnam
1.2
Changed elasticity description
1.1
Added more information about plant products: extracts, booze, thread
Seeds now show plant's growth duration
There are now percentages near material strength numbers showing that number relation to Iron
1.0
Initial Release