Resource balancers

Issue #139 closed
joseasoler repo owner created an issue

The current resource balancer (see the BonusBalancer class in CvMapGeneratorUtil.py) is not prepared for ExtraModMod or even vanilla FFH2. It would be desirable to include a new balancer that works like the existing one but takes into account the resources in FFH2.

It could also be possible to create new resource balancers that work under different premises than the original one, such as "flavor" resource starts for each civilization or balancers that take into account wilderness (see https://bitbucket.org/lfgr/barbsplus/issue/3/resources-and-wilderness).

Fixing the default balancer should go in 0.4.0.

Comments (8)

  1. joseasoler reporter

    With regard to fixing the vanilla BtS balancer, the code change could be like this:

    self.resourcesToBalance = ('BONUS_COPPER', 'BONUS_GUNPOWDER', 'BONUS_HORSE', 'BONUS_IRON', 'BONUS_MITHRIL', 'BONUS_REAGENTS') self.resourcesToEliminate = ('BONUS_MARBLE','BONUS_STONE')

    This means that the resources in the first list will be forced to appear once next to each starting place (and they will not appear anywhere else). The resources in the second list don't appear at all, to prevent them from providing a random advantage for a certain player. For comparison, the resources in each list for BtS are:

    self.resourcesToBalance = ('BONUS_ALUMINUM', 'BONUS_COAL', 'BONUS_COPPER', 'BONUS_HORSE', 'BONUS_IRON', 'BONUS_OIL', 'BONUS_URANIUM') self.resourcesToEliminate = ('BONUS_MARBLE', )

  2. Tasunke Witka

    Is this only for the 'Balanced Resources' option during Custom Game map creation?

    I'd add Bonus_Incense to the ToBalance list, as it allows for high priests

  3. Tasunke Witka

    You could even have a second option (Fast Paced Balanced Resources) which doesn't have an Eliminate list and adds Marble and Stone to the ToBalance list

  4. joseasoler reporter
    • changed version to 0.4.0
    • marked as blocker
    • edited description

    I like the fast paced idea. I'll consider it depending on if I end up tweaking a selection of map scripts specifically for ExtraModMod or not (adding a resource balancer needs to modify all map scripts you want to use it in).

    You are right about incense, I'll add it too.

  5. Tasunke Witka

    They do ... although I wonder if Incense and Gems should only be added to the 'Fast Pace' edition (perhaps in addition to reagents), as primarily Gems, but incense too to an extent, is a high commerce resource and could vastly change the consequences of the game.

    Which is why I think Fast Paced balanced resources should have all of Marble, Stone, Incense, Gems, Reagents, and all of the more normal strategic resources, while the typical 'balanced resources' option lets all 5 of these be randomly distributed.

  6. joseasoler reporter
    • removed version
    • marked as major

    MapScriptTools implements an improved balancer and I already committed an ExtraModMod version of it which implements the lists in the first comment. For now I'm not going to include Incense in the balanced resources option. Once that I get all of the MapScripts I intend to support actively to use MapScriptTools, adding additional balancers to them would be quite simple, but fast paced balanced resources will not be included in 0.4.0.

  7. Log in to comment