--------------------- - CONDUCT PATCH 2.3 - --------------------- (Change-Details) Description of all changes: --------------------------- Affected data-structures: ------------------------- Philosophy: flags - contain the player's initial intention u.roleplay - contains the character's intentions/abilities u.uconduct - contains raw statistical data on character's actions flags (flags.h) additional flags - (remain fixed after character creation) flags.ascet flags.atheist flags.blindfolded flags.illiterate flags.pacifist flags.nudist flags.vegan flags.vegetarian u (you.h) additional intrinsics - (may change during gameplay) u.roleplay.ascet u.roleplay.atheist u.roleplay.blindfolded u.roleplay.illiterate u.roleplay.pacifist u.roleplay.nudist u.roleplay.vegan u.roleplay.vegetarian additional conduct-counters - (raw statistical details) u.uconduct.armoruses u.uconduct.unblinded u.uconduct.unecologic u.uconduct.robbed I added only a few special cases in which the roleplay-intrinsics make a difference (only those I'm currently interested in; mainly illiterate pacifists). Feel free to add more... (e.g atheists deserve a lot of special cases). Affected files -------------- include : 5 files extern.h - added violated() - added successful_cdt() - added intended_cdt() - added superfluous_cdt() - added failed_cdt() - removed violated_vegetarian() flags.h - added flags for conduct-options (set at character creation) mondata.h - defined is_guardian() /* creature is an artifact-guardian */ patchlevel.h - increased editlevel (bones and save-files are incompatible) you.h - added counters for nudism, zen and thievery conduct - added roleplay-intrinsics - declared a struct[] that contains conduct-information: nouns and adjectives (used for the high-score) names (*unused*) can be used e.g. for a conduct-menue at startup a flag for 'worth mentioning in the highscore' all strings necessary for show_conduct() (the definitions for the struct are in role.c) - define CONDUCT_XYZ this gets used to access strings for the highscore access strings for show_conduct() call violated(CONDUCT_XYZ) call successful_cdt() call added intended_cdt() call superfluous_cdt() call failed_cdt() src : 17 files cmd.c - #conduct-list updated use the functions from role.c and conducts[] to display appropriate conduct-strings do_wear.c - violated(CONDUCT_BLINDFOLDED) dog.c - enlarged the area for level-followers eat.c - re-arranged all conduct lines use violated() to break conducts use character's intention instead of conduct-counter to determine blessed food-detection effects end.c - done(QUIT) and done(ASCENDED) now use the killer-string in the logfile this looks like: quit after an act of violence ascended nude pacifist engrave.c - illiterate characters always engrave a single 'X' - re-arranged the engrave-messages a bit. E.g: "You add your name to the weird writing in the dust" - violated(CONDUCT_ILLITERACY) hack.c - violated(CONDUCT_FOODLESS) - violated(CONDUCT_PACIFISM) mon.c - violated(CONDUCT_PACIFISM) - violated(CONDUCT_THIEVERY) options.c - added conduct options (DISP_IN_GAME) OPTIONS=nudist,illiterate,pacifist,atheist OPTIONS=vegetarian,vegan,ascet,blindfolded pray.c - build a conduct-string for done(ASCENDED) in the logfile this looks like: "ascended adjective adjective ... noun" in the highscore (->topten.c) it looks like Patito-Mon-Hum-Mal-Cha the nude vegan pacifist ascended to demigod-hood. read.c - violated(CONDUCT_ILLITERACY) - you can read the Book of the Dead while blind (needed for zen-conduct) - illiterate characters can't read role.c - define conduct-information name/noun/adjective flag for 'worth mentioning in the highscore' all strings necessary for show_conduct() - fix up initial roleplay flags - function violated() increases conduct-counters may give a messages may perform special actions - function successful_cdt() tells if a conduct was successful (so far) - function intended_cdt() tells if conduct was selected at character creation - function superfluous_cdt() tells if it's superflous to list that conduct - function failed_cdt() tells if you failed a selected conduct topten.c - takes ascension-conduct and puts it into the highscore. It looks like: Patito-Mon-Hum-Mal-Cha the nude vegan pacifist ascended to demigod-hood. u_init.c - initialize roleplay intrinsics - conduct specific initialisation zen masters get a worn blindfold (only one) atheists anger their god nudists don't wear initial armor pacifists don't wield initial weapon uhitm.c - violated(CONDUCT_FOOD) worn.c - violated(CONDUCT_NUDISM) write.c - violated(CONDUCT_ILLITERACY) - illiterate characters can't write How to add a conduct to the patch: ----------------------------------- (sorry, for now this is extremely short, I'll hopefully find time to write some more documentation) 1) Add CONDUCT_MYCONDUCT to you.h, increase ROLE_CONDUCTS. 2) Add your conduct-strings to the conducts[] array in role.c 3) If necessary add a new counter to u.uconduct. 4) Add a case to violated() 5) Tell successful_cdt() what it takes to be successful. 6) If necessary add an option. 7) If your conduct has an option tell intended_conduct() which flag your conduct uses. 8) Put a bunch of calls to violated() into the nethack-code... ...lots more things that can be done....