New to modding - A few key questions...

CheddarCheese

Chieftain
Joined
Sep 6, 2011
Messages
13
Location
Canada
Hi there,
I'm a beginner at modding and have only just begun to mod some Civ 5 XML. I have come across a few mod ideas which I don't know how to start. The number one thing I want to know before I attempt any of them is if they can actually be done, not just in XML, but modding in general. On that note, my questions are:

1. Is it in any way possible to have the tech tree differ depending on civilization?

For example, America starts with and climbs the regular tech tree, but a fictional Atlantis civilization would have a completely different tree revolving around naval advancements.
This would be useful for fantasy or science fiction mods, I think. The closest I've gotten to it, is making a technology branch which only one civilization can access, leaving it locked to all others.

2. Is it possible to have a combat unit be comprised of more than one individual (like it usually is), but have them go through their dying animation all at once?

I'll try to explain: For example, I've created a unit which is made of two different figures. Two spearmen, and one longswordman (a leader figure). However, when in combat, the unit takes 2 damage, and the longswordman dies, making the unit look like a damaged spearmen unit. What I want is for NONE of the figures to die until the unit has reached zero health. Possible? Or fantasy?

3. Are there any formal guides or tutorials for modding Civilization 5 through Lua? Preferably step by step, but any helpful guide would do.

Those are the three of my most prominent. Sorry for all the questions. Any answers will be greatly appreciated. Thanks! :)
 
1. Is it in any way possible to have the tech tree differ depending on civilization?

Not without a tremendous amount of work. It'd be relatively simple if the tech trees were entirely distinct (give each one a different starting tech and branch from there), but if you wanted the two to overlap along the way then there'd be problems. There'd also be tremendous problems getting the tech trees to display in the UI, and it'd be a ridiculous amount of work creating new content (since you couldn't have the same building or unit appear at two different techs).

But the real problem would be city-states and barbarians. You see, these two groups don't research techs the normal way; they primarily steal them. (City-states can research a little the normal way, but realistically once you get past the earliest eras they'll steal all their techs.) As more major civs have a tech, the city-states have a higher chance of gaining the tech automatically each turn. And that'd be a real problem here, because if you had two distinct trees, they'd start stealing from both of them at the same time, having access to the units and buildings (including Wonders, unless you disable them by hand) of both trees.

2. Is it possible to have a combat unit be comprised of more than one individual (like it usually is), but have them go through their dying animation all at once?

Not really. The game appears to do a very, very simple little bit of logic, purely engine-side. If you have 10 hit points and five unit models, then the first guy dies after one point of damage, the second after three, and so on down the line, in the order they're defined in the unitmembers art definition file. Similar ratios apply to other types of models depending on how many members are in it. Without the DLL, we can't change this.

Now, there IS a cheat that would work: create a single 3D model that actually has multiple people in it. That way, the art definition only sees a single entity with a single damage state, and won't trigger the death animation until the last HP is lost. But forget about doing this unless you're very, VERY familiar with Blender, because you're going to have to reprogram keyframe files and remap the textures by hand. (Civ5 doesn't allow the sort of multiplied overlap that you could get away with in Civ4.)

3. Are there any formal guides or tutorials for modding Civilization 5 through Lua? Preferably step by step, but any helpful guide would do.

Beyond Kael's general modding guide (which is somewhat out of date and didn't go into too much detail on Lua), not directly. However, Lua tutorials in general can be found all over the interwebz, because it's used for plenty of stuff outside Civ. Not as widespread as Python, sure, but still it's out there. The best way to learn is simply by doing; take some existing bit of UI code and try to "improve" it. Figure out what it's trying to do at each step, and see if you can make it better. (In a mod, I mean; do NOT edit the original files.)
 
I suppose I'll have to play around with #1 to see if it breaks the game too much, and I don't think I can do anything about #2.

Thanks for your answers!
 
Back
Top Bottom