1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Specialized Barbarian Units

Discussion in 'Civ5 - Modpacks' started by Lord Shadow, Oct 4, 2010.

  1. Lord Shadow

    Lord Shadow General

    Joined:
    Oct 14, 2005
    Messages:
    1,812
    Location:
    Buenos Aires
    Available in the Mod Browser database.
    Latest release: Version 2

    Changelog:
    Code:
    [U]Version 2[/U]
    - Fixed a crash when loading savegames.
    
    [U]Version 1[/U]
    - Initial release.
    For the purposes of granting the Barbarian faction more uniqueness, I've been pondering giving them a special unit tree, since I don't quite like the idea of them being able to build exactly the same units normal civilizations can. Firaxis started on the right foot with the Brute and the Galley, but that's as far as they went.

    LAND UNITS

    Brute (unchanged, comparable to the Warrior)
    Graphic: Brute, obviously
    Strength: 6
    Movement: 2
    Cost: 20

    Bandit (comparable to the Archer)
    Graphic: (Barbarian?) Archer
    Strength: 4, Ranged: 7
    Range: 2
    Movement: 2
    Cost: 40
    Technology Required: Archery
    Special Abilities: Performs ranged attacks.

    Ambusher (comparable to the Spearman)
    Graphic: (Barbarian?) Spearman
    Strength: 7
    Movement: 2
    Cost: 30
    Technology Required: Bronze Working
    Special Abilities: Receives a +100% combat bonus against mounted units.

    Brigand (comparable to the Pikeman)
    Graphic: (Barbarian?) Swordsman
    Strength: 10
    Movement: 2
    Cost: 50
    Technology Required: Civil Service

    Raider (comparable to the Knight)
    Graphic: Mandekalu Cavalry
    Strength: 18
    Movement: 3
    Cost: 75
    Technology Required: Chivalry
    Special Abilities: Can move after attacking.

    Partisan (comparable to the Musketman)
    Graphic: Minuteman
    Strength: 16
    Movement: 2
    Cost: 70
    Technology Required: Gunpowder
    Special Abilities: Receives a +20% combat bonus in rough terrain (Drill I).

    Marauder (comparable to Cavalry)
    Graphic: Cossack
    Strength: 25
    Movement: 3
    Cost: 150
    Technology Required: Military Science
    Special Abilities: Receives a +20% combat bonus in open terrain (Shock I).

    Guerrilla (comparable to Infantry)
    Graphic: Paratrooper
    Strength: 36
    Movement: 2
    Cost: 175
    Technology Required: Replaceable Parts
    Special Abilities: Ignores terrain movement costs.


    SEA UNITS

    Galley (unchanged, comparable to the Trireme)
    Graphic: Galley, obviously
    Strength: 5, Ranged: 3
    Range: 2
    Movement: 3
    Cost: 50
    Special Abilities: Performs ranged attacks.

    Privateer (comparable to the Frigate)
    Graphic: Frigate
    Strength: 25, Ranged: 12
    Range: 2
    Movement: 6
    Cost: 140
    Technology Required: Navigation
    Special Abilities: Performs ranged attacks.

    Gunboat (comparable to the Destroyer)
    Graphic: Destroyer
    Strength: 32, Ranged: 18
    Range: 2
    Movement: 8
    Cost: 300
    Technology Required: Electricity
    Special Abilities: Performs ranged attacks and air interceptions, receives a +1 bonus to Sight, and can Indirect Fire. However, it can't see submarines, nor gains any bonus against them.


    Graphical options are unfortunately limited given the current, embryonic state of Civ5 graphics modding, but that department will improve, eventually.

    The land units experimentally cost half as much as their 'civilized' counterparts, following the apparent cost style of the Brute, which by default costs half as much as the Warrior. Sea units, following the Galley's proverbial footsteps, are somewhat cheaper and weaker than their standard variants. I've given Partisans and Guerrilla bonuses that make them stronger than Musketmen and Infantry since they'll have to endure periods in which they will be invariably outclassed. Maybe I should make them a bit stronger and have them appear a tad later, who knows.

    The idea is that barbarians should be able to train these units and these units alone. Besides granting them a more stateless-like feel, it'd impose a cap on what they can produce, resulting in more flavourful choices.

    Thoughts and suggestions appreciated! :)
     
  2. TCoZ

    TCoZ Chieftain

    Joined:
    Dec 8, 2009
    Messages:
    21
    This idea is great! There needs to be a barb archer replacement, though.

    Can't wait to see it done.
     
  3. evanbgood

    evanbgood Chieftain

    Joined:
    Sep 26, 2010
    Messages:
    77
    Love it! Even though a barb-rampant game I played recently helped me come up with the best band name ever: "Barbarian Paratrooper".
    One thought, though. Barbarians make ranged units on occasion, too. That might be a bit trickier to come up with, though. Slings and javelins maybe?
     
  4. Szpilman

    Szpilman Void Co. Chairman

    Joined:
    Dec 2, 2006
    Messages:
    746
    Location:
    Cola
    It's not at all hard to prevent them from having units, they are treated as a Civilization so you just override the UNITCLASS to nothing.

    Though I'm interested in knowing if Tech requirements have any effect on Barbs. I thought they just built what the best player was building. Actually I don't think they 'build' anything as it is, so I also question what "Cost" does -- it seems to me they just spawn units every so often.
    If you get to know how these affect barbs at all, do report :)

    And yeah, beyond the archer, if you really want these to be all that barbarians have, you should also be looking to replace the unique barb units Barbarian Spearman and Barbarian Swordsman.

    Are you working on such mod?
     
  5. CYZ

    CYZ Toileteer

    Joined:
    Sep 29, 2010
    Messages:
    1,376
    Would ofcourse be great to make some barb unites with unique capabilities especially focussed on annoying the player :p. That said, I really like the guerilla idea.

    Spearthrower with bonus against cavalry?
     
  6. Nercury

    Nercury Chieftain

    Joined:
    Aug 5, 2006
    Messages:
    126
    Location:
    Lithuania
    I swear I saw a barbarian destroyer once. Go ahead with your idea :)
     
  7. Spendoza

    Spendoza Chieftain

    Joined:
    Mar 20, 2009
    Messages:
    63
    Location:
    Ontario, Canada
    +1 this idea is go
    can't wait to see it in action
     
  8. Kruelgor

    Kruelgor Chieftain

    Joined:
    May 12, 2010
    Messages:
    1,165
    Location:
    The United States
  9. Lord Shadow

    Lord Shadow General

    Joined:
    Oct 14, 2005
    Messages:
    1,812
    Location:
    Buenos Aires
    I'm working on this mod, yes.

    The mechanics of the barbarian camps themselves are the main unknown: how do they work exactly? Do they get an alotted number of hammers every turn depending on the era (that one being the highest reached by a normal player)? Maybe they automatically get techs as players research them, and train units accordingly.

    And yes, I've noticed there's separate definitions for barbarian archers, spearmen and swordsmen, but they don't appear to the different. Except for the archers, which are 1 point stronger in ranged combat. Maybe slightly tweaked 3D models? I haven't noticed. They're hidden from the Civilopedia, but I think that's about it.

    Also, it turns out the barbarian faction is already banned from constructing quite a number of units, like carriers, battleships and modern armor. I'm pretty sure their modern naval choices are restrictred to destroyers. But anyway, I'll be further restricting them in accordance with my custom tree.

    Here's the Archer and Spearman replacements:

    Bandit (comparable to the Archer)
    Graphic: (Barbarian?) Archer
    Strength: 4, Ranged: 7
    Range: 2
    Movement: 2
    Cost: 40
    Technology Required: Archery
    Special Abilities: Performs ranged attacks.

    Ambusher (comparable to the Spearman)
    Graphic: (Barbarian?) Spearman
    Strength: 7
    Movement: 2
    Cost: 30
    Technology Required: Bronze Working
    Special Abilities: Receives a +100% combat bonus against mounted units.


    I feel a bit bad giving them this level of variety early on, but having that variety decay as time goes on. I guess I'll give them something for cavalry. I wish I had something better than the Cossack graphic at hand. Something like the Tuareg raiders that appear in so many movies. :p

    Marauder (comparable to Cavalry)
    Graphic: Cossack
    Strength: 25
    Movement: 3
    Cost: 150
    Technology Required: Military Science
    Special Abilities: Receives a +20% combat bonus in open terrain (Shock I).
     
  10. Dict4t0rCiv

    Dict4t0rCiv Chieftain

    Joined:
    Sep 15, 2010
    Messages:
    35
    Great idea! :goodjob: This will really improve the barbs; best of luck with it.
     
  11. Szpilman

    Szpilman Void Co. Chairman

    Joined:
    Dec 2, 2006
    Messages:
    746
    Location:
    Cola
    Actually there's a reason why there are separate definitions: the UnitFlavors table. You should look into it to adapt your new units to how barbarians will use them, that's what flavors are all about. They work in two ways: the flavors of a same unit determines if it's more likely to attack, defend, scout, etc. And the same type of flavor across different units in the same Civilization determines which unit it is more likely to use for a given action (defend his camp/city, attack, etc.)
     
  12. Lord Shadow

    Lord Shadow General

    Joined:
    Oct 14, 2005
    Messages:
    1,812
    Location:
    Buenos Aires
    Ah, yes. Oddly enough, while crafting the units, I stumbled upon the fact the Brute has no default Unit_AITypes nor Unit_Flavors. They will have some according to the standard Warrior, now.

    The units themselves are done now, but I haven't tested anything yet. It's been all textwork so far. What's left to do is tweaking the barbarian faction itself so that it takes these unique units and shuns the rest of the conventional unit tree. Shouldn't be too hard. :)

    Ehm, alright, first problem. How do I change, using the Update function, this:

    Code:
            <Row>
                <CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
                <UnitClassType>UNITCLASS_SWORDSMAN</UnitClassType>
                <UnitType>UNIT_BARBARIAN_SWORDSMAN</UnitType>
            </Row>
    ...to this:
    Code:
            <Row>
                <CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
                <UnitClassType>UNITCLASS_SWORDSMAN</UnitClassType>
                <UnitType/>
            </Row>
    I need to do so, in this instance for example, to completely disable Swordsman production for the barbarians. :confused:


    EDIT: Maybe something like this?

    Code:
    <GameData>
        <Civilization_UnitClassOverrides>
            <Update>
                <Set UnitType=/>
                <Where CivilizationType="CIVILIZATION_BARBARIAN" UnitClassType="UNITCLASS_SWORDSMAN"/>
            </Update>
        </Civilization_UnitClassOverrides>
    </GameData>
    ModBuddy's complaining about a missing attribute value, but I don't know if the game will be able to handle <Set UnitType=""/> well...

    Wait, I took a look at the wiki, and found out this may work:

    Code:
    <GameData>
        <Civilization_UnitClassOverrides>
            <Update>
                <Where CivilizationType="CIVILIZATION_BARBARIAN" UnitClassType="UNITCLASS_SWORDSMAN"/>
                <Set>
                    <UnitType/>
                </Set>
            </Update>
        </Civilization_UnitClassOverrides>
    </GameData>
    I'd appreciate it if someone could confirm this.
     
  13. Nercury

    Nercury Chieftain

    Joined:
    Aug 5, 2006
    Messages:
    126
    Location:
    Lithuania
    Second post in this thread might help. Basically, you may write SQL sentences to update things. And you can do "and" in them:

    Code:
    UPDATE Civilization_UnitClassOverrides SET 'UnitType' = NULL WHERE CivilizationType = 'CIVILIZATION_BARBARIAN' and UnitClassType = 'UNITCLASS_SWORDSMAN';
    
    Warning! I wrote this by looking at your attempt to modify them, I haven't written single update like this yet.
     
  14. Lord Shadow

    Lord Shadow General

    Joined:
    Oct 14, 2005
    Messages:
    1,812
    Location:
    Buenos Aires
    Alright, I think it's done, at least for playtesting. I probably need to come up with a catchy name, like Barbariety or something. :lol:

    The units themselves appear to work fine, and have the correct icons, values and all. Each one also has a modest Civilopedia entry. However, what's left to test is the barbarian faction itself throughout several games: is their unit tree properly narrowed down to my units? Are the unit costs sensible or are they producing too much? Have I missed anything?

    Should I upload it to the Mod Browser's database and/or create a thread in the Modpacks subforum with a direct download link?
     
  15. Szpilman

    Szpilman Void Co. Chairman

    Joined:
    Dec 2, 2006
    Messages:
    746
    Location:
    Cola
    Please do, it'd be a pleasure to test your barbarian mod while testing mine.
     
  16. Lord Shadow

    Lord Shadow General

    Joined:
    Oct 14, 2005
    Messages:
    1,812
    Location:
    Buenos Aires
    There, it's up on the Mod Browser database, under the name Specialized Barbarian Units. I wonder how I'll be able to update it to newer versions as they come.

    I hope the database overwrites older versions of mods with the same ID.
     
  17. Nercury

    Nercury Chieftain

    Joined:
    Aug 5, 2006
    Messages:
    126
    Location:
    Lithuania
    Just mark older ones as private. When marked, it takes some time for the change to reach all servers.
     
  18. db0

    db0 Bane of Misoids

    Joined:
    Aug 31, 2010
    Messages:
    89
    Location:
    Somewhere far beyond...
    There's a very nasty bug with this mod. Game will give an exception and crash on game load. I am using the Dx11 verion of Civ and I am running it in combination with a few other mods.

    For now I had to disable it but I hope you can trace this as I really like this idea.
     
  19. Lord Shadow

    Lord Shadow General

    Joined:
    Oct 14, 2005
    Messages:
    1,812
    Location:
    Buenos Aires
    Oh, crap. Yes, I started a game with Persia just fine, but saved and tried to load to check this and got a runtime error and crash. I'm using the DX11 version as well.

    The logs (in My Games\Sid Meier's Civilization 5\Logs) aren't saying anything. I don't even know if I have to say something for them to record errors.

    No idea what to do...
     
  20. db0

    db0 Bane of Misoids

    Joined:
    Aug 31, 2010
    Messages:
    89
    Location:
    Somewhere far beyond...
    Starting removing chunks of code until it doesn't crash anymore. Then see why the last chunk you removed is causing it.
     

Share This Page