patchFreeciv - Patches: patch #3412, Unit_Bribe_Cost_Pct effect

Show feedback again

patch #3412: Unit_Bribe_Cost_Pct effect

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat Jul 14 10:25:33 2012  
Category: generalPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.6.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Tue Aug 27 09:35:27 2013, comment #7:

I think so.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue Aug 27 09:31:57 2013, comment #6:

Should Unit_Bribe_Cost_Pct be changed to that model?

Sveinung Kvilhaugsvik <sveinung>
Project Member
Tue Aug 27 01:41:27 2013, comment #5:

Documenting this to wiki I noticed that other similar effects are implemented so that they just increase (or decrease with negative amount) internal value: ((100 + effect value) / 100 * x). That way there's no need to define base effect with value 100% in all the rulesets that do not want to adjust the value at all.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue Aug 27 01:32:26 2013, SVN revision 23238:

Added Unit_Bribe_Cost_Pct effect

Requested by Jacob Nevins
Patch by Sveinung Kvilhaugsvik

See patch #3412

(Browse SVN revision 23238)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed Aug 21 21:54:14 2013, comment #3:

Thanks for the information, Marko. Removed experimental guard. Halved in value.

(file #18728)

Sveinung Kvilhaugsvik <sveinung>
Project Member
Wed Aug 21 19:27:11 2013, comment #2:

It's likely that for a very long time nobody can say if the code now limited to experimental AI is balanced or not. If we are worried that it might give too much value for the effect (causing ai to neglect more important effects to get this) and want to keep the code limited to experimental ai, I still would give some smaller value for any kind of ai (such that we are in safe side in that it's not too big, but existence of which makes ai to prefer this effect over nothing)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed Aug 21 19:06:21 2013, comment #1:

Implemented in attached patch. Possible issues:

The AI code is currently protected behind experimental. There are two reasons for this. The first is to make it easy to test that auto games (not involving the experimental AI) have the same result with or without this patch. The other is that more auto games (over many rule sets) are needed to balance the utility function properly. Since the laptop I currently borrow have a history of over heating during auto games I can't do it well enough.

The owner can't get an exact bribe cost as the local diplomatic relationship may change the price. (Use case: A rule that reduce unit bribe cost when the briber has an embassy to do... preparation work.) I therefore changed the client text.

(file #18727)

Sveinung Kvilhaugsvik <sveinung>
Project Member
Sat Jul 14 10:25:33 2012, original submission:

While working on bug #19253 it occurred to me that it would be easy enough to add an effect to let ruleset authors adjust unit bribe costs, if they don't like our calculation.

Since bribing is an instantaneous activity, I don't think this has any of the edge cases to worry about that effects often have.

Also, it would let us finally get rid of that special case in the code where Settlers are hardcoded to have half the bribe cost of any other unit.

Jacob Nevins <jtn>
Project Administrator


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #18728:  unit_bribe_cost.patch added by sveinung (10kB - text/x-patch)
file #18727:  unit_bribe_cost.patch added by sveinung (10kB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by sveinung (Updated the item)
  • -unavailable- added by jtn (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Aug 27 01:32:39 2013cazfiStatusReady For Test=>Done
    Wed Aug 21 22:02:18 2013cazfiStatusNone=>Ready For Test
      Assigned toNone=>cazfi
    Wed Aug 21 21:54:14 2013sveinungAttached File-=>Added unit_bribe_cost.patch, #18728
    Wed Aug 21 19:27:11 2013cazfiCategoryNone=>general
      Planned Release=>2.6.0
    Wed Aug 21 19:06:20 2013sveinungAttached File-=>Added unit_bribe_cost.patch, #18727
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup