Help with pawn texture

Started by Pink Omega, November 19, 2016, 03:20:01 PM

Previous topic - Next topic

Pink Omega

Hey guys, I'm a new modder (still a noob in modding) here and I was making mod that adds Velociraptors [those from isla sorna specifically] and i'm having a problem with the raptor's texture right now.
I don't know what's wrong by the way, take a look at the print in-game and in the mod files:
Any help appreciated. Thanks.
EDIT:heres the link for the mod if you guys want to test it, it is WIP so expect errors and bugs.
https://drive.google.com/open?id=0B3_ussYYY0qwN1VJb0Q0Y0U0ejg

[attachment deleted by admin due to age]

<=To Be Continued/\/

Thirite

Is that raptor a baby? The scaling caused by drawSize might be screwing up the graphics, particularly if you're using a relatively large sprite to begin with. Though I've never encountered this specific problem personally.

Pink Omega

Quote from: Thirite on November 19, 2016, 04:28:52 PM
Is that raptor a baby? The scaling caused by drawSize might be screwing up the graphics, particularly if you're using a relatively large sprite to begin with. Though I've never encountered this specific problem personally.
Nope. It is an adult one.  The drawSize of an adult is 2.5, and also, all the textures are 216x216.
Should I resize the textures or something?

<=To Be Continued/\/

Kapun

Try replacing raptor textures with another texture set from vanila or from a working mod. This way you can see if the problem is in the textures or in the code. Or you can download a mod that adds some animals and then replace the textures with your raptor's textures.

Pink Omega

Quote from: Kapun on November 20, 2016, 02:06:18 AM
Try replacing raptor textures with another texture set from vanila or from a working mod. This way you can see if the problem is in the textures or in the code. Or you can download a mod that adds some animals and then replace the textures with your raptor's textures.
I'll try that, thanks. But can I ask a question? How can I make a pawn that lays eggs? I can't find out what I have to do with that..Sorry for bothering ya :/

<=To Be Continued/\/

Kapun

Well i found this in vanila bird defs
  <ThingDef ParentName="BigBirdThingBase">
    <defName>Cassowary</defName>
    <label>cassowary</label>
    <description>A large flightless bird with brightly-colored feathers. While it looks beautiful, its kick is vicious.</description>
    <statBases>
      <MoveSpeed>4.5</MoveSpeed>
      <ComfyTemperatureMin>-8</ComfyTemperatureMin>
      <MarketValue>300</MarketValue>
    </statBases>
    <race>
      <herdAnimal>false</herdAnimal>
      <baseBodySize>0.9</baseBodySize>
      <baseHungerRate>0.3</baseHungerRate>
      <baseHealthScale>0.9</baseHealthScale>
      <foodType>VegetarianRoughAnimal</foodType>
      <wildness>0.80</wildness>
      <lifeExpectancy>45</lifeExpectancy>
      <leatherColor>(80,80,80)</leatherColor>
      <meatLabel>bird meat</meatLabel>
      <manhunterOnTameFailChance>0.030</manhunterOnTameFailChance>
    </race>
   <comps>
      <li Class="CompProperties_EggLayer">
        <eggFertilizedDef>EggCassowaryFertilized</eggFertilizedDef>
        <eggFertilizationCountMax>1</eggFertilizationCountMax>
        <eggLayIntervalDays>20</eggLayIntervalDays>
        <eggProgressUnfertilizedMax>0.5</eggProgressUnfertilizedMax>
        <eggCountRange>1</eggCountRange>
      </li>
    </comps>
    <verbs>
      <li>
        <verbClass>Verb_MeleeAttack</verbClass>
        <defaultCooldownTicks>100</defaultCooldownTicks>
        <meleeDamageBaseAmount>8</meleeDamageBaseAmount>
        <meleeDamageDef>Scratch</meleeDamageDef>
        <linkedBodyPartsGroup>Feet</linkedBodyPartsGroup>
        <surpriseAttack>
          <extraMeleeDamages>
            <li>
              <def>Stun</def>
              <amount>20</amount>
            </li>
          </extraMeleeDamages>
        </surpriseAttack>
      </li>
      <li>
        <verbClass>Verb_MeleeAttack</verbClass>
        <defaultCooldownTicks>110</defaultCooldownTicks>
        <meleeDamageBaseAmount>8</meleeDamageBaseAmount>
        <meleeDamageDef>Bite</meleeDamageDef>
        <linkedBodyPartsGroup>Beak</linkedBodyPartsGroup>
        <surpriseAttack>
          <extraMeleeDamages>
            <li>
              <def>Stun</def>
              <amount>20</amount>
            </li>
          </extraMeleeDamages>
        </surpriseAttack>
      </li>
    </verbs>
  </ThingDef>


