Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#1038 closed bug (fixed (in master))

object.txt should accept random values

Reported by: MarbleDice Owned by: MarbleDice
Milestone: 3.1.2 beta Keywords: cleanup

Description (last modified by MarbleDice)

Allow the specification of values in object.txt, for pval, to-hit, to-dam, and to-armor, of the following format:


Where 5 is a constant base, 2d6 is a damroll, and M8 is m_bonus(8). The base, the damroll, just the number of dice, and the m-bonus parameter are all optional. A leading negative sign should invert the entire value. This would have several nice benefits:

  • Allow re-balancing of object bonuses without recompiling
  • Allow weapon/armor bonuses to be balanced on a per-sval basis
  • Remove significant hard-coding in object/obj-make.c
  • May simplify auto-identify on jewelry or other objects

Change History (6)

comment:1 Changed 11 years ago by MarbleDice

  • Milestone changed from Triage to 3.1.2 beta

comment:2 Changed 11 years ago by MarbleDice

Implemented in [ed7af42] (SVN r1837).

comment:3 Changed 11 years ago by MarbleDice

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed 11 years ago by MarbleDice

  • Description modified (diff)

[b4e1543] (SVN r1843) includes some fixes:

  • Properly compute average calculation for m_bonus
  • Don't display timeout for items that don't use them but have effects
  • Style and standards fixes:
    • Define parse_random_value() as a static function
    • Properly typedef/define random_value struct
    • Use string tokenization instead of non-ANSI scan sets %[]

comment:5 Changed 11 years ago by MarbleDice

[c29c9ee] (SVN r1848) uses a random_value to handle object stack size

comment:6 Changed 11 years ago by MarbleDice

[e1fee37] (SVN r1850) extends random_value to the ego item bonus fields.

Note: See TracTickets for help on using tickets.