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 14, 2019 22:56

OK, new builds which no longer have the zombie unique issue are up.

Chud July 15, 2019 02:57

Quote:

Originally Posted by Nick (Post 139189)
OK, new builds which no longer have the zombie unique issue are up.

It might be fun (at least in the Dwarf Fortress sense) if they came back as actual zombie versions of themselves. :)

Nick July 15, 2019 12:55

Quote:

Originally Posted by Thraalbee (Post 139179)
Tired of losing all my games, I loaded my last (dead) character, said NO to immediate restart, then changed settings from randarts to standarts and then started. And for sure, things went better all the way and just now I had managed to get a short bow of power AND a nice artifact cutlass. Except it was a random artifact! I verified that the =setting was for standards (y) then quit the game to zip the savefile and the randart file for a bug report. Hmmm, there is no randart file. Odd. Restart the game and... crash due to not finding the randart file. Back to rolling up another weak ironman ranger...

OK, I can replicate this. No idea what's going on.

Nick July 15, 2019 13:27

Randart bug is found and fixed, fix will be in the next build. It is possible to change from randarts to standarts with the following character in the current build; you just need to make a character (with standarts), suicide immediately, then make a new one.

mrfy July 16, 2019 05:43

Quote:

Originally Posted by Nick (Post 139197)
Randart bug is found and fixed, fix will be in the next build. It is possible to change from randarts to standarts with the following character in the current build; you just need to make a character (with standarts), suicide immediately, then make a new one.

Heh. This happened to me when I updated to the newest nightly. I always seem to forget to to update the Birth options. Create character, realize sound isn't on, realize randarts aren't selected. Kill character, restart.

Btw, I'm finding the revised Ranger to be much better and not overpowered. I seem to be having issues in the late-mid game (latest fail from didn't have poison protection on and ran into an 8-headed hydra). But much better than it was. :)

gtrudeau88 July 16, 2019 11:30

Found a bug. No idea how to report it
 
Noticed there are no places in town to buy priestly weapons. The temple only has books and in multiple games the weapons shop does not have these either. Pretty hard to arm a priest from the start.

Nick July 16, 2019 12:53

Quote:

Originally Posted by gtrudeau88 (Post 139209)
Noticed there are no places in town to buy priestly weapons. The temple only has books and in multiple games the weapons shop does not have these either. Pretty hard to arm a priest from the start.

Priests no longer get a penalty from wielding sharp weapons, but they do get a bonus from wielding blessed weapons.

gtrudeau88 July 16, 2019 15:14

OK. Sorry then

Thraalbee July 16, 2019 20:15

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.

Derakon July 16, 2019 21:52

Maybe call it "Remove Hunger"? Doesn't really help with taking your satiation down but it's more clearly less filling than "Satisfy".

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.

takkaria July 17, 2019 03:16

Quote:

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

It's cool that this is working, but I think a cleaner way to do this would be to set the 'key' member of struct object_menu_data differently when you're building the menu in build_obj_list(). textui_get_item() would have to pass along the 'command key' which can be found from the command via cmd_lookup_key(cmd, mode). This would have the advantage of not touching the menu code at all, and you keep all the logic in the one function. You could keep track of what letters are assigned when you build the list, and mark those that have no letter with '-', or just assign them using uppercase letters starting from A-Z I guess.

Pete Mack July 17, 2019 03:28

@tak--
Agree. That stuff belongs under a function pointer, or outside the menu code entirely. It is really mysterious as a menu side effect.

Nick July 17, 2019 03:38

Thanks all for the feedback, will look into following takkaria's advice.

jml34 July 17, 2019 04:44

Quote:

Originally Posted by Sideways (Post 139230)
until code was written to make sure every item always has a letter.

What does that code do? For each hidden item, assign the first free letter?
My quick patch doesn't update the menu keys, which is indeed pretty confusing.
I'll look into that as soon as I'm done with trying to get stacking limits to work :rolleyes:
EDIT Ah, so many posts while I was thinking. Er, do I still need to look into it or are knowledgeable people going to do it? :D Never mind , looks like the big boss is on it...

jml34 July 17, 2019 08:33

I guess it's OK to double-post for unrelated matters?
I'm playing around with inscriptions for stacking limits and auto_pickup. So {!L25} would only stack up to 25 when walking over a stackable stack of objects.
The get command happily ignores this so far. I think it should prompt for a quantity when picking the most it can would overshoot the limit.

It's not thoroughly tested at all but I thought I'd ask for an opinion. I don't exactly get how the code is organized (lots of similar code in several places) so I'm afraid I'm adding to the mess. It's just a bit annoying when the game keeps stacking things, espacially when it uses a new slot, but no major problem there.

I think it's sane to ignore !Lxx when xx>40. Do people really want to have 60 or 80 of something? It would take more coding to check this out, since as it is, only the first stackable slot is checked out, so if it says !L42, then it will pickup until "it's at 42" which means 2 will go to the next stack each time. I guess I could just check what happens with the next inventory slot...

There's potential for confusion if you manually overshoot the limit, then drop some of them, then change your mind about the limit, then manually pickup items with the previous inscription etc., you end up with several stacks with different inscriptions. Only the first stack is taken into account so if you have 8 items {!L08} then 2 items {!L05}, you won't pickup anything when walking over uninscribed items. Not sure what to make of that. What if there was 7 items !L08, would I have to add 1 item to this stack then again several items to the next? Huh...

---
So the patch I'm trying is in cmd-pickup.c
There's something weird with player_pickup_aux. There are 3 calls to this function. Parameter auto_max is unused 2 times (=0), and is set to inven_carry_num(obj,true) in the 3d, in the do_autopickup function. Now in obj-gear.c we can see that, for the inven_carry_num function, stack=true only serves to return 0 when obj can't be stacked to an existing inventory item.
So either auto_max=0, or the first thing player_pickup_aux does, calling inven_carry_num(obj,false), is to recompute its value.
So auto_max should perhaps be a bool then. But I don't really get in what situation we get to that part of the code with the call to get_quantity so meh.
I need to set a pickup limit somewhere though, so I just added a new parameter :
Code:

static void player_pickup_aux(struct player *p, struct object *obj,
                                          int auto_max, int pickup_limit, bool domsg)
{
        int max = inven_carry_num(obj, false);

        /* Confirm at least some of the object can be picked up */
        if (max == 0)
                quit_fmt("Failed pickup of %s", obj->kind->name);

        /* Set ignore status */
        p->upkeep->notice |= PN_IGNORE;

/* new code */
        if(pickup_limit && max>pickup_limit) max = pickup_limit;
/* end of new code */

        /* Carry the object, prompting for number if necessary */
        if (max == obj->number) {
                if (obj->known) {
                        square_excise_object(p->cave, p->py, p->px, obj->known);
                        delist_object(p->cave, obj->known);
                }
                square_excise_object(cave, p->py, p->px, obj);
                delist_object(cave, obj);
                inven_carry(p, obj, true, domsg);
        } else {
                int num;
                bool dummy;
                struct object *picked_up;

/* old code
                if (auto_max)
                        num = auto_max;
                else
                        num = get_quantity(NULL, max); */
/* new code */
                if (!auto_max) num = get_quantity(NULL, max);
                else num = max;
/* end of new code */
                if (!num) return;
                picked_up = floor_object_for_use(obj, num, false, &dummy);
                inven_carry(p, picked_up, true, domsg);
        }
}
[...]
        /* We're given an object - pick it up */
        if (obj) {
                player_pickup_aux(p, obj, 0, 0, domsg); // new code: add a 0 param
[...]
        /* Pick up object, if legal */
        if (current) {
                /* Pick up the object */
                player_pickup_aux(p, current, 0, 0, domsg); // new code: add a 0 parameter
[...]
int do_autopickup(struct player *p)
{
[...]
                        if (auto_pickup_okay(obj)) {
                                /* Pick up the object (as much as possible) with message */
/* Old code
                                player_pickup_aux(p, obj, inven_carry_num(obj, true), true);
                                objs_picked_up++; End of old code */
/* New code */
                                int num_to_pickup = inven_carry_num(obj, true);
                                /* Check first if there's a stacking limit however */
                                const struct object *gear_obj = find_stack_object_in_inventory(obj);
                                int stack_limit = -1;
                                if (check_for_inscrip(gear_obj, "!L")) {
                                    const char *s = quark_str(gear_obj->note); // gear_obj->note is not 0
                                    while (s) {
                                        s = strstr(s, "!L");
                                        /* The stacking limit tag is !L<digit><digit> */
                                        if (s && '0'<=s[2] && s[2]<='9' && '0'<=s[3] && s[3]<='9') {
                                            stack_limit = (int)10*(s[2]-'0') + s[3] - '0';
                                            /* TODO ignore staking limits > 40? */
                                            break;
                                        }
                                        if (s) s++;
                                    }
                                    if (stack_limit>=0)
                                            num_to_pickup = MIN(num_to_pickup, stack_limit - gear_obj->number);
                                }
                                if (num_to_pickup>0) {
                                    player_pickup_aux(p, obj, num_to_pickup, num_to_pickup, true);
                                    objs_picked_up++;
                                }
/* End of new code */
                        }

(hum, no spoiler tags on this forum? I wanted to hide the code)
On a side note, I probably won't have much time until next month :(

takkaria July 17, 2019 13:20

Code:

if (check_for_inscrip(gear_obj, "!L")) {
    const char *s = quark_str(gear_obj->note); // gear_obj->note is not 0
    while (s) {
        s = strstr(s, "!L");
        /* The stacking limit tag is !L<digit><digit> */
        if (s && '0'<=s[2] && s[2]<='9' && '0'<=s[3] && s[3]<='9') {
            stack_limit = (int)10*(s[2]-'0') + s[3] - '0';
            /* TODO ignore staking limits > 40? */
            break;
        }
        if (s) s++;
    }
    if (stack_limit>=0)
            num_to_pickup = MIN(num_to_pickup, stack_limit - gear_obj->number);
}

This is dangerous code with a potential out of bounds access. I think the following will do what you want just as well:

Code:

const char *inscription = quark_str(gear_obj->note);
const char *s = strstr(inscription, "!L");
if (s && sscanf(s, "!L%d", &stack_limit) > 0) {
    num_to_pickup = MIN(num_to_pickup, stack_limit - gear_obj->number);
}


Sideways July 17, 2019 15:06

Quote:

Originally Posted by jml34 (Post 139234)
What does that code do? For each hidden item, assign the first free letter?

I think it does that, yes; though there's unrelated but very similar code elsewhere that essentially works by swapping letters between the competing items. (That approach sometimes leads to unintuitive results if an item's letter gets swapped multiple times during the process.)

The fundamental difference between the Frog/Pos code and V is that in Frog every item only has one corresponding key in a given menu (the inscriptions only change what that key is), while V has (so far) tried to make both the original letter and the inscribed key apply within the same menu. I think the latter approach is ultimately unworkable with @[letter][letter] inscriptions allowed, though it didn't cause any conflicts as long as the inscribed keys were always numbers.

(I'd also say removing that is a very cheap price to pay for making @[letter][letter] inscriptions work :) But that might be because I'm already used to it.)

jml34 July 17, 2019 16:39

@takkaria If you mean the accesses to s[2] and s[3] they can't be out of bounds (null-terminated string so these expressions are in bound when evaluated) -- I copied this from elsewhere in the code.
Now your code is much cleaner, and faster too. Er, I think you could have a look at some elsewheres in the code :D
I just quickly tested it with
Code:

if (s && sscanf(s, "!L%d", &stack_limit) > 0 && 0<stack_limit &&
                      stack_limit<=gear_obj->kind->base->max_stack) {

and it worked (ignoring !L with numbers>40).
I haven't coded in C for like 20 years so I also tested !L0x20 but it seems %d doesn't accept hexa format :D

Another quick note (I realize I wasn't clear): I think the player_pickup_aux code would work the same without the 4th parameter and
Code:

                if (!pickup_limit) num = get_quantity(NULL, max);
                else num = max;

(don't use auto_max since it's unused). Silly me just got scared of that call to get_quantity that I didn't understand so I left auto_max for no good reason that I know of...

------------
About @<cmd><letter>, my plan would be to have the menu scan the keys, check if they're hidden by an entry in the inscriptions array, in which case the inscriptions array would be scanned for an entry that points to the item: this key would be displayed in the menu if there's one, if not, the first free slot would be assigned first. Degenerate case: the player engraved multiple @ commands to objects so there's no free slot available, we display a space in the menu and the object is not reachable.
@Sideways So @<cmd><letter> could actually be made to work with multiple ways to select an item. Use a key displayed in the menu -> select the corresponding item, use some other key -> select the first engraved item if any.
Now I don't know if that's a desirable feature, the code could be messy, perhaps I can't get back to it before the 1st of 08, and above all other people have said there's a more desirable way to have @<cmd><letter> work so I'll leave it at that for now :D

khearn July 17, 2019 17:26

Yeah, I think not being able to use an item because something else has its letter in an engraving does seem like it would be a problem at times. There needs to be some way to tell the system to 'ignore engravings for this command'.

Maybe <cmd>'<letter>? So "qq" would quaff the potion engraved with @qq, and "q'q" would quaff the potion in inventory slot q. And of course, if there is no @qq engraving, "qq" would just quaff the potion in slot q.

takkaria July 17, 2019 18:00

Quote:

Originally Posted by khearn (Post 139240)
Yeah, I think not being able to use an item because something else has its letter in an engraving does seem like it would be a problem at times. There needs to be some way to tell the system to 'ignore engravings for this command'.

Maybe <cmd>'<letter>? So "qq" would quaff the potion engraved with @qq, and "q'q" would quaff the potion in inventory slot q. And of course, if there is no @qq engraving, "qq" would just quaff the potion in slot q.

I think this is over-complicated. If the user has assigned a different key to an item for a particular command, the item that has been overriden should just be assigned another key that isn't in use - I liked the suggestion of uppercase letters.

takkaria July 17, 2019 18:02

Quote:

Originally Posted by jml34 (Post 139239)
@takkaria If you mean the accesses to s[2] and s[3] they can't be out of bounds (null-terminated string so these expressions are in bound when evaluated) -- I copied this from elsewhere in the code.

Hmm, if an inscription was just "!L" then s[0] == "!", s[1] == "L", s[2] == 0, and then s[3] is out of bounds, no? Where else in the code makes this assumption?

(I hate C)

khearn July 17, 2019 19:25

Yeah, uppercase sounds good, too.

jml34 July 17, 2019 21:00

Quote:

Originally Posted by takkaria (Post 139243)
Hmm, if an inscription was just "!L" then s[0] == "!", s[1] == "L", s[2] == 0

In that case " && '0'<=s[2] " fails so further && conditions are not evaluated, which is how out of bounds accesses are prevented ;) (I also don't like lots of things about C but it still beats assembly code :D )

----
About @<cmd><letter> I just realized my plan would essentially make the inscriptions array a keymap (input letter-or-digit -> equipment slot), since we'd first assign working normal letters to the array (after inscriptions are processed) to guarantee nobody claims that letter. So we could rename this array keymap if we go that route.

About the UI, we have several possibilities:
1. Don't use uppercase letters inscribed by the user. This guarantees 26 free slots for pathological cases.
2. Let the user use uppercase inscriptions and
.2a. just do nothing if the user has somehow messed with all letters (an item is unreachable)
.2b. provide a few non-letter keys for those cases.
It's just that I don't see in what practical situation there'd be a 2a pathological case. "Assign the first free uppercase letter" should always work (going for an uppercase letter first to emphasize in the menu that a lowercase inventory slot was temporarily reassigned), unless the user inscribed all uppercase letters somewhere on purpose right?

EDIT in fact @Ee might be safer than @EE in case I'd release the shift key between the Es and end up eating something at slot e. It could be lowercase inscriptions are safer. Or I'd engrave both @EE and @Ee.

Ingwe Ingweron July 17, 2019 22:10

It seems to me that this entire thread has been sidelined into what should be in the "Development" portion for talk about coding specifics rather than the "Vanilla" portion, but maybe that's just me.

Derakon July 17, 2019 22:21

Quote:

Originally Posted by Nick (Post 139229)
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 :)

You got some positive feedback from the initial change to Satisfy Hunger specifically because it meant that players would no longer have to hoard Purging/Salt Water for the final fights to avoid getting healing-gorged. Reverting that part of the change is therefore likely to provoke complaints.

What if it set your percentage to MIN(90, current+50)? Or current+25 or whatever you think a reasonable number is.

Nick July 18, 2019 05:32

Quote:

Originally Posted by Derakon (Post 139249)
You got some positive feedback from the initial change to Satisfy Hunger specifically because it meant that players would no longer have to hoard Purging/Salt Water for the final fights to avoid getting healing-gorged. Reverting that part of the change is therefore likely to provoke complaints.

You are very likely correct :)

Here are my reasons for going ahead with this anyway:
  1. The hunger meter means the player has a chance to plan their food intake before the final fights, which seems reasonable and the sort of integration of the hunger mechanic that I am aiming for
  2. Slowing through fullness sets in gradually - one healing potion will slow the player by a maximum of 1 - so it is a situation the player can respond to dynamically
  3. Only two classes of nine get Satisfy Hunger as a spell, so others choosing to rely on "hunger reduction" would need to devote a slot to it in any case
  4. I plan to introduce some more variety of food, so the player can have more control over their hunger level

While I'm aware that there are some people who wish hunger would just go away as a mechanic, I'm in general not in favor of extreme optimisation of aspects of the game to facilitate the equivalent of speedrunning; I think that's the player's job, not the maintainer's. There was a choice between actually removing hunger or making it more integrated within the game, and overall we came down on the side of integration. So I don't want to then do things that run counter to that, in the same way as I'm not going to introduce this
Code:

#####
#123#
#4>5#
#678#
#####

as a town layout :)

Derakon July 18, 2019 14:49

You forgot the little courtyard for the townspeople and Farmer Maggot to spawn in, which is of course separated from the rest of the town by a pile of rubble. :)

But anyway, fair enough. I'm not personally trying to persuade you to go one way or another, just making sure you're making as informed of decisions as possible. Which you are, as best I can tell.

wobbly July 18, 2019 15:29

Quote:

Originally Posted by Derakon (Post 139066)
This is a good summation. As for ideas for 3, how about if more powerful races had a lower level cap? Like, you topped out at level 40 for a high-elf and level 50 for a human, and everyone else was somewhere in-between? Newbies will die before the level cap becomes relevant. The biggest problem of course is that this limits spell access for full casters; a lot of the really class-defining spells would be unavailable to high-elves if we used the numbers I suggested. But both the level caps and the spell levels could be tweaked.

HPs would probably also be a problem. I think level limits make more sense if you add something like giants & give them insane hps/level. Quickband gives high elves the "Doom of Mandos" from clvl 27 which does bad stuff (not sure what, never played the high elf) but you could adapt Sil's danger mechanic where monsters are spawning at a higher depth or do something different.

Derakon July 18, 2019 15:55

Quote:

Originally Posted by wobbly (Post 139256)
HPs would probably also be a problem. I think level limits make more sense if you add something like giants & give them insane hps/level. Quickband gives high elves the "Doom of Mandos" from clvl 27 which does bad stuff (not sure what, never played the high elf) but you could adapt Sil's danger mechanic where monsters are spawning at a higher depth or do something different.

I'm pretty sure I've seen ladder wins with character levels lower than 40. At level 40 with max CON you get 40*12.5=500 HP from CON, which means you need 2.5 HP per level from your hit dice to be out of instadeath range from Morgoth. The worst hit die in the game is a halfling mage with a d7, which has an average roll of 4. I'm not saying it'd be a fun fight, but it should be doable.

But sure, there's plenty of other neat ways to penalize powerful races in the lategame. You could give one race a time limit of 1 million game turns (~= 100k normal-speed turns, plenty to win with), for example. There might also be some way to tweak the experience-received-per-enemy formula such that as a particular race dives deeper they have to get more and more of their experience from "novel" kills (where the monster type hasn't been killed before).

Ingwe Ingweron July 18, 2019 16:40

Quote:

Originally Posted by Derakon (Post 139257)
I'm pretty sure I've seen ladder wins with character levels lower than 40. At level 40 with max CON you get 40*12.5=500 HP from CON, which means you need 2.5 HP per level from your hit dice to be out of instadeath range from Morgoth. The worst hit die in the game is a halfling mage with a d7, which has an average roll of 4. I'm not saying it'd be a fun fight, but it should be doable.

As in PowerWyrm's epic win of the Hobbit comp with The One Ring, Sting, and a Mithril ChainMail to start, with the win condition being the lowest experience. ;) However, I think ladder wins are less comparable across versions, especially as the newest rendition of the end-game is appreciably more difficult to win - in a good way.

Ingwe Ingweron July 18, 2019 16:45

Quote:

Originally Posted by Nick (Post 139250)
[*]I plan to introduce some more variety of food, so the player can have more control over their hunger level...

...in the same way as I'm not going to introduce this
Code:

#####
#123#
#4>5#
#678#
#####

as a town layout :)

Yes, I've finally found those hard biscuits to be useful. :)

Admittedly, I do tend to restart to get a favorable town layout (i.e., home relatively close to the stairs) except in comps, if I were really worried about keystrokes, I'd just play ironman! :D

gtrudeau88 July 20, 2019 15:12

Bug in the code -all uniques resurrected
 
Hi all,
Just playing the latest build, I had killed a whole bunch of uniques and exited the game for a while. Restarted the game, opened my character, and found myaself fighting someone I already killed (one of the stone trolls), Did ` so I could see a list of all the uniques my character knew of and all uniques are alive.

gtrudeau88 July 20, 2019 15:20

Interestingly my player history shows all the unique kills.

Quote:

Originally Posted by gtrudeau88 (Post 139282)
Hi all,
Just playing the latest build, I had killed a whole bunch of uniques and exited the game for a while. Restarted the game, opened my character, and found myaself fighting someone I already killed (one of the stone trolls), Did ` so I could see a list of all the uniques my character knew of and all uniques are alive.


gtrudeau88 July 20, 2019 15:38

Quote:

Originally Posted by gtrudeau88 (Post 139282)
Hi all,
Just playing the latest build, I had killed a whole bunch of uniques and exited the game for a while. Restarted the game, opened my character, and found myaself fighting someone I already killed (one of the stone trolls), Did ` so I could see a list of all the uniques my character knew of and all uniques are alive.

I can duplicate the problem at will. I created a new character, killed Maggot's 2 dogs on level 2. Exited and restarted the game. The list of uniques (via `) shows the dogs as alive. Player history shows both dogs dead.

Nick July 21, 2019 00:29

Quote:

