Is there a way to easily change the way a unit looks?

I tried messing with some of the settings in protomods.xml like the animation file and it does seem to change what the unit looks like but then they won’t work, I’m guessing because if you change a settler animation to a non-settler unit it doesn’t have the gather animations and stuff.
I wouldn’t mind just being able to change to a different settler that is already in the game… but would be best to change the looks to some random unit but have it have the animations and work as a settler but that might be too hard.
I basically have two settlers and right now the only way to tell them apart is their name so you have to go clicking on all of them until you find the right one. Even if I could just give them something to tell them apart like an aura or a hat or something.
I found some art files in other mods but I don’t even begin to understand them. Defining bones and all this weird code.
I’m guessing the way your buildings and units look is based on your homecity file… but that doesn’t help with having two settlers that you want to look different like in my case.

If there is a way to do this, please let me know. I would like the change the looks of several units if at all possible.

Thank you very much!

This is why I test my mods right after I made any changes. I copy paste a lot of stuff and forgetting just one /effect or something often breaks the entire mod. Its probably something minor like a single forgotten line or something.
Can be really annoying to find, but when you find it it is easily fixed.

1 Like

I found the error that was messing everything up and I don’t know how to delete the post so I just changed it to another question but now your reply doesn’t look like it has anything to do with my question so sorry about that.
I am now making backups each time I know my mod is working so I have a latest known working and a couple previous ones just in case… thanks for your reply, I thought I was going to have to start all over and it was making me sad.

In your civs.xml or civmods.xml you will find an entry for the civilization’s Culture. This is what determines the looks for the majority of buildings and sometimes units like wagons. Some buildings like the Church and Tavern require individual civilizations to be entered or else they use whatever the default look is.

The animfile or animation file that is coded in the protoy/protomods is indeed where the unit’s animations and models are defined. Some units like the Explorer may use civlogic like the Church does where each civilization can define what that unit would look like, but most use techlogic with their upgrades (which means if you make custom unit upgrades you’ll want to make a custom animfile that adds your new techs or else their appearance won’t change).

In ArtUnits.bar, extract and convert the villager.xml. Within it you’re going to see Submodels where animations, attachments, and the GrannyModel are defined, and at the end of the file a Component section which uses Culture logic to determine which submodels are used for each culture.

<component>Villager
  <logic type="Culture">
			<westerneurope>
				<logic type="Variation">
					<data>
						<submodelref ref="we_Villager"/>
					</data>
					<data>
						<submodelref ref="we_Villager_Female"/>
					</data>
					<data>
						<submodelref ref="we_Villager_Black"/>
					</data>
					<data>
						<submodelref ref="we_Villager_Female_Black"/>
					</data>
				</logic>
			</westerneurope>
			<easterneurope>
				<logic type="Variation">
					<data>
						<submodelref ref="ee_Villager"/>
					</data>
					<data>
						<submodelref ref="ee_Villager_Female"/>
					</data>
					<data>
						<submodelref ref="ee_Villager_Black"/>
					</data>
					<data>
						<submodelref ref="ee_Villager_Female_Black"/>
					</data>
				</logic>
			</easterneurope>
			<mediterranean>
				<logic type="Variation">
					<data>
						<submodelref ref="med_Villager"/>
					</data>
					<data>
						<submodelref ref="med_Villager_Female"/>
					</data>
					<data>
						<submodelref ref="med_Villager_Black"/>
					</data>
					<data>
						<submodelref ref="med_Villager_Female_Black"/>
					</data>
				</logic>
			</mediterranean>
			<aztec>
				<logic type="Variation">
					<data>
						<submodelref ref="Az_Villager"/>
					</data>
					<data>
						<submodelref ref="Az_Villager_Female"/>
					</data>
				</logic>
			</aztec>
			<iroquois>
				<logic type="Variation">
					<data>
						<submodelref ref="Nat_Villager"/>
					</data>
					<data>
						<submodelref ref="Nat_Villager_Female"/>
					</data>
				</logic>
			</iroquois>
			<sioux>
				<logic type="Variation">
					<data>
						<submodelref ref="Nat_Villager"/>
					</data>
					<data>
						<submodelref ref="Nat_Villager_Female"/>
					</data>
				</logic>
			</sioux>
			<inca>
				<logic type="Variation">
					<data>
						<submodelref ref="Nat_Villager"/>
					</data>
					<data>
						<submodelref ref="Nat_Villager_Female"/>
					</data>
				</logic>
			</inca>
			<chinese>
				<logic type="Variation">
					<data>
						<submodelref ref="Chn_Villager"/>
					</data>
					<data>
						<submodelref ref="Chn_Villager_Female"/>
					</data>
				</logic>
			</chinese>
			<japanese>
				<logic type="Variation">
					<data>
						<submodelref ref="Jpn_Villager"/>
					</data>
					<data>
						<submodelref ref="Jpn_Villager_Female"/>
					</data>
				</logic>
			</japanese>
			<indian>
				<logic type="Variation">
					<data>
						<submodelref ref="Ind_Villager"/>
					</data>
					<data>
						<submodelref ref="Ind_Villager_Female"/>
					</data>
				</logic>
			</indian>
			<africaeast>
				<logic type="Variation">
					<data>
						<submodelref ref="Eth_Villager"/>
					</data>
					<data>
						<submodelref ref="Eth_Villager_Female"/>
					</data>
				</logic>
			</africaeast>
			<africawest>
				<logic type="Variation">
					<data>
						<submodelref ref="Hau_Villager"/>
					</data>
					<data>
						<submodelref ref="Hau_Villager_Female"/>
					</data>
				</logic>
			</africawest>
		</logic>
		<watersplash>
			<texture>effects\projectiles\cannonball_splash</texture>
			<width>1.5</width>
			<height>1.5</height>
		</watersplash>
	</component>

Since you already made a new villager entry, you can rename the extracted villager file to advvillager.xml or whatever, put it in your mod’s Art/Units folder and enter the location for your new villager’s animfile on protomods. If you just want to use a different culture’s villager model then in your advvillager.xml you’d find which culture you are using and replace the submodel references with whichever alternate you want to use.

A little more complex method would be changing the model, let’s say making your villagers look like Amelia Black. Within each submodel entry of the villager.xml you’ll find a Component entry where the models are defined and any attachments such as a hat (which for villager.xml is its own file defined at units\villagers\villager_hat.xml.). If you replace a male villager entry that has a hat you’d want to remove the hat attachment since Amelia has a built-in hat.

<component>Villager<assetreference type="GrannyModel">
				<file>units\villagers\med_villager_female</file>
			</assetreference>
			<decal>
				<effecttype>default</effecttype>
				<texture isfakeshadow="1">shadows_selections\shadow_circle_32x32</texture>
				<selectedtexture>shadows_selections\selection_circle_32x32</selectedtexture>
				<width>1.0</width>
				<height>1.0</height>
				<selectionextrawidth>1.0</selectionextrawidth>
				<selectionextraheight>1.0</selectionextraheight>
			</decal>
		</component>

Now we track down Amelia’s file at Art\Units\spc\amelia_black\spc_amelia_black.xml and her file doesn’t use submodels so we would look for the ModelComp component.

<component>ModelComp<assetreference type="GrannyModel">
			<file>units\spc\amelia_black\amelia_black_spc</file>
		</assetreference>
		<decal>
			<effecttype>default</effecttype>
			<texture isfakeshadow="1">shadows_selections\shadow_circle_32x32</texture>
			<selectedtexture>shadows_selections\selection_hero_64x64</selectedtexture>
			<noncinematictexture>shadows_selections\shadow_hero_64x64</noncinematictexture>
			<width>1.50</width>
			<height>1.50</height>
		</decal>
		<attach a="shotgun"
		        frombone="MASTER"
		        tobone="Bip01 Prop1"
		        syncanims="0"/>
	</component>

We grab the GrannyModel assetreference (units\spc\amelia_black\amelia_black_spc) and put that into a villager submodel on the modded villager.xml, and then make sure our civ’s culture is using that submodel down in the component section. As long as the model you’re swapping in is rigged to use all the villager animations you’re good to go.

<component>Villager<assetreference type="GrannyModel">
				<file>units\spc\amelia_black\amelia_black_spc</file>
			</assetreference>
			<decal>
				<effecttype>default</effecttype>
				<texture isfakeshadow="1">shadows_selections\shadow_circle_32x32</texture>
				<selectedtexture>shadows_selections\selection_circle_32x32</selectedtexture>
				<width>1.0</width>
				<height>1.0</height>
				<selectionextrawidth>1.0</selectionextrawidth>
				<selectionextraheight>1.0</selectionextraheight>
			</decal>
		</component>

