Opened 9 years ago

Closed 9 years ago

#1193 closed task (fixed (in master))

Move info about object types (tvals) into an external file

Reported by: takkaria Owned by:
Milestone: 3.2.0 Keywords: items
Cc:

Description

for starters, object kind name (from obj-name.c), default flags (elements resisted/ignored, easy_know), attr/char (can then remove a lot of lines for default values from object.txt)

original suggestion http://angband.oook.cz/pipermail/angband-dev/2010-September/000950.html

Change History (4)

comment:1 Changed 9 years ago by magnate

  • Keywords items added
  • Milestone changed from Triage to Future
  • Status changed from new to confirmed
  • Summary changed from Move info about object kinds into an external file to Move info about object classes into an external file

Just for clarity, "object kind" is used in the game to mean the index in object.txt - so we already have an external file for object kinds.

This ticket is about introducing an external file of object classes, such as potion, scroll, rod, staff, wand etc., to replace tvals.

comment:2 Changed 9 years ago by takkaria

  • Summary changed from Move info about object classes into an external file to Move info about object types (tvals) into an external file

OK, point taken, but it's not replacing tvals, just moving data about them into an external file. I'd like to stick with tval as the name rather than using a new term.

comment:3 Changed 9 years ago by andrewdoull

See Unangband for one implementation of this (TR5_ and TR6_ flags do this). Copied useful flags below. See the object1.c code to see how to change descriptions:

#define TR5_SHOW_DD 0x00000001L /* Show damage dice */
#define TR5_SHOW_WEAPON 0x00000002L /* Show "to-hit" and "to-dam" bonus */
#define TR5_SHOW_CHARGE 0x00000004L /* Show charges */
#define TR5_SHOW_FUEL 0x00000008L /* Show turns (of light) */
#define TR5_SHOW_AC 0x00000010L /* Show armour class */
#define TR5_HAS_PVAL 0x00000020L /* Item has varying pval */
#define TR5_HAS_BONUS 0x00000040L /* Item has varying to-hit/to-dam/to-ac */
#define TR5_HAS_CHARGES 0x00000080L /* Item has varying charges */
#define TR5_INSTA_ART 0x00000100L /* Item makes an artifact */

#define TR5_BREAK_100 0x00010000L /* Breakage change 100% (cmd2.c) */
#define TR5_BREAK_50 0x00020000L /* Breakage change 50% (cmd2.c) */
#define TR5_BREAK_25 0x00040000L /* Breakage change 25% (cmd2.c) */
#define TR5_BREAK_10 0x00080000L /* Breakage change 10% (cmd2.c) */

#define TR5_AMMO 0x00400000L /* Item is branded in stacks */
#define TR5_GLOW 0x00800000L /* Item glows if timed */
#define TR5_EXHAUST 0x01000000L /* Item is destroyed at timeout */
#define TR5_RECHARGE 0x02000000L /* Item recharges at timeout */
#define TR5_KILL_ACID 0x04000000L /* Item can be destroyed by acid */
#define TR5_KILL_COLD 0x08000000L /* Item can be destroyed by cold */
#define TR5_KILL_ELEC 0x10000000L /* Item can be destroyed by electricity */
#define TR5_KILL_FIRE 0x20000000L /* Item can be destroyed by fire */

#define TR6_WEAPON 0x00000001L /* Item is a weapon */
#define TR6_ARMOUR 0x00000002L /* Item is an armour */
#define TR6_FLAVOR 0x00000004L /* Item is "flavoured" */
#define TR6_NAMED 0x00000008L /* Item is "named" after monster */
#define TR6_SIMPLE 0x00000010L /* Item has a 'simple' description */

#define TR6_SHOW_MULT 0x00000040L /* Show bow multiplier */
#define TR6_NO_TIMEOUT 0x00000080L /* Don't show timeout */

#define TR6_GOLD 0x00002000L /* Item picked up for money only (cmd1.c) */

#define TR6_TITLE 0x02000000L /* Item has a random title */
#define TR6_ADD_NAME 0x04000000L /* Add item name if aware */
#define TR6_MOD_NAME 0x08000000L /* Use item name as 'modifier' */
#define TR6_PREPEND 0x10000000L /* Prepend 'modifier' */
#define TR6_IN_FEET 0x20000000L /* Treat as a collective noun */
#define TR6_FORCE_MOD 0x40000000L /* Force display of modifier */
#define TR6_NO_TVAL 0x80000000L /* Don't display base tval name */

comment:4 Changed 9 years ago by magnate

  • Milestone changed from Future to 3.2.0
  • Resolution set to fixed
  • Status changed from confirmed to closed

This was done a while ago in [rdedbcbe2] - it's lib/edit/object_base.txt

Note: See TracTickets for help on using tickets.