BarbsPlus

Issue #34 new
joseasoler repo owner created an issue

BarbsPlus is being developed by lfgr and it aims to include many improvements and changes to Barbarians.

Repository: https://bitbucket.org/lfgr/barbsplus

Wiki: https://bitbucket.org/lfgr/barbsplus/wiki/Home

Forum thread: http://forums.civfanatics.com/showthread.php?t=508004

The components of BarbsPlus will get included in ExtraModMod eventually, when they are deemed complete enough to start testing.

The following branches were included in 0.4.0-beta1:

  • wilderness

  • terrain_flavour

This proposal was originally only about a port of RifE's MultiBarb. The original text can be found below the line.


RifE includes an implementation of a ModComp that allows to have multiple barbarian factions at one time. It would be great to have something like this in MNAI.

For starters, if the implementation has to stay modding friendly, it would need to hold a dynamic array of barbarian factions, declared via XML. All barbarian factions would need to be always in peace with each other, and they should never attack each other (even with hidden nationality units). Since animals follow different rules, it would also need a XML tag to declare a civ as an "animal" faction. The RifE code (IIRC) assumes certain specific barbarian civilizations instead of a dynamic number of them, but it should serve as a great start point for knowing which parts of the code need to be modified for handling multiple barbarian factions.

Another issue is how to handle barbarian spawns. Right now, the code is a bit messy and assumes a single barbarian faction. Features/improvements that produce barbarian units would need a tag that specifies the barbarian civilization to which they belong.

There is also a lot of python code that handles some kind of spawns. All of this code would need to be adapted to the new implementation.

