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

Units: Types and Graphics

Discussion in 'Civ4Col - Medieval: Conquests' started by Kailric, Feb 3, 2016.

  1. heroicfort

    heroicfort Chieftain

    Joined:
    Jan 24, 2016
    Messages:
    116
    Location:
    In front of a PC screen
    hi kailric,
    i need a little help cause i couldn't locate a folder named "infantry" nor search came up with smth. does it have another name in the units directory?


    EDIT: also, you have a great unit that, in my personal opinion would make a great peasant with leather armor :)
     
  2. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone

    Ahh, kk, yeah that info would help. I found the unit below. And sorry about the disarray in the unit/xml files. I downloaded tons of units at the start of this and went to fixing/testing them out in game. I had no idea exactly which units would make the cut so nothing has been made official yet, being made all cleaned up and tidy, thus the current mess of things. We can start with the Infantry however. We can name/rename the new Nifs as below:


    Generic_Infantry_Light : Infantry(Light-cloth armor and spear)
    Generic_Infantry_Shield : Infantry(Shield- cloth armor, spear, and shield)
    Generic_Infantry_Leather : Infantry(Leather- spear and shield)
    Generic_Infantry_Regular : Infantry(Regular- perhaps with Shield and Leather)
    Generic_Infantry_Heavy : Infantry(Heavy)


    Below is the file paths. To find these the current easiest way is to go to Civ4UnitsInfos.XML and search for the Profession name such as "Infantry". You'll find a <ProfessionType> tag such as PROFESSION_INFANTRY1. Then look at its art tag which would be ART_DEF_PROFESSION_ANGLO_SPEARMAN, then look that tag up in the Civ4ArtDefines_Unit.xml. The Nif in this case would be early_spearman, which isn't the name I gave it but the name it was downloaded with.

    Code:
    <UnitArtInfo>
    	<Type>ART_DEF_PROFESSION_ANGLO_SPEARMAN</Type>
    	<Button>Art/Buttons/Units/pro_infantry.dds</Button>
    	<FullLengthIcon>Art/Buttons/Units/pro_infantryCM.dds</FullLengthIcon>
    	<fScale>0.54</fScale>
    	<fInterfaceScale>0.8</fInterfaceScale>
    	<NIF>Art/Units/early_spearman/early_spearman.nif</NIF>
    	<KFM>Art/Units/HeavySpearman/HeavySpearman.kfm</KFM>
    	<fBattleDistance>0.35</fBattleDistance>
    	<fRangedDeathTime>0.31</fRangedDeathTime>
    	<bActAsRanged>0</bActAsRanged>
    	<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
    	<AudioRunSounds>
    		<AudioRunTypeLoop/>
    		<AudioRunTypeEnd/>
    	</AudioRunSounds>
    </UnitArtInfo>
     
  3. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    That unit is currently being used as a Slave Soldier Profession, but yeah, its a nice unit.

    Edit: its one of those units I had to port into blender to get to work in Col, thus its hand positions are a bit off. Not sure if you can do anything about that.
     
  4. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    I have been thinking about that. Something along the line of adding a string to tell what the "shared button" should say. However thinking a bit more, I wonder if it would be best to just leave it as it is and then set the parent profession to bIsGraphical. That way we can have the parent profession and set string, button icon and all that with the current code and still have full control over the shared button appearance.
     
  5. heroicfort

    heroicfort Chieftain

    Joined:
    Jan 24, 2016
    Messages:
    116
    Location:
    In front of a PC screen
    hi kailric,
    i generally avoid to change the name of the nif file because if it happens to be in a folder without it's kfm/kf files, i would still know which ones it uses by looking at it's name. that is why i recommended to put the desirable name of the unit to the folder.
    another thing would be to carefully check if the unit that is about to be edited is good for the mod's purposes or if we can find somewhere else in the forum a better one. also it is important if the unit is supposed to belong to a civ or it's a generic unit.
    i think this will be a great opportunity to put some order to the chaos :) .
     
  6. heroicfort

    heroicfort Chieftain

    Joined:
    Jan 24, 2016
    Messages:
    116
    Location:
    In front of a PC screen
    that's exactly what i'm here for!!! not only that, but i have already one that i edited a long time ago because i was planning to use it in my mod.
    only problem is that it doesn't have a proper shield. and by proper i mean a shield that it would be as awesome as the unit :) ! if you want it without a shield it's ok but if you want it with a shield i would suggest we put a nice one so that this great unit won't go to waste by smth that doesn't look good or doesn't match :) .

    EDIT 1: sorry for the double post :)

    EDIT 2: here is an image of the unit without a shield. it uses the papal spearman kfm and not by chance. it is very important to assign the unit to a kfm that would not distort the mesh :)
     
  7. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Ok, so what you are saying is that we should name the folder the unit is in "
    Generic_Infantry_Light" and leave the nif names the same, sounds reasonable.

    Well, it all depends on how much work you are wanting to do on this. At the moment, we need a generic unit for the Civs that can fill in until we can round up more specific units. Rounding up those units and getting them to work with Colonization would take an extensive amount of time. So, I'm suggesting simply adjust the model we currently have.

    But that unit may not just be able to plop right into Colonization (unless you've already done that), you may have to do that trick with blender first and that is when the distortion comes it lots of times.
     
  8. heroicfort

    heroicfort Chieftain

    Joined:
    Jan 24, 2016
    Messages:
    116
    Location:
    In front of a PC screen
    hi Kailric,
    the reason for the unit's (or any unit's for that matter) deformation is, as i said, a matter of the unit itself and the skeleton you assigning it. i did a lot of micro-work to this unit (re-assigned vertices, fixed uv's where needed, fixed bones position/rotation where needed, etc :) ) so this unit is, in a way, different than the one you have in your mod, although they look the same :) .
    anyway, the only way to found out is to test it. i'm planning to make a mini (or should i say a micro :) ) mod for ingame unit testing and i'll post the results :) .
     
  9. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Hmm, I remember I had to reassign custom made Unit skeletons to a Colonization unit skeleton in some instances. I know I did this for the Citizen units as I didn't want them looking like they where ready for battle (battle stances and such). But it seems like I remember having to do this sometimes as well just to get them to work in Colonization. Anyway, if the unit doesn't work you can try two things; the blender import/export trick and then if that still doesn't work you can assign it to a Colonization compatible skeleton.

    But as you say, you already done work on this unit. Most of the default Civ4 units will work in Colonization with some minor changes... here is a link that details some of these things....

    http://forums.civfanatics.com/showthread.php?t=317419
     
  10. heroicfort

    heroicfort Chieftain

    Joined:
    Jan 24, 2016
    Messages:
    116
    Location:
    In front of a PC screen
    hi Kailric,
    i've read the tutorial in the link you posted and it was very enlightening. if i'm not mistaken it talks about team colour and unit sounds and effects. the good news is the unit i have doesn't use a team color but if it did i think i could try and see if i can add it. the bad news is when it comes to unit sounds and effects i don't know much about them because no need ever rose to edit them.
    so, my thoughts are to upload the unit i have as it is (meaning a civ4 unit) and then you can add smth if you want.
     

Share This Page