Menu

#3092 Gifts don't Improve your relations even more

Fixed_0.12.0
closed-fixed
None
5
2022-05-01
2017-09-02
David Lewis
No

From the doc:

Trade always improves your relations with the natives. If
you offer your goods as a gift, this will improve your relations even
more.

However, gifts don't actually improve your relations any more than a normal trade (buy/sell) would, and has no additional advantage.
The following is the case for all trades and also delivering gifts:

csModifyAlarm(owner, -price/50, true, cs)

While it does modify alarm, it does so at the same rate as buying and selling. It is far better from a current gameplay standpoint to just sell items to the natives.

Discussion

  • Mike Pope

    Mike Pope - 2017-09-03

    Agreed this is a bug, and indeed something I have intended to fix several times. Also agreed that you are on the right track with the patch. However not quite there IMHO --- what is really needed is to get rid of the magic numbers entirely --- they should at least be in the spec either as an attribute of the native player type, or as a game option, or possibly even a difficulty option (although we need to be sparing with these). So in csBuy() for: "sis.csModifyAlarm(owner, -price/50, true, cs);" we would
    replace the price calculation with

        -int(price * 0.01f * spec.getInteger(GameOptions.ALARM_BONUS_BUY))
    

    and similarly for csSell and csGift, (assuming ALARM_BONUS_\<op> is a percentage option, a Modifier would also work). We have several complaints (and possibly an IR or two) that native trade is ineffective --- exposing those multipliers as options would allow the players to tweak trade effectiveness to their liking.

    There are a lot of magic numbers throughout the FreeCol codebase. I may even have put //TODO or //FIXME annotations on some of them:-).

     
    • David Lewis

      David Lewis - 2017-09-03

      Yes, I've seen the FIXME's on a ton of them. Thanks for the notes, I'll update the merge/pull request as soon as I can. The commentary is immensly helpful for getting the hang of this. So THANK YOU!!!!!

       
    • David Lewis

      David Lewis - 2017-09-03

      I would hate to have individual modifiers for Buy, Sell, and Gift. That seems like too many configuration options. I like the idea of one general modifier. e.g.: 1-9, 1 with less impact, 9 being the most. And would apply to all: Buy, Sell, Gift in their own ways. Gift being the most impacting, then buy, but I think we may need to increase buy even more than gift because it's always a much lower value.

       
      • Mike Pope

        Mike Pope - 2017-09-03

        Not sure what you are saying here. At first you seem to want a single modifier covering buy+sell+gift, but then you want gift to be more effective, which makes it different, which sounds to me like a distinct option again?!?

        I am also unclear on the 1-9 scheme --- please do not invent yet another option type, they are confusing enough! Trust me, having just struggled with bugs in this area, you do not want to have to maintain something like UnitListOptionType:-). If you really want a distinct set of levels, the existing practice in FreeCol is to use a SelectOption with words (e.g. small/medium/large) so no one gets confused whether 1 or 9 is the most/least powerful. However those schemes often end up with their own internal scaling magic numbers, which is why a straight percentage option is preferrable as it is more transparent to the player what it does. Or at least that was what one player concluded in a thread a few years back.

         
        • David Lewis

          David Lewis - 2017-09-03

          To clarify my point. I'd hate to see multiple user-adjustable options for buy, sell, and gift (3). Would rather have 1 user-adjustable percentage value, with a factor applied to that percentage for each category of buy, sell, gift because each of these 3 have very diffirent weights. Gift is supposed to have a higher weight according to the docs. However, if the same weight as selling is applied to buying goods, then it becomes very uneven simply due to the fact that the natives sell goods for very inexpensive prices which would result in very tiny adjustments to the alarm value.

           
          • Mike Pope

            Mike Pope - 2017-09-03

            1 user-adjustable percentage value, with a factor applied to that percentage for each category of buy, sell, gift because each of these

            So the per-operation factor then becomes an internal non-modifiable magic number? That is what I would much prefer to avoid.

             
            • David Lewis

              David Lewis - 2017-09-03

              Update: https://github.com/FreeCol/freecol/pull/1/files (https://sourceforge.net/p/freecol/git/merge-requests/53/)

              Yes, the factor is magic. :/ -- Do you have a suggestion for this?
              We can either:

              1. Make all 3 factors user-configurable, probably best as game options at that point rather than difficulty. -- the TRADE_ALARM_(BUY|SELL|GIFT)_ options.
              2. Leave as is (in the latest commit), and the configuration is instead on the percentage impact on the alarm, with factors (weights) that are hard-coded values.

              I can create a new changeset for the alternative. (option 1)

               
            • David Lewis

              David Lewis - 2017-09-03

              New pull/merge request for game options as you described above:
              https://github.com/FreeCol/freecol/pull/3
              SF: https://sourceforge.net/p/freecol/git/merge-requests/54/

               
  • David Lewis

    David Lewis - 2017-09-03

    Good point... I'm just about finished with a change that includes percentage as the value for difficulty. I'll commit that for your review here in a bit. In the mean time, this is what it would produce:

    Typical "buy" price is 50-100
    Typical sell price varies, but is often around 1000 and higher.
    Gift can vary greatly. I assume players will probably end up gifting smaller amounts than sell, so I included 2 columns with values:

    The chart shows price and the end alarm modification value.
    For reference, the current gameplay value is equal to that of "Sell" Category on "Medium".

    TradeAlarmBonus Percentage
    VeryEasy: 80% 
    Easy    : 65%
    Medium  : 50%
    Hard    : 35%
    VeryHard: 20%
    ------- BUY Factor: 5 -------
    VeryEasy  @ price: 100 | -25
    Easy      @ price: 100 | -14
    Medium    @ price: 100 | -10
    Hard      @ price: 100 | -7
    VeryHard  @ price: 100 | -6
    ------- SELL Factor 1 --------
    VeryEasy  @ price: 1000 | -50
    Easy      @ price: 1000 | -28
    Medium    @ price: 1000 | -20
    Hard      @ price: 1000 | -15
    VeryHard  @ price: 1000 | -12
    ------- GIFT Factor 3 --------
    VeryEasy  @ price: 500 | -83
    Easy      @ price: 500 | -45
    Medium    @ price: 500 | -31
    Hard      @ price: 500 | -23
    VeryHard  @ price: 500 | -19
    ------- GIFT Factor 3 --------
    VeryEasy  @ price: 1000 | -166
    Easy      @ price: 1000 | -90
    Medium    @ price: 1000 | -62
    Hard      @ price: 1000 | -47
    VeryHard  @ price: 1000 | -38
    
     

    Last edit: David Lewis 2017-09-03
    • David Lewis

      David Lewis - 2017-09-03

      If buy/sell shared the same factor, and since buying goods from natives is almost always < 100£, this is what the alarm modification factor would be:

      ------- BUY Factor 1 -----------
      VeryEasy  @  price: 100 | -5
      Easy      @  price: 100 | -2
      Medium    @  price: 100 | -2
      Hard      @  price: 100 | -1
      VeryHard  @  price: 100 | -1
      

      Hardly an adjustment. -- Medium @ Factor 1 is what takes place in the current codebase.

       
  • David Lewis

    David Lewis - 2017-09-08
    • status: open --> closed-fixed
    • assigned_to: David Lewis
    • Group: Current --> Fixed_trunk
     
  • David Lewis

    David Lewis - 2017-09-08

    Fixed in git.26f42ce66

     
  • Mike Pope

    Mike Pope - 2022-05-01
    • Group: Fixed_trunk --> Fixed_0.12.0
     

Log in to post a comment.

MongoDB Logo MongoDB