Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 2, 2012, 10:31   #1
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,884
PowerWyrm is on a distinguished road
[3.4 dev] Two problems with jewelry descriptions

1) Ring of Light
An unidentified aware Ring of Light appears as "a Ring of Light <, +1>". Shouldn't it be "a Ring of Light <+1>" until identified?
See obj_desc_pval().

2) Randart jewelry
An unidentified aware "special" randart ring/amulet will give away its bonuses (pval, tohit, todam, toac), since showing bonuses on aware jewelry is based on fixed values of object kind... and templates for special artifacts don't have bonuses set.
See object_this_pval_is_visible(), object_attack_plusses_are_visible() and object_defence_plusses_are_visible().
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old February 4, 2012, 10:27   #2
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by PowerWyrm View Post
1) Ring of Light
An unidentified aware Ring of Light appears as "a Ring of Light <, +1>". Shouldn't it be "a Ring of Light <+1>" until identified?
See obj_desc_pval().

2) Randart jewelry
An unidentified aware "special" randart ring/amulet will give away its bonuses (pval, tohit, todam, toac), since showing bonuses on aware jewelry is based on fixed values of object kind... and templates for special artifacts don't have bonuses set.
See object_this_pval_is_visible(), object_attack_plusses_are_visible() and object_defence_plusses_are_visible().
Thanks - both these are known, and I'm pretty sure the first is fixed (perhaps only in v4, though I thought we were up to date with porting fixes back to V). Were you using the latest 3.4-dev?

The second is a longstanding problem caused by the different treatment of jewelry in the ID code. I've never fixed it because I don't believe that jewelry should be treated differently, but I've not yet got round to rewriting ID. Now that we've agreed that v4 no longer needs pseudo, it might happen.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old February 6, 2012, 09:59   #3
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,884
PowerWyrm is on a distinguished road
The code for obj_desc_pval() still has the bug in the latest source from the "master" branch. Isn't that the main reference branch?

Code:
	for (i = 0; i < o_ptr->num_pvals; i++) {
		if (spoil || object_this_pval_is_visible(o_ptr, i)) {
			if (i > 0)
				strnfcat(buf, max, &end, ", ");
			strnfcat(buf, max, &end, "%+d", o_ptr->pval[i]);
		}
	}
Need to make a check for first "visible" pval instead of first pval.

For the second point, I think it's a trivial-to-fix bug: just mask the bonuses for unIDed aware artifact rings/amulets. Not really a pseudo-ID problem, more a description problem (special artifacts have a "template" instead of a flavor).
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old February 6, 2012, 13:50   #4
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by PowerWyrm View Post
The code for obj_desc_pval() still has the bug in the latest source from the "master" branch. Isn't that the main reference branch?

Code:
	for (i = 0; i < o_ptr->num_pvals; i++) {
		if (spoil || object_this_pval_is_visible(o_ptr, i)) {
			if (i > 0)
				strnfcat(buf, max, &end, ", ");
			strnfcat(buf, max, &end, "%+d", o_ptr->pval[i]);
		}
	}
Need to make a check for first "visible" pval instead of first pval.
But isn't that what this code snippet already does? The test is if (spoil || object_this_pval_is_visible(...)), which seems right?
Quote:
For the second point, I think it's a trivial-to-fix bug: just mask the bonuses for unIDed aware artifact rings/amulets. Not really a pseudo-ID problem, more a description problem (special artifacts have a "template" instead of a flavor).
Yes, that's probably sufficiently easy to be worth doing. I'll open a ticket for it when the trac migration is finished.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old February 7, 2012, 13:33   #5
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,884
PowerWyrm is on a distinguished road
Quote:
Originally Posted by Magnate View Post
But isn't that what this code snippet already does? The test is if (spoil || object_this_pval_is_visible(...)), which seems right?
Take the Ring of Light example: pval[0] is not visible (variable bonus to searching), pval[1] is visible (fixed bonus to light radius). The current code will skip the pval at i = 0 and add the pval at i = 1 along with a comma. So you get "a Ring of Light <, +1>".

Something like this will always work:

Code:
    bool first = TRUE;
    for (i = 0; i < o_ptr->num_pvals; i++)
    {
        if (spoil || object_this_pval_is_visible(o_ptr, i))
        {
            if (!first) strnfcat(buf, max, &end, ", ");
            strnfcat(buf, max, &end, "%+d", o_ptr->pval[i]);
            first = FALSE;
        }
    }
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old February 7, 2012, 16:01   #6
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Thank you, that's excellent. Ironically this is no longer needed in v4 (we've changed to displaying only the highest pval on the object's main line), but will be helpful for 3.4.

Opened as #1617
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old February 13, 2012, 12:32   #7
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,884
PowerWyrm is on a distinguished road
Quote:
Originally Posted by Magnate View Post
Thank you, that's excellent. Ironically this is no longer needed in v4 (we've changed to displaying only the highest pval on the object's main line), but will be helpful for 3.4.

Opened as #1617
#1617 was erased recently and been replaced by some spam...
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm 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
Info in Monster Descriptions Tregonsee Vanilla 19 August 25, 2013 22:34
[3.4-dev] Rarity problems PowerWyrm Development 2 January 7, 2012 16:18
Un/Ey/Fay room descriptions Mikko Lehtinen Variants 20 October 18, 2011 21:26
Prayer Descriptions dhegler Vanilla 4 January 7, 2010 19:04
Unusual Jewelry behavior - r1321 Jungle_Boy Vanilla 0 April 9, 2009 21:53


All times are GMT +1. The time now is 21:12.


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