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 14 Jul 2012 10:25:33 AM UTC  
 
Category: generalPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.6.0

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 27 Aug 2013 09:35:27 AM UTC, comment #7:

I think so.

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

Should Unit_Bribe_Cost_Pct be changed to that model?

Sveinung Kvilhaugsvik <sveinung>
Project Member
Tue 27 Aug 2013 01:41:27 AM UTC, 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 27 Aug 2013 01:32:26 AM UTC, 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 21 Aug 2013 09:54:14 PM UTC, comment #3:

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

(file #18728)

Sveinung Kvilhaugsvik <sveinung>
Project Member
Wed 21 Aug 2013 07:27:11 PM UTC, 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 21 Aug 2013 07:06:21 PM UTC, 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 14 Jul 2012 10:25:33 AM UTC, 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):
   
   
Comment:
   

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 27 Aug 2013 01:32:39 AM UTCcazfiStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Wed 21 Aug 2013 10:02:18 PM UTCcazfiStatusNone=>Ready For Test
      Assigned toNone=>cazfi
    Wed 21 Aug 2013 09:54:14 PM UTCsveinungAttached File-=>Added unit_bribe_cost.patch, #18728
    Wed 21 Aug 2013 07:27:11 PM UTCcazfiCategoryNone=>general
      Planned Release=>2.6.0
    Wed 21 Aug 2013 07:06:20 PM UTCsveinungAttached File-=>Added unit_bribe_cost.patch, #18727
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup