Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   Preparing for 4.2 release (http://angband.oook.cz/forum/showthread.php?t=9455)

Nick July 16, 2019 22:23

Quote:

Originally Posted by Thraalbee (Post 139214)
I'm hungry, I eat food => Fed 80%. I am not satisfied so I cast the (ranger) Satisfy Hunger spell too => Fed 49%. With the current naming of the spell this is very unintuitive. Sure it brings < 49% fed to 49% which is fine. Also, a glutton at 99% fed is much helped by using the spell to get to 49%, but again the naming is not telling what the spell does.

Calibrate Hunger? Set Food Level? Make Half Satiated?

Please, someone suggest something.

jml34 July 16, 2019 22:57

Spell of Nicely Half-full Stomach :)
Make Belly Comfy
Satisfy Stomach
Alleviate digestion nuisances. (But "alleviate" would suggest you go up or down to some reasonable value, not that you get to a set middle state)
Reinitialize/reinstate/rejuvenate/revitalize Stomach/Digestion
I find "Rejuvenate Stomach" suggestive :p

or maybe just have a spell of Fill Stomach/Magical Food (adds some constant food), then have a way to vomit at monsters when your stomach is above some value (cone attack dealing acidic damage + makes player stunned)

("Slow Digestion" isn't great either: it looks like regen will be slowed too, while it's not the case AFAIK. Low Food Wastage? Sustainable Metabolism? Just plain Save Food?)

Pete Mack July 16, 2019 23:44

Good digestion.

Diego Gonzalez July 17, 2019 00:52

Restore metabolism

Youssarian July 17, 2019 01:53

Scroll of Tasty Victuals

Scroll of Sustenance

Scroll of Bilbo's Larder

Chud July 17, 2019 01:56

Normalize Nutrition

Moderate Gluttony

Frodo's Second Breakfast

:)

jml34 July 17, 2019 02:23

I've just tried to patch the game to extend the @[cmd][key] syntax so that "key" can also be a-zA-Z, and it's really great. Try it and you'll wonder how you could play without it!
Engrave default food with @EE, the most useful rod with @aa, wand with @zz, arrow with @tt etc. (roguelike keyset examples) Then other things with whatever is easy to type, and probably use an upper-case key for things you don't want to mistype and launch by mistake.
If I have a potion engraved with @qe then another potion at slot e does get hidden but I don't think it's a problem. I didn't allow for the general @[key] syntax to get extended of course, since this would conflit with the @[cmd][key] syntax.
(The engraving check code doesn't use an efficient algorithm so it's slowed by a factor 6.2 (each @ was checked 10 times, now it's 10+26+26))

ui-object.c
Code:

/* old code in 4.1.3
        if (quiver_tags) { */
 /* new code */
        if (quiver_tags && '0'<=tag && tag<='9') {
/* end of new code */
                i = tag - '0';

Code:

/* Old code */     
                        ///* Check the normal tags */
                        //if (s[1] == tag) {
/* new code */       
                        /* Check the normal tags when '0'<=tag<='9' */
                        if (s[1] == tag && '0'<=tag && tag<='9') {
/* end of new code */
                                /* Save the actual object */
                                *tagged_obj = obj;

Code:

/* Get inscriptions */
/* old code */
        //m->inscriptions = mem_zalloc(10 * sizeof(char));
        //for (inscrip = 0; inscrip < 10; inscrip++) {
                ///* Look up the tag */
                //if (get_tag(&obj, (char)inscrip + '0', item_cmd,
                                        //item_mode & QUIVER_TAGS)) {
/* new code */
        /* inscriptions: '0'-'9', 'a'-'z', 'A'-'Z' */
        m->inscriptions = mem_zalloc((10+2*26) * sizeof(char));
        for (inscrip = 0; inscrip < 10+2*26; inscrip++) {
                /* Look up the tag */
                char tag;
                if (inscrip < 10) tag = (char)inscrip + '0';
                else if (inscrip < 10+26) tag = (char)(inscrip-10) + 'a';
                else tag = (char)(inscrip-10-26) + 'A';

                if (get_tag(&obj, tag, item_cmd, item_mode & QUIVER_TAGS)) {
/* end of new code */
                        int i;
                        for (i = 0; i < num_obj; i++)
                                if (items[i].object == obj)
                                                break;

file ui-menu.c:
Code:

/* Old code: we don't touch the first if but we need to swap the ifs       
        if (menu->flags & MN_CASELESS_TAGS)
                key.code = toupper((unsigned char) key.code);

        if ((menu->flags & MN_INSCRIP_TAGS) && isdigit((unsigned char)key.code)
                && menu->inscriptions[D2I(key.code)])
                key.code = menu->inscriptions[D2I(key.code)];
*/ /* new code */
        if (menu->flags & MN_INSCRIP_TAGS) {
                unsigned char keyc = (unsigned char)key.code;
                int index = -1;
                if ('0'<=keyc && keyc<='9') index = keyc-'0';
                if ('a'<=keyc && keyc<='z') index = (keyc-'a')+10;
                if ('A'<=keyc && keyc<='Z') index = (keyc-'A')+10+26;
                if (index>=0 && menu->inscriptions[index])
                        key.code = menu->inscriptions[index];
        }

        if (menu->flags & MN_CASELESS_TAGS)
                key.code = toupper((unsigned char) key.code);
/* end of new code */

I hope it's OK to not learn git for a simple patch like this :rolleyes: sorry :p
Well above all I hope it doesn't break things. I made a beginner warrior and whatever I tought I'd try worked...

Nick July 17, 2019 02:44

Quote:

Originally Posted by jml34 (Post 139227)
I've just tried to patch the game to extend the @[cmd][key] syntax so that "key" can also be a-zA-Z, and it's really great. Try it and you'll wonder how you could play without it!
Engrave default food with @EE, the most useful rod with @aa, wand with @zz, arrow with @tt etc. (roguelike keyset examples) Then other things with whatever is easy to type, and probably use an upper-case key for things you don't want to mistype and launch by mistake.

At first glance this looks good. Anyone see any objections to it (if it works as described)?

Nick July 17, 2019 02:48

Also thanks for all the helpful suggestions on a new name for Satisfy Hunger. My current thinking is to go with Derakon's idea of Remove Hunger, and change it to not reset food downward. This means it will not be a cure for fullness, which seems more in keeping with the philosophy of the changes. Also makes ,Purging and !Salt Water more useful :)

Sideways July 17, 2019 03:10

Quote:

Originally Posted by Nick (Post 139228)
At first glance this looks good. Anyone see any objections to it (if it works as described)?

Poslikes have that; and my experience is that the situation jml34 described (an item being left without a letter slot because its natural letter was claimed by another item's inscription) was actually a fairly serious problem that occurred repeatedly and equally repeatedly produced headaches (especially for new players who hadn't seen it happen before) until code was written to make sure every item always has a letter.


All times are GMT +1. The time now is 04:34.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.