1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Creating two overpowered 'mess-around' Civs

Discussion in 'Civ4 - Creation & Customization' started by HateWate, Jul 8, 2020.

  1. HateWate

    HateWate Chieftain

    Joined:
    Jul 8, 2020
    Messages:
    5
    Gender:
    Male
    Simply put, I want to make two basic Civilisations using the in-game assets (Flags based on Raelian symbols because they're easy to find, semi-similar, and fairly distinct):
    • The Collective, which has access to every Unique Unit/Building in the game (instead of a Musketman, you can train either a Musketeer or a Janissary, or any combination you wish), but requires that you take either two Traits for access to both, or a pre-existing Trait and one Trait that blocks out the other Unique line. This would require additional coding, probably added onto the Traits, that prevents older Units/Buildings from being obsoleted to have the full effect, but I can live with leaving that for later or simply not having the option. It would be an annoyance but it wouldn't be a HUGE deal; and
    • The Cumulative, which has its own line of Units/Buildings (Cumulative Warrior, Cumulative Granary, etc) which have all the bonuses divided up between other Civilisation's Unique Units/Buildings (Musketmen start with both +1 Movement and +25% vs Melee/Ranged/Gunpowder and Oromo Warrior bonuses, etc)
    I started with this tutorial here, then realised that not only is it built around creating an original Civ from scratch, I also know barely anything about Python (though I'm confident I can do basic XML editing), and I'm not really sure where to start, or what the 'Work Smarter, Not Harder' method is. Also interested in spreading the two Civs to other mods in the future, like FfH2, though that would require a completely different approach, but my main question is thus: what is the simplest way of making a mod that just throws in two Civilisations that use in-game assets/adds a few more that are just code-based variations (which don't use custom models/sound effects/graphics, etc), and what time-saving measures/tutorials do the veterans recommend?
     
  2. HateWate

    HateWate Chieftain

    Joined:
    Jul 8, 2020
    Messages:
    5
    Gender:
    Male
  3. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,058
    Gender:
    Male
    Location:
    Leblanc
    There are no time savers to understanding how things work. That said, what you want to do is comparatively easy and should only require XML (with one limitation).

    Some pointers:
    - the XML can be found in Assets/XML
    - making a new mod is simply adding a directory in Beyond the Sword/Mods and putting copies of the files that the mod changes into it (preserving paths). You also need a <yourmodname>.ini file, which you can copy and lightly edit from any other mod.
    - look into the XML reference wiki

    For the Collective civ:
    - editing CIV4CivilizationInfos.xml should be enough. This file describes all civilizations and what their unique units and buildings are
    - limitation I mentioned: the game only allows one replacement per unit/building. So you would have to choose between Musketeer and Janissary for the Musketman. I could think of a tedious workaround to solve this via XML.

    For the Cumulative civ:
    - you have to edit CIV4BuildingInfos.xml and CIV4UnitInfos.xml to make the new buildings and units that have the cumulative advantages
    - CIV4CivilizationInfos.xml for the new civ itself

    Especially as a beginner, although I think this is good practice is general, I would never "write" XML manually. Instead you look in the file for the closest equivalent of what you are looking for, and you copy paste it and then edit it to suit your needs. For example, for the Collective civ you could start making a copy of any existing civ and give it all the unique buildings/units copied from their original civs.
     
  4. HateWate

    HateWate Chieftain

    Joined:
    Jul 8, 2020
    Messages:
    5
    Gender:
    Male
    Much appreciated. I suppose FfH2 has such a 'workaround' due to all the 'Unique' Units each Civilization has (or they simply set up a research path that says 'you can build Warriors or you can build a conveniently near-identical replacement that's treated as an entirely-different unit, so it technically isn't a Unique Unit), but that does explain my confusion as to why no-one had already done something like this.

    Don't worry, I wasn't going to try and create these manually, just edit pre-existing files, but my first foray of 'just copy all the Next War files and strip away everything that isn't directly connected to what I want to edit' ended pretty quickly when I realised I didn't know for sure which XML files I needed to keep/edit. Good to hear there's a dedicated Wiki for this.
     
  5. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,058
    Gender:
    Male
    Location:
    Leblanc
    I am not completely sure, but FFH probably uses the workaround I was hinting at. Basically the game has the concept of a unit class and a unit. For example, Roman Legions, and Aztec Jaguars and normal Swordsmen are all units of the "Swordsman" class. Most of the game code (e.g. the unit you're currently building) is built around unit classes, and the civ you're currently playing only decides which unit type is slotted into the unit class type.

    A way around that is to make a specific "Roman Legion" unit class and a specific "Aztec Jaguar" unit class, and then bar all civs but Romans and Aztecs respectively from using them (if you've already looked into the civs file, you can see that for Barbarians they blocked off some units like that by setting its unique unit to NONE). It's tedious if you want to apply this to all unique units, and might mess up some hypothetical "strong vs. swordsmen" effects (cause Legions and Jaguars then aren't Swordsmen anymore), but it would work.
     

Share This Page