patchFreeciv - Patches: patch #4757, MinAllies requirement(s)

Show feedback again

patch #4757: MinAllies requirement(s)

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat May 31 22:46:03 2014  
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: Contains 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.


Sat May 31 22:46:03 2014, original submission:

(From IRC conversation with morphles)

Requirement clause that's true if subject player has a minimum number of allies. (Can't use "DiplRel" requirement for this.) Only supported at "Player" range.

A use case: enable soft discouragement of big alliances in multiplayer games by applying penalties, or denying bonuses (with negated requirements). May also have applications with new "Victory" effect (patch #4151), or proposed victory suppression (patch #4756).

Should be fairly easy to implement. May want to create a cache of alliance sizes for speed, if we don't have one already.
Alliance 'size' here is defined as the size of the transitive closure over alliance (i.e., how many players can you reach by alliance links?).

Since this gets embedded in the ruleset, to accommodate variable numbers of players, it might be useful to be able to specify either absolute numbers of players, or some proportion of the players.
In principle could support two argument syntaxes in ruleset file, "3" and "33%", but it's probably cleaner to have separate MinAllies and MinAlliesPct requirements.

  • The relative case is a bit problematic though -- if it's only living players, condition changes whenever someone dies or joins the game. Even if includes dead players, new players can be added midgame. Might have to drop this bit of the idea. Multiplayer games tend to heavily customise the ruleset anyway, so might not mind baking in the number of players.
Jacob Nevins <jtn>
Project Administrator


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jtn (Submitted the item)
  • -unavailable- added by jtn (original suggestion)

    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



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat May 31 22:46:03 2014jtnCarbon-Copy-=>Added morphles
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup