Thread: pval
View Single Post
Old October 7, 2021, 03:33   #3
Sideways
Knight
 
Join Date: Nov 2008
Posts: 842
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