Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old June 15, 2011, 11:29   #1
jens
Swordsman
 
Join Date: Apr 2011
Location: Göteborg, Sweden
Posts: 348
jens is on a distinguished road
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?
jens is offline   Reply With Quote
Old June 15, 2011, 11:39   #2
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,932
Donated: $40
takkaria is on a distinguished road
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.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old June 15, 2011, 21:23   #3
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
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.
Magnate is offline   Reply With Quote
Old June 15, 2011, 22:27   #4
jens
Swordsman
 
Join Date: Apr 2011
Location: Göteborg, Sweden
Posts: 348
jens is on a distinguished road
Quote:
Originally Posted by Magnate View Post
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 View Post
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.
jens is offline   Reply With Quote
Old June 16, 2011, 12:54   #5
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by jens View Post
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).
Magnate is offline   Reply With Quote
Old June 19, 2011, 12:30   #6
jens
Swordsman
 
Join Date: Apr 2011
Location: Göteborg, Sweden
Posts: 348
jens is on a distinguished road
Quote:
Originally Posted by Magnate View Post
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 :-)
jens is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug or not in handling object.txt info? ewert Development 14 July 9, 2010 18:38
Bug Report - Subwindow refresh after options load dhegler Vanilla 3 March 2, 2010 18:56
Vanilla Bug Report: Everburning Lantern The G Masta Vanilla 1 November 11, 2009 17:35
Bug: new-style monster list does not correctly report line-of-sight jv123 Vanilla 52 June 25, 2009 07:27
BUG: negative bonus items for sale in weapon shop Pete Mack Vanilla 14 April 13, 2009 07:37


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


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