| 1 |
The Restructure - an overview from Nick |
| 2 |
======================================= |
| 3 |
|
| 4 |
Prompted by a (very sensible) request by fizzix, this is meant to be a broad |
| 5 |
overview of the restructure as I'm imagining it. My apologies for lack of |
| 6 |
acknowledgement, errors, etc; stupidity is to blame rather than malice. |
| 7 |
|
| 8 |
Principles |
| 9 |
---------- |
| 10 |
|
| 11 |
These are the ideas underlying most of what I'm doing. They are very |
| 12 |
interrelated, and also not very clearly expressed. |
| 13 |
|
| 14 |
1. Stratify data and code, for example |
| 15 |
z-* files -> *.[ch] files -> list-*.h files -> edit files |
| 16 |
(I'm thinking of these a bit like a protocol stack, or geological strata) |
| 17 |
|
| 18 |
2. Make the code more flexible and general - gameplay assumptions should be |
| 19 |
made at the highest possible stratum |
| 20 |
|
| 21 |
3. Logical breakup - name of a file should be a good indicator of what it does |
| 22 |
|
| 23 |
|
| 24 |
More Detail |
| 25 |
----------- |
| 26 |
|
| 27 |
I'll now try to give an indication of what I think needs to change, grouped by |
| 28 |
broad areas. There's a fair bit of variation among these things as to how |
| 29 |
much thought I've put in, and how sure I am about them. I'll leave aside |
| 30 |
takkaria's work on the core-UI split, commands and events; there is some |
| 31 |
explanation in command.txt and event.txt. |
| 32 |
|
| 33 |
Dungeon gen |
| 34 |
- allow saving of dungeon levels and the town (done) |
| 35 |
- allow generation of dungeon levels piece by piece (done) |
| 36 |
- generalise level generation algorithms (done) |
| 37 |
- allow more control over monster generation for thematic purposes (done) |
| 38 |
- allow regions where restrictions apply (eg no ESP or no mapping) (done) |
| 39 |
|
| 40 |
Player knowledge |
| 41 |
- duplicate the dungeon level "cave" struct, so that there is a reality |
| 42 |
version and a player version (improves things like identify, terrain/object |
| 43 |
change when not in view, hallucination, etc) |
| 44 |
|
| 45 |
Objects |
| 46 |
- replace pvals (aside from fuel, food etc) by an array of values (done) |
| 47 |
- separate resistances, immunities etc from flags to allow for more values of |
| 48 |
resistance (done) |
| 49 |
- separate brands and slays from flags to allow more variablilty (done) |
| 50 |
- save flavors to the savefile and remove seed_flavor |
| 51 |
|
| 52 |
Inventory, quiver, equipment |
| 53 |
- make ordering of the inventory and quiver a UI construct only |
| 54 |
- make separate reality/player copies as for the cave |
| 55 |
- use a Poschengband-style equipment template to specify equipment slots |
| 56 |
(so there is a standard player body, but more could be added) |
| 57 |
|
| 58 |
Monster memory |
| 59 |
- make this a separate file, and make a full memory version available for |
| 60 |
download |
| 61 |
|
| 62 |
Birth options |
| 63 |
- improve the interface so that the player can more easily choose different |
| 64 |
options (but without making the birth process annoying) |
| 65 |
- use to allow players to try experimental ideas (combat system!) and broader |
| 66 |
gameplay options; as long as defaults are sensible, we don't need to worry |
| 67 |
as much about balance here |
| 68 |
|
| 69 |
Terrain/traps |
| 70 |
- have a full terrain flag system to allow easier addition/removal of terrain |
| 71 |
types (done) |
| 72 |
- make traps separate entities, not terrain (done) |
| 73 |
- make locked/jammed doors just closed doors with a trap |
| 74 |
- remove code reliance on the numerical value of terrain types (done) |
| 75 |
- add facility for player-set, monster-affecting traps |
| 76 |
|
| 77 |
Artifacts |
| 78 |
- save randarts to the savefile (or maybe a separate file) as for flavors |
| 79 |
- generalise to allow a mix of standarts and randarts, or even infinite |
| 80 |
randarts |
| 81 |
|
| 82 |
Squelch/Ignoring |
| 83 |
- add squelch by ego type |
| 84 |
- maybe add even finer-grained squelch |
| 85 |
- emphasise the philosophy that the items are still there, just ignored |
| 86 |
|
| 87 |
ID |
| 88 |
- have a separate field for every learnable property of an item (done) |
| 89 |
- remove the IDENT_* flags (done) |
| 90 |
- make a clear, separate place where "ID policy" (eg rune-based ID) is enforced |
| 91 |
|
| 92 |
Monster attacks |
| 93 |
- put elemental spell effects back in the projection code rather than the |
| 94 |
spellcasting code (done) |
| 95 |
- name and clarify other spell effects |
| 96 |
- as with ID, have a clear, separate place where AI policy is enforced |
| 97 |
- put blow effects into seprate handler functions (done by molybdenum) |
| 98 |
|
| 99 |
Player spells |
| 100 |
- move a lot of stuff to edit files (done by molybdenum) |
| 101 |
- generalise to make it easier to introduce new realms, classes, etc |
| 102 |
- consider allowing different classes to see books differently |
| 103 |
- consider books as spell containers (a la Pyrel, Poschengband) |
| 104 |
|
| 105 |
Projection |
| 106 |
- have separate functions to handle effects on terrain, objects, player, |
| 107 |
monsters (done by molybdenum) |
| 108 |
- clarify different types of projection (done) |
| 109 |
- allow for cone-shaped breaths (done) |
| 110 |
- allow for a wider variety of effects (eg player/monsters pushed by force) |
| 111 |
|
| 112 |
Stats, power, etc |
| 113 |
- refine and generalise stats where possible (some done by fizzix) |
| 114 |
- attempt to put all the (frankly) fudge factors involved in one place where |
| 115 |
thay can easily be seen and adjusted |
| 116 |
|
| 117 |
General code stuff |
| 118 |
- rename files to be more sensible, or create new ones where needed (ongoing) |
| 119 |
- update debug commands to reflect the current game (ongoing) |
| 120 |
- move data into list-*.h files or edit files where appropriate (ongoing) |
| 121 |
- remove archaic stuff (ongoing) |
| 122 |
- document! (ongoing) |