Author Topic: Making shops less frustrating  (Read 3522 times)

Offline magic.coding.fairy.peridot

  • Veteran
  • ***
  • Posts: 197
    • View Profile
Making shops less frustrating
« on: January 29, 2012, 12:21:25 am »
As I understand it, the only criteria determining which items a shop gets are the type of shop and (maybe) the price of items. Since a Buru Buru costs more than the high-end personal weapons, it's hard to arrange to have stores that have only "common" items and stores that stock exotic high-end items. So every store has pretty much the same potential inventory, and shopping amounts to visiting all the relevant stores at random, hoping they've randomly acquired one of the few useful items. It'd be nice to change this.

Leaving aside implementation for the moment, how should it look to the player? The JRPG style is to have items strictly ranked by quality and low enough in price that you basically get new, better items as you advance the plot by reaching new areas. The Western RPG style has shops pretty much only sell common items, so that all magical or high-quality items are obtained as loot. The Nethack style has rare, non-refreshing shops, so that what you get is as random as in GH but there's no point cycling from store to store; Nethack also raises item costs high enough that you don't necessarily have access to high-quality items until later in the game even if they're in stores. The Angband style has most stores selling only common items; the exception is the Black Market, which has a slowly-refreshing stock of random, occasionally-good items at such exorbitant prices that it's just not a very useful source of supply; in practice good items always come as loot.

GearHead also suffers from the problem that SF2 items really ought to be more expensive than all but the fanciest SF0 gear. This clashes with the fact that a Buru Buru and its supplies and repairs ought to be about as available to the player as a decent pistol and its ammunition. This problem must afflict other games with multiple scales of combat, but I can't really think of any other than the ancient "Crescent Hawks Inception", which pretty much relegated SF0 combat to the beginning, before you had the opportunity to acquire a mech.

I'm a big fan of region-based difficulty, so my inclination would be to add an additional property to buyable items, "quality". Then Hogye merchants would sell only common items, which might include Buru Burus and swords but not automatic rifles or Wraiths. Downtown Snake Lake and its environs would present more dangerous random encounters and quests but offer slightly higher-quality gear. For the second-best gear you might have to go into the frontier towns, where life is more dangerous. For the very best gear, you'd have to do quests or capture it in combat. Unfortunately, this region-based difficulty is kind of in conflict with the renown-based difficulty system. Even with the renown difficulty system, one could arrange for towns that are under attack by tougher enemies to offer better gear.

Implementation-wise, the biggest step would be to annotate all items with some kind of quality indicator. I don't know how hard this would be; presumably it would at least require someone to manually go through the item list and add a quality number to each item. I know that PV is supposed to serve this purpose, but because it treats SF0, SF2, weapons, armor, food, and tools the same way, it makes it really hard to give shops interestingly distinct inventories.

Alternatively, items could have flags like "ILLEGAL", "MILITARY", "TOPSECRET", or whatever, and these could be used to make some stores special.

What do people think? This is a good time to hack on store mechanics, particularly if they can be ported to Lua...

Offline Daemonward

  • Elite
  • ****
  • Posts: 274
    • View Profile
Re: Making shops less frustrating
« Reply #1 on: January 29, 2012, 01:41:43 pm »
Some kind of "availability/quantity" attribute might be a good idea. For example, extremely common items might have a rating of 0.95, meaning any given store has a 95% chance of having that item in stock, and a 95% chance of having another of that item in stock after each purchase. Uncommon items, with a rating of 0.05, would only show up 5% of the time and there would only be a 5% chance that the store has more than one of that item in stock.

An item's base availability could also be modified by tags to make that item's availability in certain shops more or less likely. Certain mecha dealerships could specialize by type (aerofighters, groundhuggers, zoanoids, etc.), weight (<30 tons, 30-60 tons, 60-90 tons, >90 tons), faction (Federation Defense Force, Solar Navy, Aegis Overlord Luna, etc.), or manufacturer (BioCorp, RegEx, Kettel Industries, etc.) and certain weapon stores could specialize in edged melee weapons, slug throwers, non-lethal weapons, etc. For example, a TR-93 XS Razer might have a base availability of 0.2, but at Arachnoids R Us, arachnoid-type mecha have an availability modifer of 3.0, so there is a 60% chance that they have a TR-93 XS Razer in stock (and a 60% chance that they have more than one).

Another idea would be to introduce "licenses" or "clearance levels" of some sort that a character must acquire (through quests!) before the (non-black market) shops will sell them certain classes of equipment.
« Last Edit: January 29, 2012, 01:50:25 pm by Daemonward »

