[helpmepls] HeadTypes

Started by Switter, June 16, 2019, 07:47:41 AM

Previous topic - Next topic

Switter

I want to edit the xml file in the core to add new face types (Not a simple replacement of those that are already there, but the addition of new ones average1,2,3,4...) from different mods. But I do not know if this file is in defs and how it is called. Is it possible to do this in a simple way? I found the BodyTypes.xml file, where there are such lines

<bodyNakedGraphicPath>Things/Pawn/Humanlike/Bodies/Naked_Male</bodyNakedGraphicPath>
<bodyDessicatedGraphicPath>Things/Pawn/Humanlike/Bodies/Dessicated/Dessicated_Male</bodyDessicatedGraphicPath>

And the same file with hairstyles (RimWorld\Mods\Core\Defs\Misc\HairDefs). I saw a RealFace mod in which it's easy enough to add a new head (actually a hairstyle) just add the path to the texture and the texture itself.. But I just need the type of head, not the hairstyle.

The question is as follows. Is there a file in the RimWorld\Mods\Core\Defs where you can add a head type,for example

  <HeadTypeDef>
    <defName>Average_Male</defName>
    <HeadTypeGraphicPath>Things/Pawn/Humanlike/Heads/Male/Average_Male_South</HeadTypeGraphicPath>
    <HeadTypeGraphicPath>Things/Pawn/Humanlike/Heads/Male/Average_Male_North</HeadTypeGraphicPath>
    <HeadTypeGraphicPath>Things/Pawn/Humanlike/Heads/Male/Average_Male_East</HeadTypeGraphicPath>
  </HeadTypeDef>



Shinzy

There isn't an easy way of doing what you wish to do, you cannot add new heads (or body types for that matter) via xml

However! There's a mod 'alien framework' which might let you do this although I don't remember if you could actually affect human pawns with it :p
but it is possibly your best bet if you wish to work with xml only

Switter

#2
"you cannot add new heads (or body types for that matter)"
I can and I did it(body types https://imgur.com/GOrY9iG). Yes, they are not automatically selected when creating a new pawn(The game uses a standard set), BUT, they appeared in the game, they work and I can set them in the mod on the Character Editor.
I just added and renamed the textures and added these lines.
    <BodyTypeDef>
    <defName>Fat1</defName>
    <headOffset>(0.09, 0.34)</headOffset>
    <bodyNakedGraphicPath>Things/Pawn/Humanlike/Bodies/Naked_Fat1</bodyNakedGraphicPath>
<bodyDessicatedGraphicPath>Things/Pawn/Humanlike/Bodies/Dessicated/Dessicated_Male</bodyDessicatedGraphicPath>
  </BodyTypeDef>

In this way, you can add as many bodies as you need, although you will have to choose them yourself, but this method works. And you can add as many hairs, as you need, just edit some lines. 
Why is there no simple way to add a new type of head? :(


"There's a mod 'alien framework' which might let you do this"
I looked at the files in the Alien Framework and I do not know how / there is no easy way to add new types of heads.
  :(

Shinzy

The wiki might be helpful https://github.com/RimWorld-CCL-Reborn/AlienRaces/wiki
it may not be easy but it's still purely xml!


also I did not know that about the body types! I'd just assumed you couldn't as they don't show up on generated pawns ;D

anyway, I believe the head types are hardcoded and don't have modifiable files of their own, not atleast any that I've found in any of the core xmls