Comments (16)

  1. joseasoler reporter

    Judging from the XML file, your implementation seems to handle all I wanted about barbarian spawns and more. After checking what it does to spawns, it seems to me that my idea of implementing new barbarian civilizations and then fixing barbarian spawning is far more complicated than fixing barbarian spawning and then implementing multiple barbarian civilizations on top of it. If I remember correctly, you also planned to implement different races for barbarian cities, which is a welcome addition too. Besides that, what other features are you planning?

    EDIT: Does it also allow to set the spawns created by lair exploration?

  2. lfgr

    I'm glad you're interested :). I uploaded a short summary to the wiki.

    You mean what I'm planning for the XML info type? Well... much :) There are currently the following new Tags planned: UnitName, PrereqGlobalWonder/Project (for Frostlings), Prereq founded religion, bNoDefender (for units that should not defend lairs but go raiding), bUnique (for Orthus), CommanderUnit/Promotions/Name, iCommanderMaxPlotInstances (for a maximum of 1 held necromancer on barrows)...

    Also spawns based on nearby civs (f.e. Doviello/Lanun/Hippus "Independents"), Water units that have land units loaded etc. I also plan to rework the Lair exploring system with Spawninfos. The mentioned tags are not much work, integrating the exploring system probably is.

    But these are currently low priority for me. I was planning to release the Wilderness component soon, but then I realized that it is just not fun; there is no reason to explore an island only to get either eaten by a cave bear, or capture it and simply have a boring 8 Strength unit. I have to figure out some rewards for exploring wilderness. (f.e. something like the scorpion giving poisoned blade in ExtraModMod)

    About different races for barbarians: Yes, it's implemented, and it works quite well (apart from unique buildings, but barbs don't build buildings in MNAI anyway).

    I think the only advantage of MultiBarb would be to have Doviello at peace with animals, orcs at peace with orcs and infernals at peace with demons; at the cost of probably a little performance loss. Also it would open possibilities for modders; I thought about a "independent" player, similar to the one in RFC. Besides that, it would integrate nicely with Wilderness and the SpawnInfos, but not well with BarbarianCultures.

    For your EDIT: Yes it does, and it allows multiple spawns per lair depending on conditions.

    EDIT2: Err, no, sorry, I misread. Just regular Lair spawns, not from exploration. But it's planned, as I wrote above.

  3. joseasoler reporter

    Sounds awesome :)

    It seems like BarbsPlus will require a lot of playtesting and balancing (specially the spawn changes). 0.3.1 will only include bugfixes and minor stuff, but 0.4.0 could include any parts of BarbsPlus that you consider ready for testing and feedback (0.3.1 should be ready in a few weeks, 0.4.0 will take months).

    With regard to possible wilderness rewards and the exploring system, new equipment and items could be added (I have always thought that vanilla FFH2 has too few items). Granting special minor promotions could also be an option. Killing certain units could grant an item that creates a building with a minor effect in cities (I wonder if the AI can handle this, though). IIRC some mods did stuff related to exploration, asking on the forums would get more ideas :)

    How does BarbsPlus handle Acheron and its special units?

    I also like that Terrain Flavour makes placement of civs universal. How does Terrain Flavour interact with MapScripts that already include placement of civilizations? Can the Terrain Flavour option be turned off? (I'm guessing that players that value balance over flavour will want this off)

    With all those features, MultiBarb would indeed only be required for keeping civs at peace with certain barbarian factions. This would IMO be a great improvement because of the annoyance that some situations cause and the weirdness with regard to lore that sometimes appear. It is anticlimatic to build Samhain and spend the next 10 turns fighting Frostlings (Illians would be at peace with Winter creatures) and it also does not make much sense that the Clan of Embers can safely ignore apocalypse units while the Sheaim have to suffer them (IMO it's fine that Sheaim are not at peace with Infernal barbarians, but at least with this change normal barbarian leaders wouldn't be at peace with them either).

    All barbarian cultures would belong to the default barbarian civilization; only factions that require special "at peace" requirements would be different barbarian civilizations (and they would be at peace with other barbarians factions).

    Having said that, since BarbsPlus aims to implement all of the things I wanted besides peace with different barbarian factions, the priority of having MultiBarb is quite lower now.

  4. lfgr

    I decided to post a Thread on civfanatics to hopefully involve other interested people.

    Terrain Flavour can be turned off, BarbarianCultures, too; I think other diversity among barbarians through SpawnInfos should be also switchable. I could implement a Prereq/BlockGameOption tag.

    You are right; barbarian cultures could work together with MultiBarb that way.

    I'd suggest we figure out what parts of the SpawnInfos and Barbarian Cultures you want to have in, and after we merged it in, I'll maybe at least take a look at the MultiBarb Code. It certainly would be cool, I wonder how difficult it would be to merge it. But it wouldn't require big changes to BarbarianCultures and SpawnInfos.

  5. joseasoler reporter

    As long as the barbarian cultures and spawn infos you are planning fit into the goals of ExtraModMod (they must fit into the lore and not alter it besides minor stuff) I'll probably want all of them. I'll continue discussing BarbsPlus in its thread to keep our discussion more visible.

    The merge of the MultiBarb component itself was relatively simple because the RifE developers mark all source code lines of their components clearly in their source code. My biggest problem with my failed merge wasn't the MultiBarb component itself, but how it interacted with all other components, specially the spawn system.

    Since RifE spawn system is completely different from what is present in vanilla FFH2/MNAI/ExtraModMod, and since the vanilla system is completely hardcoded everywhere, it was hellish to make it work with MultiBarb and I eventually gave up and worked in more pressing stuff instead. Since SpawnInfos is far closer to the RifE system and it removes hardcoding, it would be a better start point for a MultiBarb merge by far.

  6. Tasunke Witka

    This looks pretty awesome. Upon reading the wiki I have this one critique ... I noticed that Ogres are in the list of 'Azer co-spawns' ... and as Ogres are far stronger than Azers, I feel that perhaps Ogres should be their own spawn.

    Make an Ogre spawn which gives 0-2 of the spawn promotions to all units, and give it two co-spawn partners among lower level orc and goblin units. (Orc Warrior, Orc Axeman, Scorpion Clan Goblin, Scorpion Clan Goblin Archer, Scorpion Clan Goblin Wolfrider). Extra chances of spawning on Dungeon and Goblin Fort. Extra chance if on Hill. High Wilderness only until (Bronzeworking?) or possibly Smelting, as you said this mod tends to give Barbs techs faster ... ?

  7. joseasoler reporter

    For 0.6.0, my focus will be finishing at least equipment and animals. It would be great to have other components too, if they are done by then. Unless I stumble upon something ugly or the Puppet States OOS is more complicated than it seems to be, 0.5.0 should get a release this weekend.

  8. Log in to comment