Plan for more flexible stats

From OHRRPGCE-Wiki
Jump to navigation Jump to search

These are the stats which currently exist

HP
MP
strength
aim
defense
dodge
magic
will
speed
counter
focus
extra hits

Each of these (except counter) has pre-defined purposes, And all of them can be used as custom stats for various purposes on an attack-by-attack basis

Some other special stats exist only in battle.

poison register
regen register
stun register
mute register

All stats have a concept of current/maximum values. For HP and MP, curative items or inns are required to reset them. All other stats are reset to their maximums before/after battle. Changes to other stats only persist for the length of a single battle.

The Plan[edit]

  • Promote status registers to first class stats which can (optionally) persist outside of battle. They will have the same IDs 12-15 that are already used in attack data, to minimise headaches.
    • Example: Authors could check poison register in an each-step script for dragon-warrior-style poison.
    • There are a couple undocumented arguments to getherostat in the range 12-15, which need to be handled with a backcompat bit
    • Allow equip to affect status registers
    • Allow enemies to have initial non-zero values of status registers
  • Consider also promoting Level MP stats to first-class stats. The current algorithm for restoring level-mp would be moved to the hero level-up code. (See bug 286 discussion.)
  • Add a node to general.reld for stat definitions (alternatively have a separate RELOAD file, but I'm not convinced). Draft documentation at: stats.reld
    • Move stat names from STT to stat definitions
    • Move stat caps from GEN to stat definitions
    • Store properties such as:
      • Is stat restored after battle?
      • Is stat restored before battle?
      • Is stat restored in Inns?
      • Is stat zeroed after battle?
      • Is stat zeroed before battle?
      • Is stat zeroed in Inns?
      • Is stat displayed on status screen by default? (Currently this has to be set per-hero)
      • Do you die if you run out of it?
      • Prefer to display as a number or as a meter or as a percent
      • What happens to the "current stat" value when you level up? (Reset to max/keep same value/keep same fraction of max/gain the increase in the max value)
  • Populate the stat definition file with defaults suitable for all the current stats,
  • Update all relevant code that uses stats
    • This could actually be done one-stat-at-a-time for a lower-impact transition and easier testing of the changes (although the overall work might be a little more)
  • Update status screen to enable hideable stats
    • Also implement scrolling on the status screen for when the stats list is too long to fit
  • Update death checking (both inside battle and out)
  • This is a great time to clean up all old code that is still using stat arrays to use stat types instead.
  • Update the attack editor to refer to the stat definition file to determine which stats are available as target stats, base stats, etc.
  • Allow the user to add additional stats
  • All stats should be usable as attack costs

Possible future features[edit]

  • More customizability of how stats are used.
    • make battle speed formula customizable Example: redefine extra hits as a speed multiplier rather than an attack multiplier
  • Define a stat on heroes or enemies that increases with damage, for Limit or rage type attacks
  • Life points, deducted each time the hero dies, like Romancing SaGa series
  • Promote LMP 1-8 to first-class stats, make spell-slot-cost customizable (independent of the attack located in that slot)
  • Change hero's animations based on the value of a stat. This is similar to what already happens with the "weak" frame when HP gets low. This could be used (for example) to indicate when a players "limit" or "rage" stat had reached max.

See Also[edit]

  • Bug #629 -- Custom status effects