Offline Telok

  • Green Pilot
  • *
  • Posts: 20
    • View Profile
Re: Making shops less frustrating
« Reply #2 on: January 30, 2012, 02:27:42 am »
There is a CONTRABAND tag in the equipment files, and shops do stock only those items with tags that match their own (WEAPON, GUN, MELEE, INSTRUMENT, FEDCOM, AEGIS).

There is an equal chance to get each item (that matches the keywords of the store) in the equipment files. You can increase the chance of something appearing in the store by increasing the number of times it appears in the equipment files. This is much less elegant than a rarity system, but it has the same effect.

Offline Crucifix

  • Veteran
  • ***
  • Posts: 195
    • View Profile
    • http://thefamous.ning.com
Re: Making shops less frustrating
« Reply #3 on: February 02, 2012, 10:16:11 am »
It would be nice if this could simply be set by Supply and Demand, though I appreciate it's more complicated.

Each shop starts out with a randomised array of equipment. Equipment has a stock count.

If the player buys anything from a store, the item and any "types" of the item get's a "sold" marker.
Each day "market forces" choose ~1-20 item types at random and add a "sold" marker to them too, lowering the stock count accordingly.

If an item has "sold" that day, then it's Demand increases. If it hasn't, it decreases.

Each week, the shop restocks. Anything with a <0 Demand is removed from inventory. New stock is randomly selected from any items with a type that has a Demand of ~5+ (capped by shop-wealth and "potential types" - a music shop won't sell mecha). Anything else remains in-stock and its stock count is reset. Higher demand items already present increase their stock count cap by 2.

If more items went out of stock than went in (keep ~20 items in stock, variable by shop), any new stock from available stock types is added at random.

This randomly changes stock without player intervention. Popular items have more chances to be purchased at random, as their stock count increases to allow more purchases, meaning stores will naturally develop "favourites" without player intervention, and due to the random nature and probability distributions, most stores will independently develop their own, fairly unique, core product.

The player can invest in a store to increase their shop-wealth and potentially increase the range of types they stock.
The player can intentionally "buy-up" all of a certain item. This will make the item, and the item type, more popular and more likely to come into stock.
Longterm, this means that the player can continue to buy "bladed weapons" at a weapon shop until the shop's entire range is made up of bladed weapons and nothing else.

If a player neglects a store long enough, it will largely revert to a dynamic state, but will likely retain the core product encouraged by the player.

As I say, it's more complicated, but any thoughts?

Offline Rowanthepreacher

  • Veteran
  • ***
  • Posts: 104
  • [url]http://www.hunglikeanorca.com[/url]
    • View Profile
Re: Making shops less frustrating
« Reply #4 on: February 03, 2012, 05:31:27 pm »
I like it, but I don't think it'd solve the main problem with shops, being that they never stock the item you want, or that would be reasonable for it to stock. By your model, it could take many, many weeks for an item to get dropped and a new one picked to replace it.

I think that the wealth idea is worth looking at, though. The more you buy from places, the wealthier they get, and thus, the more they can afford exotic gear.

I propose a slightly different system, whereby each shop has a wealth level. The shop will purchase items according to it's wealth level. When nothing is purchased, (by you or randomly) it's wealth goes down, and it will restock only with items that cost equal or slightly under it's wealth level. When something -is- purchased, however, that cash gets added to the wealth level of the shop, and it will restock with items equal or slightly under it's new wealth level.

If you consistently purchase basic food from a shop, for instance, it won't gain much wealth, and the food will stay basically the same, although they'll be able to offer you Chocolate and Tubesteaks in addition to that Basic Ration. If you purchase Chocolate all the time, the shop will increase it's wealth a fair bit, and offer you the finest goods it can afford.

For a fee, you should also be able to import an item. Shopkeepers are always saying that you can, but they're lying bastards. Importing would allow you to ask them to get in a specific good in their next restock (regardless of their wealth), and you pay a proportionate fee for it (which raises the shop's wealth). Then the item comes in, and you pay for it as normal (raising the shop's wealth).

This way, the game ties your progression and tendency to buy better, shinier things, to the stores around you, so they tend to stock even shinier things for your next visit, and there's no reason you should ever go without anything for long.
I'm not actually a spammer. I promise.

Offline DudeGuyMan

  • Veteran
  • ***
  • Posts: 207
    • View Profile
Re: Making shops less frustrating
« Reply #5 on: February 04, 2012, 03:41:24 pm »
GearHead also suffers from the problem that SF2 items really ought to be more expensive than all but the fanciest SF0 gear.


One would think, but you know...

Every stupid bandit in the wilderness has a mecha, they sell for dirt cheap, and they're blown up willy-nilly in televised gladitorial contests. Someone in the later stages of Robot Warriors can destroy basically an entire regiment on a daily basis. Even a low-level local arena like Mecha Sporch can apparently afford to let Vikki give away an Aranos to anyone who flirts with her for five minutes. It really looks like a world where there are practically more mecha than people.

I started rationalizing it as being related to the Night of Fire. You know, the superpowers are locked in endless global war and half the world's industrial capacity is dedicated to churning out mecha. Then the war goes nuclear, industrial society collapses, and the population plummets. A certain proportion of mecha are destroyed in the nuclear exchange, but a lot more survive. They're pretty tough, and post-war problems that will decimate the human population (disease, starvation, radiation) don't faze them.

So now there are enough mecha floating around, relative to the population, that pretty much any dumbass can get their hands on one. But civilization is still trucking along off-planet. Luna, Mars, the Spinners, they're still building newer and more modern mecha. So when Earth starts to pull itself together, the Federated Territories armed forces can't afford to just sit on a pile of centuries-old BuruBurus and call it a day. They need to procure or produce modern mecha of their own. Which drives the industry and pushes even more of the older mecha out onto the public surplus market.

Of course that still doesn't explain why the hell any doofus with enough money can walk into a dealership and purchase a Gigas bomber and it's NUCLEAR FREAKIN' MISSILES, but I can basically buy into the notion that Gearhead takes place at a very odd moment in history, one where the combination of an unprecedented surplus of military hardware and a general breakdown of law and order have conspired to put giant robots in the hands of any schmuck who wants one.

I'd expect that the situation would look a lot different a hundred years later, after a lot of older mecha have been destroyed, finally fallen apart with age, or just become so obsolete that nobody wants to pilot them. The Federated Territories get stronger, Earth gets more civilized, the government decides having heavily-armed mecha everywhere is bad for keeping the peace. Some retard buys a Monstrous and nukes Iphsil or something, the Mecha Control Act gets passed, and nobody cares because a hundred years of Robot Warriors blowing up a regiment per day has made mecha a lot more expensive than they used to be.

Offline Crucifix

  • Veteran
  • ***
  • Posts: 195
    • View Profile
    • http://thefamous.ning.com
Re: Making shops less frustrating
« Reply #6 on: February 14, 2012, 04:54:20 am »
Rowan:

True enough, it would take awhile to coax a shop in a specific direction.

I like your idea about importing - shops could have a "browse catalogue" option, which would show a list of their particular stock which the player could place a 10% deposit for (MUGL PF: 0 shops would have access to MUGL PF: 0 gear, for example). The next week it arrives in a singular quantity at a 10% discounted price. If it sells, then they might list it as a regular item. If the player doesn't buy it, the discount goes away (you lost your deposit), and the item then may get sold or abandoned accordingly.

DGM: Yeah, I always thought that the issue was automation. Given the tiny surviving population and access to asteroids, the actual cost of materials is quite literally peanuts. Mecha manufacture has massive automated factories, and as such models and mecha scale items can be created in their thousands or millions. Even rarer items are simply easier for the SF2 market, since it's just retooling gear you had set up for making mecha anyway. These aren't suitable for non-fifty foot applications though, which are restricted to far smaller, less common factories thanks to a smaller demand. Smaller factories means less output, longer production times and a worse economy of scale (pun unintended, but rather apt). You're also stuck with paying for all the miniaturisation methods which enables personal scale equipment to function in the first place, something a 50' laser cannon doesn't have the same issue with.

In the end, you're basically paying for labour.

Offline threetoast

  • Green Pilot
  • *
  • Posts: 17
    • View Profile
Re: Making shops less frustrating
« Reply #7 on: February 20, 2012, 10:38:42 pm »
The next week it arrives in a singular quantity at a 10% discounted price.


The next week? It only takes a couple of hours to move between spinners. I could maybe understand it taking that long for ultra high-end mecha or illegal equipment, but a week is a really long time in Gearhead's gameplay terms.

Though, maybe it could take a week by default, but paying a non-refundable fee gets it to the shop quicker.

Offline Crucifix

  • Veteran
  • ***
  • Posts: 195
    • View Profile
    • http://thefamous.ning.com
Re: Making shops less frustrating
« Reply #8 on: February 29, 2012, 08:16:37 am »
The next week it arrives in a singular quantity at a 10% discounted price.


The next week? It only takes a couple of hours to move between spinners. I could maybe understand it taking that long for ultra high-end mecha or illegal equipment, but a week is a really long time in Gearhead's gameplay terms.

Though, maybe it could take a week by default, but paying a non-refundable fee gets it to the shop quicker.


Really? I thought it took quite awhile, though that could just be because I keep getting lost while travelling between spinners in my Mech. Next Day is fine too, though from a retail point of view, it's in a merchant's interest to order rarely in large quantities than order daily as soon as there's a demand.

Offline KA101

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: Making shops less frustrating
« Reply #9 on: April 11, 2012, 08:00:14 pm »
Searched and didn't find any specific thread-necro policy, so here goes.

Crucifix & Rowan are onto something, but I agree that 7 days in GH2 time is way too long.  Stock market only took 2-3 days, tops, for my low-risk investment to pay off.  [As in, makes back the purchase price +50% profit, after any fees or taxes.]  I think my Rocket Star character managed to get onto Athera Garden's stage and succeed* 7-10 days after starting that quest line (she was created with Perform in mind, granted).  Confounding problem is that there's no obvious way to use up lots of game time while you wait, such as (say) sleeping.

*The final, though the open-air concert was at "Athera Garden" as well.  Struck me as confusingly humorous.

Thinking: perhaps have the time based on quality/quantity (combined) of goods?  It should take longer for a mechanic to get several arcjets 5 than just one, and I'd agree that ordering an Ovaknight should take at least 6-12 hours (if the PDA happens to have one in stock at Gaos, if they like you, and the quickest shuttle can accommodate it) or maybe 3x cost and 3 days (need to get one lifted into orbit from Terra and then shipped out to L5).

Offline Crucifix

  • Veteran
  • ***
  • Posts: 195
    • View Profile
    • http://thefamous.ning.com
Re: Making shops less frustrating
« Reply #10 on: April 19, 2012, 09:11:35 am »
Thinking: perhaps have the time based on quality/quantity (combined) of goods?  It should take longer for a mechanic to get several arcjets 5 than just one.


Sorry, speaking from my own knowledge on the subject (I'm actually a level 50 Shopkeeper), this is actually backwards. It takes more time for *single* items to be brought in.

Suppliers have minimum orders, and price breaks, and shipping fees, and a dozen other individual deals, bargains and agreements going on with the merchants who sell their goods. With larger orders, so long as their supplier has them (which for most "core" product is intended to be 99% of the time), means meeting that minimum quantity earlier, a better discount for the merchant, and in many cases meeting the threshold where shipping fees are free, or at least minimised. For a single item the merchant adds it to their next order, which other customers add to, on and on until they meet the threshold for placing an order with their supplier.

This obviously varies by merchant - a mecha dealer doesn't drop everything to go place an order just because some schlub ordered an $80k Buru Buru, but a parts mechanic may well order early if they get an order for $80k worth of Arc Thrusters. The higher the quality of merchant, the more bulk they probably deal in, which means larger, rarer orders, and cheaper overall prices compared to smaller outfits.

As a tradeoff, smaller specialist merchants with a lower quality but a more compatible "range" would probably be able to get the item in sooner, but it would be more expensive to get (I assume Mr Hewitt disinterested in coding haggling for discounts on large purchases).

Equally, especially high value items can sometimes justify entire orders on their own (if they're not exotic items made to order - made to order items can potentially take days to months to make by themselves).

This said, I like (and agree with) the idea of geographically based pricing - Cayley Rock inhabitants are going to pay more for pretty much everything compared to the highly competitive marketplaces on the Emerald Spinner. This could be partially handled as an aspect of merchant quality (which determines overall prices generally), filtered through a multiplier for certain items based on local supply and demand.

Offline KA101

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: Making shops less frustrating
« Reply #11 on: April 19, 2012, 05:09:14 pm »
Fair enough.  The local co-op won't order one 32-oz tub of yogurt but will accept orders for a 6-tub case.  (Turnaround time is about 3-4 days, on average.)  I'd agree that there should be a minimum quantity for ordering items, whether by price or by weight.  (Bulk in GH is fairly abstract, so far as I can tell--it only comes up if you're installing something into something else.)

Distance premiums might not be a bad thing BUT would need a readily available map or somesuch to justify them.  Otherwise, players might be a bit frustrated at "randomly" getting gouged on orders.  Corollary: player is in Maquise, but the shops don't have a Zero Savin in stock.  Should being at the factory spinner provide a location discount to ordering (maybe buying the floor model?), in similar fashion to the penalty for doing the same on Cayley?

Offline Crucifix

  • Veteran
  • ***
  • Posts: 195
    • View Profile
    • http://thefamous.ning.com
Re: Making shops less frustrating
« Reply #12 on: April 20, 2012, 04:47:28 am »
Definitely - the merchant doesn't have to pay shipping if they're next to the factory, and discounted "used" floor models which are sold slightly damaged would be a cool feature.

As per the random gouging, this could all slide back to having a broadly player controlled economy - you might not ever get a Savin as cheap in Cayley, but you could get it cheaper if you poured enough wealth into the area to enable the shops to buy more stuff.

Sidenote: What about "loyalty" based discounts? Each time you buy a certain quantity of items at once, you increase the merchant's attitude to you, the more they like you, the better their prices?

Offline PlaintextMan

  • Veteran
  • ***
  • Posts: 175
    • View Profile
Re: Making shops less frustrating
« Reply #13 on: April 20, 2012, 11:15:55 am »
Definitely - the merchant doesn't have to pay shipping if they're next to the factory, and discounted "used" floor models which are sold slightly damaged would be a cool feature.

As per the random gouging, this could all slide back to having a broadly player controlled economy - you might not ever get a Savin as cheap in Cayley, but you could get it cheaper if you poured enough wealth into the area to enable the shops to buy more stuff.

Sidenote: What about "loyalty" based discounts? Each time you buy a certain quantity of items at once, you increase the merchant's attitude to you, the more they like you, the better their prices?

This thread has unofficially been promoted from "making shops less frustrating" to "making shops awesome"  ;)

Offline KA101

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: Making shops optimal parts of the GH experience
« Reply #14 on: April 20, 2012, 04:15:19 pm »
Definitely - the merchant doesn't have to pay shipping if they're next to the factory, and discounted "used" floor models which are sold slightly damaged would be a cool feature.

OK, then there's more incentive to pay attention to the world.  This is a Good Thing.  Not sure how the showroom model of a mech might be significantly damaged--possibly the joints stiffen up because it's been sitting there, but that ought to be curable at any mechanic.  Now, buying the dealership's loaner...that might be touchy.  Used-mech discounts more generally is badly needed, IMO.  Otherwise, the salvage devaluation is just a slap to the player.

As per the random gouging, this could all slide back to having a broadly player controlled economy - you might not ever get a Savin as cheap in Cayley, but you could get it cheaper if you poured enough wealth into the area to enable the shops to buy more stuff.

The gouging wasn't actually random, so much as I was worrying about player perception.  If I'm not actively taking shuttles around, I have no idea where the Spinners and Rocks are in relation to each other.  Thus, telling me that I have to pay more for the Savin I'm ordering because of shipping might seem like gouging.
Something to keep in mind--it should probably be cheaper (in most circumstances) for the player to just order something in an "expensive" area than to take the shuttle to a "cheap" area, order the something there, get it, and shuttle back.  Otherwise, there's much less point to the mechanic, let alone making a mockery of shipping costs.  (It cost me less to ship myself to Maquise and then *back* to Cayley, with the Savin, than to just ship the Savin?)

As for upgrading shops by spending money at them, I'm a bit leery of letting that get too expAnsive.  Though I don't claim any levels in Shopkeeper, growing a given store indefinitely based on one person's custom seems dangerous to me.  What when that customer leaves?  A player-influenced faction should be more effective, either temporarily (joint Knights/Stars mech-show, as part of a Peace & Love playthrough?) or long-term (new factory).

Sidenote: What about "loyalty" based discounts? Each time you buy a certain quantity of items at once, you increase the merchant's attitude to you, the more they like you, the better their prices?

Hmm.  I know there's a thing in GH1 where shopkeepers (typically mechanics) will comp me the occasional repair/reload fee because I've been a very good customer.  (Yeah, town defense does tend to need a lot of mechanic work, at least to reload the Heavy Missiles on the Harpy.)   Not sure how that works offhand, but probably not a bad place to start thinking about code-implementation.
If you're talking about just giving the currently-existing attitude/reaction score a kick upwards for buying, say, 20 Arc Thrusters in one go, not a bad idea--so long as shop selections get a bit more standardized, so we're actually talking about "loyalty" rather than"stocking up because it's never available".  Would adding a time/proportionality* check, so that I get a discount if I routinely get mechanic services or rations from one particular shopkeeper, be useful?

Problem I just realized: shop locations, the spaceport mechanic for example.  Rather easier to hit the loyalty threshold with the nearest store rather than going to someplace in the spinner.  Might need to control for that.

*Examples: Time: Ka-lol has spent an average of $ credits/day or purchased an average of I Items/day over D days.  Shopkeeper recognizes him and offers discount.
Proportionality: Ka-lol has spent 75% of the credits he spent in the entire spinner (once spinner-wide spending hits a certain amount) in this store.  Shopkeeper recognizes him and offers discount.