aliens

Author Topic: [DONE][Suggestion] prevent selling of questlike or story arc items  (Read 2592 times)

Offline Rubber Cannonball

  • Colonel
  • ****
  • Posts: 195
    • View Profile
I've noticed some mods have special items like x-piratez's menacing hull and tiny drill that can accidently get sold by the player.  I realize selling isn't the only way a player could lose these items for instance losing a base defense.  But instead of the mod relying on readme files, FAQs, or forum strategy hints to suggest to the player not to sell these special items, why not give the modder a more elegant way to prevent the selling of them.  A story arc item could have a NoSell string attribute defined in the ruleset whose value would be a reason string such as
"That ",STR_ITEM_XYZ_NAME," looks dangerous.  We don't want that junk." that would be displayed if the item was being selected to sell.  The message display would be similar to the not enough storage message when trying to buy items.

Items without a NoSell attribute would be sold like normal.  The reason string value would allow the modder to customize the message for why the player can't sell a particular item.  Basically flavor fluff, but better than a generic canned message used for every unsellable item.

I merely suggest the idea because I think it wouldn't be too hard to implement, but of course a modder would really want to have it first.  And if something like this already exists, then google let me down or I suck at search and I apologize.
« Last Edit: February 14, 2023, 10:45:18 am by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9136
    • View Profile
Re: [DONE][Suggestion] prevent selling of questlike or story arc items
« Reply #1 on: August 14, 2024, 08:45:15 am »
Done.

Code: [Select]
items:
  - type: STR_PISTOL
    sellActionMessage: STR_KEEP_THIS_STUFF

Hold Shift to sell the item anyway.
« Last Edit: August 14, 2024, 08:47:05 am by Meridian »