[TUTORIAL] Video Tutorials on Modding Civ4

The short version is that you have to rename ALL the appropriate nodes in the source nif and not just the BIP.
Thank you very much PPQ_Purple. I'll rename the rest of the appropriate nodes and post the results :thumbsup:
 
And be sure to copy paste the names and not retype them. A typo can quite literally ruin your day.
 
Thanks! I have been busy lately. Ping me next week and I'll try to make a video. Need to get back to it!
 
Hey everyone :)

My motivation (and also my availability) haven't really helped me get any videos done lately. I am going to try to work on my mod to get some motivation back and then perhaps some new videos will come out soonish. Give me some time and I will keep you posted. :D
 
@topsecret

Your help in xml was amazing thank you! Slight problem though. I’m almost there! So the new units, FW190, P51 Mustang, & CV2 Lexington all work in the game graphically and movement wise. However no civ can research them and when I deploy them on Civ Editor (which fully displays them correctly) the game crashes once I end my turn.
 
@topsecret

Your help in xml was amazing thank you! Slight problem though. I’m almost there! So the new units, FW190, P51 Mustang, & CV2 Lexington all work in the game graphically and movement wise. However no civ can research them and when I deploy them on Civ Editor (which fully displays them correctly) the game crashes once I end my turn.
Hmm, it's difficult to say what's happening without seeing the files. Based on what you're saying, it's possible you didn't add a tech prerequisite or perhaps Unit AI. If your mod is small, post it here and I will see if I can diagnose the problem. If there's a lot to the mod, just post the XML you added.
 
It’s a mod of the Legends of Revolution mod. I love that mod so much and their ethnic/cultural skins. Just wish it had a few more unique units. Basically I just want to add more units to that mod.
I did not add a tech but I didn’t think i needed to because I simply copy & pasted my fighters from the original fighter unit and changed the names like you did in your video (Same for the Lexington and the original carrier). So the tech should be ‘air superiority’ like it is for the fighter.

As for the Unit AI I don’t believe i touched anything with that. How do I check that?

…Shoot if you had the free time I would pay you $ to add some units and maybe a civ or 2 into the game lol
 
It’s a mod of the Legends of Revolution mod. I love that mod so much and their ethnic/cultural skins. Just wish it had a few more unique units. Basically I just want to add more units to that mod.
I did not add a tech but I didn’t think i needed to because I simply copy & pasted my fighters from the original fighter unit and changed the names like you did in your video (Same for the Lexington and the original carrier). So the tech should be ‘air superiority’ like it is for the fighter.

As for the Unit AI I don’t believe i touched anything with that. How do I check that?

…Shoot if you had the free time I would pay you $ to add some units and maybe a civ or 2 into the game lol
Well no need for $. Everything is volunteer around here. :D

If you can attach the UnitInfos XML file and the UnitClassInfos XML file, that would be helpful.
 
Yeah i felt like like maybe the class is wrong but being that I basically copy and paste and renamed I couldn’t figure it out.
I was able to go as far as to get them into the game in world builder with their proper skins ans everything but the game would crash next turn.
 
Can you upload the CIV4CivilizationInfos file as well?

I don't see anything at a quick glance. I suspect they might not be added to the CIV4CivilizationInfos file, which would explain why they couldn't be built. If that's the case, we need to fix that first. Basically, the game knows they're special units if the Class and the UnitType are different.

OR I think the crashing might be because you didn't have the default unit in the UnitInfos file but it is in the UnitClassInfos file.

Example, in UnitInfos:
Code:
            <Class>UNITCLASS_CARRIER</Class>
            <Type>UNIT_AMERICAN_USN_CARRIER</Type>

In UnitClassInfos:
Code:
        <UnitClassInfo>
            <Type>UNITCLASS_USN_CARRIER</Type>
            <Description>TXT_KEY_UNIT_USN_CARRIER</Description>
            <iMaxGlobalInstances>-1</iMaxGlobalInstances>
            <iMaxTeamInstances>-1</iMaxTeamInstances>
            <iMaxPlayerInstances>-1</iMaxPlayerInstances>
            <iInstanceCostModifier>0</iInstanceCostModifier>
            <DefaultUnit>UNIT_USN_CARRIER</DefaultUnit>
        </UnitClassInfo>

If the USN carrier is NOT supposed to be a unique unit, you need to switch the USN Class to match the one you made in the UnitClassInfos.
In UnitInfos, change it to the following and test if you can build it with the right techs, etc.
Code:
            <Class>UNITCLASS_USN_CARRIER</Class>
            <Type>UNIT_USN_CARRIER</Type>

TL: DR - <DefaultUnit> in UnitClassInfos needs to match <Type> in UnitInfos or the game doesn't know what the default unit is supposed to be for that class. Make sure every class in UnitClassInfos has a default type.
 
If you do want it to be a Unique Unit, you don't need to change the class at all. You could change <Class>UNITCLASS_USN_CARRIER</Class> in UnitInfos back to <Class>UNITCLASS_CARRIER</Class>.

Then the game will know:

Wow, this is usually a Carrier class (<Class>UNITCLASS_CARRIER</Class>), but there's a Unique Unit based on the Carrier class, and it's called USN Carrier (<Type>UNIT_AMERICAN_USN_CARRIER</Type>).
 
In summary:

Every class in UnitClassInfos should have a default unit type that every civ can build in UnitInfos.

Unique units should only be in UnitInfos, they do not need a UnitClassInfos entry.
 
I would like the USN to be a unique unit. As well as the FW190 & the P51. I was hoping to have the USN be a unique USA carrier. Then I was going to create the CV2 Lexington & CV6 Enterprise (Based off of the USN template) as 'Legend' Units.
 

Attachments

I would like the USN to be a unique unit. As well as the FW190 & the P51. I was hoping to have the USN be a unique USA carrier. Then I was going to create the CV2 Lexington & CV6 Enterprise (Based off of the USN template) as 'Legend' Units.
Ah OK. You need to remove the UnitClassInfos versions of your units if they are supposed to be unique units. Just take them away and make sure each Unique Unit is referring to the normal Unit Class in UnitInfos.

Then all you have to do is make sure you have added them in CivilizationInfos as well. I can step by step this process if you need but if you understand what I am saying, go for it and see if it solves your bugs.
 
Ah OK. You need to remove the UnitClassInfos versions of your units if they are supposed to be unique units. Just take them away and make sure each Unique Unit is referring to the normal Unit Class in UnitInfos.

Then all you have to do is make sure you have added them in CivilizationInfos as well. I can step by step this process if you need but if you understand what I am saying, go for it and see if it solves your bugs.
Do you have a list of mods you have created?
 
Back
Top Bottom