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.
Added a merge request for this: https://sourceforge.net/p/freecol/git/merge-requests/53/
( https://github.com/FreeCol/freecol/pull/1 )
Last edit: David Lewis 2017-09-02
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
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:-).
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!!!!!
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.
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.
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.
So the per-operation factor then becomes an internal non-modifiable magic number? That is what I would much prefer to avoid.
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:
I can create a new changeset for the alternative. (option 1)
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/
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".
Last edit: 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:
Hardly an adjustment. -- Medium @ Factor 1 is what takes place in the current codebase.
Fixed in git.26f42ce66