Author Topic: Selling stuff ideas  (Read 9961 times)

Offline Francisco Munoz

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
    • http://www.wesnoth.org
Selling stuff ideas
« on: September 07, 2009, 01:50:32 AM »
Currently all shops buy everything, more or less at the same price.
 Scale 0 items tagged identical as the tags that the shop has should get a little better price when the player sell them, just a +-5% will be enough.
 This way the player benefit from selling weapons to the weapon shop and computers to the electronic shop (and so on).
 Finding a jewellery/gem shop will be nice even if you never buy anything from it, just sell all the stuff you got from the mines.
 To create an all buying shop (smugglers and such) a tag "PAWN" could be added with no items.

Offline EarthquakeDamage

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Selling stuff ideas
« Reply #1 on: September 07, 2009, 06:47:48 PM »
IIRC from looking at the code (once upon a time) you only get half as much cash for selling to a store that doesn't sell that item type (e.g. selling SF0 weapons to someone who never sells SF0 weapons).  So I'm pretty sure that's already covered.  But I've slept since then, so take that with a grain of salt.

Offline Francisco Munoz

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
    • http://www.wesnoth.org
Selling stuff ideas
« Reply #2 on: September 08, 2009, 06:31:40 AM »
Ops my bad.... I checked the code but didnt find it. Maybe my subconscious mind read it and gave me the idea...
 Nevertheles, a pawn shop and a Jewelry/Gem one is a good idea from the story point of view.

Here is the code if someone is interested (or want to document it in the wiki, you get 2/3 of price if the shopkeeper don't sell items in the category)

   { If this part matches the category of the shopkeeper, it's worth more money. }
   { Actually, it works so that selling inappropriate items are penalized. }
   if not ( ( Part^.Scale < 1 ) and PartAtLeastOneMatch ( Categories , SAttValue( Part^.Sa , 'CATEGORY' ) ) ) then begin
      Cost := ( Cost * 2 ) div 3;
   end;