Squelching for gold

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9634

    #31
    Well, thanks everyone for an excellent discussion. After all, I have come to the opinion that Eddie's original idea of compensating for no selling by just increasing gold drops is the best solution, probably with Pete's idea of increasing variance, and as a birth option.

    So I'm sorry if anyone feels I've wasted their time; I do think, though, that major gameplay changes do warrant thorough examination.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • Pete Mack
      Prophet
      • Apr 2007
      • 6883

      #32
      For those who don't subscribe to angband-dev mailserve,

      FWD:

      I've been using Eddie's no-selling gold patch on and off for a while now, but I don't like the lack of variance: I miss the bump that comes from finding some valuable tchotchke on dl 1.

      Yesterday, Eddie proposed the following change, using the canonical function that doesn't affect the mean, but has infinite variance:


      Code:
      #define MAX_PVAL MAX_SHORT
      #define SQRT_TWO 1.4142135623730950
      
      while (one_in_(2) && money <= MAX_PVAL/SQRT_TWO)
      {
      	money *= SQRT_TWO;
      }
      money *= (SQRT_TWO - 1) / (SQRT_TWO);
      I really liked this idea, and gave it a try, with an additional tweak to hide the actual value of money drops.
      A few hours' play testing says: two thumbs up.


      Code:
      Index: obj-make.c
      ===================================================================
      --- obj-make.c	(revision 1624)
      +++ obj-make.c	(working copy)
      @@ -1546,6 +1546,12 @@
       	s32b spread = lev + 10;
       	s32b value = rand_spread(avg, spread);
       
      +	while (one_in_(2) && value < (MAX_SHORT*1414)/1000)
      +	{
      +		value = (value*1414)/1000;
      +	}
      +	value = (value*414)/1414;
      +
       	/* Pick a treasure variety scaled by level, or force a type */
       	if (coin_type != SV_GOLD_ANY)
       		sval = coin_type;
      Index: obj-desc.c
      ===================================================================
      --- obj-desc.c	(revision 1624)
      +++ obj-desc.c	(working copy)
      @@ -771,10 +771,15 @@
       
       
       	/*** Some things get really simple descriptions ***/
      -
       	if (o_ptr->tval == TV_GOLD)
      -		return strnfmt(buf, max, "%d gold pieces worth of %s",
      -				o_ptr->pval, k_name + k_ptr->name);
      +	{
      +		return strnfmt(buf, max, "A %s of %s",
      +				o_ptr->pval > 22000 ? "mountain"
      +				: o_ptr->pval > 3*(2*p_ptr->depth + 20) ? "heap"
      +				: o_ptr->pval > (2*p_ptr->depth + 20) ? "pile"
      +				: "handful",
      +				k_name + k_ptr->name);
      +	}
       	else if (!o_ptr->tval)
       		return strnfmt(buf, max, "(nothing)");
      EDIT: code cleaned up for clarity; a few messages fixed.
      Last edited by Pete Mack; August 14, 2009, 16:24.

      Comment

      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