This is an old revision of the document!


Random gods: current status

ColdPie started a trunk branch for the project: rng-gods branch.

Current features:

  • framework for storing random god powers
  • some powers from Miniature are stored
  • the powers of a random god can be rolled (including trademark power)

Desirable next steps:

  • hooks so that the powers actually do something when invoked — start with easy stuff, where you can copy from existing code (e.g. Storm powers)
  • framework for piety rules (again, copy from existing gods: piety gain for kills, piety gain for exploration, piety loss over time)
  • completely independent of the rest: name generator for random gods

TODO list

Not sure where to put this, but here's a list of things to do on the rng-gods branch of qoala's repository (in no particular order), many of which we should do before we start implementing more stuff: — qoala 2013-06-09 07:15

  • !!! In enum.h, reset GOD_NAMELESS = 101 (after all valid gods for the foreseeable future, broken by removal of GOD_RANDOM = 100)
  • In zotdef.cc, make zotdef_create_altar less hackishly handle rand gods.
  • Make an enum for GOD_MIN_RANDGOD, GOD_MAX_RANDGOD, and NUM_RANDGODS (the difference between the min and max + 1)
  • Group randgod data into a struct randgod, then store a variable number (NUM_RANDGODS) of them in struct player
  • Add piety decay rate to struct randgod.
  • Move god generation out of ng-init.cc
  • Move god name generation to its own function for easy replacement
  • In ng-init.cc, stop including colour.h and rng-god-func.h after moving code
  • In player.h, try to not include all of rng-func-data.h, see other entries about splitting that header
  • Expose the ability to set randgod entries in god_abilities from abl-show.cc? (Instead of initiallizing them via extern)
  • Expose the ability to set randgod entries in god_gain|lose_power_messages from religion.cc? (Instead of initiallizing them via extern)
  • !!! Move randgod store/load out of tag_*_char int tag_*_you_dungeon. Don't break TAG_CHR_FORMAT!
    • Add a minor version for the new data, so that we also maintain save compatibility at the less sever levels.
  • !!! Don't shift DNGN enums. Remove DNGN_ALTAR_UNUSED so that the fountain enums aren't shifted; that's what it was there for.
    • Learn which “map_marker” can change name/colour/tile/description of a feature (It's how portal entries work), so that we can fit all the randgods into one enum.
    • Figure out if the above solution already sufficiently breaks all the code assuming that altar enums 1-to-1 map with god enums (in order), that it doesn't matter where we put the enums for god altars.
    • Add a note that more DNGN_ALTAR_UNUSED enums should be generated on the next major version bump. If we somehow retain the assumption that altars and gods map 1-to-1, this should also leave empty enums corresponding to the remaining randgod slots.
  • Move definitions of rng_god_power and other stuff outside of rng-god-func.h and into rng-god.h. Change includes.
  • Move rng_god_power data out of struct player/struct randgod. Store just the enums?
  • Clear randgod stuff in player during player::init
  • Stop initializing randgod stuff on startup.
    • Remove include of abl-show.h from startup.cc if we move out of there.
    • If so, make sure things get initialized (and/or cleared) in you::init() or somewhere else called by main.cc:_reset_game() so that restart_after_game works properly.
    • Eventually random gods will be generated or loaded when a map (or wiz command or zotdef ability) request a new one.

Lower priority stuff (some of the above might belong here)

  • In rng-god.h, Convert labels to an enum of bit flags
  • Change the costs (in var name and order) to match those in ability_def
  • Make piety cost a generic_cost, like in abiliy_def
  • Move ability descriptions to the database (keyed on name?)
  • See about converting tag listings to something based on enums and/or a flag array for storage. Try not to sacrifice debugging capability.
  • Stop exposing the raw rng_god_power array to every file including rng-god.h
  • Give rng_god_power the space to store other function types beyond invocation (and allow the perl script to store NULL references if a function isn't present).
Logged in as: Anonymous (VIEWER)
dcss/brainstorm/god/concept/random_god/status.1370776264.txt.gz · Last modified: 2013-06-09 13:11 by qoala
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki