Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Bug report - negative min values in ego_item.txt (http://angband.oook.cz/forum/showthread.php?t=4547)

jens June 15, 2011 11:29

Bug report - negative min values in ego_item.txt
 
Well, I've mentioned this before, and Magnate says it's fixed. But I thought it was time to make clear what I'm talking about :-)

This is not a new bug, it has as far as I know always been there, and it was definitely in 3.2. But with the latest changes it's become pressing to fix.

So, whats up?
You can not produce negative values for to-hit, to-dam, and to-ac on ego items (Magnate has fixed so you can produce negative values for pvals). You can enter negative values in the ego_item.txt, but these will be overridden by the unset value of the M: line, i.e. they will default to a min of 0 (This was not always so, this only used to happen if you added the M: line on something early on in the ego_items.txt, but I never tested this fully. Resent changes, probably the multiple pvals, has made so this happens all the time).

So, set a negative min on the M: line you say? Well, that does not work, and has never worked. If you set a negative value you get a value wrapped on 256, e.g. -1 sets the min value to 255. This is also true for the min on pvals.

To make it clearer, here are a set of examples from game (using the latest nightly, but any version would give similar results) after tampering with the first four armours with resistances:

Code:

1) An entry:
C:-10:-10:-10
L:-3:0:CHR
On armor of Resist Acid, produced this sample:
Augmented Chain Mail of Resist Acid [42,+0] <-3>
(but should have been: Augmented Chain Mail of Resist Acid (-12,-10) [42,-x] <-3>)

Negative pval, with min set to ignore, worked correctly.


2) an entry:
C:-10:-10:-10
M:10:10:10
L:-3:10:CHR
On armor of Resist Lightning, correctly produced this sample:
Metal Brigandine Armour of Resist Lightning (+10,+10) [48,+10] <+10>

3) an entry:
C:-10:-10:-10
M:-3:-3:-3
L:-10:-3:CHR
On armor of Resist Fire, produced this sample:
Soft Leather Armour of Resist Fire (+253,+253) [8,+253] <+253>
(which btw sold and bought at a price of 1 gp)

4) and for completeness an entry:
C:-3:-3:-3
M:-10:-10:-10
L:-3:-10:CHR
On armor of Resist Acid, produced this sample:
Hard Leather Armour of Resist Acid (+246,+246) [8,+246] <+246>

So, if this bug has always been there, why do I say it's more pressing to fix now?

1) Now it manifests all the time. This can be seen in that no ego armours have a to-hit penalty (not since multiple pvals were added). This can be seen as a feature, and the malus does not affect gameplay very much, so it can be ignored. But it makes it harder to design flavorfull ego items, e.g. armour that by design remove the malus would not be any different than those that just don't have it because of a coding accident.

2) There is a move to produce mixed blessing items. It's a big hindrance to have a big part of that arsenal unavailable.

3) There is already in the latest ego_item.txt a new ego that does not work as intended (Lumbering). This is a rework of the old 'of Backbiting', it's now meant to be a mixed blessing ammo with: 'C:-d25:d25:0'. In the game this shows up as a very good ammo, e.g. 'Arrows (lumbering) (1d4) (+0,+23)'. (Another issue with this ego is that it still has the same rarity as 'of Backbiting' had, so about 36% the ego ammo is (Lumbering)).

###

Another but connected issue... When you get around to fixing this, please also change the following:

In the L: line you use 0 in the min position to mean no min has been set. This is very unfortunate, because 0 is the most useful, or possibly the second most useful min to use when designing objects.

Please use another arbitrary choice. e.g. -255, if there is ever a reason to really set that you don't want to specify a min. My guess is that this issue arises because you switch the direction of min at 0, and I can see the usefulness of that, but I would prefer a functionality where you can have items progressing in a linear fashion around the 0 mark, so you could design items which vary from e.g. -1 to +1. Your design only allows values to be on either side of the 0 mark.

###

And a second follow up issue:

Today curses negate all values on items. This will become confusing when cursing mixed blessing items. I can't see that this functionality will be applicable to the new curses that we'll have eventually. This is of course not pressing, but if it happens to be in the same code... I could fix the .txt entries affected.

###

Oh, and a third ;-)

Could you add min functionality to the L: line in object.txt?

takkaria June 15, 2011 11:39

Quote:

3) There is already in the latest ego_item.txt a new ego that does not work as intended (Lumbering). This is a rework of the old 'of Backbiting', it's now meant to be a mixed blessing ammo with: 'C:-d25:d25:0'. In the game this shows up as a very good ammo, e.g. 'Arrows (lumbering) (1d4) (+0,+23)'. (Another issue with this ego is that it still has the same rarity as 'of Backbiting' had, so about 36% the ego ammo is (Lumbering)).
OK, I didn't mean to commit that, it's now reverted in staging. Thanks for pointing it out.

Quote:

And a second follow up issue:

Today curses negate all values on items. This will become confusing when cursing mixed blessing items. I can't see that this functionality will be applicable to the new curses that we'll have eventually. This is of course not pressing, but if it happens to be in the same code... I could fix the .txt entries affected.
Cursed ego items are actually never generated anymore, and there's no code in the game to negate based on curses anymore.

Magnate June 15, 2011 21:23

I've linked to this thread from ticket #1394, which I re-opened following our previous exchange. The stuff you ask for is therefore still alive and kicking on the tracker, but not for 3.3

The bug you mention about ego armours not having to-hit maluses is unrelated to pvals, since ego_min_pvals is a separate function called from ego_apply_minima. It is a legitimate bug though, so I have opened #1471 for this.

jens June 15, 2011 22:27

Quote:

Originally Posted by Magnate (Post 54813)
I've linked to this thread from ticket #1394, which I re-opened following our previous exchange. The stuff you ask for is therefore still alive and kicking on the tracker, but not for 3.3

Great :-)

Quote:

Originally Posted by Magnate (Post 54813)
The bug you mention about ego armours not having to-hit maluses is unrelated to pvals, since ego_min_pvals is a separate function called from ego_apply_minima. It is a legitimate bug though, so I have opened #1471 for this.

It's unrelated now, but I'm pretty sure they were related in 3.2. But now that I think about it I only tried setting to-hit to negative min value in 3.2...

So, almost all my issues in the OP are being handled :-) How about making the L: line in object.txt work the same as the one in ego_item.txt? i.e. allow a min value there as well.

Magnate June 16, 2011 12:54

Quote:

Originally Posted by jens (Post 54827)
So, almost all my issues in the OP are being handled :-) How about making the L: line in object.txt work the same as the one in ego_item.txt? i.e. allow a min value there as well.

Go ahead and open a new change ticket for that. It's not difficult, so it might happen relatively soon (i.e. less than ten years).

jens June 19, 2011 12:30

Quote:

Originally Posted by Magnate (Post 54893)
Go ahead and open a new change ticket for that. It's not difficult, so it might happen relatively soon (i.e. less than ten years).

There, I've opened my first ticket :-)


All times are GMT +1. The time now is 00:09.

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