Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old October 6, 2021, 18:48   #1
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,383
AnonymousHero is on a distinguished road
pval

This may be a stupid question, but what does the 'p' in pval actually stand for? Does it stand for anything?

(I have my own guess, but it's just a guess and I'd like to avoid biasing replies.)
AnonymousHero is offline   Reply With Quote
Old October 6, 2021, 20:02   #2
Julian
Apprentice
 
Join Date: Apr 2021
Posts: 89
Julian is on a distinguished road
Quote:
Originally Posted by AnonymousHero View Post
This may be a stupid question, but what does the 'p' in pval actually stand for? Does it stand for anything?

(I have my own guess, but it's just a guess and I'd like to avoid biasing replies.)
Probably either ‘power’ or ‘plus'
Julian is offline   Reply With Quote
Old October 7, 2021, 03:33   #3
Sideways
Knight
 
Join Date: Nov 2008
Posts: 843
Sideways is on a distinguished road
In Moria/UMoria and very early Angband, pval was called p1; and object description code included the additional parameters p2 through p6, although only p1 was an actual variable name. P2 through P4 were explicitly glossed as plusses (they were stand-ins for +to-hit, +to-dam and +to-ac), but it's still unclear to me whether P in these parameters actually stood for plus or for parameter. I believe Ben was responsible for changing the variable's name from p1 to pval.

I believe that at some point I did gloss pval as plus value; but whether I knew something about the name's origins then that I've forgotten since or if I just made an editorial decision based on pvals being used as plus values in the present day, I do not know. Modern Vanilla code calls pval an "item extra-parameter" in the comments, but that is also a latter-day development. The current Frog glossary simply describes the purpose of a pval without implying that the word stands for anything specific.
__________________
The Complainer worries about the lack of activity here these days.
Sideways is offline   Reply With Quote
Old October 7, 2021, 03:48   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 56
Posts: 9,168
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
I was hoping for "potato".
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old October 13, 2021, 11:54   #5
nomapryor
Rookie
 
Join Date: Oct 2021
Posts: 1
nomapryor is on a distinguished road
I had the same thought.
nomapryor is offline   Reply With Quote
Old October 14, 2021, 21:21   #6
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,383
AnonymousHero is on a distinguished road
Brb, gotta rename a few variables to potatoVal...
AnonymousHero is offline   Reply With Quote
Old October 15, 2021, 08:36   #7
fph
Knight
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 991
fph is on a distinguished road
Quote:
Originally Posted by Nick View Post
I was hoping for "potato".
Now it's official. Nick spoke, maintainer's authority.
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph 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
[3.5-dev] Pval strangeness: amulet of devotion PowerWyrm Vanilla 1 October 9, 2013 17:06
[3.3] Potential crash with multiple pval system PowerWyrm Vanilla 6 October 7, 2011 12:11
Pval oddness Faust Development 2 April 20, 2011 21:58


All times are GMT +1. The time now is 16:50.


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