This is the part about eggs
  <comps>
      <li Class="CompProperties_EggLayer">
        <eggFertilizedDef>EggCassowaryFertilized</eggFertilizedDef>
        <eggFertilizationCountMax>1</eggFertilizationCountMax>
        <eggLayIntervalDays>20</eggLayIntervalDays>
        <eggProgressUnfertilizedMax>0.5</eggProgressUnfertilizedMax>
        <eggCountRange>1</eggCountRange>
      </li>
    </comps>

Pink Omega

Quote from: Kapun on November 20, 2016, 10:17:35 AM
Well i found this in vanila bird defs
  <ThingDef ParentName="BigBirdThingBase">
    <defName>Cassowary</defName>
    <label>cassowary</label>
    <description>A large flightless bird with brightly-colored feathers. While it looks beautiful, its kick is vicious.</description>
    <statBases>
      <MoveSpeed>4.5</MoveSpeed>
      <ComfyTemperatureMin>-8</ComfyTemperatureMin>
      <MarketValue>300</MarketValue>
    </statBases>
    <race>
      <herdAnimal>false</herdAnimal>
      <baseBodySize>0.9</baseBodySize>
      <baseHungerRate>0.3</baseHungerRate>
      <baseHealthScale>0.9</baseHealthScale>
      <foodType>VegetarianRoughAnimal</foodType>
      <wildness>0.80</wildness>
      <lifeExpectancy>45</lifeExpectancy>
      <leatherColor>(80,80,80)</leatherColor>
      <meatLabel>bird meat</meatLabel>
      <manhunterOnTameFailChance>0.030</manhunterOnTameFailChance>
    </race>
   <comps>
      <li Class="CompProperties_EggLayer">
        <eggFertilizedDef>EggCassowaryFertilized</eggFertilizedDef>
        <eggFertilizationCountMax>1</eggFertilizationCountMax>
        <eggLayIntervalDays>20</eggLayIntervalDays>
        <eggProgressUnfertilizedMax>0.5</eggProgressUnfertilizedMax>
        <eggCountRange>1</eggCountRange>
      </li>
    </comps>
    <verbs>
      <li>
        <verbClass>Verb_MeleeAttack</verbClass>
        <defaultCooldownTicks>100</defaultCooldownTicks>
        <meleeDamageBaseAmount>8</meleeDamageBaseAmount>
        <meleeDamageDef>Scratch</meleeDamageDef>
        <linkedBodyPartsGroup>Feet</linkedBodyPartsGroup>
        <surpriseAttack>
          <extraMeleeDamages>
            <li>
              <def>Stun</def>
              <amount>20</amount>
            </li>
          </extraMeleeDamages>
        </surpriseAttack>
      </li>
      <li>
        <verbClass>Verb_MeleeAttack</verbClass>
        <defaultCooldownTicks>110</defaultCooldownTicks>
        <meleeDamageBaseAmount>8</meleeDamageBaseAmount>
        <meleeDamageDef>Bite</meleeDamageDef>
        <linkedBodyPartsGroup>Beak</linkedBodyPartsGroup>
        <surpriseAttack>
          <extraMeleeDamages>
            <li>
              <def>Stun</def>
              <amount>20</amount>
            </li>
          </extraMeleeDamages>
        </surpriseAttack>
      </li>
    </verbs>
  </ThingDef>


This is the part about eggs
  <comps>
      <li Class="CompProperties_EggLayer">
        <eggFertilizedDef>EggCassowaryFertilized</eggFertilizedDef>
        <eggFertilizationCountMax>1</eggFertilizationCountMax>
        <eggLayIntervalDays>20</eggLayIntervalDays>
        <eggProgressUnfertilizedMax>0.5</eggProgressUnfertilizedMax>
        <eggCountRange>1</eggCountRange>
      </li>
    </comps>

