I'm wondering if this is possible

Joined
Jun 25, 2012
Messages
921
I want to get into modding, and my first project I want to do is some new civilizations. But I have a few questions:

1. Where are some good guides to creating new civilizations?
2. How hard is creating new unit models?
3. How much of this is possible?
a. Attaching faith yields to great works?
b. Making units gain faith if they do more damage than they take?
c. Making missionaries act like great prophets?

Thanks in advance!
 
1. Though it's outdated, you should still check it out
2. It's not hard unless you don't know how to make models (most modders use Blender)
3a. That's possible if you know how to do Lua
3b. Same as above
3c. Same as 3a
 
What are some good tutorials for learning how to create models?
 
c. Making missionaries act like great prophets?

I think you can do this just in XML, but I'm new at this so now sure. The missionary has variables for how much strength they have and how many times they can spread religious, so if you could update the files to have 4 spread religious uses and have FoundReligion set to "true", etc., I would think that would be what you want.

I've pasted the row for each unit below, with the relevant section bolded. So far I've only added new units to the game, not altered exiting ones, so I can't say exactly how to insert it.


Missionary:

<Class>UNITCLASS_MISSIONARY</Class><Type>UNIT_MISSIONARY</Type><Cost>-1</Cost><FaithCost>200</FaithCost><Moves>4</Moves><Capture>UNITCLASS_MISSIONARY</Capture><CivilianAttackPriority>CIVILIAN_ATTACK_PRIORITY_LOW</CivilianAttackPriority><Domain>DOMAIN_LAND</Domain><DefaultUnitAI>UNITAI_MISSIONARY</DefaultUnitAI><Description>TXT_KEY_UNIT_MISSIONARY</Description><Civilopedia>TXT_KEY_CIV5_MISSIONARY_TEXT</Civilopedia><Strategy>TXT_KEY_UNIT_MISSIONARY_STRATEGY</Strategy><Help>TXT_KEY_UNIT_HELP_MISSIONARY</Help><AdvancedStartCost>-1</AdvancedStartCost><CombatLimit>0</CombatLimit><SpreadReligion>true</SpreadReligion><ReligionSpreads>2</ReligionSpreads><ReligiousStrength>1000</ReligiousStrength><UnitArtInfo>ART_DEF_UNIT_MISSIONARY</UnitArtInfo><UnitFlagAtlas>EXPANSION_UNIT_FLAG_ATLAS</UnitFlagAtlas><UnitFlagIconOffset>20</UnitFlagIconOffset><IconAtlas>EXPANSION_UNIT_ATLAS_1</IconAtlas><PortraitIndex>20</PortraitIndex>

Great Prophet:
<Class>UNITCLASS_PROPHET</Class><Type>UNIT_PROPHET</Type><Cost>-1</Cost><Moves>2</Moves><Capture>UNITCLASS_PROPHET</Capture><CivilianAttackPriority>CIVILIAN_ATTACK_PRIORITY_HIGH</CivilianAttackPriority><Special>SPECIALUNIT_PEOPLE</Special><Domain>DOMAIN_LAND</Domain><DefaultUnitAI>UNITAI_PROPHET</DefaultUnitAI><Description>TXT_KEY_UNIT_GREAT_PROPHET</Description><Civilopedia>TXT_KEY_CIV5_GREATPROPHETS_TEXT</Civilopedia><Strategy>TXT_KEY_UNIT_GREAT_PROPHET_STRATEGY</Strategy><AdvancedStartCost>-1</AdvancedStartCost><WorkRate>1</WorkRate><CombatLimit>0</CombatLimit><FoundReligion>true</FoundReligion><SpreadReligion>true</SpreadReligion><ReligionSpreads>4</ReligionSpreads><ReligiousStrength>1000</ReligiousStrength><UnitArtInfo>ART_DEF_UNIT_GREAT_PROPHET</UnitArtInfo><UnitFlagAtlas>EXPANSION_UNIT_FLAG_ATLAS</UnitFlagAtlas><UnitFlagIconOffset>16</UnitFlagIconOffset><IconAtlas>EXPANSION_UNIT_ATLAS_1</IconAtlas><PortraitIndex>16</PortraitIndex><MoveRate>GREAT_PERSON</MoveRate>
 
What I did originally was to download Putmalk's ancient world civ, both to play it (it's a good mod ;)) and to have a look at how he did things. I can't stress enough how useful that was for my modding development - though there are different learning styles around and that's what worked for me.

It's like flat-pack furniture. If you like to read the instructions first and follow them through, then check out the tutorials and guides section. If, like me, you're more hands-on and dive in there with a cursory glance at the instructions, then download a mod and "look under the hood".
 