Originally Posted by gtrudeau88 (Post 139282)
Hi all,
Just playing the latest build, I had killed a whole bunch of uniques and exited the game for a while. Restarted the game, opened my character, and found myaself fighting someone I already killed (one of the stone trolls), Did ` so I could see a list of all the uniques my character knew of and all uniques are alive.

The last build (4b2e883bf) but one had this problem, but a fixed one (be48a3a47) was put up - I'm guessing you didn't get the fix. Let me know if I'm wrong; the new one is leaving uniques dead for me.

gtrudeau88 July 21, 2019 11:58

You're right. I downloaded it on the 14th but somehow didn't get the latest and greatest

Nick July 21, 2019 13:05

New builds up on the nightlies page and angband.live with the following changes:
  • Fix to game-breaking bug when standarts were chosen following a randart game
  • Satisfy Hunger renamed to Remove Hunger, now brings player up to 50% fed but never reduces food level
  • Several new and interesting foods introduced
  • New option on death - "New Game" - which restarts the game without closing
This last one is something which has been talked about forever and put off because of all the potential difficulties - all of which were cut through when sanedragon submitted a patch which just did it. There were still a few issues to sort out with exactly what was stopped and started again, but now it is I believe functional, although I have only tested it in Linux. I believe it still leaks a little memory, too, but only a little.

Please let me know how all these things go.

Ingwe Ingweron July 21, 2019 13:06

Just got an odd error on Angband.live while trying to load my current game for Angband nightly build:

At the top of the splash screen:

"Error reading known item
Savefile corrupted -- Couldn't load block stores"

and at the bottom of the splash screen:

A list of 4 lines of items dropped (stuff @ dropped in his home last time I played), followed by this line:

"No object: 25:255 (scroll)"

Nick July 21, 2019 13:12

Quote:

Originally Posted by Ingwe Ingweron (Post 139293)
Just got an odd error on Angband.live while trying to load my current game for Angband nightly build:

At the top of the splash screen:

"Error reading known item
Savefile corrupted -- Couldn't load block stores"

and at the bottom of the splash screen:

A list of 4 lines of items dropped (stuff @ dropped in his home last time I played), followed by this line:

"No object: 25:255 (scroll)"

Oops, sorry. I renamed "Satisfy Hunger" to "Remove Hunger" and this will break a savefile where Satisfy Hunger scrolls appear (and it looks like the Alchemist has some in your game).

Tibarius July 21, 2019 16:51

Angband 4.1.3
 
Birth options:
Lose Artifacts when leaving level = yes
Show level feelings = yes

Program behavior:
Seeing in the character history that i missed out more than a dozens of artifacts just being CL20, DL around 20.
Watched the shown level feelings and noticed that i miss artifacts because they are not shown right away.

I consider that a bug.

I define the expected program behavior as:
If birth option lose artifacts = yes, then the level feeling has to be shown at once entering the level, IF there is an artifact generated on level creation

Thraalbee July 21, 2019 19:14

I wouldn't mind a change, but then also I don't have a problem with the normal delay before displaying the "$" indication of one or more artifacts.

Nick July 21, 2019 22:40

Quote:

Originally Posted by Tibarius (Post 139297)
I define the expected program behavior as:
If birth option lose artifacts = yes, then the level feeling has to be shown at once entering the level, IF there is an artifact generated on level creation

Since delayed level feelings were introduced mainly for people playing with lose_artifacts=no, I'm inclined to agree. What do others think?

mrfy July 21, 2019 23:53

Quote:

Originally Posted by Nick (Post 139300)
Since delayed level feelings were introduced mainly for people playing with lose_artifacts=no, I'm inclined to agree. What do others think?

Seems reasonable. Though you can't guarantee the level feelings will always include artifacts on a level right? I just found a Phial on a 3-2 level in a locked chest. But I guess that wouldn't affect the level feeling if the Phial is only generated when you open the chest?

Derakon July 22, 2019 00:01

Quote:

Originally Posted by mrfy (Post 139301)
Seems reasonable. Though you can't guarantee the level feelings will always include artifacts on a level right? I just found a Phial on a 3-2 level in a locked chest. But I guess that wouldn't affect the level feeling if the Phial is only generated when you open the chest?

I think that special feelings are only for items generated on the ground. If they included monster inventories then you'd always be at risk for losing artifacts if a monster got generated with an artifact in-inventory the round you left the level. As for chests, I guess that's an implementation detail -- as you say, I don't think chests generate their contents before they're opened. Plus there's weirdness with chests being able to be destroyed without dropping their contents.

Voovus July 22, 2019 11:07

Quote:

Originally Posted by Tibarius (Post 139297)
If birth option lose artifacts = yes, then the level feeling has to be shown at once entering the level, IF there is an artifact generated on level creation

Isn't this going to encourage stair scumming? Might be ok with forced descent or with no connected stairs.

Nick July 22, 2019 12:35

Quote:

Originally Posted by Voovus (Post 139310)
Isn't this going to encourage stair scumming? Might be ok with forced descent or with no connected stairs.

OK, I think you're right, and I think the current situation is correct.

Originally, spending too little time on one level resulted in the message "Looks like any other level" when you arrived on the next one. This was seen to be a problem because it was hard to tell how much time you were meant to have spent. The solution, then, was to delay announcement of level feelings; this way, you were told when you'd spent "enough" time on the level, because you got a feeling. And all this deliberation was completely independent of playing with artifact preservation on or off.

Thraalbee July 22, 2019 19:56

Ironman hobbit ranger feedback (short)
 
My ironman ranger testing is progressing nicely now. Will write a full summary once complete. For now I can say this is the most enjoyable version in a long time for a kobold/gnome/hobbit (i.e. non-high elf) ranger with ironman settings. The initial game quickly becomes difficult until you find a decent shooter. Then it gets difficult again when you start running out of ammo. It gets easier once you get the create ammo spell, but the the prereqs for this spell are nicely tuned - many attempts failed just short of the right player level or having >= 20 mana points or just finding the book before being totally out of ammo and soon dead. [twice dead wielding a powerful x3-5 (+x,+20)ish bow after running out of ammo with pitiful melee as last resort that just didn't cut it. This is good, otherwise an early find of such a bow would be too big]

Also I really like having staves as material for ammo. It's brilliant because they are plentiful enough but also heavy, and they stack. So my ironman ranger can finally go 100% archery with just one shooter which I find very satisfying. The cost of collecting staves is burden and inventory slots. It has quite some impact but that feels right since I no longer need to bring swap-shooters and multiple stacks of ammo. Also I can clear nearly any vault or huge monster pit with just arrows after level 30(ish), no need to switch to melee.

Also, the very important (for this build) ?phase door is now very easy to stock up on. Blue p's and even blue p pits are common, but more interesting than large packs of hounds so no complaints there. Teleport scrolls are more scarce but after thinking about it, I feel their commonness is also well tuned.

Thraalbee July 22, 2019 20:07

What is the difference between pFear and Fear in the character sheet?
[edit] Nm, I guess one is constant fear from e.g. =escaping]

Ingwe Ingweron July 22, 2019 22:26

Something has gone odd with the rune.id system. Even with the "know runes" birth option on, Boots of Wormtongue have a {??} in its title indicating unknown runes.

Ingwe Ingweron July 22, 2019 22:31

Quote:

Originally Posted by Thraalbee (Post 139318)
What is the difference between pFear and Fear in the character sheet?
[edit] Nm, I guess one is constant fear from e.g. =escaping]

Exactly right. Basically, think of the Fear indicator as "Panic". Which pFear cannot protect against. E.g., mushrooms of Terror, Rings of Escaping, etc.

Nick July 22, 2019 22:35

Quote:

Originally Posted by Ingwe Ingweron (Post 139321)
Something has gone odd with the rune.id system. Even with the "know runes" birth option on, Boots of Wormtongue have a {??} in its title indicating unknown runes.

Hm. Will check.

EDIT: Actually, savefile would be handy if you can.

Ingwe Ingweron July 22, 2019 23:09

Quote:

Originally Posted by Nick (Post 139323)
Hm. Will check.

EDIT: Actually, savefile would be handy if you can.

Since it's on Angband.live, I guess you have access or Gwarl can get it for you. I've stored the oddity in the Home.

Sphara July 23, 2019 09:27

1 Attachment(s)
Quote:

Originally Posted by Ingwe Ingweron (Post 139321)
Something has gone odd with the rune.id system. Even with the "know runes" birth option on, Boots of Wormtongue have a {??} in its title indicating unknown runes.

Same with rune knowledge birth option off. Found a very early jackpot Amulet of Sustenance and it was already pre-identified but had {??}. As I started reading ID's on it, sustaining runes started to reveal. Haven't used ID on HoldLife yet and there in the pic, it appears ´half-identified'.

fph July 23, 2019 12:42

Quote:

Originally Posted by Sphara (Post 139325)
Same with rune knowledge birth option off. Found a very early jackpot Amulet of Sustenance and it was already pre-identified but had {??}. As I started reading ID's on it, sustaining runes started to reveal. Haven't used ID on HoldLife yet and there in the pic, it appears ´half-identified'.

Could it be cursed?

Sphara July 23, 2019 13:18

Quote:

Originally Posted by fph (Post 139327)
Could it be cursed?

Character was alive for over 10 000 turns (now dead) after wearing it and never noticed any effect, so VERY LIKELY no.

I had the same ghost identification with a Ring of the Dog. Fear resistance showed gray + in the ring slot but the sustenance amulet's pFear status was showing a question mark.

Voovus July 23, 2019 19:46

Quote:

Originally Posted by Ingwe Ingweron (Post 139321)
Something has gone odd with the rune.id system. Even with the "know runes" birth option on, Boots of Wormtongue have a {??} in its title indicating unknown runes.

Whoa, I like the new "hidden" effect of these boots (re: effect on traps). :eek:

Is this deliberate? It isn't declared when playing with known runes.

Nick July 23, 2019 22:19

Quote:

Originally Posted by Voovus (Post 139334)
Whoa, I like the new "hidden" effect of these boots (re: effect on traps). :eek:

Is this deliberate? It isn't declared when playing with known runes.

It is deliberate, and that pretty much confirms that it's causing the problem.

Quote:

Originally Posted by Sphara (Post 139325)
Same with rune knowledge birth option off. Found a very early jackpot Amulet of Sustenance and it was already pre-identified but had {??}. As I started reading ID's on it, sustaining runes started to reveal. Haven't used ID on HoldLife yet and there in the pic, it appears ´half-identified'.

Thanks, will chase his up too.

Voovus July 24, 2019 20:47

1 Attachment(s)
Quote:

Originally Posted by Nick (Post 139336)
It is deliberate, and that pretty much confirms that it's causing the problem.

Save file with boots attached, if it helps.

On a different note, theft works much better now - thank you, Nick! Mushrooms of Shadow seem a bit too rare (only found 1 in an entire run, and none seem to appear in mushroom rooms).

Nick July 24, 2019 21:55

Quote:

Originally Posted by Voovus (Post 139352)
Save file with boots attached, if it helps.

On a different note, theft works much better now - thank you, Nick! Mushrooms of Shadow seem a bit too rare (only found 1 in an entire run, and none seem to appear in mushroom rooms).

Thanks, but I've found and fixed the problem. I'll tweak the mushrooms a bit.

Ingwe Ingweron July 24, 2019 21:58

Thought I was imagining it at first, but it's repeated enough times that it's for sure. Getting a lot of "run past" problems, where @ runs over $ but they aren't picked up. Also happens occasionally with objects such as ammo, etc.

Nick July 25, 2019 06:45

Quote:

Originally Posted by Ingwe Ingweron (Post 139354)
Thought I was imagining it at first, but it's repeated enough times that it's for sure. Getting a lot of "run past" problems, where @ runs over $ but they aren't picked up. Also happens occasionally with objects such as ammo, etc.

I haven't been able to repeat this. Are there specific circumstances where it happens? What are your pickup options set to?

Nick July 25, 2019 12:27

Quote:

Originally Posted by Sphara (Post 139325)
Same with rune knowledge birth option off. Found a very early jackpot Amulet of Sustenance and it was already pre-identified but had {??}. As I started reading ID's on it, sustaining runes started to reveal. Haven't used ID on HoldLife yet and there in the pic, it appears ´half-identified'.

Did you have "know flavors" birth option on?

Ingwe Ingweron July 25, 2019 13:55

Quote:

Originally Posted by Nick (Post 139356)
I haven't been able to repeat this. Are there specific circumstances where it happens? What are your pickup options set to?

I haven't discovered the specific repeatable conditions, but it happens while running (the normal mode of travel). Options set DO NOT automatically pick up objects, except for ammo, which I inscribe with "=g". Pick up options should be irrelevant for $. Next time you happen to be watching on angband.live, I'll point it out when it happens.

Thraalbee July 25, 2019 18:44

Angband 4.1.3-515-gbe48a3a47. http://angband.oook.cz/ladder-show.php?id=22674

Hobbit Ranger "Revansch" started her quest with Str 18, Dex 15 and Con 13. Int & wis 10. Starting gear:
*) 4 Rations of Food
*) 7 Potions of Cure Light Wounds
*) 8 Scrolls of Phase Door
*) 4 Wooden Torches (5000 turns)
*) a Sling (x2) (+0,+0)
*) 74 Arrows (1d4) (+0,+0)
*) 80 Iron Shots (1d4) (+0,+0)

First levels in the dungeon went smoothly, the sling was enough to kill what had to be killed but mostly I was helped by Stealth starting out already as "Excellent".

The first nice find (at 1250') was a holy avenger throwing axe, courtesy of Shagrat, which provided 4 points of Wisdom and See invisible. More than decent melee too but I had decided to only use shooters, so that didn't really help.

The second thing advancing my situation was two =Escaping. I always wonder why only the first ring gives a -15 (iirc) penalty to to-hit for shooters. Why not another -15 for the second? Anyway, with two of those and some ammo, you can take care of most stuff. Notably Mim who dropped a nice artifact Longbow x5 (+10,+21) with resist confusion. That's an end-game weapon, so already at level 29, and 1550', all I needed to win was to find the second book or find truckloads of arrows. And gain HP of course. As you know, arrows aren't that frequent but I found the book before being overwhelmed and from then it was a totally different game.

My stealth improved over time and once at "Legendary" level I even managed to sneak by nasty 's' drujs with confidence. Not a common happening. This was great when clearing out vaults.

The end-game kit was unusual in that all resistances and protections were covered plus fire immunity. Not a single hole although I didn't have regen, so there was a tiny room for improvement. Native Speed 24 not counting the 4 points lost to burden.

Sauron went the usual way but the Morgoth fight was a bit odd. I lobbed seeker arrows of wounding but didn't take much damage. Only a single mana storm which coincided with a darkness attack from a summon (took me down to 150hp) so the many unique's summoned were a bigger problem. Having a truckload of ammo was nice. First time as ranger not having to loop back and collect arrows mid-fight.

Reflections

(1) The create ammo spell does not make a huge difference if you use a powerful staff or something like _light or _see invis. I was worried that it would be too good at higher levels but it wasn't. Not a single holy might arrow in the entire game and creating frost and fire brand as well as slay evil were sufficiently rare to be balanced.

(2) A ranger, now with unlimited ammo even for ironman, no longer need melee. If the old "we've got to nerf rangers" thread wakes up again, my first suggestion would be to nerf ranger melee , like max 2 or 3 blows if you carry a longbow or crossbow.

(3) Picking up arrows (with =option "show damage" on) says "You have 22 arrows (+1,+1) (0)" etc. The final (0) does not make sense. Sometimes it gives a larger number. It could be that it says how many it picked up but gets the number 1 too short. Not sure.

(4) Randarts were balanced this game. With the exception of the early drop of the x5 artifact bow, I am quite happy with the progression of drops from somewhat useful to great to really great. No single item were awesome enough to be a gamechanger. The bow itself was not overpowered as such, it just came very early. The first and only Lotlorien bow I found was better for damage output.

(5) Rods/wands of Teleport Other makes the game more fun. However, I suggest waking monsters up when they are teleported. I once managed to teleport six unique's into the same tiny room, all still asleep http://angband.oook.cz/screen-show.php?id=4637

(6) Using two =Escaping with no penalty for the second ring (as far as I can tell) is just too good for archers. I'd either reduce the speed bonus for =Escaping to +2 or double the to-hit penalty when using two.

Nick July 25, 2019 22:15

Thanks for the report.

Quote:

Originally Posted by Thraalbee (Post 139383)
(3) Picking up arrows (with =option "show damage" on) says "You have 22 arrows (+1,+1) (0)" etc. The final (0) does not make sense. Sometimes it gives a larger number. It could be that it says how many it picked up but gets the number 1 too short. Not sure.

That's the label for the quiver slot the arrows are going into.

Quote:

Originally Posted by Thraalbee (Post 139383)
(5) Rods/wands of Teleport Other makes the game more fun. However, I suggest waking monsters up when they are teleported. I once managed to teleport six unique's into the same tiny room, all still asleep http://angband.oook.cz/screen-show.php?id=4637

Yes, I need to decide what wakes monsters and what doesn't (there probably should be some randomness to this), and teleporting should be high on the wake list.

Quote:

Originally Posted by Thraalbee (Post 139383)
(6) Using two =Escaping with no penalty for the second ring (as far as I can tell) is just too good for archers. I'd either reduce the speed bonus for =Escaping to +2 or double the to-hit penalty when using two.

OK, will look at that.

Derakon July 25, 2019 23:47

What if Escaping had no stat modifiers, and the "terrified" flag automatically conveyed +X speed? That would effectively mean that the two rings would not stack.

It's always bugged me that those rings are as powerful as they are. Early permanent speed is ridiculously hard to balance, and as it stands it seems like they're more or less a no-brainer for any character that relies primarily on ranged damage.

PowerWyrm July 26, 2019 16:29

Continuing to port the "struct loc" refactoring to PWMAngband, I just tested some changes and suddenly monsters were not removed from screen when they died. I tracked the problem and found out the following:

Code:

void delete_monster_idx(int m_idx)
{
...

/* Wipe the Monster */
memset(mon, 0, sizeof(struct monster));

/* Visual update */
square_light_spot(cave, mon->grid);
}

Yeah, sure this will work... ;)

Pete Mack July 26, 2019 16:34

Well, 0,0 will sure be blank.

Diego Gonzalez July 26, 2019 17:47

I see sometimes that monsters first drop their objetcs and then are wiped from screen. Perhaps this odd behavior is related to this code.

fph July 26, 2019 21:24

Quote:

Originally Posted by Thraalbee (Post 139383)
(2) A ranger, now with unlimited ammo even for ironman, no longer need melee. If the old "we've got to nerf rangers" thread wakes up again, my first suggestion would be to nerf ranger melee , like max 2 or 3 blows if you carry a longbow or crossbow.

To be fair, they did nerf rangers, but then we all complained. :)

emar July 26, 2019 22:13

When clicking with a mouse or using look->g, @ will only successfully travel to a square if there's an unimpeded direct path; if there are any obstacles in the way, @ travels as far as possible (as the crow flies), then halts as soon as it hits an obstacle.

Is this intentional?

Chud July 26, 2019 22:50

Minor bug, perhaps -- I drank an unknown potion, which turned out to be Surprise! "Your body starts to scramble..."

... only, nothing scrambled. As far as I can tell it didn't do anything, unless there's a hidden effect I haven't noticed.

This is in the latest nightly.

Chud July 26, 2019 23:55

Another minor bug -- someone dropped some blue dragon scale mail, which I had not identified yet. The description says "provides resistance to cold" along with "you do not know the full extent ..".

After I identified it, now it says resistance to lightning as expected, and it no longer says resistance to cold.

jml34 July 27, 2019 00:13

Sorry I didn't realize the development section was also about Vanilla. I'll post code there next time. (Are diffs against 4.1.3 ok?)

About autopickup limits: is it okay to have limits that only work in the range of one stack (i.e. 1..40), or should the code be able to deal with limits over several stacks (e.g. the player wants two stacks of !CCW so {!L80} should work) before the code can be considered user-ready?

Nick July 27, 2019 01:38

Wow, that "only 11 bugs left" thing really went to hell in a hurry. Thanks for all the reports, have confirmed at least two, will follow up.

Voovus July 27, 2019 13:21

Quote:

Originally Posted by Nick (Post 139409)
that "only 11 bugs left" thing

In that case, while we are at it... :rolleyes:
Sauron's shapes declare they give 0 exp. Also, unlike other uniques, Nan the Giant can carry scrolls and not just equipment (flag missing?).

luneya July 27, 2019 18:32

Quote:

Originally Posted by Nick (Post 139409)
Wow, that "only 11 bugs left" thing really went to hell in a hurry. Thanks for all the reports, have confirmed at least two, will follow up.

Hey, it's better to find bugs now than to have to rapidly release a 4.2.1. Of course, that will probably happen anyway, as there are always more bugs to find, but still, catching them in the dev builds is ideal.

Nick July 28, 2019 00:34

Quote:

Originally Posted by Voovus (Post 139410)
Sauron's shapes declare they give 0 exp.

Technically correct, since shapechanged monsters change back on death and give the original XP; probably shouldn't say that in the monster lore, though.

Quote:

Originally Posted by Voovus (Post 139410)
Also, unlike other uniques, Nan the Giant can carry scrolls and not just equipment (flag missing?).

Yes, thanks, and there's a couple of others in the same boat.

Nick July 28, 2019 01:33

Quote:

Originally Posted by emar (Post 139402)
When clicking with a mouse or using look->g, @ will only successfully travel to a square if there's an unimpeded direct path; if there are any obstacles in the way, @ travels as far as possible (as the crow flies), then halts as soon as it hits an obstacle.

Is this intentional?

No - I assume your pull request fixes this?

emar July 28, 2019 04:36

Quote:

Originally Posted by Nick (Post 139413)
No - I assume your pull request fixes this?

Yeah, it does--it also fixes the pathfinding halting when it encounters a visible trap square by treating it as invalid path square.

(Also, please let me know if I did anything wrong in the process; I'm new to contributing to projects.)

Nick July 28, 2019 06:00

Quote:

Originally Posted by emar (Post 139414)
Yeah, it does--it also fixes the pathfinding halting when it encounters a visible trap square by treating it as invalid path square.

(Also, please let me know if I did anything wrong in the process; I'm new to contributing to projects.)

All looks great. I'm going to do an updated build fairly soon, and I'll pull your stuff in then.

Nick July 28, 2019 13:14

New builds now up on the nightlies page and angband.live with the following changes:
  • Shockbolt tiles for the new foods (if someone wants to do something about the other tilesets, great)
  • Fixes to SDL2 submitted by fumsoft
  • Several fixes to pathfinding - thanks emar
  • Finished updating help (apart from thanks, which gets done right before release)
  • Adjust high elf XP factor to 145% (vs 100 for humans and 120 for everyone else)
  • Make the trap immunity rune register properly
  • Enlarge the character display for resists, abilities etc in both 'C' screen and character dumps
  • Correct some unique drops (thanks Voovus)
  • Don't display XP for killing monsters which only appear as a shapechange in monster lore (Voovus again)
  • Make !Surprise actually capable of scrambling stats (thanks Chud, and sorry if I spoiled anyone's surprise)
  • Fix dead monster display bug (thanks PowerWyrm)
  • Make =Escaping only +2 speed, ,Shadows more common
Interested as always in opinions, especially on the character display.

Vorczar July 29, 2019 03:31

I like the new character expanded screen.

I picked up a wicker shield on Angband.Live with "makes you slow to recover hit points".
I would expect a + in the ImpHP but nothing was there.

Nick July 29, 2019 06:10

Quote:

Originally Posted by Vorczar (Post 139417)
I like the new character expanded screen.

I picked up a wicker shield on Angband.Live with "makes you slow to recover hit points".
I would expect a + in the ImpHP but nothing was there.

It seems the shield has the "impair hitpoint recovery" curse, which gives an item the "impaired hitpoint recovery" property. Both curse and property are runes you can learn; it is the property that displays on the ImpHP line.

What *should* happen is that when you learn the curse you learn the property. Could you check the knowledge menu ('~') for runes and se whether you have both? The curse is under "Curses", the property under "Other".

Vorczar July 30, 2019 00:32

Quote:

Originally Posted by Nick (Post 139418)
It seems the shield has the "impair hitpoint recovery" curse, which gives an item the "impaired hitpoint recovery" property. Both curse and property are runes you can learn; it is the property that displays on the ImpHP line.

What *should* happen is that when you learn the curse you learn the property. Could you check the knowledge menu ('~') for runes and se whether you have both? The curse is under "Curses", the property under "Other".


Thanks!
I didn't know about the Runes knowledge menu. Cool.
They're both there.

PowerWyrm July 30, 2019 15:27

I thought I'd post this here. It's a little function that I added while porting the struct loc refactoring to PWMAngband to make some code clearer. Here it is:

Code:

bool loc_iterator(struct loc *iter, struct loc *grid1, struct loc *grid2, bool strict)
{
    iter->x++;
    if (iter->x == (strict? grid2->x: grid2->x + 1))
    {
        iter->x = grid1->x;
        iter->y++;
        if (iter->y == (strict? grid2->y: grid2->y + 1)) return false;
    }
    return true;
}

This allows to change the following code:

Code:

for (y = y1; y < y2; y++) {
for (x = x1; x < x2; x++) {
foo(y, x);
}
}

into:

Code:

loc_copy(&iter, &grid1);
do {
foo(&iter);
} while (loc_iterator(&iter, &grid1, &grid2, true)); (or "false" to do "<=" instead of "<")

I've removed most of the ugly x/y loops that way.

Nick July 30, 2019 22:41

Quote:

Originally Posted by PowerWyrm (Post 139434)
I've removed most of the ugly x/y loops that way.

What a great idea! Now I can go and implement that all over the place instead of fixing bugs :D

takkaria July 30, 2019 23:45

Quote:

Originally Posted by PowerWyrm (Post 139434)
I thought I'd post this here. It's a little function that I added while porting the struct loc refactoring to PWMAngband to make some code clearer. Here it is:
...
I've removed most of the ugly x/y loops that way.

Nice. Though I think it would be clearer if split into loc_iterate_inside and loc_iterate instead of passing a flag. (Also, you can just write iter = grid1 instead of loc_copy, surely?)

Kusunose July 31, 2019 09:23

It's nice but I think something like this is nicer because you can keep using for loop, though bit wordy.
Code:

struct loc_iterator {
        struct loc cur;
        struct loc begin;
        struct loc end;
};

struct loc_iterator loc_iterator(struct loc begin, struct loc end)
{
        struct loc_iterator iter;
        iter.cur = iter.begin = begin;
        iter.end = end;
        return iter;
}

bool loc_iterator_test(const struct loc_iterator* iter)
{
        return iter->cur.y != iter->end.y;
}

void loc_iterator_next(struct loc_iterator* iter)
{
        iter->cur.x++;
        if (iter->cur.x == iter->end.x) {
                iter->cur.x = iter->begin.x;
                iter->cur.y++;
        }
}

This code
Code:

        for (y = y1; y < y2; y++) {
                for (x = x1; x < x2; x++) {

can be translated as
Code:

        for (struct loc_iterator iter = loc_iterator(loc(x1, y1), loc(x2, y2));
                loc_iterator_test(&iter); loc_iterator_next(&iter)) {
                        /* use iter.cur */
                        int x = iter.cur.x;
                        int y = iter.cur.y;

and this
Code:

        for (y = y1 - 1; y < y2 + 1; y++) {
                for (x = x1 - 1; x < x2 + 1; x++) {

can be translated as
Code:

        for (struct loc_iterator iter = loc_iterator(loc(x1 - 1, y1 - 1), loc(x2 + 1, y2 + 1));
                loc_iterator_test(&iter); loc_iterator_next(&iter)) {

Values for initializers and conditions can be directly translated, provided conditions are exclusive (if inclusive, add +1 for x and y for loc end).

Pete Mack July 31, 2019 14:22

Too bad C doesnt have anonymous functions. Then you could package up the loop contents in a function, and execute the whole thing with a single subroutine call.


All times are GMT +1. The time now is 13:27.

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