I already did that before, but this shows up: http://prntscr.com/d9lx1o take a look at what ive done with the egg thing: http://prnt.sc/d9lw4p The error message is saying that there's no thingDef named raptor egg, so where I should add this def?

<=To Be Continued/\/

Kapun

Do you have all the abstrats and bases you need? You have to define all the abstrats and bases you are using even if they are in vanila as they are not inheritable (see this https://ludeon.com/forums/index.php?topic=27431.0). Anyway you can just upload the mod somewhere so i can look for mistakes.

Pink Omega

Quote from: Kapun on November 20, 2016, 11:34:00 AM
Do you have all the abstrats and bases you need? You have to define all the abstrats and bases you are using even if they are in vanila as they are not inheritable (see this https://ludeon.com/forums/index.php?topic=27431.0). Anyway you can just upload the mod somewhere so i can look for mistakes.
Currently I don't know what is '' abstrats and bases '' thing, I swear, I started modding like two weeks ago, and also I used another mod (the mamuffalo mod) to begin with this one. Anyway, here's the link: https://drive.google.com/open?id=0B3_ussYYY0qwN1VJb0Q0Y0U0ejg

<=To Be Continued/\/

Kapun

Abstracts are pieces of basic information about an object. They are made to allow you to not write the same information about all simular objects. For example BaseMeleeWeapon abstract says a lot of things like that melee weapons rely on crafter smithing speed instead of tailoring speed (like apparel). You dont have to write all information every time you add an object.

So every time you write something like this   <ThingDef ParentName="EggFertBase"> - you have to tell the game what EggFertBase is cause if you dont that may cause problems. It Core there is a lot of examples. Suprisingly you have made a Races_Animal_Pet_Base.xml that contains the abstracts about animals that you need. So just make another one for the other stuff.

Also PawnKindDefs should probably be inside Defs catalog.

But i am not an expert and i can be wrong  :P

Pink Omega

Quote from: Kapun on November 20, 2016, 12:36:50 PM
Abstracts are pieces of basic information about an object. They are made to allow you to not write the same information about all simular objects. For example BaseMeleeWeapon abstract says a lot of things like that melee weapons rely on crafter smithing speed instead of tailoring speed (like apparel). You dont have to write all information every time you add an object.

So every time you write something like this   <ThingDef ParentName="EggFertBase"> - you have to tell the game what EggFertBase is cause if you dont that may cause problems. It Core there is a lot of examples. Suprisingly you have made a Races_Animal_Pet_Base.xml that contains the abstracts about animals that you need. So just make another one for the other stuff.

Also PawnKindDefs should probably be inside Defs catalog.

But i am not an expert and i can be wrong  :P
I didn't made the Races_Animal_Pet_Base at all XD, it came with the mod I used as base, I didn't know at all what it did actually, so I didn't messed with it. Anyway, how can I make another one for other stuff? I'm sorry for bothering you with that.

<=To Be Continued/\/

Kapun

Just look what abstracts you are using in your defs. Look for words like ParentName. Then copy the Abstracts you use from core. Lack of abstracts might be the reason why you have problems with the eggs. When you are done post the updated variant if it doesnt work.

Pink Omega

Quote from: Kapun on November 20, 2016, 12:48:45 PM
Just look what abstracts you are using in your defs. Look for words like ParentName. Then copy the Abstracts you use from core. Lack of abstracts might be the reason why you have problems with the eggs. When you are done post the updated variant if it doesnt work.
I did the items_bases thing, here: https://drive.google.com/open?id=0B3_ussYYY0qwN1VJb0Q0Y0U0ejg
Still giving me errors, can you point what is it? I think I just forgot something...

<=To Be Continued/\/

Kapun

I will look at it tomorrow evening.

Pink Omega

Quote from: Kapun on November 20, 2016, 03:07:18 PM
I will look at it tomorrow evening.
Ok, I'll try to fix it in this while.

<=To Be Continued/\/