Version 6 (modified by nckmccnnll, 6 years ago) (diff)


Object Generation


  • struct object (Nick)
    • pvals are an obsolete hack, and should be replaced with actual values
    • it would be nice to see tvals and svals go away too, but I'm not as clear how to do that
    • ID (within this struct) is also pretty much a hack, and needs to be thought through; I have some ideas, but they're not radical enough yet
    • int resist[GF_MAX], int brand[GF_MAX], int slay[RF_SIZE], seem fairly straightforward (but see see Brands & Slays? for another idea on this -- takkaria)
    • int stat[A_MAX], and int bonus[SOMETHING_MAX] (for speed, stealth &c) could be separate or together
    • bitflag flags[OF_SIZE] is also fairly clear, but maybe should have negatives/curses pulled out
    • there should be some fields for ID, and maybe pseudo-ID

  • if you wanted to remove tvals and svals you could consider something like bool wearable[EQ_MAX]. Although, in the end, it's probably worth it to be able to separate axes, from polearms, from maces, so you're not gaining much. At the very least, we should be thinking about how to accommodate classes that dual wield weapons.
  • For dual-wielding, you could add a flag on weapons/shields that permit offhand usage and move to weapon+offhand slots; this gives you the opportunity to restrict dual-wielding and shield usage independently.
  • Latest consensus seems to be tval->type, sval->subtype (but retained), slays and brands to be handled as linked lists of appropriate (entity, multiplier) pairs (Nick)