UNIT_HELAMANS_SWORDSMAN is NOT the same as

<Type>UNIT_NEPHITE_HELAMANS_SWORDSMAN</Type>

As for the rest of the problems I have no experience in modding civilizations so can't help you there.
 
UNIT_HELAMANS_SWORDSMAN is NOT the same as

<Type>UNIT_NEPHITE_HELAMANS_SWORDSMAN</Type>

As for the rest of the problems I have no experience in modding civilizations so can't help you there.

I looked at the Legion entry and the style is the same. I even replaced the file with the Kris Swordsman (so I could see if it was an issue with me not having overriden something important) and it still isn't showing up. In all of the logs that is the only error.

Even after the change:
Invalid Reference on Civilization_UnitClassOverrides.UnitType - "UNIT_NEPHITE_HELAMANS_SWORDSMAN" does not exist in Units
 
You don't have a unit class for that unit

Code:
<Type>UNIT_NEPHITE_HELAMANS_SWORDSMAN</Type>

<Class>UNITCLASS_SWORDSMAN</Class>
Isn't that how you add a unit to a class? I followed the tutorial...
 
Yes. but you don't have it in your Unit.xml. And get rid of all those junk. You don't need them (like CultureBomb etc)
 
About selecting a Civ and the scroll bar not being there (but showing up fine in advanced set-up), I had the same problem until I had at least 2 unique units or buildings for the Civ - otherwise it doesn't know what 2 pictures to show. Once I had 2 unique units, it showed up in the basic selection screen with the scroll bar. If the civilization only had two unique units and the one that's being talked about isn't working, that could be why it's not showing up.
 
Okay, I've fixed the issue with units not showing up (at least for the swordsman

I'm kind of new to SQLite Manager, and I've been able to find what looks like all of the base civs and units, but I can't find any of the expansion units for some reason. Is there a different database I need to use or am I missing something?

I had to dig in the XML files to find the missionary unit, but I couldn't find a database file that would make it easier.

Aaaaand now there's some problems with my Son of Mosiah unit. It replaces the missionary, and I just copied the XML from the normal missionary and replaced what needed to be replaced (text id's strategy, help, etc.) and it isn't showing up on the civ loading screen (and thus causing it to only be selectable through advanced setup), but it is showing up in the Civilopedia but this is what the screen looks like:
Spoiler :


And here's the errors from the database:
[1008517.875] Invalid Reference on Civilization_UnitClassOverrides.UnitType - "UNIT_NEPHITE_SON_OF_MOSIAH" does not exist in Units
[1008519.453] Invalid Reference on Unit_AITypes.UnitAIType - "UNITAI_MELEE" does not exist in UnitAIInfos
[1008519.453] Invalid Reference on Unit_AITypes.UnitType - "UNIT_NEPHITE_SON_OF_MOSIAH" does not exist in Units
[1008520.078] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_NEPHITE_SON_OF_MOSIAH" does not exist in Units

I think the unitai melee error is from the swordsman, but the other ones I don't know why they are there because I've defined the UU in both civilization.xml and units.xml.
 

Attachments

  • nephite civ.zip
    9.6 KB · Views: 23
C:/Program Files (x86)/Steam/SteamApps/common/Sid Meier's Civilization 5/Assets/dlc/expansion 1 (or 2)/units
 
UNIT_NEPHITE_SON_OF_MOSIAH

<Type>UNIT_SON_OF_MOSIAH</Type>


<Description>TXT_KEY_UNIT_SON_OF_MOSIAH</Description>

<Row Tag="TXT_KEY_UNIT_NEPHITE_SON_OF_MOSIAH">

Once again. Tags must match eachother. If they do not, errors will ensue.
 
OmniPotent42, as far as your SQL db question, you want the debug database, not the core database.

THANK YOU!
I tried most of the others but not that one.

So I've got everything to show up without glitching (I just used normal icons for now for the units) and now I'm thinking I'm going to have to start using LUA scripts, or perhaps dummy buildings.

For my UA, I want the civilization to get 1 additional faith from every source (i.e. natural wonders, religious buildings, world wonders, grand temple). Would I have to create a script that finds all of the religious buildings/wonders needed, then boost the faith output by one if the player is the nephites?

Now I think the next part is a bit trickier: I want my Helaman's Swordsman to behave sort of like a Winged Hussar, but instead of pushing the unit back it would gain x amount of faith, and would also work on defense. Any idea how I would get that to work?

EDIT: I've found a tutorial on how to add a custom trait, but I'm not sure what I should be putting in my code. What is the syntax for putting in new trait types, for example? Like the ones that you enable when editing the xml (GreatPersonModifier, YieldChanges, not the actual trait names)?
 
Top Bottom