buyout button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerDiver
    Prophet
    • Mar 2008
    • 2820

    buyout button

    I was planning on waiting to get some birth options done, but I've been lazy. I got a request, so rather than making anyone wait any longer, here's a perl script that should modify the code to add a buyout button. Run it in .../src

    I use 4 char suffixes, and don't know about newlines, so maybe things will need to be changed to get it to work in windows. Surely anyone with a clue should be able to fix it.

    I removed some broken stuff about options, hopefully it should work as is. I had to change the suffix to .txt to get oook to upload it.

    Hopefully this should continue to work as the codebase evolves.
    Attached Files
  • Derakon
    Prophet
    • Dec 2009
    • 9022

    #2
    ...I think that's the first time I've seen a patch distributed as a Perl script. Okay.

    Comment

    • PowerDiver
      Prophet
      • Mar 2008
      • 2820

      #3
      Originally posted by Derakon
      ...I think that's the first time I've seen a patch distributed as a Perl script. Okay.
      How would you distribute a patch that needs to work on everything from 3.1.1.1626 to the latest nightly? They have significantly different code.

      Comment

      • Marble Dice
        Swordsman
        • Jun 2008
        • 412

        #4
        Or if you prefer, here's a patch file in Unix file format. Change directory to "src" and apply it with this command:

        Code:
        patch < /path/to/pd_buyout.txt
        Attached Files

        Comment

        • PowerDiver
          Prophet
          • Mar 2008
          • 2820

          #5
          Way to make me look silly!

          The variable stuff was in the options code. Things like some revisions [properly IMO] comma-terminating enums and some not. I suppose once I cut down to just the buyout button I should have realized a simple diff would work.

          Comment

          • Marble Dice
            Swordsman
            • Jun 2008
            • 412

            #6
            Originally posted by PowerDiver
            Way to make me look silly!
            Don't worry, I felt pretty silly too since I don't actually have perl in my (Windows) development environment. I had to upload the script and source file to one of my unix boxes, execute it, and then download the result!

            Comment

            • tigen
              Apprentice
              • May 2007
              • 53

              #7
              Is it really desirable for a buyout to induce a restock? It doesn't seem intuitive to me, and I don't see what it adds to the game.

              Why shouldn't the store just stay empty until the next normal restock?

              Comment

              • Derakon
                Prophet
                • Dec 2009
                • 9022

                #8
                There needs to be some way to force a restock, or to obviate the need for restocks. Townscumming is a tedius waste of time, and the game should not reward tedium. My personally-preferred approach would be to have the stores stock infinite quantities of basic goods (rations, oil, WoR scrolls, C*W potions, unenchanted ammo, etc.), but that's admittedly significantly trickier than the buyout button.

                Comment

                • Marble Dice
                  Swordsman
                  • Jun 2008
                  • 412

                  #9
                  The game's been that way for a long while, this patch just makes it easy to do (buy out every item in a store manually and they'll restock for you).

                  I think variable stock (excepting the black market) is annoying. With scumming you can trivially force the stores to cycle stock, so the player just has to waste lots of keystrokes, game time, and RL time because they got unlucky with random stock.

                  Derakon is on the money, but it's not a technical difficulty so much as a balance one. Shops are due for an overhaul sometime in the near future, so these problems might be addressed then. This button isn't going into V, which is why PowerDiver posted it here as a patch. In the mean time, if you need a spellbook, a stat restore potion, or a scroll of remove curse, and it doesn't happen to be there, your choices are scumming, buyout the store, or live with what might be a critical deficiency in your kit.

                  Comment

                  • tigen
                    Apprentice
                    • May 2007
                    • 53

                    #10
                    Originally posted by Derakon
                    There needs to be some way to force a restock, or to obviate the need for restocks. Townscumming is a tedius waste of time, and the game should not reward tedium. My personally-preferred approach would be to have the stores stock infinite quantities of basic goods (rations, oil, WoR scrolls, C*W potions, unenchanted ammo, etc.), but that's admittedly significantly trickier than the buyout button.
                    Sounds good to me!

                    You could have the general store only sell basic stuff, and never run out of stock. It could sell only food, oil, torches, and standard ammo. I don't think the other items are strictly necessary, and you have the ability to stock up on them/conserve them.

                    Even with buyouts, the game still "rewards" townscumming in that you can restock without spending the gold on buyouts. Right? You could have an "automatic townscum" button too, which makes about as much sense as a buyout button.

                    Comment

                    • Derakon
                      Prophet
                      • Dec 2009
                      • 9022

                      #11
                      Well, townscumming takes gametime, while the buyout button takes money. It's not that uncommon, particularly in competitions, to be willing to use money in preference to gametime.

                      As for what items would be stocked by a hypothetical "infinite stock" store, personally I'd include the following:

                      General Store: rations; torches; lanterns; oil; unenchanted ammo
                      Weapons store: unenchanted ammo
                      Temple: Restore Stat / Life Levels; Cure Light/Serious/Critical Wounds; Heroism; first four priest books
                      Alchemist: ID; Phase Door; Word of Recall; Satisfy Hunger
                      Magic Store: First four mage books

                      My basic philosophy here is "If the missing item would make you feel like your kit is incomplete or you aren't fully prepared to return to the dungeon, then the item should always be stocked by a store." Of course, the "you" in this case needs to be fairly broad to cover most players; personally I don't usually care if my experience is partiall drained (I'll buy a !Restore Life Levels if it's available, but I won't townscum for it), but I know other players who are much more stringent about it.

                      Comment

                      • Magnate
                        Angband Devteam member
                        • May 2007
                        • 5110

                        #12
                        Dudes, there have been several looooong threads on the subject of store stocking within the last 6 months or so. They ran the gamut from gameplay implications to economic realism and back. It's one of those issues where the views on all sides are pretty well known, and we're just waiting for Takkaria to tell us which side he comes down on. All we know at the moment is that he doesn't want a buyout button and he doesn't want people to need to buy out the store manually. We don't know what he thinks should be infinite and what should be dungeon-only (never available for purchase). We also don't know his view on the whole economic realism argument (i.e. whether prices should change during the game).
                        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                        Comment

                        • pav
                          Administrator
                          • Apr 2007
                          • 793

                          #13
                          Originally posted by Derakon
                          General Store: rations; torches; lanterns; oil; unenchanted ammo
                          Weapons store: unenchanted ammo
                          Temple: Restore Stat / Life Levels; Cure Light/Serious/Critical Wounds; Heroism; first four priest books
                          Alchemist: ID; Phase Door; Word of Recall; Satisfy Hunger
                          Magic Store: First four mage books
                          You totally don't need restore stat or exp. It is no big deal to spend a recall or two with drained stats. Easily survivable. Also, have spare books and ID at home. The rest is IIRC already guaranteed available.
                          See the elves and everything! http://angband.oook.cz

                          Comment

                          • Derakon
                            Prophet
                            • Dec 2009
                            • 9022

                            #14
                            Drained stats: definitely depends on the situation. I've had warriors get drained from 4 attacks/round down to 1 because they had to fight a drainer in melee combat; they're sure as hell not going back in gimped to a fourth their normal offensive capability. Likewise, a mage who's gotten badly INT-drained is going to want to get that restored first. Sure, these might be survivable -- if you're going to avoid getting into any remotely nontrivial fights. But then what are you down in the dungeon for?

                            ID: I'll grant I haven't played with the recent ID changes, but for older variants I'll generally buy all of the ID scrolls available in the alchemist's shop and still regularly run out.

                            There are two reasons to return to town: to re-equip, and to sell off loot. Restoring stats is part of re-equipping, and having an adequate supply of ID is part of selling off loot. (Okay, there's a third reason: as a last-ditch escape from a fight. But that doesn't affect this discussion)

                            Comment

                            • JonnyOThan
                              Rookie
                              • Dec 2009
                              • 7

                              #15
                              I recently lost a level 23 ranger in the most unlucky game I've ever played. I never found any artifacts...but relevant to this discussion I was -4 DEX for pretty much the entire game. !Restore <everything but DEX> were readily available.

                              One of my biggest frustrations is spell failure rates. It's quite tedious to sit in one spot and cast Identify 10 times in a row without success, when the fail rate is 63%. I don't know how the code actually works, but I'm guessing it's independent random number generation? What if you instead randomly generate a number which is how many failures you'll have in a row before succeeding (for failure rate >50%)?

                              And you could apply this technique to store inventory. Some things should have infinite supply, but !restore stats, I'm not so sure. But it would be pretty cool if you never had to restock the store more than X times before getting what you needed.

                              Comment

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