Adding additional national units

thinkingnut

Warlord
Joined
Sep 18, 2013
Messages
146
Hi there,

Was wondering how would I add the unit art for the units of a whole new nation?

For example, in the main game, there's Archer_Asian and Archer_European. Let's say, I have a nation called X, and I have a specific unit art for the archers of nation X. The unit would of course stay the same in terms of stats, but it's the appearance that would be unique if I chose that nation in game. How would I proceed to add this unit art to the game?

Many thanks, :crazyeye:
T.N
 
Use civilizations/CIV4UnitArtStyleTypeInfos

Hm... Thank you for the tip.

I got that open, and did the prerequisite stuff. When it was time to write in the kfm bit like in pic 1, I tried finding the required kfm file. Can't find it. Apparently, the original mod I'm copying this stuff from links it like in pic 2. But when I follow the pathway, I get this and can't locate the kfm. See pic 3. Is it hidden somewhere or do I have unlock it somehow? :confused:

Yeah... Had a look at the archer skin in game if I just put in the usual /archer_chinese.kfm... It does not look right lol.
 

Attachments

  • pic1.pdf
    pic1.pdf
    99.8 KB · Views: 53
  • pic 2.pdf
    pic 2.pdf
    94.2 KB · Views: 74
  • pic3.pdf
    pic3.pdf
    69.3 KB · Views: 65
  • Screen Shot 2014-04-16 at 00.21.36.jpg
    Screen Shot 2014-04-16 at 00.21.36.jpg
    155.2 KB · Views: 54
I don't understand your problem.

ART_DEF_UNIT_ARCHER_CHINESE is already included in BtS/.../CIV4ArtDefines_Unit.xml

Its files are located in Warlords/Assets/Art/Units and of course are correctly referenced in the above file.
 
I don't understand your problem.

ART_DEF_UNIT_ARCHER_CHINESE is already included in BtS/.../CIV4ArtDefines_Unit.xml

Its files are located in Warlords/Assets/Art/Units and of course are correctly referenced in the above file.

Hm, I mean the art of this unit has its own custom kfm file. I'm trying to add a unique skin to all the units of this civ of mine. The location of these skins are from the History Rewritten Mod. I unpackaged the HR_Units.fpk folder, and went to art/units/chinese archer/ and supposedly, given pic 2 of my last post, the HR assets links the required kfm file to be in that folder. When I go there, what I see is pic 3 = no kfm file to be found.

My question is, how do I find this kfm file? Or do I have to do something to see it?

Hope I clarified the issue.
 
So, HR has changed the unit but not the animation.

From what it seems, the reference to the kfm is pointing to the standard one which you will find in Warlords/Assets/Art/Units/Archer_Chinese. If you put it as
Code:
<KFM>Art/Units/Archer_Chinese/Archer_Chinese.kfm</KFM>
it should work, no?
 
So, HR has changed the unit but not the animation.

From what it seems, the reference to the kfm is pointing to the standard one which you will find in Warlords/Assets/Art/Units/Archer_Chinese. If you put it as
Code:
<KFM>Art/Units/Archer_Chinese/Archer_Chinese.kfm</KFM>
it should work, no?

Yes, I came to the same conclusion as you. But as I said in my earlier post, if I just put in Archer_Chinese.kfm, the appearance of the unit in game looks off. Please refer to the screenshot of the archer (in my first post). Notice how his arm is somehow raised, and there is a stray arrow suspended in mid-air.

Edit: So I guess that really puts us back to the issue: We need to find the right kfm file, and as you can see from my pics, it is not there despite the written pathways pointing to it supposedly being there.
 
Hmm, I see. I'm not very familiar with the graphical aspects of a unit. kfm is for animation only, no?

Supposedly, you have tried HR and the unit works for you. On top of that, you prefer it to the "official" one.

Sorry, I don't really have a clue.
 
Hmm, I see. I'm not very familiar with the graphical aspects of a unit. kfm is for animation only, no?

Supposedly, you have tried HR and the unit works for you. On top of that, you prefer it to the "official" one.

Sorry, I don't really have a clue.

Yes, kfm should be for animation. And yes, in HR the unit works. And yes, I prefer it to the standard one. It's just weird that the file pathway says it's supposedly there, but it's not.

It's ok. Thanks for your help any way.
 
It's just weird that the file pathway says it's supposedly there, but it's not.

As I said earlier, it is there, just not in the folder you thought (Warlords/Assets/Art/Units/Archer_Chinese/). In that folder, there are 35 files. In Pic3, only 6? Probably in HR, it's modular.

What I would try is the following: copy the 35 files of the Warlords/Assets/Art/Units/Archer_Chinese/ folder into an art folder of your mod (if it's not modular), then copy over the 6 files from HR overriding them. Reference appropriately and hope that it works... :)
 
As I said earlier, it is there, just not in the folder you thought (Warlords/Assets/Art/Units/Archer_Chinese/). In that folder, there are 35 files. In Pic3, only 6? Probably in HR, it's modular.

What I would try is the following: copy the 35 files of the Warlords/Assets/Art/Units/Archer_Chinese/ folder into an art folder of your mod (if it's not modular), then copy over the 6 files from HR overriding them. Reference appropriately and hope that it works... :)

Got really excited by your idea. Tried it... and this is what happens.

I'm already saving the CIV4UnitArtStyleTypeInfos.xml with the code Western (Windows Latin 1) format. What went wrong?!

Edit: Checked it, and it's something about the new entry I made into CIV4UnitArtStyleTypeInfos.xml which is causing the problem. If I delete my custom entry it works again. Don't know what exactly is the problem though. :confused:
 

Attachments

Doesn't look good: it's the same problem... (line 0,0)

We can play the same game: here is the file adapted but your new text editor doesn't seem good. I also wonder about Windows Latin 1.

Is Notepad++ not compatible with Mac?
 
Doesn't look good: it's the same problem... (line 0,0)

We can play the same game: here is the file adapted but your new text editor doesn't seem good. I also wonder about Windows Latin 1.

Is Notepad++ not compatible with Mac?

As you can see, it works now. Thank you again for your help! Wonder what on earth did you do? Once I replaced my file with your file, the game loads well.

To double check the validity of Windows Latin 1, I tried retyping the exact text (the stuff with "Amberite") and saving it with Windows Latin 1. The game still works fine. Hmm...

And no, Notepad++ is not compatible with Mac. I use TextWrangler.
 

Attachments

  • Screen Shot 2014-04-16 at 17.03.46.jpg
    Screen Shot 2014-04-16 at 17.03.46.jpg
    164.9 KB · Views: 42
First, I corrected my file as the first one was based on my mod and not on BtS.

What did I do? Just add UNIT_ARTSTYLE_AMBERITE to it. Notepad++ doesn't even ask you the format (just *.xml).
 
First, I corrected my file as the first one was based on my mod and not on BtS.

What did I do? Just add UNIT_ARTSTYLE_AMBERITE to it. Notepad++ doesn't even ask you the format (just *.xml).

Oh yeah, of course. Hmm. But UNIT_ARTSTYLE_AMBERITE was already there when I took the screenshot. That's odd.

At any rate, I've tried doing the process for Anti-tank infantry, and it works!

Still don't really know why the computer rejected it, because I'm doing exactly the same thing as before, except now it doesn't give me that "0, 0 null" message.
 

Attachments

  • Screen Shot 2014-04-16 at 17.29.36.jpg
    Screen Shot 2014-04-16 at 17.29.36.jpg
    162.4 KB · Views: 71
On the Mac forum, I read about people using TextWrangler. The only advice was to save as text, never as rich text.
 
Back
Top Bottom