Expect shell shock when initially looking at animfiles, but once you get a grasp on them you can add your own submodels, add Tech logic so that WesternEurope culture looks like this unless you are age0newciv in which case it looks like that instead, etc. Using a program like Notepad++ to pretty print the animfiles can make it much easier to understand it.

The native_villager.xml may be a bit easier to comprehend as it’s only got two submodels in it. Not all models will have been rigged for all animations, so if you try to use one and it shows up invisible in-game then either the animations aren’t supported or you made a copy-paste or other formatting error.

1 Like

Wow. Thank you so very much for all of this wonderful information! I will have to reread it a few times and practice to fully grasp it but I will get there. Thank you for taking the time to teach me this! This is the main issue with my new civ. I really appreciate the help!
Going to go try this right now!

Edit: I have figured out some of this but thought I would leave most of this here still cause I still need to find out how to see who is capable of what animations, like who has the settler animations, etc… how can I find that out? My last reply is where I’m actually at now… I think I got it to work! /edit

I think my civ is using spanish villagers cause my homecity xml file the visuals are set to the spanish cause I copied that file from argentina mod and just renamed some stuff. So visual is spanish\spanish_homcity.xml and everything else says spanish in it somewhere but my villagers and buildings do look a lot like the dutch so unless spanish and dutch use the same buildings and villagers I’m not sure why. The only reason I say they look like the dutch is because the dutch is who I mainly play and I don’t ever play the spanish but I would be surprised if the spanish settlers looked like the dutch ones cause that wouldn’t make sense. I might just be wrong because I didn’t zoom in enough and maybe they do look somewhat the same.

In the extracted villagers.xml file I don’t see how I would know what to change since none say dutch or even spanish. I see Az, med, ee, we, Nat, Chn, Jpn, Ind, Eth, Hau villagers. I am not sure which villagers I’m using. If dutch and spanish are the same then maybe they are EE? or WE? I’m really bad at geography. Not sure which are considered med either…

But let’s say I figure out the ones I’m using are EE. I make this file called advsettler.xml and put it in the art\units or whatever folder (I’ll look and see where I’m suppose to put them and change the submodelref ref=“(whichever villager I want)” in the (easterneurope) section… so instead of pointing to ee_villager it will point to whatever the new one is I’m guessing, I think I got it, right?

What I really want to be able to do is what you put in your second half. Use a very different model! Like (just being silly here) but let’s say I wanted to use lazerbear for the advsettler… but because he don’t have any animations for gathering he could never work, right? No way to give him those animations I’m guessing…

So I got to find out who actually has all the animations needed… is there a simple way to see what animations a unit can do? If I was to guess, nobody but the settlers would have the farming and chopping trees animations so nothing but those could work for settlers, no? Does Amelia black have those animations? Is there a way I can see which ones she has? Thanks so much for taking the time to help me. I promise I won’t bother you anymore after this. I think I can figure it out once I have this info. You have been a huge help!

I tried searching the villager.xml for that line but it’s not in mine. :frowning: I was going to try changing that line to the amelia_black one and see what happened but I don’t have a line like that. If I search for just (component)Villager I get a ton of results (too many) but if I add (asset to the other side I get 0 hits. Not sure why I don’t have that line in my file.

okay, I think I got it to work. I just changed all the units\villagers(whatever) to units\spc\amelia_black and put the files where they needed to go and pointed the protomods.xml animation file for advsettler to advvillager.xml and when I make the new settler it’s a woman and she is wearing overalls each time? She doesn’t look that different than the settlers but she isn’t wearing a white thing on her head like the other female settlers so I’m thinking that must be her, right?!

If so, yay. Thanks for the help. I don’t know if I needed to extract the .gr2 file and .xml file for amelia_black and put them into art\units\spc\amelia_black\ folder in my mod folder but I did. Should I be okay if I delete those?

So she works because she has the right animations I’m guessing. If there is a way I can find who has the right animations for being a settler that would be awesome. I’m not sure where to look to find that. Other than that I think I understand what you told me now. Going to go back and delete the replies where I ask you questions that I figured out now. lol, sorry about that.

I hopefully won’t need any more help on this… oh, one other quick question… is there a way to add a prop to an already made unit? like go into their .xml and give them that glowing aura that explorers have? I noticed one mod did that with some of their normal units, they have a glowing aura and it’s neat. Or like give them something different so it’s not just the same units people have seen a million times before.

Anyway, thanks so much for the help. Much appreciated!! You are awesome!